pub enum Response {
Version {
version: u32,
},
ReadParameter {
param: u8,
value: Vec<u8>,
},
WriteParameter {
param: u8,
},
DeviceState {
device_state: u8,
},
ChangeNetworkState {
state: u8,
},
ApsDataRequest {
device_state: u8,
request_id: u8,
},
ApsDataConfirm(Box<ApsConfirm>),
ApsDataIndication(Box<ApsIndication>),
DeviceStateChanged {
device_state: u8,
},
MacPoll {
source: Address,
},
}Expand description
A frame from the NCP: a response or an unsolicited notice.
Variants§
Version
VERSION: 0xMMmmPP00 (major, minor, platform).
ReadParameter
READ_PARAMETER.
WriteParameter
WRITE_PARAMETER.
DeviceState
DEVICE_STATE.
ChangeNetworkState
CHANGE_NETWORK_STATE.
ApsDataRequest
APS_DATA_REQUEST.
ApsDataConfirm(Box<ApsConfirm>)
APS_DATA_CONFIRM.
ApsDataIndication(Box<ApsIndication>)
APS_DATA_INDICATION.
DeviceStateChanged
DEVICE_STATE_CHANGED (unsolicited).
MacPoll
MAC_POLL (unsolicited): a child polled.
Implementations§
Source§impl Response
impl Response
Sourcepub fn device_state(&self) -> Option<u8>
pub fn device_state(&self) -> Option<u8>
The device state the frame carries, if it carries one.
Sourcepub fn decode(frame: &Frame) -> Result<Response, DecodeError>
pub fn decode(frame: &Frame) -> Result<Response, DecodeError>
Decode a frame from the NCP. A frame with a failure status decodes
to nothing useful; check Frame::status first.
Trait Implementations§
impl Eq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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