Struct resol_vbus::specification_file::SpecificationFile [−][src]
pub struct SpecificationFile {
pub datecode: i32,
pub texts: Vec<String>,
pub localized_texts: Vec<LocalizedText>,
pub units: Vec<Unit>,
pub device_templates: Vec<DeviceTemplate>,
pub packet_templates: Vec<PacketTemplate>,
}
Expand description
Contains the information from a VSF1 file.
Fields
datecode: i32
Date of VSF creation in format ‘YYYMMDD’
texts: Vec<String>
List of texts.
localized_texts: Vec<LocalizedText>
List of localized texts.
units: Vec<Unit>
List of units.
device_templates: Vec<DeviceTemplate>
List of device templates.
packet_templates: Vec<PacketTemplate>
List of packet templates.
Implementations
Construct a new SpecificationFile
from a byte slice of VSF1 data.
Construct a new SpecificationFile
from the embedded default VSF data.
Get text by its index.
Get localized text by its index and language.
Get UnitFamily
by its ID.
Get Unit
by its index.
Get Unit
by unit code.
Get Type
by its ID.
pub fn find_device_template(
&self,
self_address: u16,
peer_address: u16
) -> Option<&DeviceTemplate>
pub fn find_device_template(
&self,
self_address: u16,
peer_address: u16
) -> Option<&DeviceTemplate>
Find a DeviceTemplate
matching the self and peer addresses.
pub fn find_packet_template(
&self,
destination_address: u16,
source_address: u16,
command: u16
) -> Option<&PacketTemplate>
pub fn find_packet_template(
&self,
destination_address: u16,
source_address: u16,
command: u16
) -> Option<&PacketTemplate>
Find a PacketTemplate
matching the destination and source addresses as well as the command.