pub struct Status {
pub raw: u32,
pub legacy: bool,
}Expand description
A status code from the NCP.
Version 13 sends 8-bit EmberStatus codes, version 14 and later 32-bit
sl_status_t; legacy says which space raw is in. Use the predicates
rather than comparing raw.
Fields§
§raw: u32The code as sent.
legacy: boolTrue for an 8-bit EmberStatus (or EzspStatus) code.
Implementations§
Source§impl Status
impl Status
Sourcepub fn ok(v: ProtocolVersion) -> Status
pub fn ok(v: ProtocolVersion) -> Status
ok in the given version’s code space.
Sourcepub fn fail(v: ProtocolVersion) -> Status
pub fn fail(v: ProtocolVersion) -> Status
fail in the given version’s code space.
Sourcepub fn invalid_parameter(v: ProtocolVersion) -> Status
pub fn invalid_parameter(v: ProtocolVersion) -> Status
invalid_parameter in the given version’s code space.
Sourcepub fn is_invalid_parameter(&self) -> bool
pub fn is_invalid_parameter(&self) -> bool
True for invalid_parameter.
Sourcepub fn not_found_sl(v: ProtocolVersion) -> Status
pub fn not_found_sl(v: ProtocolVersion) -> Status
not_found_sl in the given version’s code space.
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
True for not_found_sl.
Sourcepub fn not_joined(v: ProtocolVersion) -> Status
pub fn not_joined(v: ProtocolVersion) -> Status
not_joined in the given version’s code space.
Sourcepub fn is_not_joined(&self) -> bool
pub fn is_not_joined(&self) -> bool
True for not_joined.
Sourcepub fn network_up(v: ProtocolVersion) -> Status
pub fn network_up(v: ProtocolVersion) -> Status
network_up in the given version’s code space.
Sourcepub fn is_network_up(&self) -> bool
pub fn is_network_up(&self) -> bool
True for network_up.
Sourcepub fn network_down(v: ProtocolVersion) -> Status
pub fn network_down(v: ProtocolVersion) -> Status
network_down in the given version’s code space.
Sourcepub fn is_network_down(&self) -> bool
pub fn is_network_down(&self) -> bool
True for network_down.
Sourcepub fn network_opened(v: ProtocolVersion) -> Status
pub fn network_opened(v: ProtocolVersion) -> Status
network_opened in the given version’s code space.
Sourcepub fn is_network_opened(&self) -> bool
pub fn is_network_opened(&self) -> bool
True for network_opened.
Sourcepub fn network_closed(v: ProtocolVersion) -> Status
pub fn network_closed(v: ProtocolVersion) -> Status
network_closed in the given version’s code space.
Sourcepub fn is_network_closed(&self) -> bool
pub fn is_network_closed(&self) -> bool
True for network_closed.
Sourcepub fn delivery_failed(v: ProtocolVersion) -> Status
pub fn delivery_failed(v: ProtocolVersion) -> Status
delivery_failed in the given version’s code space.
Sourcepub fn is_delivery_failed(&self) -> bool
pub fn is_delivery_failed(&self) -> bool
True for delivery_failed.
Sourcepub fn invalid_call(v: ProtocolVersion) -> Status
pub fn invalid_call(v: ProtocolVersion) -> Status
invalid_call in the given version’s code space.
Sourcepub fn is_invalid_call(&self) -> bool
pub fn is_invalid_call(&self) -> bool
True for invalid_call.
Source§impl Status
impl Status
Sourcepub const SL_NOT_FOUND: Status
pub const SL_NOT_FOUND: Status
not_found as a 32-bit status.
Sourcepub fn read(r: &mut Reader<'_>, v: ProtocolVersion) -> Result<Status, Truncated>
pub fn read(r: &mut Reader<'_>, v: ProtocolVersion) -> Result<Status, Truncated>
Read a status in the version’s width.