Trees | Indices | Help |
|
---|
|
asyncore.dispatcher --+ | SpecConnectionDispatcher
SpecConnection class
Signals: connected() -- emitted when the required Spec version gets connected disconnected() -- emitted when the required Spec version gets disconnected replyFromSpec(reply id, SpecReply object) -- emitted when a reply comes from the remote Spec error(error code) -- emitted when an error event is received from the remote Spec
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Constructor Arguments: specVersion -- a 'host:port' string
|
|
|
Establish a connection to Spec If the connection is already established, do nothing. Otherwise, create a socket object and try to connect. If we are in port scanning mode, try to connect using a port defined in the range from MIN_PORT to MAX_PORT |
Register a channel Tell the remote Spec we are interested in receiving channel update events. If the channel is not already registered, create a new SpecChannel object, and connect the channel 'valueChanged' signal to the receiver slot. If the channel is already registered, simply add a connection to the receiver slot. Arguments: chanName -- a string representing the channel name, i.e. 'var/toto' receiverSlot -- any callable object in Python Keywords arguments: registrationFlag -- internal flag dispatchMode -- can be SpecEventsDispatcher.UPDATEVALUE (default) or SpecEventsDispatcher.FIREEVENT, depending on how the receiver slot will be called. UPDATEVALUE means we don't mind skipping some channel update events as long as we got the last one (for example, a motor position). FIREEVENT means we want to call the receiver slot for every event. |
Unregister a channel Arguments: chanName -- a string representing the channel to unregister, i.e. 'var/toto' |
Return a channel object If the required channel is already registered, return it. Otherwise, return a new 'temporary' unregistered SpecChannel object ; reference should be kept in the caller or the object will get dereferenced. Arguments: chanName -- a string representing the channel name, i.e. 'var/toto' |
Handle 'close' event on socket.
|
Handle an uncaught error.
|
Handle 'read' events on socket Messages are built from the read calls on the socket.
|
Check remote Spec version If we are in port scanning mode, check if the name from Spec corresponds to our required Spec version. |
|
Return True if socket should be written.
|
Handle 'connect' event on socket Send a HELLO message.
|
Handle 'write' events on socket Send all the messages from the queue.
|
Send a command message to the remote Spec server, and return the reply id. Arguments: cmd -- command string, i.e. '1+1' |
Send a command message to the remote Spec server using the new 'func' feature, and return the reply id. Arguments: cmd -- command string |
Send a command message to the remote Spec server. Arguments: cmd -- command string, i.e. 'mv psvo 1.2' |
Send a command message to the remote Spec server using the new 'func' feature Arguments: cmd -- command string |
Send a channel read message, and return the reply id. Arguments: chanName -- a string representing the channel name, i.e. 'var/toto' |
Send a channel write message. Arguments: chanName -- a string representing the channel name, i.e. 'var/toto' value -- channel value |
Send a channel register message. Arguments: chanName -- a string representing the channel name, i.e. 'var/toto' |
Send a channel unregister message. Arguments: chanName -- a string representing the channel name, i.e. 'var/toto' |
Send a message to the remote Spec, and return the reply id. The reply object is added to the registeredReplies dictionary, with its reply id as the key. The reply id permits then to register for the reply using the 'registerReply' method. Arguments: reply -- SpecReply object which will receive the reply message -- SpecMessage object defining the message to send |
Send a message to the remote Spec. If a reply is sent depends only on the message, and not on the method to send the message. Using this method, any reply is lost. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 20 03:53:37 2014 | http://epydoc.sourceforge.net |