38 #ifndef SERIAL_CMD_RSP_H__ 39 #define SERIAL_CMD_RSP_H__ 43 #include "nrf_mesh_defines.h" 44 #include "nrf_mesh_dfu_types.h" 45 #include "nrf_mesh_serial.h" 46 #include "nrf_mesh_prov.h" 48 #include "device_state_manager.h" 58 #define SERIAL_EVT_CMD_RSP_OVERHEAD (2) 60 #define SERIAL_EVT_CMD_RSP_LEN_OVERHEAD (NRF_MESH_SERIAL_PACKET_OVERHEAD + SERIAL_EVT_CMD_RSP_OVERHEAD) 62 #define SERIAL_EVT_CMD_RSP_DATA_MAXLEN (NRF_MESH_SERIAL_PAYLOAD_MAXLEN - SERIAL_EVT_CMD_RSP_OVERHEAD) 67 typedef struct __attribute((packed))
73 typedef struct __attribute((packed))
79 typedef struct __attribute((packed))
85 typedef struct __attribute((packed))
91 typedef struct __attribute((packed))
98 typedef struct __attribute((packed))
104 typedef struct __attribute((packed))
110 typedef struct __attribute((packed))
117 typedef struct __attribute((packed))
127 typedef struct __attribute((packed))
133 typedef struct __attribute((packed))
139 typedef struct __attribute((packed))
145 typedef struct __attribute((packed))
151 typedef struct __attribute((packed))
157 typedef struct __attribute((packed))
160 uint8_t addr[BLE_GAP_ADDR_LEN];
166 typedef struct __attribute((packed))
173 typedef struct __attribute((packed))
179 typedef struct __attribute((packed))
188 typedef struct __attribute((packed))
198 typedef struct __attribute((packed))
208 typedef struct __attribute((packed))
214 typedef struct __attribute((packed))
220 typedef struct __attribute((packed))
227 typedef struct __attribute((packed))
234 typedef struct __attribute((packed))
241 typedef struct __attribute((packed))
247 typedef struct __attribute((packed))
253 typedef struct __attribute((packed))
259 typedef struct __attribute((packed))
265 typedef struct __attribute((packed))
271 typedef struct __attribute((packed))
278 typedef struct __attribute((packed))
285 typedef struct __attribute((packed))
291 typedef struct __attribute((packed))
298 typedef struct __attribute((packed))
304 typedef struct __attribute((packed))
313 typedef struct __attribute((packed))
317 union __attribute((packed))
uint8_t status
Return status of the serial command.
Address access response data.
serial_evt_cmd_rsp_data_model_pub_app_get_t pub_app
Model publish application key.
Command response data with firmware info.
uint16_t address_handle
Address handle operated on.
uint16_t access_model_handle_t
Access layer handle type.
serial_evt_cmd_rsp_data_housekeeping_t hk_data
Housekeeping data response.
uint8_t role
This device's intended role in the transfer, see nrf_mesh_dfu_role_t for accepted values...
serial_evt_cmd_rsp_data_dfu_bank_info_t dfu_bank_info
Bank information.
uint8_t opcode
Opcode of original command.
Beacon parameter command response.
Application key access response data.
uint16_t count
Number of available handles in model_ids.
uint16_t iv_update_timeout_counter
Current value of timeout counter for IV update.
Raw address access response data.
Command response to SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_GET with application key handles.
Command response data with the model count.
serial_evt_cmd_rsp_data_model_id_get_t model_id
Company and model IDs.
uint8_t beacon_slot
Slot number of the beacon to start.
Subnetwork list response data.
uint8_t dfu_type
DFU type of the bank.
uint8_t tx_power
TX Power value, must be a value from serial_cmd_tx_power_value_t.
#define NRF_MESH_UUID_SIZE
Size (in octets) of a UUID.
uint16_t raw_short_addr
Raw representation of the address.
serial_evt_cmd_rsp_data_model_init_t model_init
Reserved handle for the initialized model instance.
uint32_t alloc_fail_count
Number of failed serial packet allocations.
serial_evt_cmd_rsp_data_models_get_t model_ids
All the available models.
uint16_t address_start
First address in the range of unicast addresses.
Command response data with a list size.
uint16_t appkey_handle
Application key handle operated on.
serial_evt_cmd_rsp_data_model_pub_period_get_t pub_period
Model publish period.
Command response to SERIAL_OPCODE_CMD_MESH_PACKET_SEND with information about the sent packet...
nrf_mesh_tx_token_t token
TX Token assigned to the packet.
serial_evt_cmd_rsp_data_elem_model_count_get_t model_count
Number of models in the element.
uint16_t location
Element location info.
uint32_t start_addr
Start address of the bank.
Command response to SERIAL_OPCODE_CMD_MODEL_SPECIFIC_INIT with the reserved model handle...
uint32_t interval_ms
TX interval in milliseconds.
serial_evt_cmd_rsp_data_subnet_list_t subnet_list
List of all subnet key indexes.
serial_evt_cmd_rsp_data_beacon_params_t beacon_params
Beacon parameters.
Command response data with dfu state.
uint16_t dsm_handle_t
DSM handle type, used for the handles returned for the each set of data added.
serial_evt_cmd_rsp_data_model_handle_get_t model_handle
Handle for the model.
uint16_t list_size
Size of the list requested by the command.
serial_evt_cmd_rsp_data_devkey_t devkey
Devkey response.
uint8_t context
Provisioning context ID.
Subnetwork access response data.
uint16_t devkey_handle
Device key handle operated on.
Command response data with TX power.
Command response data with dfu bank information.
uint8_t is_signed
Flag indicating whether the bank is signed with an encryption key.
uint16_t count
Number of available handles in appkey_handles.
Command response to SERIAL_OPCODE_CMD_MODEL_SPECIFIC_COMMAND from the model addressed.
nrf_mesh_fwid_t fwid
Firmware ID data.
uint8_t resolution
Resolution of each step.
dsm_handle_t addr_handle
Address handle for the publish address.
Command response data with version information.
serial_evt_cmd_rsp_data_device_uuid_t device_uuid
Device UUID.
uint16_t count
Number of addresses in the range of unicast addresses.
uint16_t count
Number of available handles in address_handles.
serial_evt_cmd_rsp_data_appkey_list_t appkey_list
List of all appkey key indexes for a given subnetwork.
Command response to SERIAL_OPCODE_CMD_MODEL_SPECIFIC_MODELS_GET with available model IDs...
Command response data with the element location info.
uint8_t ttl
TTL for published messages.
#define SERIAL_EVT_CMD_RSP_DATA_MAXLEN
Max length of the command response data field.
uint8_t addr_type
Address type of the given address.
Command response data with the publish ttl value.
uint8_t step_number
Number of steps in each period.
serial_evt_cmd_rsp_data_model_subs_get_t model_subs
Model subscription list.
serial_evt_cmd_rsp_data_elem_loc_get_t elem_loc
Element location.
uint32_t length
Length of the firmware in the bank.
uint16_t address_handle
Address handle requested.
Device UUID command response.
Application key list response data.
serial_evt_cmd_rsp_data_adv_addr_t adv_addr
Advertisement address.
uint16_t count
Number of available handles in model_handles.
access_model_id_t model_id
Company and model IDs.
serial_evt_cmd_rsp_data_net_state_get_t net_state_get
Net state.
access_model_handle_t model_handle
Handle of the requested model.
uint16_t serial_ver
Serial interface version.
Command response data with the model id.
Command response data with publish period information.
serial_evt_cmd_rsp_data_addr_t addr
Address response.
Command response to SERIAL_OPCODE_CMD_MESH_NET_STATE_GET with the current net state.
uint32_t nrf_mesh_tx_token_t
TX Token type, used as a context parameter to notify the application of ended transmissions.
uint16_t subnet_handle
Handle of the Subnetwork associated with the application keys.
uint8_t iv_update_in_progress
Value indicating the phase of the IV update process.
serial_evt_cmd_rsp_data_model_pub_addr_get_t pub_addr
Model publish address.
uint8_t data_len
Length of data array.
Unicast address access response data.
uint8_t model_count
Number of existing models.
Command response data with address handle for the publish address.
uint16_t subnet_handle
Subnetwork handle operated on.
Serial interface housekeeping data.
dsm_handle_t appkey_handle
Handle of the application key used for publishing.
nrf_mesh_fwid_t fwid
Firmware ID of the bank.
access_model_handle_t model_handle
Handle of the initialized model.
Address handle list response data.
serial_evt_cmd_rsp_data_appkey_t appkey
Appkey response.
Command response data with context information.
Advertisement address command response.
serial_evt_cmd_rsp_data_subnet_t subnet
Subnet response.
uint8_t channel_map
Channel map bitfield for beacon, starting at channel 37.
serial_evt_cmd_rsp_data_elem_models_get_t model_handles
Element's list of model handles.
uint8_t type
The DFU type of the transfer, see nrf_mesh_dfu_type_t for accepted values.
uint8_t addr_type
Advertisement address type.
uint8_t data_progress
The progress of the transfer in percent (0-100).
serial_evt_cmd_rsp_data_dfu_state_t dfu_state
DFU state.
Command response to SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_GET command with subscription address handles...
serial_evt_cmd_rsp_data_firmware_info_t firmware_info
Firmware information.
uint32_t next_seqnum_block
The start of the next unused sequence number block.
ID of a standalone firmware segment.
uint8_t subscribed
Flag indicating whether the given address is subscribed to or not.
serial_evt_cmd_rsp_data_prov_ctx_t prov_ctx
Provisioning context.
nrf_mesh_fwid_t fwid
The FWID of the new data in the transfer.
serial_evt_cmd_rsp_data_addr_local_unicast_t local_unicast
Local unicast addresses.
serial_evt_cmd_rsp_data_serial_version_t serial_version
Serial version.
uint8_t tx_power
TX Power value, must be a value from serial_cmd_tx_power_value_t.
Command response data with appkey handle of the application key used for publishing.
Command response to SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_GET with application key handles.
Command response data with the model handle.
serial_evt_cmd_rsp_data_list_size_t list_size
List size.
serial_evt_cmd_rsp_data_model_pub_ttl_get_t pub_ttl
Model publish ttl value.
uint8_t state
The current global state of the transfer, see nrf_mesh_dfu_state_t for accepted values.
serial_evt_cmd_rsp_data_model_apps_get_t model_pub
Model application keys list.
serial_evt_cmd_rsp_data_packet_send_t packet_send
Information about the sent packet.
Device key access response data.
uint32_t iv_index
The current IV index.