Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Decoded HCI command response. More...

#include <hci_pkt.h>

Data Fields

uint16_t opcode
 Opcode of the command the event responds to.
uint8_t ncmd
 Num_HCI_Command_Packets.
uint8_t status
 Status code (BT_HCI_ERR_*).
const uint8_trp
 Return parameters of the command.
size_t rp_len
 Length of rp in bytes.

Detailed Description

Decoded HCI command response.

Filled by bt_hci_pkt_pull_cmd_complete(), bt_hci_pkt_pull_cmd_status() and bt_hci_pkt_parse_cmd_rsp() from an HCI_Command_Complete or HCI_Command_Status event.

Field Documentation

◆ ncmd

uint8_t bt_hci_pkt_cmd_rsp::ncmd

Num_HCI_Command_Packets.

The number of further HCI command packets the controller accepts.

◆ opcode

uint16_t bt_hci_pkt_cmd_rsp::opcode

Opcode of the command the event responds to.

BT_OP_NOP when the event responds to no command and only updates the number of command packets the controller accepts.

◆ rp

const uint8_t* bt_hci_pkt_cmd_rsp::rp

Return parameters of the command.

Point into the decoded event and start with the status, as the bt_hci_rp_* structures do. HCI_Command_Status carries no return parameters: rp_len is then 0 and rp points just past the event parameters, so that a zero-length copy stays well defined.

◆ rp_len

size_t bt_hci_pkt_cmd_rsp::rp_len

Length of rp in bytes.

◆ status

uint8_t bt_hci_pkt_cmd_rsp::status

Status code (BT_HCI_ERR_*).

For HCI_Command_Complete this is the first return parameter. It is meaningful only when opcode is not BT_OP_NOP: that event responds to no command and carries no status, and the field is then BT_HCI_ERR_SUCCESS. Match opcode before acting on it. When an HCI_Command_Complete for a command lacks the status its return parameters start with, reported as -ENODATA by the decoders, the field is BT_HCI_ERR_UNSPECIFIED.


The documentation for this struct was generated from the following file: