action-sender
This example plugin can be used to send actions to MERLIC. The plugin opens a socket on port 65432 and listens for a six-byte messages in a very simple custom protocol:
- 1 byte magic number "\x42"
- 1 byte encoding the type of action
- 4 bytes action-specific payload: either an unsigned 32-bit integer for the mode ID for "SelectMode", or a signed 32-bit integer for the a recipe ID.
The Python script "comm-send.py" can be used to write these messages to the socket.
Type "comm-send.py --help" for usage information.
Once the "action-sender" plugin receives a message corresponding to an action, it will queue the action to MERLIC RTE. A message sent using "comm-send.py GetRecipeList" will instead query the list of available recipes and print it to the command line.
Since the "action-sender" plugin does not receive events, it identifies its capabilities as eMVCapabilities_Control. It can be started via the "Communication" tab of the MERLIC RTE Setup.
The "action-sender" plugin uses the Boost.ASIO library for portable networking. Boost 1.73 or newer should be installed to build and use this plugin. In addition, at least Python 3.7 or higher is required to use this plugin.
The "action-sender" plugin allows configuring a port in addition to the ports used by MERLIC within the dynamic port range 49152 - 65535. The default port is 65432. For more information see the topic Additional Settings for Communication Plugins.