NimBLE-Arduino 2.1.2
|
#include <ble_l2cap.h>
Public Attributes | ||
uint8_t | type | |
union { | ||
struct { | ||
int status | ||
uint16_t conn_handle | ||
struct ble_l2cap_chan * chan | ||
} connect | ||
struct { | ||
uint16_t conn_handle | ||
struct ble_l2cap_chan * chan | ||
} disconnect | ||
struct { | ||
uint16_t conn_handle | ||
uint16_t peer_sdu_size | ||
struct ble_l2cap_chan * chan | ||
} accept | ||
struct { | ||
uint16_t conn_handle | ||
struct ble_l2cap_chan * chan | ||
struct os_mbuf * sdu_rx | ||
} receive | ||
struct { | ||
uint16_t conn_handle | ||
struct ble_l2cap_chan * chan | ||
int status | ||
} tx_unstalled | ||
struct { | ||
int status | ||
uint16_t conn_handle | ||
struct ble_l2cap_chan * chan | ||
} reconfigured | ||
}; | ||
Represents a L2CAP-related event. When such an event occurs, the host notifies the application by passing an instance of this structure to an application-specified callback.
union { ... } ble_l2cap_event |
A discriminated union containing additional details concerning the L2CAP event. The 'type' field indicates which member of the union is valid.
struct { ... } ble_l2cap_event::accept |
Represents connection accept. Valid for the following event types: o BLE_L2CAP_EVENT_COC_ACCEPT
struct ble_l2cap_chan* ble_l2cap_event::chan |
The L2CAP channel of the relevant L2CAP connection.
Information about the L2CAP connection prior to termination.
uint16_t ble_l2cap_event::conn_handle |
Connection handle of the relevant connection
struct { ... } ble_l2cap_event::connect |
Represents a connection attempt. Valid for the following event types: o BLE_L2CAP_EVENT_COC_CONNECTED
struct { ... } ble_l2cap_event::disconnect |
Represents a terminated connection. Valid for the following event types: o BLE_L2CAP_EVENT_COC_DISCONNECTED
uint16_t ble_l2cap_event::peer_sdu_size |
MTU supported by peer device on the channel
struct { ... } ble_l2cap_event::receive |
Represents received data. Valid for the following event types: o BLE_L2CAP_EVENT_COC_DATA_RECEIVED
struct { ... } ble_l2cap_event::reconfigured |
Represents reconfiguration done. Valid for the following event types: o BLE_L2CAP_EVENT_COC_RECONFIG_COMPLETED o BLE_L2CAP_EVENT_COC_PEER_RECONFIGURED
struct os_mbuf* ble_l2cap_event::sdu_rx |
The mbuf with received SDU.
int ble_l2cap_event::status |
The status of the connection attempt; o 0: the connection was successfully established. o BLE host error code: the connection attempt failed for the specified reason.
The status of the send attempt which was stalled due to lack of credits; This can be non zero only if there is an issue with memory allocation for following SDU fragments. In such a case last SDU has been partially sent to peer device and it is up to application to decide how to handle it.
The status of the reconfiguration attempt; o 0: the reconfiguration was successfully done. o BLE host error code: the reconfiguration attempt failed for the specified reason.
struct { ... } ble_l2cap_event::tx_unstalled |
Represents tx_unstalled data. Valid for the following event types: o BLE_L2CAP_EVENT_COC_TX_UNSTALLED
uint8_t ble_l2cap_event::type |
Indicates the type of L2CAP event that occurred. This is one of the BLE_L2CAP_EVENT codes.