Wirepas SDK
provisioning_config.h File Reference

Go to the source code of this file.

Functions

uint8_t remote_api_csap_write (uint16_t attr_id, uint32_t flags, app_lib_settings_remote_api_csap_data_t *data)
 
uint8_t remote_api_csap_read (uint16_t attr_id, app_lib_settings_remote_api_csap_data_t *data)
 
app_lib_settings_remote_api_res_e remote_api_csap_update (void)
 
void remote_api_csap_cancel (void)
 
settings_validation_ret_e validate_settings (const provisioning_settings_t *settings)
 

Enumerations

enum  settings_validation_ret_e {
  SETTINGS_OK = 0, SETTINGS_INVALID = 1, SETTINGS_UID_INVALID_LENGTH = 2, SETTINGS_EUID_INVALID_TYPE = 3,
  SETTINGS_INVALID_KEY = 4, SETTINGS_INVALID_TIMEOUT = 5
}
 

Function Documentation

◆ remote_api_csap_cancel()

void remote_api_csap_cancel ( void  )

Function for handling the Remote API CSAP attribute cancel request on application side. Clear any stored attributes from the temporary location which were stored there in write requests. See, more details on the purpose and use of the cancel function in the Remote API reference manual.

◆ remote_api_csap_read()

uint8_t remote_api_csap_read ( uint16_t  attr_id,
app_lib_settings_remote_api_csap_data_t data 
)

Function for handling the Remote API CSAP attribute read requests on the application side. Reads the CSAP attribute values and builds the response. See, more details on the use of the write function in the Remote API reference manual.

Parameters
attr_idAttribute ID value that is read. Remote API is expected to call this function only with an attribute ID between 0xC001 - 0xFFFF.
dataThe payload content of the CSAP attribute read request as well as reference to buffers where the response is written.
Returns
Returns REMOTE_API_CSAP_RESPONSE_NONE is read was succesful and response was generated successfully, otherwise an error code is returned.

◆ remote_api_csap_update()

app_lib_settings_remote_api_res_e remote_api_csap_update ( void  )

Function for handling the Remote API CSAP attribute update request on application side. Stores the CSAP attribute values of the preceding write requests to a persistent location (from the temporary location). See, more details on the purpose and use of the update function in the Remote API reference manual.

Returns
Return APP_LIB_SETTINGS_REMOTE_API_RES_OK if update was ok, APP_LIB_SETTINGS_REMOTE_API_RES_OK_RESET if update was ok and reset is required, APP_LIB_SETTINGS_REMOTE_API_RES_NONE otherwise.

◆ remote_api_csap_write()

uint8_t remote_api_csap_write ( uint16_t  attr_id,
uint32_t  flags,
app_lib_settings_remote_api_csap_data_t data 
)

Function for handling the Remote API CSAP attribute write requests on the application side. Stores the CSAP attribute values to a temporary location and builds the response. See, more details on the use of the write function in the Remote API reference manual.

Parameters
attr_idAttribute ID value that is written. Remote API is expected to call this function only with an attribute ID between 0xC001 - 0xFFFF.
flagsIncludes additional information such as whether the write requestwas transported in a unicast packet.
dataThe payload content of the CSAP attribute write request as well as reference to buffers where the response is written.
Returns
Returns REMOTE_API_CSAP_RESPONSE_NONE is write was succesful and response was generated successfully, otherwise an error code is returned.

◆ validate_settings()

settings_validation_ret_e validate_settings ( const provisioning_settings_t settings)

Enumeration Type Documentation

◆ settings_validation_ret_e

Enumerator
SETTINGS_OK 
SETTINGS_INVALID 
SETTINGS_UID_INVALID_LENGTH 
SETTINGS_EUID_INVALID_TYPE 
SETTINGS_INVALID_KEY 
SETTINGS_INVALID_TIMEOUT 

Definition at line 9 of file provisioning_config.h.

SETTINGS_OK
@ SETTINGS_OK
Definition: provisioning_config.h:11
SETTINGS_INVALID_TIMEOUT
@ SETTINGS_INVALID_TIMEOUT
Definition: provisioning_config.h:16
SETTINGS_EUID_INVALID_TYPE
@ SETTINGS_EUID_INVALID_TYPE
Definition: provisioning_config.h:14
SETTINGS_UID_INVALID_LENGTH
@ SETTINGS_UID_INVALID_LENGTH
Definition: provisioning_config.h:13
settings_validation_ret_e
settings_validation_ret_e
Definition: provisioning_config.h:9
SETTINGS_INVALID_KEY
@ SETTINGS_INVALID_KEY
Definition: provisioning_config.h:15
SETTINGS_INVALID
@ SETTINGS_INVALID
Definition: provisioning_config.h:12