Wirepas SDK
app_setup_int.h File Reference

Go to the source code of this file.

Data Structures

struct  app_setup_hdr_t
 Application setup data header. More...
 
struct  app_setup_node_t
 Node configuration. More...
 
struct  app_setup_key_mgmt_t
 Key management configuration. More...
 
struct  app_setup_provisioning_t
 Provisioning configuration. More...
 
struct  app_setup_action_t
 Actions for application setup. More...
 
struct  app_setup
 Application setup data structure. More...
 

Macros

#define APP_SETUP_FORMAT   0xabb5e70b
 Internal header for application setup library. More...
 
#define APP_SETUP_VERSION   1
 Version of the library. More...
 
#define APP_SETUP_CLEAR_BYTE   0xff
 In flash 0xff marks empty byte. More...
 
#define APP_SETUP_KEY_SIZE_BYTES   16
 All security keys are 16 bytes long. More...
 
#define APP_SETUP_PROV_UID_MAX_SIZE_BYTES   112
 Maximum size of provisioning UID. More...
 

Data Structure Documentation

◆ app_setup_hdr_t

struct app_setup_hdr_t

Application setup data header.

TYPES

Definition at line 61 of file app_setup_int.h.

Data Fields
uint32_t format

APP_SETUP_FORMAT

uint16_t length

Length in bytes of header + data

uint16_t version

APP_SETUP_VERSION

◆ app_setup_node_t

struct app_setup_node_t

Node configuration.

Definition at line 83 of file app_setup_int.h.

Data Fields
uint8_t diag_interval

Diagnostic interval in seconds

uint32_t id

Node id

uint32_t network_address

Network address

uint8_t network_channel

Network channel

uint8_t reserved

Reserved byte to align structure to word

uint8_t role

Node role

◆ app_setup_key_mgmt_t

struct app_setup_key_mgmt_t

Key management configuration.

Definition at line 120 of file app_setup_int.h.

Data Fields
uint8_t enable_key_management

Enable key management

uint8_t force_key_revocation

Force key revocation

uint8_t mgmt_auth_key[16]

Management authentication key

uint8_t mgmt_enc_key[16]

Management encryption key

uint8_t mgmt_key_pair_seq

Management key pair sequence

uint8_t network_auth_key[16]

Network authentication key

uint8_t network_enc_key[16]

Network encryption key

uint8_t network_key_pair_seq

Network key pair sequence

◆ app_setup_provisioning_t

struct app_setup_provisioning_t

Provisioning configuration.

Definition at line 167 of file app_setup_int.h.

Data Fields
uint8_t auth_key[16]

Authentication key if method is SECURED

uint8_t enc_key[16]

Encryption key if method is SECURED

uint8_t method

Provisioning method

uint8_t num_retries

How many retries will be attempted

uint8_t reserved[3]

Reserved bytes to align structure to word

uint16_t timeout

Timeout in seconds

uint8_t uid[112]

Provisioning UID

uint8_t uid_len

Provisioning UID length

◆ app_setup_action_t

struct app_setup_action_t

Actions for application setup.

Definition at line 214 of file app_setup_int.h.

Data Fields
uint8_t no_erase_after

Do not erase application persistent area after setup configuration is read

uint16_t reserved

Reserved to align structure to word

uint8_t start_dualmcu

Start dualMCU app on boot without explicit command

◆ app_setup

struct app_setup

Application setup data structure.

Definition at line 236 of file app_setup_int.h.

Data Fields
app_setup_action_t action

Application setup actions

app_setup_hdr_t header

Header

app_setup_key_mgmt_t key_mgmt

Key management configuration

app_setup_node_t node

Node configuration

app_setup_provisioning_t provisioning

Provisioning configuration

Macro Definition Documentation

◆ APP_SETUP_CLEAR_BYTE

#define APP_SETUP_CLEAR_BYTE   0xff

In flash 0xff marks empty byte.

Definition at line 42 of file app_setup_int.h.

◆ APP_SETUP_FORMAT

#define APP_SETUP_FORMAT   0xabb5e70b

Internal header for application setup library.

     Data structures match the output produced by:

         tools/app_setup.py
Note
Data structures are packed and aligned so that every compound member and array are word addressable.

One MUST NOT use scalar members as pointers, because they are not guaranteed to be on word addressable offset. DEFINITIONS

Application setup data identifier

     If application persistent area has this at the beginning, the
     data is presumed to be application setup data.

Definition at line 32 of file app_setup_int.h.

◆ APP_SETUP_KEY_SIZE_BYTES

#define APP_SETUP_KEY_SIZE_BYTES   16

All security keys are 16 bytes long.

Definition at line 47 of file app_setup_int.h.

◆ APP_SETUP_PROV_UID_MAX_SIZE_BYTES

#define APP_SETUP_PROV_UID_MAX_SIZE_BYTES   112

Maximum size of provisioning UID.

Definition at line 52 of file app_setup_int.h.

◆ APP_SETUP_VERSION

#define APP_SETUP_VERSION   1

Version of the library.

Definition at line 37 of file app_setup_int.h.