pub struct ControllinoMessageContent {
pub command: char,
pub id: u8,
pub reserved1: u8,
pub payload: u16,
pub reserved2: char,
}Expand description
Container for message content sent to Controllino
Fields§
§command: charSet by control application with command sent to Controllino
id: u8Set by control application with id (e.g., for relay) of an element sent to Controllino
reserved1: u8Unused byte
payload: u16Either used to communicate pulse duration in milliseconds to Controllino or set by Controllino with data to be sent back to control application
reserved2: charUnused byte
Implementations§
Source§impl ControllinoMessageContent
impl ControllinoMessageContent
Sourcepub fn new(
command: char,
id: u8,
duration_millis: u16,
) -> ControllinoMessageContent
pub fn new( command: char, id: u8, duration_millis: u16, ) -> ControllinoMessageContent
Provides a new ControllinoMessageContent struct.
This struct serves as a container for the data that will eventually be
assembled into a full ControllinoMessage for serial transmission.
It initializes the message content with the specified command, ID, and
pulse duration, setting reserved bytes to zero.
§Arguments
command- The character representing the command to be sent to Controllino.id- The identifier for the relay or digital output relevant to the command.duration_millis- The pulse duration in milliseconds, or0if not applicable to the command.
Auto Trait Implementations§
impl Freeze for ControllinoMessageContent
impl RefUnwindSafe for ControllinoMessageContent
impl Send for ControllinoMessageContent
impl Sync for ControllinoMessageContent
impl Unpin for ControllinoMessageContent
impl UnwindSafe for ControllinoMessageContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more