pub struct SimDevice {
pub ieee: Ieee,
pub router: bool,
pub sleepy: bool,
pub legacy: bool,
pub install_code_key: Option<Key>,
pub manufacturer_code: u16,
pub endpoints: Vec<SimEndpoint>,
pub lqi: u8,
pub rssi: i8,
pub pairing: bool,
pub firmware: Option<SimFirmware>,
}Expand description
A simulated device.
Fields§
§ieee: IeeeIEEE address.
router: boolA router (true) or an end device.
sleepy: boolThe receiver is off when idle (a sleepy end device).
legacy: boolDoes not request a unique link key after joining (pre-Zigbee 3.0).
install_code_key: Option<Key>Joins only with this install code key.
manufacturer_code: u16Manufacturer code in the node descriptor.
endpoints: Vec<SimEndpoint>Endpoints.
lqi: u8Link quality the coordinator hears it at.
rssi: i8Signal strength the coordinator hears it at.
pairing: boolJoin when the network opens (a powered-on device in pairing mode).
firmware: Option<SimFirmware>Its firmware, for devices that take OTA upgrades (an OTA Upgrade client cluster).
Implementations§
Source§impl SimDevice
impl SimDevice
Sourcepub fn temperature_humidity_sensor(ieee: Ieee) -> SimDevice
pub fn temperature_humidity_sensor(ieee: Ieee) -> SimDevice
A battery temperature and humidity sensor (sleepy end device).
Sourcepub fn contact_sensor(ieee: Ieee) -> SimDevice
pub fn contact_sensor(ieee: Ieee) -> SimDevice
A door contact sensor using an IAS zone (sleepy end device).
Source§impl SimDevice
impl SimDevice
Sourcepub fn handle_zdo(
&self,
nwk: NodeId,
state: &mut DeviceState,
cluster: u16,
payload: &[u8],
coordinator: Ieee,
) -> Reaction
pub fn handle_zdo( &self, nwk: NodeId, state: &mut DeviceState, cluster: u16, payload: &[u8], coordinator: Ieee, ) -> Reaction
Handle a ZDO request addressed to this device.
Sourcepub fn handle_zcl(
&mut self,
state: &mut DeviceState,
endpoint: u8,
cluster: u16,
source_endpoint: u8,
payload: &[u8],
) -> Reaction
pub fn handle_zcl( &mut self, state: &mut DeviceState, endpoint: u8, cluster: u16, source_endpoint: u8, payload: &[u8], ) -> Reaction
Handle a ZCL frame addressed to one of this device’s endpoints. Changed attributes that are configured for reporting are reported.
Sourcepub fn set_attribute(
&mut self,
state: &mut DeviceState,
endpoint: u8,
cluster: u16,
attribute: u16,
value: Value,
) -> Vec<Outgoing>
pub fn set_attribute( &mut self, state: &mut DeviceState, endpoint: u8, cluster: u16, attribute: u16, value: Value, ) -> Vec<Outgoing>
Set an attribute; returns the report frames its reporting configuration and bindings call for.