Struct resol_vbus::PacketSpec
[−]
[src]
pub struct PacketSpec { pub packet_id: String, pub channel: u8, pub destination_address: u16, pub source_address: u16, pub command: u16, pub destination_device: Arc<DeviceSpec>, pub source_device: Arc<DeviceSpec>, pub name: String, pub fields: Vec<PacketFieldSpec>, }
Contains information about a VBus packet and its fields.
Fields
packet_id: String
A packet identifier.
channel: u8
The VBus channel to packet was sent to.
destination_address: u16
The destination VBus address the packet was sent to.
source_address: u16
The source VBus address to packet was send from.
command: u16
The VBus command of the packet.
destination_device: Arc<DeviceSpec>
The DeviceSpec
containing information about the destination VBus device.
source_device: Arc<DeviceSpec>
The DeviceSpec
containing information about the source VBus device.
name: String
The name of the packet, containing channel, source and optionally destination names.
fields: Vec<PacketFieldSpec>
The fields contained in the frame payload of the VBus packet.
Methods
impl PacketSpec
[src]
fn get_field_spec(&self, id: &str) -> Option<&PacketFieldSpec>
Get a PacketFieldSpec
by its field ID.