Handles the operation-specific logic of a rosbridge message
May define one or more opcodes to handle, for example 'publish' or 'call_service'
Each connected client receives its own capability instance, which are managed by the client's own protocol instance.
Protocol.send() is available to send messages back to the client.
Method | __init__ |
Abstract class constructor. All capabilities require a handle to the containing protocol. |
Method | basic |
Performs basic typechecking on fields in msg. |
Method | finish |
Notify this capability that the client is finished and that it's time to free up resources. |
Method | handle |
Handle an incoming message. |
Instance Variable | protocol |
Undocumented |
Abstract class constructor. All capabilities require a handle to the containing protocol.
Keyword arguments: protocol -- the protocol instance for this capability instance
Performs basic typechecking on fields in msg.
Keyword arguments: msg -- a message, deserialized into a dictoinary types_info -- a list of tuples (mandatory, fieldname, fieldtype) where
mandatory - boolean, is the field mandatory fieldname - the name of the field in the message fieldtypes - the expected python type of the field or list of types
Throws: MissingArgumentException -- if a field is mandatory but not present in the message InvalidArgumentException -- if a field is present but not of the type specified by fieldtype