Trait frcds::ds_to_rio::udp::tags::Tag

source ·
pub trait Tag: Debug {
    fn id(&self) -> u8;
    fn data(&self) -> Vec<u8>;

    fn construct(&self) -> Vec<u8> { ... }
}

Required Methods

Provided Methods

constructs the tag for sending by packet

Examples
use frcds::ds_to_rio::udp::tags::Tag;
let tag = frcds::ds_to_rio::udp::tags::Countdown(12.2); //can be any tag
assert_eq!(tag.construct(), vec![0x05,0x07,0x41,0x43,0x33,0x33]);

Implementors