[−][src]Enum rubble::link::data::ControlPdu
A structured representation of an LL Control PDU used by the Link Layer Control Protocol (LLCP).
Variants
ConnectionUpdateReq(ConnectionUpdateData)
0x00
/LL_CONNECTION_UPDATE_REQ
- Update connection parameters.
Sent by the master. The slave does not send a response back.
ChannelMapReq
0x01
/LL_CHANNEL_MAP_REQ
- Update the channel map.
Sent by the master. The slave does not send a response back.
Fields of ChannelMapReq
map: ChannelMap
instant: u16
TerminateInd
0x02
/LL_TERMINATE_IND
- Close the connection.
Can be sent by master or slave.
Fields of TerminateInd
UnknownRsp
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.
FeatureReq
0x08
/LL_FEATURE_REQ
- Master requests slave's features.
Fields of FeatureReq
features_master: FeatureSet
Supported feature set of the master.
FeatureRsp
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.
VersionInd
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
Unknown
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.
Methods
impl<'_> ControlPdu<'_>
[src]
pub fn opcode(&self) -> ControlOpcode
[src]
Returns the opcode of this LL Control PDU.
Trait Implementations
impl<'a> ToBytes for ControlPdu<'a>
[src]
fn to_bytes(&self, buffer: &mut ByteWriter) -> Result<(), Error>
[src]
impl<'a> FromBytes<'a> for ControlPdu<'a>
[src]
fn from_bytes(bytes: &mut ByteReader<'a>) -> Result<Self, Error>
[src]
impl<'a> Clone for ControlPdu<'a>
[src]
fn clone(&self) -> ControlPdu<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Copy for ControlPdu<'a>
[src]
impl<'a> Debug for ControlPdu<'a>
[src]
impl<'a> From<&'a ControlPdu<'a>> for Pdu<'a, &'a [u8]>
[src]
fn from(c: &'a ControlPdu<'a>) -> Self
[src]
Auto Trait Implementations
impl<'a> Send for ControlPdu<'a>
impl<'a> Sync for ControlPdu<'a>
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,