Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Generic Object Exchange Profile (GOEP)

Generic Object Exchange Profile (GOEP). More...

Topics

 GOEP transport L2CAP
 GOEP transport RFCOMM

Data Structures

struct  bt_goep_transport_ops
 GOEP transport operations structure. More...
struct  bt_goep_transport_v1
 GOEP v1.1 structure. More...
struct  bt_goep_transport_v2
 GOEP v2 structure. More...
struct  bt_goep_transport
 GOEP transport unified structure. More...
struct  bt_goep
 GOEP structure. More...

Macros

#define BT_GOEP_INIT_V1(_goep, _v1)
 Initialize the GOEP and GOEP v1 (RFCOMM) transport structures.
#define BT_GOEP_INIT_V2(_goep, _v2)
 Initialize the GOEP and GOEP v2 (L2CAP) transport structures.

Enumerations

enum  bt_goep_transport_state { BT_GOEP_TRANSPORT_DISCONNECTED , BT_GOEP_TRANSPORT_CONNECTING , BT_GOEP_TRANSPORT_CONNECTED , BT_GOEP_TRANSPORT_DISCONNECTING }
 Life-span states of GOEP transport. More...

Functions

struct net_bufbt_goep_create_pdu (struct bt_goep *goep, struct net_buf_pool *pool)
 Allocate the buffer from given pool after reserving head room for GOEP.

Detailed Description

Generic Object Exchange Profile (GOEP).

Macro Definition Documentation

◆ BT_GOEP_INIT_V1

#define BT_GOEP_INIT_V1 ( _goep,
_v1 )

#include <zephyr/bluetooth/classic/goep.h>

Value:
do { \
BUILD_ASSERT(SAME_TYPE(*(_goep), struct bt_goep) && \
SAME_TYPE(*(_v1), struct bt_goep_transport_v1), \
"pointer type mismatch in BT_GOEP_INIT_V1"); \
(_v1)->goep = (_goep); \
(_goep)->v1 = (_v1); \
(_goep)->v2 = NULL; \
} while (0)
#define SAME_TYPE(a, b)
Validate if two entities have a compatible type.
Definition util.h:247
GOEP v1.1 structure.
Definition goep.h:62
GOEP structure.
Definition goep.h:138

Initialize the GOEP and GOEP v1 (RFCOMM) transport structures.

Sets up the mutual back-pointer between a Generic Object Exchange Profile (GOEP) instance and its transport instance bt_goep_transport_v1, and clears the unused v2 pointer to avoid the goep version mismatch.

Equivalent to:

(_v1)->goep = (_goep);
(_goep)->v1 = (_v1);
(_goep)->v2 = NULL;
Parameters
_goepPointer to the Generic Object Exchange Profile (GOEP) structure to initialize.
_v1Pointer to the bt_goep_transport_v1 structure to associate.

◆ BT_GOEP_INIT_V2

#define BT_GOEP_INIT_V2 ( _goep,
_v2 )

#include <zephyr/bluetooth/classic/goep.h>

Value:
do { \
BUILD_ASSERT(SAME_TYPE(*(_goep), struct bt_goep) && \
SAME_TYPE(*(_v2), struct bt_goep_transport_v2), \
"pointer type mismatch in BT_GOEP_INIT_V2"); \
(_v2)->goep = (_goep); \
(_goep)->v2 = (_v2); \
(_goep)->v1 = NULL; \
} while (0)
GOEP v2 structure.
Definition goep.h:77

Initialize the GOEP and GOEP v2 (L2CAP) transport structures.

Sets up the mutual back-pointer between a Generic Object Exchange Profile (GOEP) instance and its transport instance bt_goep_transport_v2, and clears the unused v1 pointer to avoid the goep version mismatch.

Equivalent to:

(_v2)->goep = (_goep);
(_goep)->v2 = (_v2);
(_goep)->v1 = NULL;
Parameters
_goepPointer to the Generic Object Exchange Profile (GOEP) structure to initialize.
_v2Pointer to the bt_goep_transport_v2 structure to associate.

Enumeration Type Documentation

◆ bt_goep_transport_state

#include <zephyr/bluetooth/classic/goep.h>

Life-span states of GOEP transport.

Used only by internal APIs dealing with setting GOEP to proper transport state depending on operational context.

GOEP transport enters the BT_GOEP_TRANSPORT_CONNECTING state upon bt_goep_transport_l2cap_connect, bt_goep_transport_rfcomm_connect or upon returning from bt_goep_transport_rfcomm_server::accept and bt_goep_transport_l2cap_server::accept.

When GOEP transport leaves the BT_GOEP_TRANSPORT_CONNECTING state and enters the BT_GOEP_TRANSPORT_CONNECTED, bt_goep_transport_ops::connected is called.

When GOEP transport enters the BT_GOEP_TRANSPORT_DISCONNECTED from other states, bt_goep_transport_ops::disconnected is called.

Enumerator
BT_GOEP_TRANSPORT_DISCONNECTED 

GOEP disconnected.

BT_GOEP_TRANSPORT_CONNECTING 

GOEP in connecting state.

BT_GOEP_TRANSPORT_CONNECTED 

GOEP ready for upper layer traffic on it.

BT_GOEP_TRANSPORT_DISCONNECTING 

GOEP in disconnecting state.

Function Documentation

◆ bt_goep_create_pdu()

struct net_buf * bt_goep_create_pdu ( struct bt_goep * goep,
struct net_buf_pool * pool )

#include <zephyr/bluetooth/classic/goep.h>

Allocate the buffer from given pool after reserving head room for GOEP.

For GOEP connection over RFCOMM, the reserved head room includes OBEX, RFCOMM, L2CAP and ACL headers. For GOEP connection over L2CAP, the reserved head room includes OBEX, L2CAP and ACL headers.

Parameters
goepGOEP object.
poolWhich pool to take the buffer from.
Returns
New buffer.