Enum capsules::net::thread::tlv::NetworkDataTlv
[−]
[src]
pub enum NetworkDataTlv<'a> {
Prefix {
domain_id: u8,
prefix_length_bits: u8,
prefix: [u8; 3],
sub_tlvs: &'a [u8],
},
CommissioningData {
com_length: u8,
com_data: [u8; 128],
},
Service {
thread_enterprise_number: bool,
s_id: u8,
s_enterprise_number: u32,
s_service_data_length: u8,
s_service_data: [u8; 128],
sub_tlvs: &'a [u8],
},
}These TLVs are contained within the value of a Network Data TLV. See Section 5.18.
Variants
PrefixFields of Prefix
domain_id: u8 | |
prefix_length_bits: u8 | |
prefix: [u8; 3] | |
sub_tlvs: &'a [u8] |
CommissioningDataFields of CommissioningData
com_length: u8 | |
com_data: [u8; 128] |
ServiceFields of Service
thread_enterprise_number: bool | |
s_id: u8 | |
s_enterprise_number: u32 | |
s_service_data_length: u8 | |
s_service_data: [u8; 128] | |
sub_tlvs: &'a [u8] |
Methods
impl<'a> NetworkDataTlv<'a>[src]
pub fn encode(&self, buf: &mut [u8], stable: bool) -> SResult[src]
Serializes TLV data in buf into the format specific to the
Network Data TLV type.
fn encode_tl(&self, buf: &mut [u8], value_width: usize, stable: bool) -> SResult[src]
pub fn decode(buf: &[u8]) -> SResult<(NetworkDataTlv, bool)>[src]
Deserializes TLV data from buf into the Network Data TLV variant
specific to the TLV type.
Returns NetworkDataTlv and true if the data stable, false
otherwise.
SResult::Error is returned if the type field does not match any
implemented TLV type.
Trait Implementations
impl<'a, 'b> From<&'a NetworkDataTlv<'b>> for NetworkDataTlvType[src]
fn from(network_data_tlv: &'a NetworkDataTlv<'b>) -> Self[src]
Performs the conversion.