Base class for all messages sent by RIDE. More...
Public Member Functions | |
| def | __init__ (self, **kwargs) |
| Initializes message based on given keyword arguments. More... | |
| def | publish (self) |
| Publishes the message. More... | |
| def | topic (cls) |
Static Public Attributes | |
| list | data = [] |
Static Private Attributes | |
| _topic | |
Base class for all messages sent by RIDE.
:CVariables:
topic
Topic of this message. If not overridden, value is got from the class
name by lowercasing it, separating words with a dot and dropping possible
``Message`` from the end. For example classes ``MyExample`` and
``AnotherExampleMessage`` get titles ``my.example`` and
``another.example``, respectively.
data
Names of attributes this message provides. These must be given as
keyword arguments to `__init__` when an instance is created.
Definition at line 37 of file messages.py.
| def robotide.publish.messages.RideMessage.__init__ | ( | self, | |
| ** | kwargs | ||
| ) |
Initializes message based on given keyword arguments.
Names of the given keyword arguments must match to names in `data`
class attribute, otherwise the initialization fails.
Must be called explicitly by subclass if overridden.
Definition at line 52 of file messages.py.
| def robotide.publish.messages.RideMessage.publish | ( | self | ) |
Publishes the message.
All listeners that have subscribed to the topic of this message will be
called with the this instance as an argument.
Notifications are sent sequentially. Due to the limitations of current
implementation, if any of the listeners raises an exception, subsequent
listeners will not get the notification.
Definition at line 77 of file messages.py.
| def robotide.publish.messages.RideMessage.topic | ( | cls | ) |
Definition at line 58 of file messages.py.
|
staticprivate |
Definition at line 42 of file messages.py.
|
static |
Definition at line 43 of file messages.py.