Struct bluetooth_hci::event::command::CommandComplete[][src]

pub struct CommandComplete<V> where
    V: VendorEvent
{ pub num_hci_command_packets: u8, pub return_params: ReturnParameters<V>, }

The Command Complete event is used by the Controller for most commands to transmit return status of a command and the other event parameters that are specified for the issued HCI command.

Must be specialized on the return parameters that may be returned by vendor-specific commands.

Defined in the Bluetooth spec, Vol 2, Part E, Section 7.7.14.

Fields

Indicates the number of HCI command packets the Host can send to the Controller. If the Controller requires the Host to stop sending commands, num_hci_command_packets will be set to zero. To indicate to the Host that the Controller is ready to receive HCI command packets, the Controller generates a Command Complete event with return_params set to Spontaneous and num_hci_command_packets parameter set to 1 or more. Spontaneous return parameters indicates that this event is not associated with a command sent by the Host. The Controller can send a Spontaneous Command Complete event at any time to change the number of outstanding HCI command packets that the Host can send before waiting.

The type of command that has completed, and any parameters that it returns.

Methods

impl<V> CommandComplete<V> where
    V: VendorEvent
[src]

Deserializes a buffer into a CommandComplete event.

Errors

  • BadLength if the buffer is not large enough to contain a parameter length (1 byte) and opcode (2 bytes)
  • Returns errors that may be generated when deserializing specific events. This may be BadLength, which indicates the buffer was not large enough to contain all of the required data for the event. Some commands define other errors that indicate parameter values are invalid. The error type must be specialized on potential vendor-specific errors, though vendor-specific errors are never returned by this function.

Trait Implementations

impl<V: Clone> Clone for CommandComplete<V> where
    V: VendorEvent
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<V: Debug> Debug for CommandComplete<V> where
    V: VendorEvent
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<V> Send for CommandComplete<V> where
    <V as VendorEvent>::ReturnParameters: Send,
    <V as VendorEvent>::Status: Send

impl<V> Sync for CommandComplete<V> where
    <V as VendorEvent>::ReturnParameters: Sync,
    <V as VendorEvent>::Status: Sync