pub struct Device {Show 17 fields
pub identifier: ObjectIdentifier,
pub object_name: String,
pub object_type: ObjectType,
pub system_status: DeviceStatus,
pub vendor_name: String,
pub vendor_identifier: u16,
pub model_name: String,
pub firmware_revision: String,
pub application_software_version: String,
pub protocol_version: u8,
pub protocol_revision: u8,
pub protocol_services_supported: ProtocolServicesSupported,
pub object_types_supported: Vec<ObjectType>,
pub max_apdu_length_accepted: u16,
pub segmentation_supported: Segmentation,
pub device_address_binding: Vec<AddressBinding>,
pub database_revision: u32,
}Expand description
Device object implementation
Fields§
§identifier: ObjectIdentifierObject identifier
object_name: StringObject name (required property)
object_type: ObjectTypeObject type (always Device)
system_status: DeviceStatusSystem status
vendor_name: StringVendor name
vendor_identifier: u16Vendor identifier
model_name: StringModel name
firmware_revision: StringFirmware revision
application_software_version: StringApplication software version
protocol_version: u8Protocol version (always 1)
protocol_revision: u8Protocol revision
protocol_services_supported: ProtocolServicesSupportedProtocol services supported
object_types_supported: Vec<ObjectType>Object types supported
max_apdu_length_accepted: u16Maximum APDU length accepted
segmentation_supported: SegmentationSegmentation support
device_address_binding: Vec<AddressBinding>Device address binding (for routing)
database_revision: u32Database revision
Implementations§
Source§impl Device
impl Device
Sourcepub fn add_supported_object_type(&mut self, object_type: ObjectType)
pub fn add_supported_object_type(&mut self, object_type: ObjectType)
Add an object type to the supported list
Sourcepub fn get_vendor_info(&self) -> Option<VendorInfo>
pub fn get_vendor_info(&self) -> Option<VendorInfo>
Get the vendor information for this device
Sourcepub fn get_official_vendor_name(&self) -> Option<&'static str>
pub fn get_official_vendor_name(&self) -> Option<&'static str>
Get the official vendor name from the vendor ID
Sourcepub fn set_vendor_by_id(&mut self, vendor_id: u16) -> Result<()>
pub fn set_vendor_by_id(&mut self, vendor_id: u16) -> Result<()>
Set vendor information using an official vendor ID
Sourcepub fn set_vendor_name(&mut self, name: String)
pub fn set_vendor_name(&mut self, name: String)
Set vendor information with custom name (preserves vendor ID)
Sourcepub fn is_vendor_id_official(&self) -> bool
pub fn is_vendor_id_official(&self) -> bool
Check if the current vendor ID is officially assigned
Sourcepub fn is_vendor_id_test(&self) -> bool
pub fn is_vendor_id_test(&self) -> bool
Check if the current vendor ID is reserved for testing
Sourcepub fn format_vendor_display(&self) -> String
pub fn format_vendor_display(&self) -> String
Get a formatted string showing vendor information