openthread/ot/types/
commissioning_dataset.rs1use crate::prelude_internal::*;
6
7#[derive(Debug, Default, Clone)]
9#[repr(transparent)]
10pub struct CommissioningDataset(pub otCommissioningDataset);
11
12impl_ot_castable!(CommissioningDataset, otCommissioningDataset);
13
14impl CommissioningDataset {
15 pub fn has_extra_tlv(&self) -> bool {
17 self.0.mHasExtraTlv()
18 }
19
20 pub fn is_joiner_udp_port_set(&self) -> bool {
22 self.0.mIsJoinerUdpPortSet()
23 }
24
25 pub fn is_locator_set(&self) -> bool {
27 self.0.mIsLocatorSet()
28 }
29
30 pub fn is_session_id_set(&self) -> bool {
32 self.0.mIsSessionIdSet()
33 }
34
35 pub fn is_steering_data_set(&self) -> bool {
37 self.0.mIsSteeringDataSet()
38 }
39
40 pub fn joiner_udp_port(&self) -> u16 {
42 self.0.mJoinerUdpPort
43 }
44
45 pub fn locator(&self) -> u16 {
47 self.0.mLocator
48 }
49
50 pub fn session_id(&self) -> u16 {
52 self.0.mSessionId
53 }
54
55 pub fn steering_data(&self) -> &SteeringData {
57 (&self.0.mSteeringData).into()
58 }
59}