Enum rubble::att::pdus::Opcode [−][src]
pub enum Opcode {
Show 29 variants
ErrorRsp,
ExchangeMtuReq,
ExchangeMtuRsp,
FindInformationReq,
FindInformationRsp,
FindByTypeValueReq,
FindByTypeValueRsp,
ReadByTypeReq,
ReadByTypeRsp,
ReadReq,
ReadRsp,
ReadBlobReq,
ReadBlobRsp,
ReadMultipleReq,
ReadMultipleRsp,
ReadByGroupReq,
ReadByGroupRsp,
WriteReq,
WriteRsp,
WriteCommand,
SignedWriteCommand,
PrepareWriteReq,
PrepareWriteRsp,
ExecuteWriteReq,
ExecuteWriteRsp,
HandleValueNotification,
HandleValueIndication,
HandleValueConfirmation,
Unknown(u8),
}
Expand description
Specifies an ATT operation to perform.
The byte values assigned to opcodes are chosen so that the most significant 2 bits indicate additional information that can be useful in some cases:
MSb LSb
+-----------+---------+----------+
| Signature | Command | Method |
| 1 bit | 1 bit | 6 bits |
+-----------+---------+----------+
Signature
is set to 1 to indicate that the Attribute Opcode and Parameters are followed by an Authentication Signature. This is only allowed for the Write Command, resulting in theSignedWriteCommand
.Command
is set to 1 when the PDU is a command. This is done purely so that the server can ignore unknown commands. Unlike Requests, Commands are not followed by a server response.Method
defines which operation to perform.
Variants
Unknown(u8)
Tuple Fields of Unknown
0: u8
Implementations
Returns whether the Signature
bit in this opcode is set.
If the bit is set, this is an authenticated operation. The opcode parameters are followed by a 12-Byte signature.
Returns whether the Command
bit in this opcode is set.
Commands sent to the server are not followed by a server response (ie. it is not indicated whether they succeed). Unimplemented commands should be ignored, according to the spec.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Opcode
impl UnwindSafe for Opcode
Blanket Implementations
Mutably borrows from an owned value. Read more