Struct resol_vbus::specification::DeviceSpec[][src]

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.