[Twisted-Python] documentation

I am sorry if I sound stupid or you feel I may not be looking hard enough in the current documentation, however I am looking for documentation on the transport attribute that is available to the t.i.p.Protocol class. I don't see anything about this attribute, so If i hadn't seen code examples I would not have known it was even available. Again I apologize if I am missing something here, can someone shed some light. Thanks, -Lee

On Wed, 21 Feb 2007 20:33:54 -0500, Lee Connell <lee.a.connell@gmail.com> wrote:
You're looking for ITransport documentation, probably. ITransport is the interface which defines the behavior of the transport attribute of Protocol instances. You can find it here: http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.I... It is probably true that much of the documentation assumes that you already know that a protocol's transport attribute is one of these, so it uses it without explaining it. Jean-Paul

Hi. Just need a small tip, how to send a string by UDP, should I use socket from python or can I use any twisted class. BTW: Put together a rough code for reciving a string of data from simulink ( matlab ) to a H3D ( Haptic Interactive X3D ) application www.h3d.org #import H3D fields and types from H3DInterface import * recived_vect = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] class Set_Position( AutoUpdate( SFVec3f ) ): def update( self,event ): set_pos[1] = recived_vect[2] set_pos[2] = recived_vect[3] set_pos[3] = recived_vect[4] return set_pos set_a_position=Set_position() class Speedo_value( AutoUpdate( SFVec3f ) ): def update( self,event ): set_rot[1] = 0.0 set_rot[2] = 0.0 set_rot[3] = recived_vect[1] return set_rot set_speedo=Speedo_value() from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor class Recive_UDP_Package(DatagramProtocol): def datagramRecived(self, data): recived_vect=data # need to work on this to convert the data string to list element set_a_position() set_speedo() reactor.listenUDP(7999, Recived_UDP_Package()) reactor.run()

On Sun, 25 Feb 2007 20:52:47 +0100, Sven-Erik Tiberg <sven-erik.tiberg@ltu.se> wrote:
After this port is set up, the Recived_UDP_Package instance will have a 'transport' attribute which you can use to send UDP packets. For details, see: http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.I... Jean-Paul

On Wed, 21 Feb 2007 20:33:54 -0500, Lee Connell <lee.a.connell@gmail.com> wrote:
You're looking for ITransport documentation, probably. ITransport is the interface which defines the behavior of the transport attribute of Protocol instances. You can find it here: http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.I... It is probably true that much of the documentation assumes that you already know that a protocol's transport attribute is one of these, so it uses it without explaining it. Jean-Paul

Hi. Just need a small tip, how to send a string by UDP, should I use socket from python or can I use any twisted class. BTW: Put together a rough code for reciving a string of data from simulink ( matlab ) to a H3D ( Haptic Interactive X3D ) application www.h3d.org #import H3D fields and types from H3DInterface import * recived_vect = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] class Set_Position( AutoUpdate( SFVec3f ) ): def update( self,event ): set_pos[1] = recived_vect[2] set_pos[2] = recived_vect[3] set_pos[3] = recived_vect[4] return set_pos set_a_position=Set_position() class Speedo_value( AutoUpdate( SFVec3f ) ): def update( self,event ): set_rot[1] = 0.0 set_rot[2] = 0.0 set_rot[3] = recived_vect[1] return set_rot set_speedo=Speedo_value() from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor class Recive_UDP_Package(DatagramProtocol): def datagramRecived(self, data): recived_vect=data # need to work on this to convert the data string to list element set_a_position() set_speedo() reactor.listenUDP(7999, Recived_UDP_Package()) reactor.run()

On Sun, 25 Feb 2007 20:52:47 +0100, Sven-Erik Tiberg <sven-erik.tiberg@ltu.se> wrote:
After this port is set up, the Recived_UDP_Package instance will have a 'transport' attribute which you can use to send UDP packets. For details, see: http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.I... Jean-Paul
participants (3)
-
Jean-Paul Calderone
-
Lee Connell
-
Sven-Erik Tiberg