[Twisted-Python] Custom protocol : good practices and complexity?
Mark "Ckaos" Moissette
kaosat.dev at gmail.com
Sat Aug 20 15:08:52 MDT 2011
I am currently working on a control system for Arduino type devices using
Twisted,and have a bit of a design issue
Hello everyone!
I am currently working on a control system for Arduino type devices using
Twisted,and have a bit of a design issue
Here is how things are currently: (sorry in advance, might be a bit long)
1. to handle different type of devices (each having a different firmware
& communication protocol ) i have a designed a "driver" system :
- each driver is made of :
- a "hardware handler class" : a wrapper around Twsited's
*serial* class
with a few added helper methods
- a custom serial protocol
2- While implementing drivers for Reprap 3d printers (also based on arduino,
also using a serial connection) with rather specific protocols (generally
containing comands like *enqueue* point, *set* temperature etc), i have
started to wonder if i am placing the methods for handling those features
(each having specific commands) in the right place..
This all leads me to a few questions:
While all things are working right now,I am not quite sure about the "good
practices" as far asTwisted protocols go , but having looked through the
documentation / code of quite a few of them, it seems they tend to have
relatively few methods/keep it simple.
- is this always the case? should the protocol *only* be used for very
low level functions and in/out formatting and communication ?
- certain devices i want to manage have very clearly defined protocols
(Makerbot etc), should i consider general protocol specifications to be a
different thing then the actual Twisted protocol classes i am creating ?
Any advice, tips and pointers are more than welcome ! Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20110820/4ec2bb21/attachment.html>
More information about the Twisted-Python
mailing list