pub struct DeviceSpec {
pub device_id: String,
pub channel: u8,
pub self_address: u16,
pub peer_address: Option<u16>,
pub name: String,
}
Expand description
Contains information about a VBus device.
§Examples
use resol_vbus::{SpecificationFile, Specification, Language};
let spec = Specification::from_file(SpecificationFile::new_default(), Language::De);
let device_spec = spec.get_device_spec(0x00, 0x7E11, 0x0010);
assert_eq!("00_7E11", device_spec.device_id);
assert_eq!(0, device_spec.channel);
assert_eq!(0x7E11, device_spec.self_address);
assert_eq!(None, device_spec.peer_address);
assert_eq!("DeltaSol MX [Regler]", device_spec.name);
Fields§
§device_id: String
A device identifier.
channel: u8
The VBus channel the device is attached to.
self_address: u16
The VBus address of the device itself.
peer_address: Option<u16>
Optionally the VBus address of the device’s peer.
name: String
The name of the device.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceSpec
impl RefUnwindSafe for DeviceSpec
impl Send for DeviceSpec
impl Sync for DeviceSpec
impl Unpin for DeviceSpec
impl UnwindSafe for DeviceSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more