Opcodes Aggregator Client

The Opcodes Aggregator Client model is a foundation model defined by the Bluetooth Mesh specification. It is an optional model, enabled with the CONFIG_BT_MESH_OP_AGG_CLI option.

The Opcodes Aggregator Client model is introduced in the Bluetooth Mesh Protocol Specification version 1.1, and is used to support the functionality of dispatching a sequence of access layer messages to nodes supporting the Opcodes Aggregator Server model.

The Opcodes Aggregator Client model communicates with an Opcodes Aggregator Server model using the device key of the target node or the application keys configured by the Configuration Client.

If present, the Opcodes Aggregator Client model must only be instantiated on the primary element.

The Opcodes Aggregator Client model is implicitly bound to the device key on initialization. It should be bound to the same application keys as the client models that are used to produce the sequence of messages.

To be able to aggregate a message from a client model, it should support an asynchronous API, for example through callbacks.

API reference

group bt_mesh_op_agg_cli

Defines

BT_MESH_MODEL_OP_AGG_CLI

Opcodes Aggregator Client model composition data entry.

Functions

int bt_mesh_op_agg_cli_seq_start(uint16_t net_idx, uint16_t app_idx, uint16_t dst, uint16_t elem_addr)

Configure Opcodes Aggregator context.

Parameters:
  • net_idx – NetKey index to encrypt with.

  • app_idx – AppKey index to encrypt with.

  • dst – Target Opcodes Aggregator Server address.

  • elem_addr – Target node element address for the sequence message.

Returns:

0 on success, or (negative) error code on failure.

int bt_mesh_op_agg_cli_seq_send(void)

Opcodes Aggregator message send.

Uses previously configured context and sends aggregated message to target node.

Returns:

0 on success, or (negative) error code on failure.

void bt_mesh_op_agg_cli_seq_abort(void)

Abort Opcodes Aggregator context.

bool bt_mesh_op_agg_cli_seq_is_started(void)

Check if Opcodes Aggregator Sequence context is started.

Returns:

true if it is started, otherwise false.

size_t bt_mesh_op_agg_cli_seq_tailroom(void)

Get Opcodes Aggregator context tailroom.

Returns:

Remaning tailroom of Opcodes Aggregator SDU.

int32_t bt_mesh_op_agg_cli_timeout_get(void)

Get the current transmission timeout value.

Returns:

The configured transmission timeout in milliseconds.

void bt_mesh_op_agg_cli_timeout_set(int32_t timeout)

Set the transmission timeout value.

Parameters:
  • timeout – The new transmission timeout.