Struct opc::Message
[−]
[src]
pub struct Message { pub channel: u8, pub command: Command, }
Describes a single message that follows the OPC protocol
Fields
channel: u8
Up to 255 separate strands of pixels can be controlled. Channel 0 are considered broadcast messages. Channels number from 1 to 255 are for each strand and listen for messages with that channel number.
command: Command
Designates the message type
Methods
impl Message
[src]
fn from_pixels(ch: u8, pixels: &[[u8; 3]]) -> Message
Create new Message Instance from Pixel Array
fn from_data(ch: u8, id: &[u8; 2], data: &[u8]) -> Message
Create new Message Instance from Data Array
fn len(&self) -> usize
Check Message Data Length
fn is_valid(&self) -> bool
Check is Message has a valid size
fn is_broadcast(&self) -> bool
Check if Message is a broadcast message
Trait Implementations
impl Clone for Message
[src]
fn clone(&self) -> Message
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more