Enum capsules::net::thread::tlv::Tlv
[−]
[src]
pub enum Tlv<'a> { SourceAddress(u16), Mode(u8), Timeout(u32), Challenge([u8; 8]), Response([u8; 8]), LinkLayerFrameCounter(u32), MleFrameCounter(u32), Address16(u16), LeaderData { partition_id: u32, weighting: u8, data_version: u8, stable_data_version: u8, leader_router_id: u8, }, NetworkData(&'a [u8]), TlvRequest(&'a [u8]), ScanMask(u8), Connectivity { parent_priority: u8, link_quality_3: u8, link_quality_2: u8, link_quality_1: u8, leader_cost: u8, id_sequence: u8, active_routers: u8, sed_buffer_size: Option<u16>, sed_datagram_count: Option<u8>, }, LinkMargin(u8), Status(u8), Version(u16), ActiveOperationalDataset(&'a [u8]), PendingOperationalDataset(&'a [u8]), }
Type-Length-Value structure.
Variants
SourceAddress(u16)
Mode(u8)
Timeout(u32)
Challenge([u8; 8])
Response([u8; 8])
LinkLayerFrameCounter(u32)
MleFrameCounter(u32)
Address16(u16)
LeaderData
Fields of LeaderData
partition_id: u32 | |
weighting: u8 | |
data_version: u8 | |
stable_data_version: u8 | |
leader_router_id: u8 |
NetworkData(&'a [u8])
TlvRequest(&'a [u8])
ScanMask(u8)
Connectivity
Fields of Connectivity
parent_priority: u8 | |
link_quality_3: u8 | |
link_quality_2: u8 | |
link_quality_1: u8 | |
leader_cost: u8 | |
id_sequence: u8 | |
active_routers: u8 | |
sed_buffer_size: Option<u16> | |
sed_datagram_count: Option<u8> |
LinkMargin(u8)
Status(u8)
Version(u16)
ActiveOperationalDataset(&'a [u8])
PendingOperationalDataset(&'a [u8])
Methods
impl<'a> Tlv<'a>
[src]
pub fn encode(&self, buf: &mut [u8]) -> SResult
[src]
Serializes TLV data in buf
into the format specific to the TLV
type.
fn encode_tl(&self, buf: &mut [u8], value_width: usize) -> SResult
[src]
pub fn decode(buf: &[u8]) -> SResult<Tlv>
[src]
Deserializes TLV data from buf
into the TLV variant specific to
the TLV type.
SResult::Error
is returned if the type field does not match any
implemented TLV type.