pub struct DeviceSync {Show 16 fields
pub last_status: Status,
pub reset_since_last_contact: bool,
pub capabilities: Vec<u32>,
pub ownership: HostOwnership,
pub host_key: Option<[u8; 32]>,
pub phy_enabled: bool,
pub freq_khz: u32,
pub device_name: String,
pub saved: Option<SavedSnapshot>,
pub queue_count: Option<u16>,
pub queue_dropped: Option<u32>,
pub filters: Option<Vec<Filter>>,
pub host_channel_ids: Option<Vec<[u8; 2]>>,
pub host_peer_keys: Option<Vec<[u8; 32]>>,
pub auto_ack: Option<bool>,
pub dev_key: Option<[u8; 32]>,
}Expand description
Device state gathered by UlcpDevice::sync: the spec’s
post-attach synchronization procedure. Fields whose capability the
device does not advertise are None; multi-value properties are the
digest forms and never contain key material.
Fields§
§last_status: StatusRetained PROP_LAST_STATUS.
reset_since_last_contact: boollast_status was a reset code: the device has reset since the
last host command, so state not restored from a saved snapshot
(notably queue contents) has been lost.
capabilities: Vec<u32>Advertised PROP_CAPS.
ownership: HostOwnershipWhether the queued data and provisioning belong to this host.
host_key: Option<[u8; 32]>The configured host identity, when one exists.
phy_enabled: boolPROP_PHY_ENABLED — with a restored snapshot the PHY may
already be up.
freq_khz: u32PROP_PHY_FREQ in kHz.
device_name: StringPROP_DEV_NAME.
saved: Option<SavedSnapshot>PROP_SAVED (CAP_SAVE).
queue_count: Option<u16>PROP_HOST_RX_QUEUE_COUNT (CAP_HOST_RX_QUEUE).
queue_dropped: Option<u32>PROP_HOST_RX_QUEUE_DROPPED (CAP_HOST_RX_QUEUE).
filters: Option<Vec<Filter>>PROP_HOST_RX_FILTERS (CAP_HOST_FILTER).
host_channel_ids: Option<Vec<[u8; 2]>>Derived channel identifiers of PROP_HOST_CHANNEL_KEYS
(CAP_HOST_KEYS).
host_peer_keys: Option<Vec<[u8; 32]>>Provisioned peer public keys of PROP_HOST_PEER_KEYS
(CAP_HOST_KEYS).
auto_ack: Option<bool>PROP_HOST_AUTO_ACK (CAP_HOST_AUTO_ACK).
dev_key: Option<[u8; 32]>The device identity public key (CAP_DEV_IDENTITY), when one
is configured.
Implementations§
Source§impl DeviceSync
impl DeviceSync
Sourcepub fn has_capability(&self, capability: u32) -> bool
pub fn has_capability(&self, capability: u32) -> bool
Whether the device advertised this capability code.
Trait Implementations§
Source§impl Clone for DeviceSync
impl Clone for DeviceSync
Source§fn clone(&self) -> DeviceSync
fn clone(&self) -> DeviceSync
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceSync
impl RefUnwindSafe for DeviceSync
impl Send for DeviceSync
impl Sync for DeviceSync
impl Unpin for DeviceSync
impl UnwindSafe for DeviceSync
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)