z25 / pyZOCP

Python ZOCP implementation (Z25 Orchestration Control Protocol)
GNU Lesser General Public License v3.0
32 stars 5 forks source link

Allow custom message handlers, extending the basic ZOCP protocol #73

Closed fieldOfView closed 9 years ago

fieldOfView commented 9 years ago

The current implementation almost (but not quite) allows for adding handlers for custom messages besides the ZOCP messages (GET, MOD, SIG, SUB, UNSUB, etc). In the current implementation a node can add a custom handler (handle_SMTHNG()), but any node not implementing that handler and receiving a SMTHNG message will raise an exception. This patch replaces that exception with a warning, allowing the node to continue, ignoring the custom message.

An example of a custom message implementation can be seen here: https://github.com/fieldOfView/pyZTime This example uses custom messages (DTIME_GET and DTIME_REP) to implement a distributed timer.

fieldOfView commented 9 years ago

Closing this, since this way of extending the protocol is not in the charts for now.