Wirepas SDK
lock_bits.h File Reference

Detailed Description

App side handling of feature lock bits

Definition in file lock_bits.h.

Go to the source code of this file.

Functions

bool LockBits_isKeySet (void)
 Check if a feature lock key is set.
 
bool LockBits_isFeaturePermitted (uint32_t lock_bits)
 Check if a feature is permitted.
 

Enumerations

enum  lock_bits_e {
  LOCK_BITS_DSAP_DATA_TX = 0x00000001 , LOCK_BITS_MSAP_STACK_START = 0x00000004 , LOCK_BITS_MSAP_STACK_STOP = 0x00000008 , LOCK_BITS_MSAP_APP_CONFIG_WRITE = 0x00000010 ,
  LOCK_BITS_MSAP_APP_CONFIG_READ = 0x00000020 , LOCK_BITS_MSAP_ATTR_WRITE = 0x00000040 , LOCK_BITS_MSAP_ATTR_READ = 0x00000080 , LOCK_BITS_CSAP_ATTR_WRITE = 0x00000100 ,
  LOCK_BITS_CSAP_ATTR_READ = 0x00000200 , LOCK_BITS_CSAP_FACTORY_RESET = 0x00001000 , LOCK_BITS_MSAP_SCRATCHPAD_START = 0x00002000 , LOCK_BITS_MSAP_SCRATCHPAD_STATUS = 0x00008000 ,
  LOCK_BITS_MSAP_GET_NBORS = 0x00200000 , LOCK_BITS_MSAP_SCAN_NBORS = 0x00400000 , LOCK_BITS_MSAP_SINK_COST_WRITE = 0x02000000 , LOCK_BITS_MSAP_SINK_COST_READ = 0x04000000 ,
  LOCK_BITS_REMOTE_API_TX = 0x20000000 , LOCK_BITS_OTAP = 0x80000000
}
 Feature lock bits. More...
 

Function Documentation

◆ LockBits_isFeaturePermitted()

bool LockBits_isFeaturePermitted ( uint32_t  lock_bits)

Check if a feature is permitted.

Parameters
lock_bitsOne or more lock bits to check
Returns
True if none of the lock bits are locked, false otherwise

◆ LockBits_isKeySet()

bool LockBits_isKeySet ( void  )

Check if a feature lock key is set.

Returns
True if feature lock key is set, false otherwise

Enumeration Type Documentation

◆ lock_bits_e

Feature lock bits.

Note
A set bit means that the feature is not locked (all set by default)
These bits try to follow the order and gaps of Dual-MCU API primitive IDs
Enumerator
LOCK_BITS_DSAP_DATA_TX 

Prevent sending data with DATA_TX and DATA_TX_TT requests

LOCK_BITS_MSAP_STACK_START 

Prevent starting stack

LOCK_BITS_MSAP_STACK_STOP 

Prevent stopping stack

LOCK_BITS_MSAP_APP_CONFIG_WRITE 

Prevent setting app config data

LOCK_BITS_MSAP_APP_CONFIG_READ 

Prevent reading app config data

LOCK_BITS_MSAP_ATTR_WRITE 

Prevent writing MSAP attributes

LOCK_BITS_MSAP_ATTR_READ 

Prevent reading certain MSAP attributes

LOCK_BITS_CSAP_ATTR_WRITE 

Prevent writing CSAP attributes (except feature lock key)

LOCK_BITS_CSAP_ATTR_READ 

Prevent reading certain CSAP attributes

LOCK_BITS_CSAP_FACTORY_RESET 

Prevent performing factory reset

LOCK_BITS_MSAP_SCRATCHPAD_START 

Prevent scratchpad write and read operations

LOCK_BITS_MSAP_SCRATCHPAD_STATUS 

Prevent reading scratchpad status (includes CSAP and MSAP attributes)

LOCK_BITS_MSAP_GET_NBORS 

Prevent reading neighbor information (includes MSAP attributes)

LOCK_BITS_MSAP_SCAN_NBORS 
LOCK_BITS_MSAP_SINK_COST_WRITE 

Prevent affecting the sink cost

LOCK_BITS_MSAP_SINK_COST_READ 

Prevent reading the sink cost

LOCK_BITS_REMOTE_API_TX 

Prevent sending Remote API requests

LOCK_BITS_OTAP 

Prevent participating in OTAP operations

Definition at line 25 of file lock_bits.h.

26{
28 LOCK_BITS_DSAP_DATA_TX = 0x00000001,
30 LOCK_BITS_MSAP_STACK_START = 0x00000004,
32 LOCK_BITS_MSAP_STACK_STOP = 0x00000008,
38 LOCK_BITS_MSAP_ATTR_WRITE = 0x00000040,
40 LOCK_BITS_MSAP_ATTR_READ = 0x00000080,
42 LOCK_BITS_CSAP_ATTR_WRITE = 0x00000100,
44 LOCK_BITS_CSAP_ATTR_READ = 0x00000200,
52 LOCK_BITS_MSAP_GET_NBORS = 0x00200000,
53 LOCK_BITS_MSAP_SCAN_NBORS = 0x00400000,
59 LOCK_BITS_REMOTE_API_TX = 0x20000000,
61 LOCK_BITS_OTAP = 0x80000000,
lock_bits_e
Feature lock bits.
Definition lock_bits.h:26
@ LOCK_BITS_MSAP_SCAN_NBORS
Definition lock_bits.h:53
@ LOCK_BITS_MSAP_SCRATCHPAD_STATUS
Definition lock_bits.h:50
@ LOCK_BITS_MSAP_SINK_COST_WRITE
Definition lock_bits.h:55
@ LOCK_BITS_MSAP_APP_CONFIG_READ
Definition lock_bits.h:36
@ LOCK_BITS_MSAP_STACK_START
Definition lock_bits.h:30
@ LOCK_BITS_DSAP_DATA_TX
Definition lock_bits.h:28
@ LOCK_BITS_MSAP_ATTR_READ
Definition lock_bits.h:40
@ LOCK_BITS_CSAP_ATTR_READ
Definition lock_bits.h:44
@ LOCK_BITS_MSAP_SINK_COST_READ
Definition lock_bits.h:57
@ LOCK_BITS_MSAP_STACK_STOP
Definition lock_bits.h:32
@ LOCK_BITS_MSAP_ATTR_WRITE
Definition lock_bits.h:38
@ LOCK_BITS_MSAP_SCRATCHPAD_START
Definition lock_bits.h:48
@ LOCK_BITS_CSAP_FACTORY_RESET
Definition lock_bits.h:46
@ LOCK_BITS_CSAP_ATTR_WRITE
Definition lock_bits.h:42
@ LOCK_BITS_MSAP_GET_NBORS
Definition lock_bits.h:52
@ LOCK_BITS_MSAP_APP_CONFIG_WRITE
Definition lock_bits.h:34
@ LOCK_BITS_REMOTE_API_TX
Definition lock_bits.h:59
@ LOCK_BITS_OTAP
Definition lock_bits.h:61