XBee Firmware Library  1.6.0
Files | Data Structures | Typedefs | Functions | Variables

Files

file  zcl_commissioning.c
 
file  zcl_commissioning.h
 

Data Structures

struct  zcl_comm_startup_attr_t
 
struct  zcl_comm_startup_param_t
 
struct  zcl_comm_state_t
 

Typedefs

typedef PACKED_STRUCT zcl_comm_reset_startup_param_t
 
typedef PACKED_STRUCT zcl_comm_restart_device_cmd_t
 
typedef PACKED_STRUCT zcl_comm_restore_startup_param_t
 
typedef PACKED_STRUCT zcl_comm_save_startup_param_t
 
typedef struct zcl_comm_startup_attr_t zcl_comm_startup_attr_t
 
typedef struct zcl_comm_startup_param_t zcl_comm_startup_param_t
 
typedef struct zcl_comm_state_t zcl_comm_state_t
 

Functions

int _zcl_comm_command_build (wpan_envelope_t FAR *envelope, zcl_header_nomfg_t *header)
 
int _zcl_comm_command_send (wpan_envelope_t FAR *envelope)
 
int _zcl_comm_startup_control_set (const zcl_attribute_full_t FAR *attribute, zcl_attribute_write_rec_t *rec)
 
int rand_range (int range)
 
int zcl_comm_clust_handler (const wpan_envelope_t FAR *envelope, void FAR *context)
 
void zcl_comm_factory_reset (uint16_t ms_delay)
 Perform a locally-triggered factory reset to default SAS. More...
 
int zcl_comm_reset_parameters (wpan_envelope_t FAR *envelope, const zcl_comm_reset_startup_param_t *parameters)
 Send a "Reset Startup Parameters" command to the ZCL Commissioning Cluster. More...
 
int zcl_comm_response (const wpan_envelope_t FAR *envelope, uint_fast8_t status)
 Send response to a Commissioning Server Cluster request. More...
 
int zcl_comm_restart_device (wpan_envelope_t FAR *envelope, const zcl_comm_restart_device_cmd_t *parameters)
 Send a "Restart Device" command to the ZCL Commissioning Cluster. More...
 
void zcl_comm_sas_init (zcl_comm_startup_param_t *parameters)
 
bool_t zcl_comm_sas_is_valid (const zcl_comm_state_t FAR *comm)
 

Variables

uint32_t channel_mask
 
zcl_attribute_base_t channel_mask
 
struct {
   uint8_t   discovery_time
 
   bool_t   flag
 
   uint8_t   radius
 
concentrator
 
struct {
   zcl_attribute_base_t   discovery_time
 
   zcl_attribute_base_t   flag
 
