Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / NS__CWORD77__ServiceIf / src / ns__CWORD77__data_pool_table.cpp
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 ////////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_HMI_CWORD77_Controller
19 /// \brief
20 ///
21 ////////////////////////////////////////////////////////////////////////////////
22
23 #include <native_service/ns__CWORD77__data_pool_table.h>
24 #include <native_service/ns__CWORD77__data_pool_if.h>
25 #include <vector>
26 #include <string>
27 #include <map>
28 #include <utility>
29 #include "ns__CWORD77__data_pool_internal.h"
30 #include "ns__CWORD77__common_internal.h"
31
32 C_CWORD77_DataPool g__CWORD77_DataPool;
33 C_CWORD77_DataPool *C_CWORD77_DataPool::m_p_CWORD77_DataPoolInstance = NULL;
34
35 // For getting/setting notification data from data pool,
36 // data key will be pair<g_uiNotificationDataPoolId,"NotificationName">
37 static const UI_32 g_uiNotificationDataPoolId = 0;
38
39 /////////////////////////////////////////////////////////////////////////////////
40 /// NoOfElementsinData
41 /////////////////////////////////////////////////////////////////////////////////
42 UI_32 NoOfElementsinData(std::string Input) {
43   std::string first = "";
44   std::istringstream ss(Input);
45   int i = 0;
46   while (!ss.eof()) {
47     getline(ss, first, ',');
48     if (first != "") {
49       i++;
50     }
51   }
52   return i;
53 }
54
55 /////////////////////////////////////////////////////////////////////////////////
56 /// ConvertArrayStringsToString
57 /////////////////////////////////////////////////////////////////////////////////
58 std::string ConvertArrayStringsToString(std::string *strArr, int Size) {
59   int length = 0;
60   std::string Result;
61   if (strArr == NULL) {
62     FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "strArr is NULL");
63     Result.append("");
64     return Result;
65   }
66   while (length < Size) {
67     Result.append(strArr[length]);
68     Result.append(",");
69     length++;
70   }
71   Result.append("");
72   return Result;
73 }
74 /////////////////////////////////////////////////////////////////////////////////
75 /// ConvertStringToArrString
76 /////////////////////////////////////////////////////////////////////////////////
77 void ConvertStringToArrString(std::string Input, std::string *strArr,
78                               UI_32 &ArraySize) {   // NOLINT  (readability/nolint)
79   if (strArr == NULL) {
80     FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "strArr is NULL");
81     return;
82   }
83   int i = 0;
84   std::string first = "";
85   std::istringstream ss(Input);
86   while (!ss.eof()) {
87     getline(ss, first, ',');
88     if (first != "") {
89       strArr[i] = first;
90       i++;
91     }
92   }
93   ArraySize = i;
94 }
95 /////////////////////////////////////////////////////////////////////////////////
96 /// C_CWORD77_DataPool
97 /////////////////////////////////////////////////////////////////////////////////
98 C_CWORD77_DataPool::C_CWORD77_DataPool() {
99   m__CWORD77_DataRequestTable.clear();
100   m__CWORD77_DataResponseTable.clear();
101 }
102 /////////////////////////////////////////////////////////////////////////////////
103 /// ~C_CWORD77_DataPool
104 /////////////////////////////////////////////////////////////////////////////////
105 C_CWORD77_DataPool::~C_CWORD77_DataPool() {
106   m__CWORD77_DataRequestTable.clear();
107   m__CWORD77_DataResponseTable.clear();
108 }
109
110 //////////////////////////////////////////
111 /// Function : GetInstance
112 //////////////////////////////////////////
113 C_CWORD77_DataPool *C_CWORD77_DataPool::GetInstance() {
114   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "GetInstance");
115   if (m_p_CWORD77_DataPoolInstance == NULL) {
116     FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "Before creating object");
117     m_p_CWORD77_DataPoolInstance = new C_CWORD77_DataPool();
118   }
119   return m_p_CWORD77_DataPoolInstance;
120 }
121
122 //////////////////////////////////////////
123 /// Function : DeleteInstance
124 //////////////////////////////////////////
125 void C_CWORD77_DataPool::DeleteInstance() {
126   DELETEPTR(m_p_CWORD77_DataPoolInstance);
127 }
128 /////////////////////////////////////////////////////////////////////////////////
129 /// GetValueFromMap
130 /////////////////////////////////////////////////////////////////////////////////
131 void C_CWORD77_DataPool::GetValueFromMap(ETableType TableType, UI_32 VarName, EDataType &DataType, std::string &Strvalue) {
132   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
133   std::map<UI_32, _CWORD77_Data>::iterator iter;
134   std::string temp;
135
136   if (TableType == REQUEST_TABLE) {
137     iter = m__CWORD77_DataRequestTable.begin();
138     iter = m__CWORD77_DataRequestTable.find(VarName);
139     if (iter != m__CWORD77_DataRequestTable.end()) {
140       DataType = iter->second.DataType;
141       temp = iter->second.DataValue;
142     }
143   } else {
144     iter = m__CWORD77_DataResponseTable.begin();
145     iter = m__CWORD77_DataResponseTable.find(VarName);
146     if (iter != m__CWORD77_DataResponseTable.end()) {
147       DataType = iter->second.DataType;
148       temp = iter->second.DataValue;
149     }
150   }
151   Strvalue.assign(temp);
152   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
153 }
154 /////////////////////////////////////////////////////////////////////////////////
155 /// SetValueinMap
156 /////////////////////////////////////////////////////////////////////////////////
157 void C_CWORD77_DataPool::SetValueinMap(ETableType TableType, UI_32 VarName, EDataType VarType, std::string Result) {
158   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
159   _CWORD77_Data t_CWORD77_Data;
160   t_CWORD77_Data.DataType = VarType;
161   t_CWORD77_Data.DataValue = Result;
162   if (TableType == REQUEST_TABLE) {
163     m__CWORD77_DataRequestTable[VarName] = t_CWORD77_Data;
164   } else {
165     m__CWORD77_DataResponseTable[VarName] = t_CWORD77_Data;
166   }
167   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
168 }
169
170 /////////////////////////////////////////////////////////////////////////////////
171 /// GetNoofElementsofData
172 /////////////////////////////////////////////////////////////////////////////////
173 UI_32 C_CWORD77_DataPool::GetNoofElementsofData(ETableType TableType, UI_32 KeyName) {
174   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
175   EDataType DataType = UNKNOWNTYPE;
176   std::string Result = "";
177   GetValueFromMap(TableType, KeyName, DataType, Result);
178   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
179   return NoOfElementsinData(Result);
180 }
181 /////////////////////////////////////////////////////////////////////////////////
182 /// GetDataType
183 /////////////////////////////////////////////////////////////////////////////////
184 EDataType C_CWORD77_DataPool::GetDataType(ETableType TableType, UI_32 KeyName) {
185   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
186   EDataType DataType = UNKNOWNTYPE;
187   std::string Result = "";
188   GetValueFromMap(TableType, KeyName, DataType, Result);
189   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
190   return DataType;
191 }
192 /////////////////////////////////////////////////////////////////////////////////
193 /// SetArrayStringData
194 /////////////////////////////////////////////////////////////////////////////////
195 void C_CWORD77_DataPool::SetArrayStringData(ETableType TableType, UI_32 VarName, EDataType VarType,
196                                       std::string DataValue[], UI_32 size) {
197   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
198   std::string Result = ConvertArrayStringsToString(DataValue, size);
199   SetValueinMap(TableType, VarName, VarType, Result);
200   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
201 }
202 /////////////////////////////////////////////////////////////////////////////////
203 /// GetArrayStringData
204 /////////////////////////////////////////////////////////////////////////////////
205 void C_CWORD77_DataPool::GetArrayStringData(ETableType TableType, UI_32 VarName, std::string DataValue[], UI_32 &size) {
206   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
207   std::string Result = "";
208   EDataType DataType = UNKNOWNTYPE;
209   GetValueFromMap(TableType, VarName, DataType, Result);
210   ConvertStringToArrString(Result, DataValue, size);
211   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
212 }
213
214
215 /////////////////////////////////////////////////////////////////////////////////
216 /// SetRequestArrayStringData
217 /////////////////////////////////////////////////////////////////////////////////
218 void SetRequestArrayStringData(UI_32 VarName, EDataType VarType,  std::string DataValue[], UI_32 size) {
219   g__CWORD77_DataPool.SetReqArrayStringData(VarName, VarType, DataValue, size);
220 }
221
222 /////////////////////////////////////////////////////////////////////////////////
223 /// SetResponseArrayStringData
224 /////////////////////////////////////////////////////////////////////////////////
225 void SetResponseArrayStringData(UI_32 VarName, EDataType VarType,  std::string DataValue[], UI_32 size) {
226   g__CWORD77_DataPool.SetRespArrayStringData(VarName, VarType, DataValue, size);
227 }
228 /////////////////////////////////////////////////////////////////////////////////
229 /// GetRequestArrayStringData
230 /////////////////////////////////////////////////////////////////////////////////
231 void GetRequestArrayStringData(UI_32 VarName, std::string DataValue[],
232                                UI_32 &size) {  // NOLINT  (readability/nolint)
233   g__CWORD77_DataPool.GetReqArrayStringData(VarName, DataValue, size);
234 }
235
236 /////////////////////////////////////////////////////////////////////////////////
237 /// GetResponseArrayStringData
238 /////////////////////////////////////////////////////////////////////////////////
239 void GetResponseArrayStringData(UI_32 VarName, std::string DataValue[],
240                                 UI_32 &size) {  // NOLINT  (readability/nolint)
241   g__CWORD77_DataPool.GetRespArrayStringData(VarName, DataValue, size);
242 }
243
244 /////////////////////////////////////////////////////////////////////////////////
245 /// SetRequestStringData
246 /////////////////////////////////////////////////////////////////////////////////
247
248 void SetRequestStringData(UI_32 VarName, EDataType VarType,  std::string DataValue) {
249   g__CWORD77_DataPool.SetReqStringData(VarName, VarType, DataValue);
250 }
251 /////////////////////////////////////////////////////////////////////////////////
252 /// SetResponseStringData
253 /////////////////////////////////////////////////////////////////////////////////
254 void SetResponseStringData(UI_32 VarName, EDataType VarType,  std::string DataValue) {
255   g__CWORD77_DataPool.SetRespStringData(VarName, VarType, DataValue);
256 }
257 /////////////////////////////////////////////////////////////////////////////////
258 /// GetRequestStringData
259 /////////////////////////////////////////////////////////////////////////////////
260 std::string GetRequestStringData(UI_32 VarName) {
261   return g__CWORD77_DataPool.GetReqStringData(VarName);
262 }
263
264 /////////////////////////////////////////////////////////////////////////////////
265 /// GetRequestDataSize
266 /////////////////////////////////////////////////////////////////////////////////
267 UI_32 GetRequestDataSize(UI_32 Key) {
268   return g__CWORD77_DataPool.GetReqDataSize(Key);
269 }
270
271 /////////////////////////////////////////////////////////////////////////////////
272 /// GetResponseDataSize
273 /////////////////////////////////////////////////////////////////////////////////
274 UI_32 GetResponseDataSize(UI_32 Key) {
275   return g__CWORD77_DataPool.GetRespDataSize(Key);
276 }
277
278 /////////////////////////////////////////////////////////////////////////////////
279 /// GetRequestDataType
280 /////////////////////////////////////////////////////////////////////////////////
281 EDataType GetRequestDataType(UI_32 Key) {
282   return g__CWORD77_DataPool.GetReqDataType(Key);
283 }
284 /////////////////////////////////////////////////////////////////////////////////
285 /// GetResponseDataType
286 /////////////////////////////////////////////////////////////////////////////////
287 EDataType GetResponseDataType(UI_32 Key) {
288   return g__CWORD77_DataPool.GetRespDataType(Key);
289 }
290
291
292
293 C_CWORD77_Data *C_CWORD77_Data::m_p_CWORD77_DataInstance = NULL;
294
295 /////////////////////////////////////////////////////////////////////////////////
296 /// Constructor
297 /////////////////////////////////////////////////////////////////////////////////
298 C_CWORD77_Data::C_CWORD77_Data() {
299   m__CWORD77_RequestDataTable.clear();
300   m__CWORD77_ResponseDataTable.clear();
301 }
302 /////////////////////////////////////////////////////////////////////////////////
303 /// Destructor
304 /////////////////////////////////////////////////////////////////////////////////
305 C_CWORD77_Data::~C_CWORD77_Data() {
306   m__CWORD77_RequestDataTable.clear();
307   m__CWORD77_ResponseDataTable.clear();
308 }
309 /////////////////////////////////////////////////////////////////////////////////
310 /// GetInstacne
311 /////////////////////////////////////////////////////////////////////////////////
312 C_CWORD77_Data *C_CWORD77_Data::GetInstance() {
313   if (m_p_CWORD77_DataInstance == NULL) {
314     m_p_CWORD77_DataInstance = new C_CWORD77_Data();  // LCOV_EXCL_BR_LINE 11:except branch
315   }
316   return m_p_CWORD77_DataInstance;
317 }
318 /////////////////////////////////////////////////////////////////////////////////
319 /// DeleteInstance
320 /////////////////////////////////////////////////////////////////////////////////
321 void C_CWORD77_Data::DeleteInstance() {
322   delete m_p_CWORD77_DataInstance;
323   m_p_CWORD77_DataInstance = NULL;
324 }
325 /////////////////////////////////////////////////////////////////////////////////
326 /// SetRequData
327 /////////////////////////////////////////////////////////////////////////////////
328 VOID C_CWORD77_Data::SetRequData(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 f_uiSize, PVOID f_pData) {
329   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
330   std::vector<CHAR> &DataVector =  m__CWORD77_RequestDataTable[f_DataPoolKey];
331   CHAR *l_pTemp = static_cast<CHAR *>(f_pData);
332   DataVector.assign(l_pTemp, (l_pTemp + f_uiSize));
333   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
334 }
335 /////////////////////////////////////////////////////////////////////////////////
336 /// SetRequData
337 /////////////////////////////////////////////////////////////////////////////////
338 VOID C_CWORD77_Data::SetRequData(UI_32 f_uiMsgId, UI_32 f_uiSize, PVOID f_pData) {
339   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
340   std::vector<CHAR> &DataVector =  m__CWORD77_RequestDataTableOrig[f_uiMsgId];
341   CHAR *l_pTemp = static_cast<CHAR *>(f_pData);
342   DataVector.assign(l_pTemp, (l_pTemp + f_uiSize));
343   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
344 }
345 /////////////////////////////////////////////////////////////////////////////////
346 /// SetRespoData
347 /////////////////////////////////////////////////////////////////////////////////
348 VOID C_CWORD77_Data::SetRespoData(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 f_uiSize, const PVOID f_pData) {
349   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
350   std::vector<CHAR> &DataVector =  m__CWORD77_ResponseDataTable[f_DataPoolKey];
351   CHAR *l_pTemp = static_cast<CHAR *>(f_pData);
352   DataVector.assign(l_pTemp, (l_pTemp + f_uiSize));
353   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
354 }
355 /////////////////////////////////////////////////////////////////////////////////
356 /// SetRespoData
357 /////////////////////////////////////////////////////////////////////////////////
358 VOID C_CWORD77_Data::SetRespoData(UI_32 f_uiMsgId, UI_32 f_uiSize, const PVOID f_pData) {
359   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
360   std::vector<CHAR> &DataVector =  m__CWORD77_ResponseDataTableOrig[f_uiMsgId];
361   CHAR *l_pTemp = static_cast<CHAR *>(f_pData);
362   DataVector.assign(l_pTemp, (l_pTemp + f_uiSize));
363   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
364 }
365 /////////////////////////////////////////////////////////////////////////////////
366 /// GetRequData
367 /////////////////////////////////////////////////////////////////////////////////
368 EFrameworkunifiedStatus C_CWORD77_Data::GetRequData(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 &f_uiSize, PVOID &f_pData) {
369   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
370   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusDbRecNotFound;  // data not found in data pool
371   T_CWORD77_DataPool::iterator l_iter;
372
373   l_iter = m__CWORD77_RequestDataTable.find(f_DataPoolKey);
374   if (l_iter != m__CWORD77_RequestDataTable.end()) {
375     f_uiSize = static_cast<UI_32>(l_iter->second.size());
376     if (f_uiSize > 0) {
377       f_pData = &l_iter->second[0];
378     } else {
379       f_pData = NULL;
380     }
381     l_eStatus = eFrameworkunifiedStatusOK;
382   }
383   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
384   return l_eStatus;
385 }
386 /////////////////////////////////////////////////////////////////////////////////
387 /// GetRequData
388 /////////////////////////////////////////////////////////////////////////////////
389 EFrameworkunifiedStatus C_CWORD77_Data::GetRequData(UI_32 f_uiMsgId, UI_32 &f_uiSize, PVOID &f_pData) {
390   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
391   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusDbRecNotFound;  // data not found in data pool
392   std::map<UI_32, std::vector<CHAR> >::iterator l_iter;
393
394   l_iter = m__CWORD77_RequestDataTableOrig.find(f_uiMsgId);
395   if (l_iter != m__CWORD77_RequestDataTableOrig.end()) {
396     f_uiSize = static_cast<UI_32>(l_iter->second.size());
397     if (f_uiSize > 0) {
398       f_pData = &l_iter->second[0];
399     } else {
400       f_pData = NULL;
401     }
402     l_eStatus = eFrameworkunifiedStatusOK;
403   }
404   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
405   return l_eStatus;
406 }
407 /////////////////////////////////////////////////////////////////////////////////
408 /// GetRespoData
409 /////////////////////////////////////////////////////////////////////////////////
410 EFrameworkunifiedStatus C_CWORD77_Data::GetRespoData(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 &f_uiSize, PVOID &f_pData) {
411   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
412   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusFail;
413   T_CWORD77_DataPool::iterator l_iter;
414   l_iter = m__CWORD77_ResponseDataTable.find(f_DataPoolKey);
415   if (l_iter != m__CWORD77_ResponseDataTable.end()) {
416     f_uiSize = static_cast<UI_32>(l_iter->second.size());
417     if (f_uiSize > 0) {
418       /**
419        * @todo
420        * If *f_pData is set to NULL, a segmentation fault occurs.
421        */
422       f_pData = &l_iter->second[0];
423     } else {
424       f_pData = NULL;
425     }
426     l_eStatus = eFrameworkunifiedStatusOK;
427   }
428   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
429   return l_eStatus;
430 }
431 /////////////////////////////////////////////////////////////////////////////////
432 /// GetRespoData
433 /////////////////////////////////////////////////////////////////////////////////
434 EFrameworkunifiedStatus C_CWORD77_Data::GetRespoData(UI_32 f_uiMsgId,
435                                  UI_32 &f_uiSize, PVOID &f_pData) {  // NOLINT  (readability/nolint)
436   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
437   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusFail;
438   std::map<UI_32, std::vector<CHAR> >::iterator l_iter;
439   l_iter = m__CWORD77_ResponseDataTableOrig.find(f_uiMsgId);
440   if (l_iter != m__CWORD77_ResponseDataTableOrig.end()) {
441     f_uiSize = static_cast<UI_32>(l_iter->second.size());
442     if (f_uiSize > 0) {
443       f_pData = &l_iter->second[0];
444     } else {
445       f_pData = NULL;
446     }
447     l_eStatus = eFrameworkunifiedStatusOK;
448   }
449   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
450   return l_eStatus;
451 }
452
453 /////////////////////////////////////////////////////////////////////////////////
454 /// SetReqDataIn_CWORD77_DataPool
455 /////////////////////////////////////////////////////////////////////////////////
456 VOID SetReqDataIn_CWORD77_DataPool(const _CWORD77_DataPoolKey &f_DataPoolKey,  // NOLINT  (readability/nolint)
457                              UI_32 f_uiSize, PVOID f_pData) {
458   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
459   if (C_CWORD77_Data::GetInstance()) {
460     C_CWORD77_Data::GetInstance()->SetRequData(f_DataPoolKey, f_uiSize, f_pData);
461   }
462   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
463 }
464
465 /////////////////////////////////////////////////////////////////////////////////
466 /// SetRespDataIn_CWORD77_DataPool
467 /////////////////////////////////////////////////////////////////////////////////
468 VOID SetRespDataIn_CWORD77_DataPool(const _CWORD77_DataPoolKey &f_DataPoolKey,  // NOLINT  (readability/nolint)
469                               UI_32 f_uiSize, const PVOID f_pData) {
470   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
471   if (C_CWORD77_Data::GetInstance()) {
472     C_CWORD77_Data::GetInstance()->SetRespoData(f_DataPoolKey, f_uiSize, f_pData);
473   }
474   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
475 }
476
477 /////////////////////////////////////////////////////////////////////////////////
478 /// SetRespNotfnDataIn_CWORD77_DataPool
479 /////////////////////////////////////////////////////////////////////////////////
480 VOID SetRespNotfnDataIn_CWORD77_DataPool(const std::string &f_cNotificationName,  // NOLINT  (readability/nolint)
481                                    UI_32 f_uiSize, const PVOID f_pData) {
482   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
483   if (C_CWORD77_Data::GetInstance()) {
484     // LCOV_EXCL_BR_START 11:except branch
485     C_CWORD77_Data::GetInstance()->SetRespoData(std::make_pair(g_uiNotificationDataPoolId, f_cNotificationName), f_uiSize,  // LCOV_EXCL_BR_LINE 11:except branch
486                                           f_pData);
487     // LCOV_EXCL_BR_STOP
488   }
489   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
490 }
491
492 /////////////////////////////////////////////////////////////////////////////////
493 /// GetReqDataFrom_CWORD77_DataPool
494 /////////////////////////////////////////////////////////////////////////////////
495 EFrameworkunifiedStatus GetReqDataFrom_CWORD77_DataPool(const _CWORD77_DataPoolKey &f_DataPoolKey,  // NOLINT  (readability/nolint)
496                                     UI_32 &f_uiSize,  // NOLINT  (readability/nolint)
497                                     PVOID &f_pData) {  // NOLINT  (readability/nolint)
498   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
499   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusFail;
500   if (C_CWORD77_Data::GetInstance()) {
501     l_eStatus = C_CWORD77_Data::GetInstance()->GetRequData(f_DataPoolKey, f_uiSize, f_pData);
502   }
503   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
504   return l_eStatus;
505 }
506
507 /////////////////////////////////////////////////////////////////////////////////
508 /// GetRespDataFrom_CWORD77_DataPool
509 /////////////////////////////////////////////////////////////////////////////////
510 EFrameworkunifiedStatus GetRespDataFrom_CWORD77_DataPool(const _CWORD77_DataPoolKey &f_DataPoolKey,  // NOLINT  (readability/nolint)
511                                       UI_32 &f_uiSize,  // NOLINT  (readability/nolint)
512                                       PVOID &f_pData) {  // NOLINT  (readability/nolint)
513   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");
514   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusFail;
515   if (C_CWORD77_Data::GetInstance()) {
516     l_eStatus = C_CWORD77_Data::GetInstance()->GetRespoData(f_DataPoolKey, f_uiSize, f_pData);
517   }
518   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");
519   return l_eStatus;
520 }
521
522 /////////////////////////////////////////////////////////////////////////////////
523 /// GetRespDataFrom_CWORD77_DataPool
524 /////////////////////////////////////////////////////////////////////////////////
525 EFrameworkunifiedStatus GetRespNotfnDataFrom_CWORD77_DataPool(const std::string &f_cNotificationName,  // NOLINT  (readability/nolint)
526                                            UI_32 &f_uiSize,   // NOLINT  (readability/nolint)
527                                            PVOID &f_pData) {  // NOLINT  (readability/nolint)
528   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "+");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
529   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusFail;
530   if (C_CWORD77_Data::GetInstance()) {
531     // LCOV_EXCL_BR_START 11:except branch
532     l_eStatus = C_CWORD77_Data::GetInstance()->GetRespoData(std::make_pair(g_uiNotificationDataPoolId, f_cNotificationName),
533                                                       f_uiSize, f_pData);
534     // LCOV_EXCL_BR_STOP
535   }
536   FRAMEWORKUNIFIEDLOG(ZONE_NS__CWORD77_, __FUNCTION__, "-");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
537   return l_eStatus;
538 }