Enum rubble::link::llcp::ControlPdu [−][src]
pub enum ControlPdu<'a> {
ConnectionUpdateReq(&'a ConnectionUpdateData),
ChannelMapReq(&'a ChannelMapReq),
TerminateInd {
error_code: Hex<u8>,
},
UnknownRsp {
unknown_type: ControlOpcode,
},
FeatureReq {
features_master: FeatureSet,
},
FeatureRsp {
features_used: FeatureSet,
},
VersionInd {
vers_nr: VersionNumber,
comp_id: CompanyId,
sub_vers_nr: Hex<u16>,
},
ConnectionParamReq(ConnectionParamRequest),
ConnectionParamRsp(ConnectionParamRequest),
Unknown {
opcode: ControlOpcode,
ctr_data: &'a [u8],
},
}
Expand description
A structured representation of an LL Control PDU used by the Link Layer Control Protocol (LLCP).
Variants
ConnectionUpdateReq(&'a ConnectionUpdateData)
0x00
/LL_CONNECTION_UPDATE_REQ
- Update connection parameters.
Sent by the master. The slave does not send a response back.
Tuple Fields of ConnectionUpdateReq
0: &'a ConnectionUpdateData
ChannelMapReq(&'a ChannelMapReq)
0x01
/LL_CHANNEL_MAP_REQ
- Update the channel map.
Sent by the master. The slave does not send a response back.
Tuple Fields of ChannelMapReq
0: &'a ChannelMapReq
0x02
/LL_TERMINATE_IND
- Close the connection.
Can be sent by master or slave.
0x07
/LL_UNKNOWN_RSP
- Response to unknown/unsupported LL Control PDUs.
This is returned as a response to an incoming LL Control PDU when the opcode is
unimplemented or unknown, or when the CtrData
is invalid for the opcode.
Fields of UnknownRsp
unknown_type: ControlOpcode
Opcode of the unknown PDU.
0x08
/LL_FEATURE_REQ
- Master requests slave’s features.
Fields of FeatureReq
features_master: FeatureSet
Supported feature set of the master.
0x09
/LL_FEATURE_RSP
- Slave answers LL_FEATURE_REQ
with the used feature set.
Fields of FeatureRsp
features_used: FeatureSet
Features that will be used for the connection. Logical AND
of master and slave
features.
0x0C
/LL_VERSION_IND
- Bluetooth version indication (sent by both master and slave).
When either master or slave receive this PDU, they should respond with their version if they have not already sent this PDU during this data connection (FIXME do this).
Fields of VersionInd
ConnectionParamReq(ConnectionParamRequest)
Tuple Fields of ConnectionParamReq
ConnectionParamRsp(ConnectionParamRequest)
Tuple Fields of ConnectionParamRsp
Catch-all variant for unsupported opcodes.
Fields of Unknown
opcode: ControlOpcode
The opcode we don’t support. This can also be the Unknown
variant.
ctr_data: &'a [u8]
Additional data depending on the opcode.
Implementations
Returns the opcode of this LL Control PDU.
Returns the encoded size of this LLCPDU, including the opcode byte.
Trait Implementations
Performs the conversion.
Decode a Self
from a byte slice, advancing bytes
to point past the data that was read. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for ControlPdu<'a>
impl<'a> Send for ControlPdu<'a>
impl<'a> Sync for ControlPdu<'a>
impl<'a> Unpin for ControlPdu<'a>
impl<'a> UnwindSafe for ControlPdu<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more