Network general¶
Types¶
Name | Type | Description |
---|---|---|
mira_link_metric_t |
uint16_t |
Enums¶
mira_net_state_t¶
Value | Description |
---|---|
MIRA_NET_STATE_NOT_ASSOCIATED | |
MIRA_NET_STATE_IS_COORDINATOR | |
MIRA_NET_STATE_ASSOCIATED | |
MIRA_NET_STATE_JOINED |
Structs¶
mira_net_address_t¶
Type | Name | Description |
---|---|---|
uint8_t[16] |
u8 |
Functions¶
mira_net_init¶
mira_status_t mira_net_init( void);
Return
Whether or not the action was successful
mira_net_set_pan_id¶
mira_status_t mira_net_set_pan_id( uint32_t pan_id);
Parameters
Parameter | Description |
---|---|
pan_id |
The requested PAN ID |
Return
Whether or not the action was successful
mira_net_get_address¶
mira_status_t mira_net_get_address( mira_net_address_t* dst);
Parameters
Parameter | Description |
---|---|
dst |
The destination where to store the retrieved IP address |
Return
Whether or not the action was successful
mira_net_set_root¶
mira_status_t mira_net_set_root( void);
Return
Whether or not the action was successful
mira_net_get_state¶
mira_net_state_t mira_net_get_state( void);
Return
Current network state
mira_net_get_root_address¶
mira_status_t mira_net_get_root_address( mira_net_address_t* dst);
Parameters
Parameter | Description |
---|---|
dst |
The destination where to store the retrieved IP address of the root node |
Return
Whether or not the action was successful
mira_net_get_parent_address¶
mira_status_t mira_net_get_parent_address( mira_net_address_t* dst);
Parameters
Parameter | Description |
---|---|
dst |
The destination where to store the retrieved IP address of the parent. |
Return
Whether or not the action was successful
mira_net_get_parent_link_metric¶
mira_link_metric_t mira_net_get_parent_link_metric( void);
Return
A link quality metric as an unsigned 9.7 fix point number
mira_net_encryption_key_set¶
mira_status_t mira_net_encryption_key_set( const uint8_t* src);
Set the encryption key to use. The key is an array of 16 bytes
Parameters
Parameter | Description |
---|---|
src |
Encryption key to set. |
Return
MIRA_SUCCESS if successful.
mira_net_reset_scanning¶
mira_status_t mira_net_reset_scanning( void);
Network scanning will timeout after 30 minutes and sleep to conserve battery power in the case that there is no network to join. The sleep period is 60 minutes the first time, and will double after each active scan period. The sleep period will never be longer than 24 hours.
Return
MIRA_SUCCESS if successful.