pub enum HostEvent {
Show 19 variants
Started {
outcome: StartOutcome,
network: NetworkInfo,
adapter: AdapterInfo,
},
PermitJoin {
seconds: u8,
via: Option<Ieee>,
},
DeviceJoined {
ieee: Ieee,
nwk: NodeId,
rejoin: bool,
},
DeviceAnnounced {
ieee: Ieee,
nwk: NodeId,
},
OtaQuery {
ieee: Ieee,
current_version: u32,
available: Option<u32>,
},
OtaProgress {
ieee: Ieee,
percent: u8,
},
OtaFinished {
ieee: Ieee,
from: u32,
to: u32,
success: bool,
status: u8,
},
ChannelChanged {
network: NetworkInfo,
},
DeviceLeft {
ieee: Ieee,
},
DeviceRemoved {
ieee: Ieee,
reason: String,
},
InterviewStarted {
ieee: Ieee,
},
InterviewStep {
ieee: Ieee,
stage: InterviewStage,
},
InterviewDone {
device: Box<Device>,
},
InterviewFailed {
ieee: Ieee,
stage: InterviewStage,
error: String,
},
Attributes {
ieee: Ieee,
endpoint: u8,
cluster: u16,
attributes: Vec<(u16, Value)>,
lqi: u8,
},
Command {
ieee: Ieee,
endpoint: u8,
cluster: u16,
command: u8,
name: Option<&'static str>,
fields: Vec<(&'static str, Value)>,
from_server: bool,
},
Frame {
ieee: Ieee,
link: FrameLink,
frame: Vec<u8>,
},
BackupWritten {
path: PathBuf,
},
AdapterFailed {
reason: String,
},
}Expand description
What happened on the network.
Variants§
Started
The network is up.
Fields
outcome: StartOutcomeResumed, formed or restored.
network: NetworkInfoThe network.
adapter: AdapterInfoThe NCP.
PermitJoin
Joining opened (seconds > 0) or closed.
Fields
DeviceJoined
A device joined or rejoined.
DeviceAnnounced
A device announced itself (after joining or a power cycle).
OtaQuery
A device asked for an OTA image (on its own, or after
Host::ota_check or Host::ota_update).
Fields
OtaProgress
An OTA download advanced (every 10%).
OtaFinished
An OTA upgrade ended.
Fields
ChannelChanged
The network moved to another channel.
Fields
network: NetworkInfoThe network now.
DeviceLeft
A device left the network.
DeviceRemoved
The host removed a device.
InterviewStarted
An interview started or resumed.
InterviewStep
An interview step finished.
InterviewDone
An interview finished.
InterviewFailed
An interview stopped on a failure; it resumes when the device next talks.
Attributes
Attribute values arrived (a report, or an unsolicited read response).
Fields
Command
A device sent a cluster command (a remote’s button, an alarm).
Fields
Frame
A ZCL frame from a device, exactly as received, with how it arrived.
Sent for every frame that is not a reply to the host’s own request,
before the decoded HostEvent::Attributes or
HostEvent::Command, so a device library can decode what the
host does not.
Fields
BackupWritten
A backup was written.
AdapterFailed
The NCP failed; the host has stopped. Restart it.