Friendly LWM2M client
ConnectivityMonitoring.h
Go to the documentation of this file.
1 /*
2  * ConnectivityMonitoring
3  * Generated on: 2023-11-02 16:57:15
4  * Created by: Sinai RnD
5  */
6 
7 #ifndef WPP_O_4_CONNECTIVITY_MONITORING_H
8 #define WPP_O_4_CONNECTIVITY_MONITORING_H
9 
12 #include "Instance.h"
13 #include "InstSubject.h"
14 
15 /* --------------- Сode_h block 0 start --------------- */
16 /* --------------- Сode_h block 0 end --------------- */
17 
18 namespace wpp {
19 
20 class WppClient;
21 class Object;
22 
23 /* --------------- Сode_h block 1 start --------------- */
24 /* --------------- Сode_h block 1 end --------------- */
25 
27 public:
28  enum ID: ID_T {
32  #if RES_4_3
33  LINK_QUALITY_3 = 3,
34  #endif
36  #if RES_4_5
37  ROUTER_IP_ADDRESSES_5 = 5,
38  #endif
39  #if RES_4_6
40  LINK_UTILIZATION_6 = 6,
41  #endif
42  #if RES_4_7
43  APN_7 = 7,
44  #endif
45  #if RES_4_8
46  CELL_ID_8 = 8,
47  #endif
48  #if RES_4_9
49  SMNC_9 = 9,
50  #endif
51  #if RES_4_10
52  SMCC_10 = 10,
53  #endif
54  #if RES_4_11
55  SIGNALSNR_11 = 11,
56  #endif
57  #if RES_4_12
58  LAC_12 = 12,
59  #endif
60  #if RES_4_13
61  COVERAGE_ENHANCEMENT_LEVEL_13 = 13,
62  #endif
63  };
64 
65  /* --------------- Code_h block 2 start --------------- */
66  enum NtwrkBrr: uint8_t {
67  GSM = 0,
68  TD_SCDMA = 1,
69  WCDMA = 2,
70  CDMA2000 = 3,
71  WIMAX = 4,
72  LTE_TDD = 5,
73  LTE_FDD = 6,
74  NB_IOT = 7,
75  NR_TDD_5G = 8,
76  NR_FDD_5G = 9,
79  WLAN = 21,
80  BLUETOOTH = 22,
84  ETHERNET = 41,
85  DSL = 42,
86  PLC = 43,
90  };
91 
92  #if RES_4_13
93  enum CvrgEnhncmntLvl: uint8_t {
94  MISSING = 0,
95  LEVEL_0 = 1,
96  LEVEL_1 = 2,
97  LEVEL_2 = 3,
98  LEVEL_3 = 4,
99  CVRG_ENHNCMNT_LVL_MAX
100  };
101  #endif
102  /* --------------- Code_h block 2 end --------------- */
103 
104 public:
105  ConnectivityMonitoring(lwm2m_context_t &context, const OBJ_LINK_T &id);
107 
108  /* --------------- Helpful methods --------------- */
114  static Object & object(WppClient &ctx);
115 
122  static ConnectivityMonitoring * instance(WppClient &ctx, ID_T instId = ID_T_MAX_VAL);
123 
130  static ConnectivityMonitoring * createInst(WppClient &ctx, ID_T instId = ID_T_MAX_VAL);
131 
138  static bool removeInst(WppClient &ctx, ID_T instId);
139 
140  /* --------------- Code_h block 3 start --------------- */
141 
142  bool checkLinkQuality(uint8_t linkQuality);
143  bool checkCellId(uint32_t cellId);
144 
145  /* --------------- Code_h block 3 end --------------- */
146 
147 protected:
148  /* --------------- Instance implementation part --------------- */
149  /*
150  * Handles information about resource operation that made server
151  */
152  void serverOperationNotifier(Instance *securityInst, ItemOp::TYPE type, const ResLink &resLink) override;
153  /*
154  * Handles information about resource operation that made user
155  */
156  void userOperationNotifier(ItemOp::TYPE type, const ResLink &resLink) override;
157 
158  /* --------------- Code_h block 4 start --------------- */
159  /* --------------- Code_h block 4 end --------------- */
160 
161 private:
162  /* --------------- Class private methods --------------- */
163  /*
164  * Creates resources without initializing.
165  */
166  void resourcesCreate();
167  /*
168  * Initialize resources with default values
169  * SINGLE resource always must have at least one instance.
170  */
171  void resourcesInit();
172 
173  /* --------------- Code_h block 5 start --------------- */
174  /* --------------- Code_h block 5 end --------------- */
175 
176 private:
177  /* --------------- Class private properties --------------- */
178  /* --------------- Code_h block 6 start --------------- */
179  /* --------------- Code_h block 6 end --------------- */
180 };
181 
182 } /* namespace wpp */
183 
184 #endif /* WPP_O_4_CONNECTIVITY_MONITORING_H */
#define ID_T_MAX_VAL
Definition: WppTypes.h:16
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.
static Object & object(WppClient &ctx)
Gets the Object reference.
bool checkLinkQuality(uint8_t linkQuality)
Instance is interface class that implements manipulation with derived class resources....
Definition: Instance.h:40
Instance(lwm2m_context_t &context, const OBJ_LINK_T &id)
Definition: Instance.h:42
The WppConnection class represents a connection interface for the Wpp library.
Definition: WppClient.cpp:14
uint16_t ID_T
Definition: WppTypes.h:15
TYPE
Enum representing the different types of operations.
Definition: ItemOp.h:29