Module bluetooth_hci::event[][src]

Bluetooth events and event deserialization.

This module defines all of the HCI events that can be generated by the Bluetooth controller. In addition to all of the event types, the core functionality of the module is the Event enum, which converts a byte buffer into an HCI event.

Modules

command

Return parameters for HCI commands.

Structs

CommandStatus

The Command Status event is used to indicate that the command described by the opcode parameter has been received, and that the Controller is currently performing the task for this command.

ConnectionComplete

The Connection Complete event indicates to both of the Hosts forming the connection that a new connection has been established.

DataBufferOverflow

Indicates that the Controller's data buffers have been overflowed. This can occur if the Host has sent more packets than allowed.

DisconnectionComplete

The Disconnection Complete event occurs when a connection is terminated.

EncryptionChange

The Encryption Change event is used to indicate that the change of the encryption mode has been completed.

EncryptionKeyRefreshComplete

Indicates to the Host that the encryption key was refreshed.

HardwareError

The Hardware Error event is used to notify the Host that a hardware failure has occurred in the Controller.

LeAdvertisement

A single advertising report returned by the LE Advertising Report event.

LeAdvertisingReport

The LE Advertising Report event indicates that a Bluetooth device or multiple Bluetooth devices have responded to an active scan or received some information during a passive scan. The Controller may queue these advertising reports and send information from multiple devices in one event.

LeAdvertisingReportIterator

Iterator over the individual LE advertisement responses in the LE Advertising Report event.

LeConnectionComplete

Indicates to both of the Hosts forming the connection that a new connection has been created. Upon the creation of the connection a connection handle shall be assigned by the Controller, and passed to the Host in this event. If the connection establishment fails this event shall be provided to the Host that had issued the LE Create Connection command.

LeConnectionUpdateComplete

Indicates that the Controller process to update the connection has completed.

LeLongTermKeyRequest

The LE Long Term Key Request event indicates that the master device is attempting to encrypt or re-encrypt the link and is requesting the Long Term Key from the Host. (See Vol 6, Part B, Section 5.1.3).

LeReadRemoteUsedFeaturesComplete

Indicates the completion of the process of the Controller obtaining the features used on the connection and the features supported by the remote Bluetooth device specified by conn_handle.

NumberOfCompletedPackets

The Number of Completed Packets event is used by the Controller to indicate to the Host how many HCI Data Packets have been completed (transmitted or flushed) for each connection handle since the previous Number Of Completed Packets event was sent to the Host.

NumberOfCompletedPacketsIterator

Iterator over the connection handle-number of completed packet pairs from the NumberOfCompletedPackets event.

NumberOfCompletedPacketsPair

The NumberOfCompletedPackets event includes a series of connection handle-number of completed packets pairs.

Packet

Defines a newtype to indicate that the buffer is supposed to contain an HCI event.

RemoteVersionInformation

Indicates the completion of the process obtaining the version information of the remote Controller specified by conn_handle.

Enums

AdvertisementEvent

Types of advertisement reports.

CentralClockAccuracy

Values for the central (master) clock accuracy as returned by the LE Connection Complete event.

ConnectionRole

Connection roles as returned by the LE Connection Complete event.

Encryption

The type of used encryption for the connection.

Error

Errors that may occur when deserializing an event. Must be specialized by the vendor crate to allow for vendor-specific event errors.

Event

Potential events that can be generated by the controller.

LinkType

Permissible values for ConnectionComplete::link_type.

Traits

VendorEvent

Trait for vendor-specific events.

VendorReturnParameters

Trait for return parameters for vendor-specific commands.

Functions

rewrap_bad_status

Extracts the value from a BadStatusError and returns it as a BadStatus error.