fn create_command_message(
internal_command: InternalCommand,
config: &ActuateControllinoConfig,
) -> Result<ControllinoMessage, RelayError>Expand description
Creates the message to be sent to Controllino based on an internal command.
This function translates a high-level InternalCommand into a low-level,
hardware-specific ControllinoMessage ready for serial transmission.
§Arguments
internal_command- TheInternalCommandspecifying the device and action.config- A reference to theActuateControllinoConfigfor device-to-relay mappings.
§Returns
A Result containing the constructed ControllinoMessage on success.
§Errors
Returns a RelayError if the internal_command is not applicable for actuation
(e.g., ResetAllErrors) or if get_relay_command fails for other reasons.