16 #define NTWRK_BRR_MIN 0
17 #define NTWRK_BRR_MAX 50
18 #define AVLB_NTWRK_BRR_MIN 0
19 #define AVLB_NTWRK_BRR_MAX 50
20 #define LINK_QUALITY_IEEE_802_15_4_MIN 0
21 #define LINK_QUALITY_IEEE_802_15_4_MAX 255
22 #define LINK_QUALITY_GSM_MIN 0
23 #define LINK_QUALITY_GSM_MAX 7
25 #define LINK_UTLZTN_MIN 0
26 #define LINK_UTLZTN_MAX 100
28 #define CELL_ID_GSM_MIN 0
29 #define CELL_ID_GSM_MAX 65535
30 #define CELL_ID_WCDMA_MIN 0
31 #define CELL_ID_WCDMA_MAX 268435455
42 #define TAG "ConnectivityMonitoring"
69 if (!inst)
return NULL;
75 if (!inst)
return NULL;
100 void ConnectivityMonitoring::resourcesCreate() {
140 void ConnectivityMonitoring::resourcesInit() {
194 switch (networkBearer) {
213 switch (networkBearer) {
#define CELL_ID_WCDMA_MAX
#define LINK_QUALITY_IEEE_802_15_4_MIN
#define CELL_ID_WCDMA_MIN
#define LINK_QUALITY_GSM_MAX
#define AVLB_NTWRK_BRR_MAX
#define AVLB_NTWRK_BRR_MIN
#define LINK_QUALITY_IEEE_802_15_4_MAX
#define LINK_QUALITY_GSM_MIN
static ConnectivityMonitoring * createInst(WppClient &ctx, ID_T instId=ID_T_MAX_VAL)
Creates an instance of the object.
ConnectivityMonitoring(lwm2m_context_t &context, const OBJ_LINK_T &id)
void userOperationNotifier(ItemOp::TYPE type, const ResLink &resLink) override
This method must be implemented by the derived class, and handle information about resource operation...
void serverOperationNotifier(Instance *securityInst, ItemOp::TYPE type, const ResLink &resLink) override
This method must be implemented by the derived class, and handle information about resource operation...
static ConnectivityMonitoring * instance(WppClient &ctx, ID_T instId=ID_T_MAX_VAL)
Gets an instance of the object.
static bool removeInst(WppClient &ctx, ID_T instId)
Removes an instance of the object.
@ AVAILABLE_NETWORK_BEARER_1
@ RADIO_SIGNAL_STRENGTH_2
static Object & object(WppClient &ctx)
Gets the Object reference.
bool checkLinkQuality(uint8_t linkQuality)
bool checkCellId(uint32_t cellId)
~ConnectivityMonitoring()
void operationNotify(Instance &inst, const ResLink &resLink, ItemOp::TYPE type)
Notifies the observers about an operation on an instance resource.
Instance is interface class that implements manipulation with derived class resources....
void notifyResChanged(ID_T resId, ID_T resInstId=ID_T_MAX_VAL)
Notify server about resource value change.
The Object class implements manipulation with Instance interface class and its inheritors.
Instance * instance(ID_T instanceID=ID_T_MAX_VAL)
Gets an instance of the object.
virtual Instance * createInstance(ID_T instanceID=ID_T_MAX_VAL)=0
Creates an instance of the object.
bool remove(ID_T instanceID)
Removes an instance of the object.
void setupResources(const std::vector< Resource > &resources)
This methods setup resources list.
Resource * resource(ID_T resId)
This method return resource ptr if it exists. If resources does not exist then return NULL.
std::vector< Resource > & resources()
This method return list with all resources that has been defined.
bool set(const T &value, ID_T resInstId=SINGLE_INSTANCE_ID)
Set data value by copy for the resource (instance)
bool setDataVerifier(const DATA_VERIFIER_T &verifier)
Set data verifier for the resource.
const T & get(ID_T resInstId=SINGLE_INSTANCE_ID)
Represents a client interface for Wpp library.
WppRegistry & registry()
Gets the WppRegistry associated with the WppClient.
Object & connectivityMonitoring()
The WppConnection class represents a connection interface for the Wpp library.
std::function< bool(const INT_T &)> VERIFY_INT_T
Data validation function types.
The ItemOp struct represents the operations that can be performed on a instance/resource.
TYPE
Enum representing the different types of operations.
ObjLink - (object ID):(instance ID), example: 1:3. Represent as two integers in lwm2m_data_t....