Enum rubble::att::pdus::AttPdu[][src]

pub enum AttPdu<'a> {
Show 29 variants ErrorRsp { opcode: Opcode, handle: Handle, error_code: ErrorCode, }, ExchangeMtuReq { mtu: u16, }, ExchangeMtuRsp { mtu: u16, }, FindInformationReq { handle_range: RawHandleRange, }, FindInformationRsp { format: u8, data: HexSlice<&'a [u8]>, }, FindByTypeValueReq { handle_range: RawHandleRange, attribute_type: u16, attribute_value: HexSlice<&'a [u8]>, }, FindByTypeValueRsp { handles_information_list: HexSlice<&'a [u8]>, }, ReadByTypeReq { handle_range: RawHandleRange, attribute_type: AttUuid, }, ReadByTypeRsp { length: u8, data_list: HexSlice<&'a [u8]>, }, ReadReq { handle: Handle, }, ReadRsp { value: HexSlice<&'a [u8]>, }, ReadBlobReq { handle: Handle, offset: u16, }, ReadBlobRsp { value: HexSlice<&'a [u8]>, }, ReadMultipleReq { handles: HexSlice<&'a [u8]>, }, ReadMultipleRsp { values: HexSlice<&'a [u8]>, }, ReadByGroupReq { handle_range: RawHandleRange, group_type: AttUuid, }, ReadByGroupRsp { length: u8, data_list: HexSlice<&'a [u8]>, }, WriteReq { handle: Handle, value: HexSlice<&'a [u8]>, }, WriteRsp, WriteCommand { handle: Handle, value: HexSlice<&'a [u8]>, }, SignedWriteCommand { handle: Handle, value: HexSlice<&'a [u8]>, signature: HexSlice<&'a [u8; 12]>, }, PrepareWriteReq { handle: Handle, offset: u16, value: HexSlice<&'a [u8]>, }, PrepareWriteRsp { handle: Handle, offset: u16, value: HexSlice<&'a [u8]>, }, ExecuteWriteReq { flags: u8, }, ExecuteWriteRsp, HandleValueNotification { handle: Handle, value: HexSlice<&'a [u8]>, }, HandleValueIndication { handle: Handle, value: HexSlice<&'a [u8]>, }, HandleValueConfirmation, Unknown { opcode: Opcode, params: HexSlice<&'a [u8]>, },
}
Expand description

Structured representation of an ATT message (request or response).

Note that many responses will need their own type that wraps an iterator.

Variants

ErrorRsp

Request could not be completed due to an error.

Fields of ErrorRsp

opcode: Opcode

The opcode that caused the error.

handle: Handle

The attribute handle on which the operation failed.

error_code: ErrorCode

An error code describing the kind of error that occurred.

ExchangeMtuReq

Fields of ExchangeMtuReq

mtu: u16
ExchangeMtuRsp

Fields of ExchangeMtuRsp

mtu: u16
FindInformationReq

Used to obtain mapping of attribute handles and their types

Fields of FindInformationReq

handle_range: RawHandleRange
FindInformationRsp

Fields of FindInformationRsp

format: u8

0x01 - data is a list of handles and 16-bit UUIDs 0x02 - data is a list of handles and 128-bit UUIDs

data: HexSlice<&'a [u8]>

minimum size of 4 bytes

FindByTypeValueReq

Used to obtain the handles of attributes with a given type and value.

Fields of FindByTypeValueReq

handle_range: RawHandleRangeattribute_type: u16attribute_value: HexSlice<&'a [u8]>
FindByTypeValueRsp

Fields of FindByTypeValueRsp

handles_information_list: HexSlice<&'a [u8]>

A single “Handles Information” is 2 octets found handle, 2 octets group end handle

ReadByTypeReq

Fields of ReadByTypeReq

handle_range: RawHandleRangeattribute_type: AttUuid

16 or 128 bit UUID allowed

ReadByTypeRsp

Fields of ReadByTypeRsp

length: u8

The length of each attribute handle-value pair in the list

data_list: HexSlice<&'a [u8]>
ReadReq

Fields of ReadReq

handle: Handle
ReadRsp

Fields of ReadRsp

value: HexSlice<&'a [u8]>
ReadBlobReq

Fields of ReadBlobReq

handle: Handleoffset: u16
ReadBlobRsp

Fields of ReadBlobRsp

value: HexSlice<&'a [u8]>
ReadMultipleReq

Fields of ReadMultipleReq

handles: HexSlice<&'a [u8]>

Minimum length of two handles

ReadMultipleRsp

Fields of ReadMultipleRsp

values: HexSlice<&'a [u8]>
ReadByGroupReq

Fields of ReadByGroupReq

handle_range: RawHandleRangegroup_type: AttUuid
ReadByGroupRsp

Fields of ReadByGroupRsp

length: u8data_list: HexSlice<&'a [u8]>
WriteReq

Fields of WriteReq

handle: Handlevalue: HexSlice<&'a [u8]>
WriteRsp
WriteCommand

Fields of WriteCommand

handle: Handlevalue: HexSlice<&'a [u8]>
SignedWriteCommand

Fields of SignedWriteCommand

handle: Handlevalue: HexSlice<&'a [u8]>signature: HexSlice<&'a [u8; 12]>
PrepareWriteReq

Fields of PrepareWriteReq

handle: Handleoffset: u16value: HexSlice<&'a [u8]>
PrepareWriteRsp

Fields of PrepareWriteRsp

handle: Handleoffset: u16value: HexSlice<&'a [u8]>
ExecuteWriteReq

Fields of ExecuteWriteReq

flags: u8

0x00 – Cancel all prepared writes 0x01 – Immediately write all pending prepared values

ExecuteWriteRsp
HandleValueNotification

Attribute value change notification sent from server to client.

Not acknowledged by client.

Fields of HandleValueNotification

handle: Handlevalue: HexSlice<&'a [u8]>
HandleValueIndication

Attribute value change indication sent by server, acknowledged by client.

Fields of HandleValueIndication

handle: Handlevalue: HexSlice<&'a [u8]>
HandleValueConfirmation

Confirmation returned by client in response to a HandleValueIndication.

Unknown

Fields of Unknown

opcode: Opcodeparams: HexSlice<&'a [u8]>

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Decode a Self from a byte slice, advancing bytes to point past the data that was read. Read more

Converts self to bytes and writes them into writer, advancing writer to point past the encoded value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.