Commit Graph

5 Commits (v1.5)

Author SHA1 Message Date
Thibaut Vermeulen 26bec663d2 control server for python: add control action handler for operate server 3 years ago
Mikael Bourhis e47601a81e Python wrapper: about the wrapped callbacks, maintain a 'map' of subscribers
The 'callback' function is a part of the 'Subscriber' class.
Once the 'event' (or asynchronous message) is received, the 'Subscriber' object
forwards the data to the 'Handler' object.
With this approach, the 'event' processing algorithm can be defined
in a Python subclass by the user.

Each 'subscriber' class has a function that matches the C function pointer.
But this function is a static method, shared with all instances of the class.
In order to dispatch the message/data to the right instance,
we maintain a dictionary of instantiated objects.

Therfore, we have added the following internal services :
 * bool registerNewSubscriber(EventSubscriber*, id);
 * EventSubscriber* findSubscriber(id);
 * void unregisterSubscriber(id);
5 years ago
Mikael Bourhis b1fc481ab8 Python wrapper: add some quality improvements 5 years ago
Mikael Bourhis da9b77af7a Python wrapper: add handler class for the reception of CommandTermination events 5 years ago
Mikael Bourhis 401a436c95 Python wrapper: move the 'event handler' classes into a subdirectory 5 years ago