   zcl_attribute_base_t   radius
 
concentrator
 
uint8_t delay
 
uint8_t   discovery_time
 
zcl_attribute_base_t   discovery_time
 
uint16_t end_of_list
 
zcl64_t extended_panid
 
zcl_attribute_base_t extended_panid
 
bool_t   flag
 
zcl_attribute_base_t   flag
 
uint8_t flags
 
uint8_t index
 
uint8_t jitter
 
uint16_t max_rejoin_interval
 
zcl_attribute_full_t max_rejoin_interval
 
zcl_attribute_base_t network_key
 
uint8_t network_key_le [16]
 
uint8_t network_key_seq_num
 
zcl_attribute_base_t network_key_seq_num
 
uint8_t network_key_type
 
zcl_attribute_base_t network_key_type
 
uint16_t network_mgr_addr
 
zcl_attribute_base_t network_mgr_addr
 
uint16_t panid
 
zcl_attribute_base_t panid
 
zcl_attribute_base_t preconfig_link_key
 
uint8_t preconfig_link_key_le [16]
 
uint8_t   radius
 
zcl_attribute_base_t   radius
 
uint16_t rejoin_interval
 
zcl_attribute_full_t rejoin_interval
 
uint32_t restart_ms
 value of xbee_millisecond_timer() when it's time to restart More...
 
zcl_comm_startup_param_t sas
 
uint8_t scan_attempts
 
zcl_attribute_full_t scan_attempts
 
uint16_t short_address
 
zcl_attribute_base_t short_address
 
uint8_t startup_control
 
zcl_attribute_full_t startup_control
 
uint8_t state
 
uint16_t time_between_scans
 
zcl_attribute_full_t time_between_scans
 
zcl_attribute_base_t trust_ctr_addr
 
zcl_attribute_base_t trust_ctr_master_key
 
bool_t use_insecure_join
 
zcl_attribute_base_t use_insecure_join
 
const zcl_comm_startup_param_t zcl_comm_default_sas
 
const zcl64_t zcl_comm_global_epid = ZCL_COMM_GLOBAL_EPID
 
const zcl64_t zcl_comm_global_epid
 
const zcl_attribute_tree_t zcl_comm_startup_attribute_tree []
 
const zcl_attribute_tree_t zcl_comm_startup_attribute_tree []
 
const zcl_comm_startup_attr_t zcl_comm_startup_attributes
 
const zcl_comm_startup_attr_t zcl_comm_startup_attributes
 
zcl_comm_state_t zcl_comm_state = { { 0 } }
 
zcl_comm_state_t zcl_comm_state
 

Detailed Description

Typedef Documentation

Initial value:
{
unsigned char uint8_t
A unsigned char variable 8 bits.
Definition: types.h:43
uint8_t options
Options byte (see XBEE_REMOTE_AT_OPT_* macros)
Definition: atcmd.h:264
Initial value:
{
unsigned char uint8_t
A unsigned char variable 8 bits.
Definition: types.h:43
uint8_t options
Options byte (see XBEE_REMOTE_AT_OPT_* macros)
Definition: atcmd.h:264
Initial value:
{
unsigned char uint8_t
A unsigned char variable 8 bits.
Definition: types.h:43
uint8_t options
Options byte (see XBEE_REMOTE_AT_OPT_* macros)
Definition: atcmd.h:264
Initial value:
{
unsigned char uint8_t
A unsigned char variable 8 bits.
Definition: types.h:43
uint8_t options
Options byte (see XBEE_REMOTE_AT_OPT_* macros)
Definition: atcmd.h:264

Function Documentation

int _zcl_comm_command_build ( wpan_envelope_t FAR *  envelope,
zcl_header_nomfg_t header 
)
int _zcl_comm_command_send ( wpan_envelope_t FAR *  envelope)
int _zcl_comm_startup_control_set ( const zcl_attribute_full_t FAR *  attribute,
zcl_attribute_write_rec_t rec 
)
int rand_range ( int  range)
int zcl_comm_clust_handler ( const wpan_envelope_t FAR *  envelope,
void FAR *  context 
)
void zcl_comm_factory_reset ( uint16_t  ms_delay)

Perform a locally-triggered factory reset to default SAS.

Parameters
[in]ms_delayinitiate reset after ms_delay milliseconds
int zcl_comm_reset_parameters ( wpan_envelope_t FAR *  envelope,
const zcl_comm_reset_startup_param_t parameters 
)

Send a "Reset Startup Parameters" command to the ZCL Commissioning Cluster.

Parameters
[in,out]envelopePartial envelope used to send the request. Caller must set dev, ieee_address, network_address, profile_id, source_endpoint, dest_endpoint and (optionally) options. On return, payload and length are cleared, and cluster_id is set to ZCL_CLUST_COMMISSIONING.

If source_endpoint is 0, function will search the endpoint table for a Commissioning Client Cluster and set the envelope's source_endpoint and profile_id.

Parameters
[in]parametersParameters for the Reset Startup Parameters command or NULL for default settings (reset current parameters only).
Return values
0request sent
-EINVALcouldn't find source endpoint in endpoint table, or some other error in parameter passed to function
!0error trying to send request
int zcl_comm_response ( const wpan_envelope_t FAR *  envelope,
uint_fast8_t  status 
)

Send response to a Commissioning Server Cluster request.

int zcl_comm_restart_device ( wpan_envelope_t FAR *  envelope,
const zcl_comm_restart_device_cmd_t parameters 
)

Send a "Restart Device" command to the ZCL Commissioning Cluster.

Parameters
[in,out]envelopePartial envelope used to send the request. Caller must set dev, ieee_address, network_address, profile_id, source_endpoint, dest_endpoint and (optionally) options. On return, payload and length are cleared, and cluster_id is set to ZCL_CLUST_COMMISSIONING.

If source_endpoint is 0, function will search the endpoint table for a Commissioning Client Cluster and set the envelope's source_endpoint and profile_id.

Parameters
[in]parametersParameters for the Restart Device command or NULL for default settings (save changes and restart without delay/jitter).
Return values
0request sent
-EINVALcouldn't find source endpoint in endpoint table, or some other error in parameter passed to function
!0error trying to send request
void zcl_comm_sas_init ( zcl_comm_startup_param_t parameters)
bool_t zcl_comm_sas_is_valid ( const zcl_comm_state_t FAR *  comm)

Partial implementation of a function to validate a Startup Attribute Set before trying to use it.

Parameters
[in]commStartup Attribute Set to test.
Return values
TRUEStartup Attribute Set is valid
FALSEStartup Attribute Set is invalid and cannot be used

add more tests to this function

Variable Documentation

uint32_t channel_mask
zcl_attribute_base_t channel_mask
struct { ... } concentrator
struct { ... } concentrator
uint8_t delay
uint8_t discovery_time
uint8_t discovery_time
zcl_attribute_base_t discovery_time
zcl_attribute_base_t discovery_time
uint16_t end_of_list
zcl64_t extended_panid
zcl_attribute_base_t extended_panid
bool_t flag
bool_t flag
uint8_t flags
uint8_t index
uint8_t jitter
uint16_t max_rejoin_interval
zcl_attribute_full_t max_rejoin_interval
zcl_attribute_base_t network_key
uint8_t network_key_le[16]
uint8_t network_key_seq_num
zcl_attribute_base_t network_key_seq_num
uint8_t network_key_type
zcl_attribute_base_t network_key_type
uint16_t network_mgr_addr
zcl_attribute_base_t network_mgr_addr
uint16_t panid
zcl_attribute_base_t preconfig_link_key
uint8_t preconfig_link_key_le[16]
uint8_t radius
uint8_t radius
uint16_t rejoin_interval
zcl_attribute_full_t rejoin_interval
uint32_t restart_ms

value of xbee_millisecond_timer() when it's time to restart

uint8_t scan_attempts
zcl_attribute_full_t scan_attempts
uint16_t short_address
zcl_attribute_base_t short_address
uint8_t startup_control
zcl_attribute_full_t startup_control
uint8_t state
uint16_t time_between_scans
zcl_attribute_full_t time_between_scans
zcl_attribute_base_t trust_ctr_addr
zcl_attribute_base_t trust_ctr_master_key
bool_t use_insecure_join
zcl_attribute_base_t use_insecure_join
const zcl_comm_startup_param_t zcl_comm_default_sas
const zcl64_t zcl_comm_global_epid = ZCL_COMM_GLOBAL_EPID
const zcl64_t zcl_comm_global_epid
const zcl_attribute_tree_t zcl_comm_startup_attribute_tree[]
const zcl_attribute_tree_t zcl_comm_startup_attribute_tree[]
Initial value:
=
{ { ZCL_MFG_NONE, &zcl_comm_startup_attributes.short_address, NULL } }
const zcl_comm_startup_attr_t zcl_comm_startup_attributes
Definition: zcl_commissioning.c:111
zcl_attribute_base_t short_address
Definition: zcl_commissioning.h:123
const zcl_comm_startup_attr_t zcl_comm_startup_attributes
const zcl_comm_startup_attr_t zcl_comm_startup_attributes
zcl_comm_state_t zcl_comm_state = { { 0 } }
zcl_comm_state_t zcl_comm_state