action-sender

This example plug-in can be used to send actions to MERLIC. The plug-in 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" plug-in 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" plug-in 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" plug-in uses the Boost.ASIO library for portable networking. Boost 1.73 or newer should be installed to build and use this plug-in. In addition, at least Python 3.7 or higher is required to use this plug-in.

The "action-sender" plug-in 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 Plug-ins.