RDK Documentation (Open Sourced RDK Components)
hostIf_DeviceClient_ReqHandler.cpp
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016-2019 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**
21  * @file hostIf_DeviceClient_ReqHandler.cpp
22  * @brief The header file provides HostIf Device client request handler information APIs.
23  */
24 
25 /**
26 * @defgroup tr69hostif
27 * @{
28 * @defgroup hostif
29 * @{
30 **/
31 //#define HAVE_VALUE_CHANGE_EVENT
32 
33 
34 #include "hostIf_main.h"
36 #include "hostIf_utils.h"
37 #include "host.hpp"
38 #include "dsError.h"
39 #include "libIBus.h"
40 #include "Device_DeviceInfo.h"
44 #include "hostIf_msgHandler.h"
45 #include "safec_lib.h"
46 #ifdef SNMP_ADAPTER_ENABLED
48 #include "snmpAdapter.h"
49 #endif
50 #ifdef USE_XRDK_BT_PROFILE
51 #include "XrdkBlueTooth.h"
52 #endif
53 
54 DeviceClientReqHandler* DeviceClientReqHandler::pInstance = NULL;
55 int DeviceClientReqHandler::curNumOfProcess[100] = {0,};
56 int DeviceClientReqHandler::curNumOfProcessor[10] = {0,};
57 updateCallback DeviceClientReqHandler::mUpdateCallback = NULL;
58 
59 msgHandler* DeviceClientReqHandler::getInstance()
60 {
61 
62  if(!pInstance)
63  pInstance = new DeviceClientReqHandler();
64  return pInstance;
65 }
66 
67 void DeviceClientReqHandler::reset()
68 {
69  hostIf_DeviceInfo::getLock();
70  memset(curNumOfProcess,0,sizeof(curNumOfProcess));
71  memset(curNumOfProcessor,0,sizeof(curNumOfProcessor));
72  hostIf_DeviceInfo::releaseLock();
73 }
74 
75 /**
76  * @brief This function is used to initialize all the current process and processor
77  * to '0' using memset.
78  *
79  * @return Returns the status of the operation.
80  *
81  * @retval true if initialization is successful.
82  * @retval false if initialization is not successful.
83  * @ingroup TR-069HOSTIF_DEVICECLIENT_REQHANDLER_CLASSES
84  */
86 {
87 // RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s] Entering..\n", __FUNCTION__, __FILE__);
88 // RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s] Exiting..\n", __FUNCTION__, __FILE__);
89  memset(curNumOfProcess,0,sizeof(curNumOfProcess));
90  memset(curNumOfProcessor,0,sizeof(curNumOfProcessor));
91  return true;
92 }
93 
94 /**
95  * @brief This function is used to close all the instances of device info, device processor
96  * interface, device process status interface.
97  *
98  * @return Returns the status of the operation.
99  *
100  * @retval true if it successfully close all the instances.
101  * @retval false if not able to close all the instances.
102  * @ingroup TR-069HOSTIF_DEVICECLIENT_REQHANDLER_CLASSES
103  */
105 {
106 // RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s] Entering..\n", __FUNCTION__, __FILE__);
107  RDK_LOG(RDK_LOG_DEBUG,LOG_TR69HOSTIF,"[%s()] Device manager DeInitializing\n", __FUNCTION__);
108  hostIf_DeviceInfo::closeAllInstances();
109  hostIf_DeviceProcessorInterface::closeAllInstances();
110  hostIf_DeviceProcessStatusInterface::closeAllInstances();
111 // RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s] Exiting..\n", __FUNCTION__, __FILE__);
112  return true;
113 }
114 
115 /**
116  * @brief This function is used to set the Device reset, FirmwareDownload and FirmwareDownload Status.
117  * The possible reset states of the device are "Cold", "Factory", "Warehouse" and "Customer".
118  *
119  * @param[out] stMsgData TR-069 Host interface message request.
120  *
121  * @return Returns the status of the operation.
122  *
123  * @retval OK if it is successful.
124  * @retval ERR_INTERNAL_ERROR if not able to set the data to the device.
125  * @ingroup TR-069HOSTIF_DEVICECLIENT_REQHANDLER_CLASSES
126  */
128 {
129  int ret = NOT_HANDLED;
130  const char *pSetting;
131  int instanceNumber = 0; //CID:84325 - UNINIT
132  hostIf_DeviceInfo::getLock();
133  RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s:%d] Found string as %s\n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramName);
134 
135  if (stMsgData->bsUpdate != HOSTIF_NONE)
136  {
137  if ( (stMsgData->bsUpdate == HOSTIF_SRC_RFC && stMsgData->requestor == HOSTIF_SRC_RFC) ||
138  (stMsgData->bsUpdate == HOSTIF_SRC_ALL && (stMsgData->requestor == HOSTIF_SRC_RFC || stMsgData->requestor == HOSTIF_SRC_WEBPA)) )
139  {
140  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
141  stMsgData->instanceNum = instanceNumber;
142  if(!pIface)
143  {
144  hostIf_DeviceInfo::releaseLock();
145  return NOK;
146  }
147  ret = pIface->set_xRDKCentralComBootstrap(stMsgData);
148  }
149  else
150  RDK_LOG(RDK_LOG_DEBUG,LOG_TR69HOSTIF,"[%s()] Not setting the bootstrap param:%s [bsUpdate=%d, requestor=%d]\n", __FUNCTION__, stMsgData->paramName, stMsgData->bsUpdate, stMsgData->requestor);
151  }
152 #ifdef SNMP_ADAPTER_ENABLED
153  else if(strncasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDK_SNMP",strlen("Device.DeviceInfo.X_RDK_SNMP"))==0)
154  {
155  hostIf_snmpAdapter *pIStatus = hostIf_snmpAdapter::getInstance(instanceNumber);
156  stMsgData->instanceNum = instanceNumber;
157  if(pIStatus){
158  ret = pIStatus->set_ValueToSNMPAdapter(stMsgData);
159  }
160  else{
161  ret = NOK;
162  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%s:%d] hostIf_snmpAdapter::getInstance is NULL for %s\n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramName);
163  }
164  }
165 #endif
166  else if(strncasecmp(stMsgData->paramName,"Device.DeviceInfo",strlen("Device.DeviceInfo"))==0)
167  {
168  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
169  stMsgData->instanceNum = instanceNumber;
170  if(!pIface)
171  {
172  hostIf_DeviceInfo::releaseLock();
173  return NOK;
174  }
175 
176  if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_Reset") == 0 ||
177  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_Reset") == 0)
178  {
179  ret = pIface->set_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(stMsgData);
180  }
181  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_FirmwareToDownload") == 0 ||
182  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload") == 0)
183  {
185  }
186  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_FirmwareDownloadStatus") == 0 ||
187  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadStatus") == 0)
188  {
190  }
191  /* Added as per RDK Requirement RDK-12720 */
192  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadProtocol") == 0)
193  {
194  ret = pIface->set_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol (stMsgData);
195  }
196  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL") == 0)
197  {
198  ret = pIface->set_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL (stMsgData);
199  }
200  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_PreferredGatewayType") == 0)
201  {
202  ret = pIface->set_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType(stMsgData);
203  }
204  else if (strcasecmp(stMsgData->paramName, xOpsDMUploadLogsNow_STR) == 0)
205  {
206  ret = pIface->set_xOpsDMUploadLogsNow(stMsgData);
207  }
208  else if (strcasecmp(stMsgData->paramName, xOpsDMMoCALogEnabled) == 0)
209  {
210  ret = pIface->set_xOpsDMMoCALogEnabled(stMsgData);
211  }
212  else if (strcasecmp(stMsgData->paramName, xOpsDMMoCALogPeriod) == 0)
213  {
214  ret = pIface->set_xOpsDMMoCALogPeriod(stMsgData);
215  }
216  else if (strcasecmp(stMsgData->paramName,xOpsReverseSshTrigger_STR) == 0)
217  {
218  ret = pIface->set_xOpsReverseSshTrigger(stMsgData);
219  }
220  else if (strcasecmp(stMsgData->paramName,xOpsReverseSshArgs_STR) == 0)
221  {
222  ret = pIface->set_xOpsReverseSshArgs(stMsgData);
223  }
224  else if (strncmp(stMsgData->paramName,X_OPS_RPC_PROFILE, strlen(X_OPS_RPC_PROFILE)) == 0)
225  {
226  ret = pIface->set_xOpsRPC_Profile(stMsgData);
227  }
228  else if (strncasecmp(stMsgData->paramName,xOpsForwardSshEnable_STR,strlen(xOpsForwardSshEnable_STR)) == 0)
229  {
230  ret = pIface->set_xOpsDeviceMgmtForwardSSHEnable(stMsgData);
231  }
232  else if (strcasecmp(stMsgData->paramName,X_RDKDownloadManager_InstallPackage) == 0)
233  {
234  ret = pIface->set_xRDKDownloadManager_InstallPackage(stMsgData);
235  }
236  else if (strcasecmp(stMsgData->paramName,IPREMOTE_SUPPORT) == 0)
237  {
238  ret = pIface->set_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportEnable(stMsgData);
239  }
240  else if (strcasecmp(stMsgData->paramName,PARTNER_ID) == 0)
241  {
243  }
244  else if (strcasecmp(stMsgData->paramName,XRPOLLING_ACTION) == 0)
245  {
246  ret = pIface->set_Device_DeviceInfo_X_RDKCENTRAL_COM_XRPollingAction(stMsgData);
247  if(OK == ret) {
248  notifyIARM(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)stMsgData->paramName, stMsgData->paramValue, stMsgData->paramtype);
249  }
250  }
251  else if (strstr(stMsgData->paramName,TR181_RFC_PREFIX) != NULL)
252  {
253  RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] parameter %s is being set with value %s \n", __FUNCTION__, stMsgData->paramName, stMsgData->paramValue);
254  ret = pIface->set_xRDKCentralComRFC(stMsgData);
255  }
256 #ifdef USE_XRDK_BT_PROFILE
257  else if(strncasecmp(stMsgData->paramName,X_BT_ROOT_OBJ,strlen(X_BT_ROOT_OBJ))==0)
258  {
259  hostIf_DeviceInfoRdk_xBT *pIface = hostIf_DeviceInfoRdk_xBT::getInstance();
260 
261  if(!pIface) {
262  hostIf_DeviceInfo::releaseLock();
263  return NOK;
264  }
265  ret = pIface->handleSetMsg(stMsgData);
266  }
267 #endif
268 #ifdef USE_HWSELFTEST_PROFILE
269  else if (!strcasecmp(stMsgData->paramName, "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.hwHealthTest.ExecuteTest"))
270  {
271  ret = pIface->set_xOpsDeviceMgmt_hwHealthTest_ExecuteTest(stMsgData);
272  }
273  else if (!strcasecmp(stMsgData->paramName, "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.hwHealthTest.SetTuneType"))
274  {
275  ret = pIface->set_xOpsDeviceMgmt_hwHealthTest_SetTuneType(stMsgData);
276  }
277  else if (!strcasecmp(stMsgData->paramName, "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.hwHealthTest.ExecuteTuneTest"))
278  {
279  ret = pIface->set_xOpsDeviceMgmt_hwHealthTest_ExecuteTuneTest(stMsgData);
280  }
281 #endif /* USE_HWSELFTEST_PROFILE */
282  else if (!strcasecmp(stMsgData->paramName, xFirmwareDownloadNow_STR))
283  {
284  ret = pIface->set_xFirmwareDownloadNow(stMsgData);
285  }
286  else if (!strcasecmp(stMsgData->paramName, "Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadUseCodebig"))
287  {
288  ret = pIface->set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig(stMsgData);
289  }
290  else if (!strcasecmp(stMsgData->paramName, FWDNLD_DEFER_REBOOT))
291  {
292  ret = pIface->set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadDeferReboot(stMsgData);
293  }
294  else
295  {
296  ret = NOK;
297  stMsgData->faultCode = fcAttemptToSetaNonWritableParameter;
298  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s] Failed, since Attempt To Set a NonWritable Parameter \"%s\"\n", __FUNCTION__, stMsgData->paramName);
299  }
300 
301  if( ret == OK )
302  {
303  stMsgData->faultCode = fcNoFault;
304  }
305 
306  }
307  hostIf_DeviceInfo::releaseLock();
308  return ret;
309 }
310 
311 /**
312  * @brief This function is used to get the Process information such as "PID", "Command"
313  * "Size", "Priority", "CPUTime" and "State". It is also used to get the processor information,
314  * process status such as total number of active process entries and CPUUsage and device info
315  * such as "BootStatus", "Manufacturer", "ManufacturerOUI", "ModelName", "Description", "ProductClass"
316  * "SerialNumber", "HardwareVersion", "SoftwareVersion", "AdditionalHardwareVersion" etc..
317  *
318  * @param[out] stMsgData TR-069 Host interface message request.
319  *
320  * @return Returns the status of the operation.
321  *
322  * @retval OK if it is gets the data successfully.
323  * @retval ERR_INTERNAL_ERROR if not able to get the data from the device.
324  * @ingroup TR-069HOSTIF_DEVICECLIENT_REQHANDLER_CLASSES
325  */
327 {
328  int ret = NOT_HANDLED;
329  const char *pSetting;
330  int instanceNumber = 0;
331  hostIf_DeviceInfo::getLock();
332  RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s:%d] Found string as %s\n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramName);
333 
334  if (stMsgData->bsUpdate != HOSTIF_NONE)
335  {
336  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
337  stMsgData->instanceNum = instanceNumber;
338  if(!pIface)
339  {
340  hostIf_DeviceInfo::releaseLock();
341  return NOK;
342  }
343  ret = pIface->get_xRDKCentralComBootstrap(stMsgData);
344  }
345  else if(matchComponent(stMsgData->paramName,"Device.DeviceInfo.ProcessStatus.Process",&pSetting,instanceNumber))
346  {
347  hostIf_DeviceProcess *pIfaceProcess = hostIf_DeviceProcess::getInstance(instanceNumber);
348  stMsgData->instanceNum = instanceNumber;
349  if(!pIfaceProcess)
350  {
351  hostIf_DeviceInfo::releaseLock();
352  return NOK;
353  }
354  if(strcasecmp(pSetting,"PID") == 0)
355  {
356  ret = pIfaceProcess->get_Device_DeviceInfo_ProcessStatus_Process_PID(stMsgData);
357  }
358  else if(strcasecmp(pSetting,"Command") == 0)
359  {
360  ret = pIfaceProcess->get_Device_DeviceInfo_ProcessStatus_Process_Command(stMsgData);
361  }
362  else if(strcasecmp(pSetting,"Size") == 0)
363  {
364  ret = pIfaceProcess->get_Device_DeviceInfo_ProcessStatus_Process_Size(stMsgData);
365  }
366  else if(strcasecmp(pSetting,"Priority") == 0)
367  {
368  ret = pIfaceProcess->get_Device_DeviceInfo_ProcessStatus_Process_Priority(stMsgData);
369  }
370  else if(strcasecmp(pSetting,"CPUTime") == 0)
371  {
372  ret = pIfaceProcess->get_Device_DeviceInfo_ProcessStatus_Process_CPUTime(stMsgData);
373  }
374  else if(strcasecmp(pSetting,"State") == 0)
375  {
376  ret = pIfaceProcess->get_Device_DeviceInfo_ProcessStatus_Process_State(stMsgData);
377  }
378  else
379  {
380  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%d] Parameter : \'%s\' is Not Supported \n", __FUNCTION__, __LINE__, stMsgData->paramName);
381  stMsgData->faultCode = fcInvalidParameterName;
382  ret = NOK;
383  }
384  }
385  else if(matchComponent(stMsgData->paramName,"Device.DeviceInfo.Processor",&pSetting,instanceNumber))
386  {
387  hostIf_DeviceProcessorInterface *pIfaceProcessor = hostIf_DeviceProcessorInterface::getInstance(instanceNumber);
388  if(!pIfaceProcessor)
389  {
390  hostIf_DeviceInfo::releaseLock();
391  return NOK;
392  }
393  stMsgData->instanceNum = instanceNumber;
394  if(strcasecmp(pSetting,"Architecture")==0)
395  {
396  ret = pIfaceProcessor->get_Device_DeviceInfo_Processor_Architecture(stMsgData);
397  }
398  else
399  {
400  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%d] Parameter : \'%s\' is Not Supported \n", __FUNCTION__, __LINE__, stMsgData->paramName);
401  stMsgData->faultCode = fcInvalidParameterName;
402  ret = NOK;
403  }
404  }
405  else if(strncasecmp(stMsgData->paramName,"Device.DeviceInfo.ProcessStatus",strlen("Device.DeviceInfo.ProcessStatus"))==0)
406  {
407  hostIf_DeviceProcessStatusInterface *pIfaceStatus = hostIf_DeviceProcessStatusInterface::getInstance(instanceNumber);
408  stMsgData->instanceNum = instanceNumber;
409  if(!pIfaceStatus)
410  {
411  hostIf_DeviceInfo::releaseLock();
412  ret = NOK;
413  }
414  if(strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ProcessStatus.ProcessNumberOfEntries")==0)
415  {
417  }
418  else if(strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ProcessStatus.CPUUsage")==0)
419  {
420  ret = pIfaceStatus->get_Device_DeviceInfo_ProcessStatus_CPUUsage(stMsgData);
421  }
422  else
423  {
424  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%d] Parameter : \'%s\' is Not Supported \n", __FUNCTION__, __LINE__, stMsgData->paramName);
425  stMsgData->faultCode = fcInvalidParameterName;
426  ret = NOK;
427  }
428  }
429  else if(strncasecmp(stMsgData->paramName,xOpsForwardSshEnable_STR,strlen(xOpsForwardSshEnable_STR)) == 0)
430  {
431  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
432  ret = pIface->get_xOpsDeviceMgmtForwardSSHEnable(stMsgData);
433  }
434  else if(strncasecmp(stMsgData->paramName,xOpsReverseSshStatus_STR,strlen(xOpsReverseSshStatus_STR)) == 0)
435  {
436  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
437  ret = pIface->get_xOpsReverseSshStatus(stMsgData);
438  }
439 
440  else if(strncasecmp(stMsgData->paramName,APPARMOR_BLOCKLIST_PROCESS,strlen(APPARMOR_BLOCKLIST_PROCESS)) == 0)
441  {
442  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
443  ret = pIface->get_ApparmorBlockListStatus(stMsgData);
444  }
445 
446 #ifdef USE_XRDK_BT_PROFILE
447  else if(strncasecmp(stMsgData->paramName,X_BT_ROOT_OBJ,strlen(X_BT_ROOT_OBJ))==0)
448  {
449  hostIf_DeviceInfoRdk_xBT *pIface = hostIf_DeviceInfoRdk_xBT::getInstance();
450 
451  if(!pIface) {
452  hostIf_DeviceInfo::releaseLock();
453  return NOK;
454  }
455  ret = pIface->handleGetMsg(stMsgData);
456  }
457 #endif
458 #ifdef SNMP_ADAPTER_ENABLED
459  else if(strncasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDK_SNMP",strlen("Device.DeviceInfo.X_RDK_SNMP"))==0)
460  {
461  hostIf_snmpAdapter *pIStatus = hostIf_snmpAdapter::getInstance(instanceNumber);
462  stMsgData->instanceNum = instanceNumber;
463  if(pIStatus){
464  ret = pIStatus->get_ValueFromSNMPAdapter(stMsgData);
465  }
466  else{
467  ret = NOK;
468  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%s:%d] hostIf_snmpAdapter::getInstance is NULL for %s\n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramName);
469  }
470  }
471 #endif
472  else if(strncasecmp(stMsgData->paramName,"Device.DeviceInfo",strlen("Device.DeviceInfo"))==0)
473  {
474  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
475  stMsgData->instanceNum = instanceNumber;
476  if(!pIface)
477  {
478  hostIf_DeviceInfo::releaseLock();
479  return NOK;
480  }
481  if(strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM.BootStatus") == 0)
482  {
483  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_BootStatus(stMsgData);
484  }
485  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_PreferredGatewayType") == 0)
486  {
488  }
489  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.Manufacturer") == 0)
490  {
491  ret = pIface->get_Device_DeviceInfo_Manufacturer(stMsgData);
492  }
493  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ManufacturerOUI") == 0)
494  {
495  ret = pIface->get_Device_DeviceInfo_ManufacturerOUI(stMsgData);
496  }
497  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ModelName") == 0)
498  {
499  ret = pIface->get_Device_DeviceInfo_ModelName(stMsgData);
500  }
501  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.Description") == 0)
502  {
503  ret = pIface->get_Device_DeviceInfo_Description(stMsgData);
504  }
505  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ProductClass") == 0)
506  {
507  ret = pIface->get_Device_DeviceInfo_ProductClass(stMsgData);
508  }
509  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.SerialNumber") == 0)
510  {
511  ret = pIface->get_Device_DeviceInfo_SerialNumber(stMsgData);
512  }
513  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.HardwareVersion") == 0)
514  {
515  ret = pIface->get_Device_DeviceInfo_HardwareVersion(stMsgData);
516  }
517  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.SoftwareVersion") == 0)
518  {
519  ret = pIface->get_Device_DeviceInfo_SoftwareVersion(stMsgData);
520  }
521  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.AdditionalHardwareVersion") == 0)
522  {
523  ret = pIface->get_Device_DeviceInfo_AdditionalHardwareVersion(stMsgData);
524  }
525  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.AdditionalSoftwareVersion") == 0)
526  {
527  ret = pIface->get_Device_DeviceInfo_AdditionalSoftwareVersion(stMsgData);
528  }
529  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ProvisioningCode") == 0)
530  {
531  ret = pIface->get_Device_DeviceInfo_ProvisioningCode(stMsgData);
532  }
533  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.UpTime") == 0)
534  {
535  ret = pIface->get_Device_DeviceInfo_UpTime(stMsgData);
536  }
537  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.FirstUseDate") == 0)
538  {
539  ret = pIface->get_Device_DeviceInfo_FirstUseDate(stMsgData);
540  }
541  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_STB_MAC") == 0)
542  {
543  ret = pIface->get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC(stMsgData);
544  }
545  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_STB_IP") == 0)
546  {
547  ret = pIface->get_Device_DeviceInfo_X_COMCAST_COM_STB_IP(stMsgData);
548  }
549  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_FirmwareFilename") == 0 ||
550  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareFilename") == 0)
551  {
553  }
554  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_FirmwareToDownload") == 0 ||
555  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload") == 0)
556  {
558  }
559  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_FirmwareDownloadStatus") == 0 ||
560  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadStatus") == 0)
561  {
563  }
564  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL") == 0)
565  {
567  }
568  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadProtocol") == 0)
569  {
571  }
572  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadUseCodebig") == 0)
573  {
575  }
576  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadPercent") == 0)
577  {
578  ret = pIface->get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadPercent (stMsgData);
579  }
580  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareUpdateState") == 0)
581  {
582  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareUpdateState (stMsgData);
583  }
584  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_RDKVersion") == 0)
585  {
586  ret = pIface->get_Device_DeviceInfo_SoftwareVersion(stMsgData);
587  }
588  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_Reset") == 0 ||
589  strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM_Reset") == 0)
590  {
591  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(stMsgData);
592  }
593  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_COMCAST-COM_PowerStatus") == 0)
594  {
595  ret = pIface->get_Device_DeviceInfo_X_COMCAST_COM_PowerStatus(stMsgData);
596  }
597  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.VendorConfigFileNumberOfEntries") == 0)
598  {
600  }
601  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.SupportedDataModelNumberOfEntries") == 0)
602  {
604  }
605  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.ProcessorNumberOfEntries") == 0)
606  {
608  }
609  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.VendorLogFileNumberOfEntries") == 0)
610  {
612  }
613  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.MemoryStatus.Total") == 0)
614  {
615  ret = pIface->get_Device_DeviceInfo_MemoryStatus_Total(stMsgData);
616  }
617  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.MemoryStatus.Free") == 0)
618  {
619  ret = pIface->get_Device_DeviceInfo_MemoryStatus_Free(stMsgData);
620  }
621  else if (strcasecmp(stMsgData->paramName,"Device.DeviceInfo.X_RDKCENTRAL-COM.CPUTemp") == 0)
622  {
623  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_CPUTemp(stMsgData);
624  }
625  else if (strcasecmp(stMsgData->paramName,xOpsDMLogsUploadStatus_STR) == 0)
626  {
627  ret = pIface->get_xOpsDMLogsUploadStatus(stMsgData);
628  }
629  else if (strcasecmp(stMsgData->paramName, xOpsDMMoCALogEnabled) == 0)
630  {
631  ret = pIface->get_xOpsDMMoCALogEnabled(stMsgData);
632  }
633  else if (strcasecmp(stMsgData->paramName, xOpsDMMoCALogPeriod) == 0)
634  {
635  ret = pIface->get_xOpsDMMoCALogPeriod(stMsgData);
636  }
637  else if (strcasecmp(stMsgData->paramName,xOpsDMUploadLogsNow_STR) == 0)
638  {
639  ret = pIface->get_xOpsDMUploadLogsNow(stMsgData);
640  }
641  else if (strcasecmp(stMsgData->paramName,IPREMOTE_SUPPORT) == 0)
642  {
643  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportEnable(stMsgData);
644  }
645  else if (strcasecmp(stMsgData->paramName,IPREMOTE_IPADDRESS) == 0)
646  {
647  ret= pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportIpaddress(stMsgData);
648  }
649  else if (strcasecmp(stMsgData->paramName,IPREMOTE_MACADDRESS) == 0)
650  {
651  ret= pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportMACaddress(stMsgData);
652  }
653  else if ( !strcasecmp(stMsgData->paramName, PARTNER_ID) )
654  {
655  ret= pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_Syndication_PartnerId(stMsgData);
656  }
657  else if (strcasecmp(stMsgData->paramName,XRPOLLING_ACTION) == 0)
658  {
659  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_XRPollingAction(stMsgData);
660  }
661  else if (strcasecmp(stMsgData->paramName,XRDK_BOOT_TIME) == 0)
662  {
663  ret = pIface->get_X_RDKCENTRAL_COM_BootTime(stMsgData);
664  } else if (strstr(stMsgData->paramName,TR181_RFC_PREFIX) != NULL)
665  {
666  // RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] requst for parameter: %s of type: %d \n", __FUNCTION__, stMsgData->paramName, stMsgData->paramtype);
667  ret = pIface->get_xRDKCentralComRFC(stMsgData);
668  // RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] return for parameter: %s , is: %s \n", __FUNCTION__, stMsgData->paramName, stMsgData->paramValue);
669  }
670 #ifdef USE_HWSELFTEST_PROFILE
671  else if (!strcasecmp(stMsgData->paramName, "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.hwHealthTest.Results"))
672  {
673  ret = pIface->get_xOpsDeviceMgmt_hwHealthTest_Results(stMsgData);
674  }
675  else if (!strcasecmp(stMsgData->paramName, "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.hwHealthTestTune.TuneResults"))
676  {
677  ret = pIface->get_xOpsDeviceMgmt_hwHealthTestTune_TuneResults(stMsgData);
678  }
679 #endif /* USE_HWSELFTEST_PROFILE */
680  else if (strncmp(stMsgData->paramName,X_OPS_RPC_PROFILE, strlen(X_OPS_RPC_PROFILE)) == 0)
681  {
682  ret = pIface->get_xOpsRPC_Profile(stMsgData);
683  }
684  else if (strncmp(stMsgData->paramName,X_RDKCENTRAL_COM_LastRebootReason, strlen(X_RDKCENTRAL_COM_LastRebootReason)) == 0)
685  {
686  ret = pIface->get_X_RDKCENTRAL_COM_LastRebootReason(stMsgData);
687  }
688  else if(strncmp(stMsgData->paramName,X_RDKCENTRAL_COM_Experience, strlen(X_RDKCENTRAL_COM_Experience)) == 0)
689  {
690  ret = pIface->get_X_RDKCENTRAL_COM_experience(stMsgData);
691  }
692  else if (!strcasecmp(stMsgData->paramName, FWDNLD_DEFER_REBOOT))
693  {
694  ret = pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadDeferReboot(stMsgData);
695  }
696  else if (!strcasecmp(stMsgData->paramName, X_RDK_FirmwareName))
697  {
698  ret = pIface->get_X_RDK_FirmwareName(stMsgData);
699  }
700  else
701  {
702  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%d] Parameter : \'%s\' is Not Supported \n", __FUNCTION__, __LINE__, stMsgData->paramName);
703  stMsgData->faultCode = fcInvalidParameterName;
704  ret = NOK;
705  }
706  }
707  hostIf_DeviceInfo::releaseLock();
708  return ret;
709 }
710 
711 int DeviceClientReqHandler::handleGetAttributesMsg(HOSTIF_MsgData_t *stMsgData)
712 {
713  int ret = NOT_HANDLED;
714  int instanceNumber = 0;
715 
716  hostIf_DeviceInfo::getLock();
717  stMsgData->instanceNum = instanceNumber;
718  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
719  if(!pIface)
720  {
721  hostIf_DeviceInfo::releaseLock();
722  return NOK;
723  }
724 
725  GHashTable* notifyhash = pIface->getNotifyHash();
726  if(notifyhash != NULL)
727  {
728  int* notifyvalue = (int*) g_hash_table_lookup(notifyhash,stMsgData->paramName);
729  put_int(stMsgData->paramValue, *notifyvalue);
730  stMsgData->paramtype = hostIf_IntegerType;
731  ret = OK;
732  }
733  else
734  {
735  ret = NOK;
736  }
737  hostIf_DeviceInfo::releaseLock();
738  return ret;
739 }
740 
741 int DeviceClientReqHandler::handleSetAttributesMsg(HOSTIF_MsgData_t *stMsgData)
742 {
743  int ret = NOT_HANDLED;
744  errno_t rc = -1;
745  int instanceNumber = 0;
746  const char *pSetting;
747  hostIf_DeviceInfo::getLock();
748  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
749 
750  stMsgData->instanceNum = instanceNumber;
751  if(!pIface)
752  {
753  hostIf_DeviceInfo::releaseLock();
754  return NOK;
755  }
756  GHashTable* notifyhash = pIface->getNotifyHash();
757  if(notifyhash != NULL)
758  {
759  int *notifyValuePtr;
760  notifyValuePtr = (int*) malloc(1 * sizeof(int));
761 
762  // Inserting Notification parameter to Notify Hash Table,
763  // Note that neither keys nor values are copied when inserted into the GHashTable, so they must exist for the lifetime of the GHashTable
764  // There for allocating a memory for both Param name and param value. This should be freed whenever we disable Notification.
765  char *notifyKey = NULL;
766  notifyKey = (char*) calloc(sizeof(char),strlen(stMsgData->paramName)+1);
767  if((NULL != notifyValuePtr) && (NULL != notifyKey))
768  {
769  *notifyValuePtr = 1;
770  rc=strcpy_s(notifyKey,strlen(stMsgData->paramName)+1,stMsgData->paramName);
771  if(rc!=EOK)
772  {
773  ERR_CHK(rc);
774  }
775  g_hash_table_insert(notifyhash,notifyKey,notifyValuePtr);
776  ret = OK;
777  }
778  else
779  {
780  ret = NOK;
781  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%s:%d] Not able to allocate Notify pointer %s\n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramName);
782  }
783  free(notifyKey);//CID:86943 - Resource leak
784  free(notifyValuePtr);
785  }
786  else
787  {
788  ret = NOK;
789  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%s:%d] Not able to get notifyhash %s\n", __FUNCTION__, __FILE__, __LINE__, stMsgData->paramName);
790  }
791  hostIf_DeviceInfo::releaseLock();
792  return ret;
793 }
794 
795 
796 void DeviceClientReqHandler::registerUpdateCallback(updateCallback cb)
797 {
798  mUpdateCallback = cb;
799 }
800 
801 
802 
803 void DeviceClientReqHandler::checkForUpdates()
804 {
805  HOSTIF_MsgData_t msgData;
806  bool bChanged;
807  GList *elem;
808  int index = 1;
809  const char *pSetting;
810  int instanceNumber = 0;
811  GHashTable* notifyhash = NULL;
812  char tmp_buff[TR69HOSTIFMGR_MAX_PARAM_LEN];
813 
814  // Update ADD/REMOVE Events
815  hostIf_DeviceProcess::getLock();
816  index = 1;
817  memset(&msgData,0,sizeof(msgData));
818  memset(tmp_buff,0,TR69HOSTIFMGR_MAX_PARAM_LEN);
819 
821  {
822  int tmpNoDev = get_int(msgData.paramValue);
823  char tmp[TR69HOSTIFMGR_MAX_PARAM_LEN] = "";
824  sprintf(tmp_buff,"Device.DeviceInfo.ProcessStatus.Process");
825  while(curNumOfProcess[index] > tmpNoDev)
826  {
827  sprintf(tmp,"%s.%d.",tmp_buff,tmpNoDev);
828  if(mUpdateCallback) mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_REMOVE,tmp, NULL, hostIf_IntegerType);
829  tmpNoDev++;
830  }
831  while(curNumOfProcess[index] < tmpNoDev)
832  {
833  sprintf(tmp,"%s.",tmp_buff);
834  if(mUpdateCallback) mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_ADD,tmp, NULL, hostIf_IntegerType);
835  tmpNoDev--;
836  }
837  curNumOfProcess[index] = get_int(msgData.paramValue);
838  }
839  hostIf_DeviceProcess::releaseLock();
840  hostIf_DeviceInfo::getLock();
842  {
843  int tmpNoDev = get_int(msgData.paramValue);
844  char tmp[TR69HOSTIFMGR_MAX_PARAM_LEN] = "";
845  sprintf(tmp_buff,"Device.DeviceInfo.Processor");
846  while(curNumOfProcessor[index] > tmpNoDev)
847  {
848  sprintf(tmp,"%s.%d.",tmp_buff,tmpNoDev);
849  if(mUpdateCallback) mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_REMOVE,tmp, NULL, hostIf_IntegerType);
850  tmpNoDev++;
851  }
852  while(curNumOfProcessor[index] < tmpNoDev)
853  {
854  sprintf(tmp,"%s.",tmp_buff);
855  if(mUpdateCallback) mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_ADD,tmp, NULL, hostIf_IntegerType);
856  tmpNoDev--;
857  }
858  curNumOfProcessor[index] = get_int(msgData.paramValue);
859  }
860 // Update for Value change events
861 #ifdef HAVE_VALUE_CHANGE_EVENT
862 
863  instanceNumber = 0;
864  hostIf_DeviceInfo *dIface = hostIf_DeviceInfo::getInstance(instanceNumber);
865 
866  //Get Notify Hash from device Info
867  if(NULL != dIface)
868  {
869  notifyhash = dIface->getNotifyHash();
870  }
871  else
872  {
873  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%s] Unable to get Device Info Instance\n", __FUNCTION__, __FILE__);
874  }
875 
876  // Iterate through Ghash Table
877  if(NULL != notifyhash)
878  {
879  GHashTableIter notifyHashIterator;
880  gpointer paramName;
881  gpointer notifyEnable;
882  bool bChanged;
883 
884  g_hash_table_iter_init (&notifyHashIterator, notifyhash);
885  while (g_hash_table_iter_next (&notifyHashIterator, &paramName, &notifyEnable))
886  {
887  int* isNotifyEnabled = (int *)notifyEnable;
888  instanceNumber = 0;
889  // Getting Update for Device.DeviceInfo.ProcessStatus.Process Parameters
890  if(matchComponent((const char*)paramName,"Device.DeviceInfo.ProcessStatus.Process",&pSetting,instanceNumber))
891  {
892  hostIf_DeviceProcess *pIface = hostIf_DeviceProcess::getInstance(instanceNumber);
893  if(pIface)
894  {
895  if (strcasecmp(pSetting,"PID") == 0)
896  {
897  memset(&msgData,0,sizeof(msgData));
898  bChanged = false;
899  pIface->get_Device_DeviceInfo_ProcessStatus_Process_PID(&msgData,&bChanged);
900  if(bChanged)
901  {
902  if(mUpdateCallback && (*isNotifyEnabled == 1))
903  {
904  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
905  }
906  }
907  }
908  if (strcasecmp(pSetting,"Command") == 0)
909  {
910  memset(&msgData,0,sizeof(msgData));
911  bChanged = false;
912  pIface->get_Device_DeviceInfo_ProcessStatus_Process_Command(&msgData,&bChanged);
913  if(bChanged)
914  {
915  if(mUpdateCallback && (*isNotifyEnabled == 1))
916  {
917  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
918  }
919  }
920  }
921  if (strcasecmp(pSetting,"Size") == 0)
922  {
923  memset(&msgData,0,sizeof(msgData));
924  bChanged = false;
925  pIface->get_Device_DeviceInfo_ProcessStatus_Process_Size(&msgData,&bChanged);
926  if(bChanged)
927  {
928  if(mUpdateCallback && (*isNotifyEnabled == 1))
929  {
930  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
931  }
932  }
933  }
934  if (strcasecmp(pSetting,"Size") == 0)
935  {
936  memset(&msgData,0,sizeof(msgData));
937  bChanged = false;
938  pIface->get_Device_DeviceInfo_ProcessStatus_Process_Size(&msgData,&bChanged);
939  if(bChanged)
940  {
941  if(mUpdateCallback && (*isNotifyEnabled == 1))
942  {
943  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
944  }
945  }
946  }
947  if (strcasecmp(pSetting,"Priority") == 0)
948  {
949  memset(&msgData,0,sizeof(msgData));
950  bChanged = false;
951  pIface->get_Device_DeviceInfo_ProcessStatus_Process_Priority(&msgData,&bChanged);
952  if(bChanged)
953  {
954  if(mUpdateCallback && (*isNotifyEnabled == 1))
955  {
956  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
957  }
958  }
959  }
960  if (strcasecmp(pSetting,"CPUTime") == 0)
961  {
962  memset(&msgData,0,sizeof(msgData));
963  bChanged = false;
964  pIface->get_Device_DeviceInfo_ProcessStatus_Process_CPUTime(&msgData,&bChanged);
965  if(bChanged)
966  {
967  if(mUpdateCallback && (*isNotifyEnabled == 1))
968  {
969  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
970  }
971  }
972  }
973  if (strcasecmp(pSetting,"State") == 0)
974  {
975  memset(&msgData,0,sizeof(msgData));
976  bChanged = false;
977  pIface->get_Device_DeviceInfo_ProcessStatus_Process_State(&msgData,&bChanged);
978  if(bChanged)
979  {
980  if(mUpdateCallback && (*isNotifyEnabled == 1))
981  {
982  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
983  }
984  }
985  }
986  }
987  }
988  else if(matchComponent((const char*)paramName,"Device.DeviceInfo.Processor",&pSetting,instanceNumber))
989  {
990  hostIf_DeviceProcessorInterface *pIfaceProcessor = hostIf_DeviceProcessorInterface::getInstance(instanceNumber);
991  if(pIfaceProcessor)
992  {
993  if (strcasecmp(pSetting,"Architecture") == 0)
994  {
995  memset(&msgData,0,sizeof(msgData));
996  bChanged = false;
997  pIfaceProcessor->get_Device_DeviceInfo_Processor_Architecture(&msgData,&bChanged);
998  if(bChanged)
999  {
1000  if(mUpdateCallback && (*isNotifyEnabled == 1))
1001  {
1002  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1003  }
1004  }
1005  }
1006  }
1007  }
1008  else if(matchComponent((const char*)paramName,"Device.DeviceInfo.ProcessStatus",&pSetting,instanceNumber))
1009  {
1010  hostIf_DeviceProcessStatusInterface *pIfaceStatus = hostIf_DeviceProcessStatusInterface::getInstance(instanceNumber);
1011  if(pIfaceStatus)
1012  {
1013  if (strcasecmp(pSetting,"CPUUsage") == 0)
1014  {
1015  memset(&msgData,0,sizeof(msgData));
1016  bChanged = false;
1017  pIfaceStatus->get_Device_DeviceInfo_ProcessStatus_CPUUsage(&msgData,&bChanged);
1018  if(bChanged)
1019  {
1020  if(mUpdateCallback && (*isNotifyEnabled == 1))
1021  {
1022  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1023  }
1024  }
1025  }
1026  }
1027  }
1028  else if(matchComponent((const char*)paramName,"Device.DeviceInfo",&pSetting,instanceNumber))
1029  {
1030  hostIf_DeviceInfo *pIface = hostIf_DeviceInfo::getInstance(instanceNumber);
1031  if(pIface)
1032  {
1033  if (strcasecmp(pSetting,"Manufacturer") == 0)
1034  {
1035  memset(&msgData,0,sizeof(msgData));
1036  bChanged = false;
1037  pIface->get_Device_DeviceInfo_Manufacturer(&msgData,&bChanged);
1038  if(bChanged)
1039  {
1040  if(mUpdateCallback && (*isNotifyEnabled == 1))
1041  {
1042  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1043  }
1044  }
1045  }
1046  if (strcasecmp(pSetting,"ModelName") == 0)
1047  {
1048  memset(&msgData,0,sizeof(msgData));
1049  bChanged = false;
1050  pIface->get_Device_DeviceInfo_ModelName(&msgData,&bChanged);
1051  if(bChanged)
1052  {
1053  if(mUpdateCallback && (*isNotifyEnabled == 1))
1054  {
1055  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1056  }
1057  }
1058  }
1059  if (strcasecmp(pSetting,"Description") == 0)
1060  {
1061  memset(&msgData,0,sizeof(msgData));
1062  bChanged = false;
1063  pIface->get_Device_DeviceInfo_Description(&msgData,&bChanged);
1064  if(bChanged)
1065  {
1066  if(mUpdateCallback && (*isNotifyEnabled == 1))
1067  {
1068  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1069  }
1070  }
1071  }
1072  if (strcasecmp(pSetting,"ProductClass") == 0)
1073  {
1074  memset(&msgData,0,sizeof(msgData));
1075  bChanged = false;
1076  pIface->get_Device_DeviceInfo_ProductClass(&msgData,&bChanged);
1077  if(bChanged)
1078  {
1079  if(mUpdateCallback && (*isNotifyEnabled == 1))
1080  {
1081  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1082  }
1083  }
1084  }
1085  if (strcasecmp(pSetting,"SerialNumber") == 0)
1086  {
1087  memset(&msgData,0,sizeof(msgData));
1088  bChanged = false;
1089  pIface->get_Device_DeviceInfo_SerialNumber(&msgData,&bChanged);
1090  if(bChanged)
1091  {
1092  if(mUpdateCallback && (*isNotifyEnabled == 1))
1093  {
1094  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1095  }
1096  }
1097  }
1098  if (strcasecmp(pSetting,"HardwareVersion") == 0)
1099  {
1100  memset(&msgData,0,sizeof(msgData));
1101  bChanged = false;
1102  pIface->get_Device_DeviceInfo_HardwareVersion(&msgData,&bChanged);
1103  if(bChanged)
1104  {
1105  if(mUpdateCallback && (*isNotifyEnabled == 1))
1106  {
1107  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1108  }
1109  }
1110  }
1111  if (strcasecmp(pSetting,"SoftwareVersion") == 0)
1112  {
1113  memset(&msgData,0,sizeof(msgData));
1114  bChanged = false;
1115  pIface->get_Device_DeviceInfo_SoftwareVersion(&msgData,&bChanged);
1116  if(bChanged)
1117  {
1118  if(mUpdateCallback && (*isNotifyEnabled == 1))
1119  {
1120  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1121  }
1122  }
1123  }
1124  if (strcasecmp(pSetting,"AdditionalSoftwareVersion") == 0)
1125  {
1126  memset(&msgData,0,sizeof(msgData));
1127  bChanged = false;
1128  pIface->get_Device_DeviceInfo_AdditionalSoftwareVersion(&msgData,&bChanged);
1129  if(bChanged)
1130  {
1131  if(mUpdateCallback && (*isNotifyEnabled == 1))
1132  {
1133  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1134  }
1135  }
1136  }
1137  if (strcasecmp(pSetting,"ProvisioningCode") == 0)
1138  {
1139  memset(&msgData,0,sizeof(msgData));
1140  bChanged = false;
1141  pIface->get_Device_DeviceInfo_ProvisioningCode(&msgData,&bChanged);
1142  if(bChanged)
1143  {
1144  if(mUpdateCallback && (*isNotifyEnabled == 1))
1145  {
1146  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1147  }
1148  }
1149  }
1150  if (strcasecmp(pSetting,"UpTime") == 0)
1151  {
1152  memset(&msgData,0,sizeof(msgData));
1153  bChanged = false;
1154  pIface->get_Device_DeviceInfo_UpTime(&msgData,&bChanged);
1155  if(bChanged)
1156  {
1157  if(mUpdateCallback && (*isNotifyEnabled == 1))
1158  {
1159  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1160  }
1161  }
1162  }
1163  if (strcasecmp(pSetting,"FirstUseDate") == 0)
1164  {
1165  memset(&msgData,0,sizeof(msgData));
1166  bChanged = false;
1167  pIface->get_Device_DeviceInfo_FirstUseDate(&msgData,&bChanged);
1168  if(bChanged)
1169  {
1170  if(mUpdateCallback && (*isNotifyEnabled == 1))
1171  {
1172  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1173  }
1174  }
1175  }
1176  if (strcasecmp(pSetting,"X_COMCAST-COM_STB_MAC") == 0)
1177  {
1178  memset(&msgData,0,sizeof(msgData));
1179  bChanged = false;
1180  pIface->get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC(&msgData,&bChanged);
1181  if(bChanged)
1182  {
1183  if(mUpdateCallback && (*isNotifyEnabled == 1))
1184  {
1185  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1186  }
1187  }
1188  }
1189  if (strcasecmp(pSetting,"X_COMCAST-COM_STB_IP") == 0)
1190  {
1191  memset(&msgData,0,sizeof(msgData));
1192  bChanged = false;
1193  pIface->get_Device_DeviceInfo_X_COMCAST_COM_STB_IP(&msgData,&bChanged);
1194  if(bChanged)
1195  {
1196  if(mUpdateCallback && (*isNotifyEnabled == 1))
1197  {
1198  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1199  }
1200  }
1201  }
1202  if (strcasecmp(pSetting,"X_COMCAST-COM_FirmwareFilename") == 0 ||
1203  strcasecmp(pSetting,"X_RDKCENTRAL-COM_FirmwareFilename") == 0)
1204  {
1205  memset(&msgData,0,sizeof(msgData));
1206  bChanged = false;
1207  pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareFilename(&msgData,&bChanged);
1208  if(bChanged)
1209  {
1210  if(mUpdateCallback && (*isNotifyEnabled == 1))
1211  {
1212  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1213  }
1214  }
1215  }
1216  if (strcasecmp(pSetting,"X_COMCAST-COM_Reset") == 0 ||
1217  strcasecmp(pSetting,"X_RDKCENTRAL-COM_Reset") == 0)
1218  {
1219  memset(&msgData,0,sizeof(msgData));
1220  bChanged = false;
1221  pIface->get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(&msgData,&bChanged);
1222  if(bChanged)
1223  {
1224  if(mUpdateCallback && (*isNotifyEnabled == 1))
1225  {
1226  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1227  }
1228  }
1229  }
1230  if (strcasecmp(pSetting,"VendorConfigFileNumberOfEntries") == 0)
1231  {
1232  memset(&msgData,0,sizeof(msgData));
1233  bChanged = false;
1234  pIface->get_Device_DeviceInfo_VendorConfigFileNumberOfEntries(&msgData,&bChanged);
1235  if(bChanged)
1236  {
1237  if(mUpdateCallback && (*isNotifyEnabled == 1))
1238  {
1239  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1240  }
1241  }
1242  }
1243  if (strcasecmp(pSetting,"SupportedDataModelNumberOfEntries") == 0)
1244  {
1245  memset(&msgData,0,sizeof(msgData));
1246  bChanged = false;
1247  pIface->get_Device_DeviceInfo_SupportedDataModelNumberOfEntries(&msgData,&bChanged);
1248  if(bChanged)
1249  {
1250  if(mUpdateCallback && (*isNotifyEnabled == 1))
1251  {
1252  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1253  }
1254  }
1255  }
1256  if (strcasecmp(pSetting,"VendorLogFileNumberOfEntries") == 0)
1257  {
1258  memset(&msgData,0,sizeof(msgData));
1259  bChanged = false;
1260  pIface->get_Device_DeviceInfo_VendorLogFileNumberOfEntries(&msgData,&bChanged);
1261  if(bChanged)
1262  {
1263  if(mUpdateCallback && (*isNotifyEnabled == 1))
1264  {
1265  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1266  }
1267  }
1268  }
1269  if (strcasecmp(pSetting,"VendorLogFileNumberOfEntries") == 0)
1270  {
1271  memset(&msgData,0,sizeof(msgData));
1272  bChanged = false;
1273  pIface->get_Device_DeviceInfo_VendorLogFileNumberOfEntries(&msgData,&bChanged);
1274  if(bChanged)
1275  {
1276  if(mUpdateCallback && (*isNotifyEnabled == 1))
1277  {
1278  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,(const char*)paramName, msgData.paramValue, msgData.paramtype);
1279  }
1280  }
1281  }
1282  }
1283  }
1284  }
1285  }
1286 
1287 #endif /*HAVE_VALUE_CHANGE_EVENT*/
1288  hostIf_DeviceInfo::releaseLock();
1289 }
1290 
1291 
1292 void DeviceClientReqHandler::notifyIARM(IARM_Bus_tr69HostIfMgr_EventId_t event_type, const char* paramName, const char* paramValue, HostIf_ParamType_t paramtype) {
1294  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"[%s:%s] DeviceClientReqHandler Notify for Parameter :- %s..\n", __FILE__, __FUNCTION__,paramName);
1295  strncpy(eventData.paramName,paramName, sizeof(eventData.paramName) -1); //CID:136301 - Buffer size warning
1296  eventData.paramName[sizeof(eventData.paramName) -1] = '\0';
1297 
1298  if(paramValue)
1299  {
1300  strncpy(eventData.paramValue, paramValue, sizeof(eventData.paramValue) -1);
1301  eventData.paramValue[sizeof(eventData.paramValue) -1] = '\0';
1302  }
1303 
1304  eventData.paramtype = paramtype;
1305  IARM_Bus_BroadcastEvent(IARM_BUS_TR69HOSTIFMGR_NAME, (IARM_EventId_t) event_type, (void *)&eventData, sizeof(eventData));
1306 }
1307 
1308 
1309 
1310 
1311 
1312 
1313 /** @} */
1314 /** @} */
hostIf_DeviceInfo::get_Device_DeviceInfo_ManufacturerOUI
int get_Device_DeviceInfo_ManufacturerOUI(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_Manufacturer.
Definition: Device_DeviceInfo.cpp:565
hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_Syndication_PartnerId
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_Syndication_PartnerId(HOSTIF_MsgData_t *)
set_Device.DeviceInfo_X_RDKCENTRAL-COM_Syndication_PartnerId
Definition: Device_DeviceInfo.cpp:2325
hostIf_DeviceProcess::get_Device_DeviceInfo_ProcessStatus_Process_CPUTime
int get_Device_DeviceInfo_ProcessStatus_Process_CPUTime(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function provides The amount of time spent by the process taking the cpu.
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:522
hostIf_DeviceInfo::get_xOpsDMLogsUploadStatus
int get_xOpsDMLogsUploadStatus(HOSTIF_MsgData_t *)
get_xOpsDMLogsUploadStatus.
Definition: Device_DeviceInfo.cpp:1980
hostIf_DeviceInfo::get_Device_DeviceInfo_UpTime
int get_Device_DeviceInfo_UpTime(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_UpTime.
Definition: Device_DeviceInfo.cpp:1022
IARM_BUS_TR69HOSTIFMGR_EVENT_REMOVE
@ IARM_BUS_TR69HOSTIFMGR_EVENT_REMOVE
Definition: hostIf_tr69ReqHandler.h:188
hostIf_DeviceProcess::get_Device_DeviceInfo_ProcessStatus_Process_PID
int get_Device_DeviceInfo_ProcessStatus_Process_PID(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function provides the Process Identifier.
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:375
Device_DeviceInfo_ProcessStatus.h
The header file provides TR069 device processor status information APIs.
_HostIf_MsgData_t::instanceNum
short instanceNum
Definition: hostIf_tr69ReqHandler.h:176
Device_DeviceInfo_Processor.h
The header file provides TR069 device information of processor APIs.
hostIf_DeviceProcess
This class provides the interface for getting device processor information.
Definition: Device_DeviceInfo_ProcessStatus_Process.h:108
hostIf_DeviceInfo::get_Device_DeviceInfo_MemoryStatus_Total
int get_Device_DeviceInfo_MemoryStatus_Total(HOSTIF_MsgData_t *, bool *pChanged=NULL)
Get the device total memory status.
Definition: Device_DeviceInfo.cpp:1740
hostIf_SNMPClient_ReqHandler.h
The header file provides HostIf SNMP client request handler information APIs.
hostIf_DeviceInfo::set_xOpsDMMoCALogPeriod
int set_xOpsDMMoCALogPeriod(HOSTIF_MsgData_t *)
set_xOpsDMMoCALogPeriod.
Definition: Device_DeviceInfo.cpp:2505
hostIf_DeviceInfo::get_Device_DeviceInfo_Manufacturer
int get_Device_DeviceInfo_Manufacturer(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_Manufacturer.
Definition: Device_DeviceInfo.cpp:486
_HostIf_MsgData_t::bsUpdate
HostIf_Source_Type_t bsUpdate
Definition: hostIf_tr69ReqHandler.h:181
hostIf_DeviceInfo::get_Device_DeviceInfo_FirstUseDate
int get_Device_DeviceInfo_FirstUseDate(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_FirstUseDate.
Definition: Device_DeviceInfo.cpp:1047
hostIf_snmpAdapter
This class provides the interface for getting device information.
Definition: snmpAdapter.h:94
DeviceClientReqHandler::unInit
virtual bool unInit()
This function is used to close all the instances of device info, device processor interface,...
Definition: hostIf_DeviceClient_ReqHandler.cpp:104
Device_DeviceInfo_ProcessStatus_Process.h
The header file provides TR069 device processor status process information APIs.
hostIf_DeviceInfo::get_Device_DeviceInfo_AdditionalSoftwareVersion
int get_Device_DeviceInfo_AdditionalSoftwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_AdditionalSoftwareVersion.
Definition: Device_DeviceInfo.cpp:901
IARM_BUS_TR69HOSTIFMGR_EVENT_ADD
@ IARM_BUS_TR69HOSTIFMGR_EVENT_ADD
Definition: hostIf_tr69ReqHandler.h:187
hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(HOSTIF_MsgData_t *)
set_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset.
Definition: Device_DeviceInfo.cpp:2098
hostIf_DeviceProcessorInterface
This class provides the interface for getting device processor information.
Definition: Device_DeviceInfo_Processor.h:71
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_BootStatus
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_BootStatus(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_BootStatus.
Definition: Device_DeviceInfo.cpp:1801
hostIf_DeviceInfo::get_Device_DeviceInfo_VendorLogFileNumberOfEntries
int get_Device_DeviceInfo_VendorLogFileNumberOfEntries(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_VendorLogFileNumberOfEntries.
Definition: Device_DeviceInfo.cpp:1702
_tr69HostIfMgr_EventData_t
Definition: hostIf_tr69ReqHandler.h:195
DeviceClientReqHandler::handleSetMsg
virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData)
This function is used to set the Device reset, FirmwareDownload and FirmwareDownload Status....
Definition: hostIf_DeviceClient_ReqHandler.cpp:127
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
hostIf_snmpAdapter::get_ValueFromSNMPAdapter
int get_ValueFromSNMPAdapter(HOSTIF_MsgData_t *)
This function fetch the SNMP OID for the corresponding TR181 param, and run the snmpget command with ...
Definition: snmpAdapter.cpp:235
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_CPUTemp
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_CPUTemp(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This method gets the CPU temperature for doing general health check up of the box.
Definition: Device_DeviceInfo.cpp:1931
hostIf_DeviceInfo::get_Device_DeviceInfo_X_COMCAST_COM_PowerStatus
int get_Device_DeviceInfo_X_COMCAST_COM_PowerStatus(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_PowerStatus.
Definition: Device_DeviceInfo.cpp:1369
hostIf_DeviceInfo::get_Device_DeviceInfo_X_COMCAST_COM_STB_IP
int get_Device_DeviceInfo_X_COMCAST_COM_STB_IP(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_STB_IP.
Definition: Device_DeviceInfo.cpp:1328
hostIf_DeviceInfo::get_Device_DeviceInfo_VendorConfigFileNumberOfEntries
int get_Device_DeviceInfo_VendorConfigFileNumberOfEntries(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_VendorConfigFileNumberOfEntries.
Definition: Device_DeviceInfo.cpp:1634
hostIf_DeviceProcess::get_Device_DeviceInfo_ProcessStatus_Process_Priority
int get_Device_DeviceInfo_ProcessStatus_Process_Priority(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function provides The priority of the process.
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:489
hostIf_DeviceInfo::get_Device_DeviceInfo_ProcessorNumberOfEntries
static int get_Device_DeviceInfo_ProcessorNumberOfEntries(HOSTIF_MsgData_t *)
get_Device_DeviceInfo_ProcessorNumberOfEntries.
Definition: Device_DeviceInfo.cpp:1660
dsError.h
Device Settings HAL error codes.
hostIf_DeviceInfo::get_Device_DeviceInfo_SerialNumber
int get_Device_DeviceInfo_SerialNumber(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_SerialNumber.
Definition: Device_DeviceInfo.cpp:301
hostIf_main.h
hostIf_main API.
hostIf_DeviceProcess::getNumOfProcessEntries
static int getNumOfProcessEntries(HOSTIF_MsgData_t *)
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:185
hostIf_DeviceClient_ReqHandler.h
The header file provides HostIf Device client request handler information APIs.
hostIf_DeviceProcessStatusInterface::get_Device_DeviceInfo_ProcessStatus_CPUUsage
int get_Device_DeviceInfo_ProcessStatus_CPUUsage(HOSTIF_MsgData_t *stMsgData, bool *pChanged=NULL)
This function provides the total amount of cpu usage, in percentage.
Definition: Device_DeviceInfo_ProcessStatus.cpp:208
hostIf_snmpAdapter::set_ValueToSNMPAdapter
int set_ValueToSNMPAdapter(HOSTIF_MsgData_t *)
This function fetch the SNMP OID for the corresponding TR181 param, and run the snmpset command with ...
Definition: snmpAdapter.cpp:309
hostIf_DeviceInfo::get_Device_DeviceInfo_Description
int get_Device_DeviceInfo_Description(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_Description.
Definition: Device_DeviceInfo.cpp:724
hostIf_DeviceInfo::get_Device_DeviceInfo_SupportedDataModelNumberOfEntries
int get_Device_DeviceInfo_SupportedDataModelNumberOfEntries(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_SupportedDataModelNumberOfEntries.
Definition: Device_DeviceInfo.cpp:1652
snmpAdapter.h
The header file provides TR181 SNMP device RDK Central APIs.
hostIf_DeviceInfo::get_xOpsReverseSshStatus
int get_xOpsReverseSshStatus(HOSTIF_MsgData_t *)
get_xOpsReverseSshStatus
Definition: Device_DeviceInfo.cpp:2921
_tr69HostIfMgr_EventData_t::paramtype
HostIf_ParamType_t paramtype
Definition: hostIf_tr69ReqHandler.h:199
hostIf_DeviceInfo::set_xOpsReverseSshArgs
int set_xOpsReverseSshArgs(HOSTIF_MsgData_t *)
set_xOpsReverseSshArgs
Definition: Device_DeviceInfo.cpp:2833
IARM_Bus_tr69HostIfMgr_EventId_t
enum _tr69HostIfMgr_EventId_t IARM_Bus_tr69HostIfMgr_EventId_t
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig.
Definition: Device_DeviceInfo.cpp:1570
_HostIf_MsgData_t::paramtype
HostIf_ParamType_t paramtype
Definition: hostIf_tr69ReqHandler.h:177
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload.
Definition: Device_DeviceInfo.cpp:1529
RDK_LOG
#define RDK_LOG
Definition: rdk_debug.h:258
hostIf_DeviceInfo::get_Device_DeviceInfo_ProductClass
int get_Device_DeviceInfo_ProductClass(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_ProductClass.
Definition: Device_DeviceInfo.cpp:748
IARM_Bus_BroadcastEvent
IARM_Result_t IARM_Bus_BroadcastEvent(const char *ownerName, IARM_EventId_t eventId, void *data, size_t len)
This API is used to publish an Asynchronous event to all IARM client registered for this perticular e...
hostIf_DeviceInfo::get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC
int get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC.
Definition: Device_DeviceInfo.cpp:1083
HostIf_ParamType_t
enum _HostIf_ParamType HostIf_ParamType_t
_HostIf_MsgData_t::faultCode
faultCode_t faultCode
Definition: hostIf_tr69ReqHandler.h:179
hostIf_DeviceInfo::get_Device_DeviceInfo_HardwareVersion
int get_Device_DeviceInfo_HardwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_HardwareVersion.
Definition: Device_DeviceInfo.cpp:821
libIBus.h
RDK IARM-Bus API Declarations.
hostIf_DeviceInfo::get_Device_DeviceInfo_SoftwareVersion
int get_Device_DeviceInfo_SoftwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_SoftwareVersion.
Definition: Device_DeviceInfo.cpp:392
Device_DeviceInfo.h
The header file provides TR69 device information APIs.
_HostIf_MsgData_t::paramName
char paramName[(4 *1024)]
Definition: hostIf_tr69ReqHandler.h:171
hostIf_DeviceInfo::set_xOpsDMUploadLogsNow
int set_xOpsDMUploadLogsNow(HOSTIF_MsgData_t *)
set_xOpsDMUploadLogsNow.
Definition: Device_DeviceInfo.cpp:2232
hostIf_DeviceInfo::get_X_RDK_FirmwareName
int get_X_RDK_FirmwareName(HOSTIF_MsgData_t *)
This function identifying the imagename of the running image This Value comes from "imagename" proper...
Definition: Device_DeviceInfo.cpp:4743
hostIf_DeviceInfo
This class provides the interface for getting device information.
Definition: Device_DeviceInfo.h:194
hostIf_DeviceProcess::get_Device_DeviceInfo_ProcessStatus_Process_Size
int get_Device_DeviceInfo_ProcessStatus_Process_Size(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function provides The Size in Kilo bytes of the memory occupied by process.
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:456
hostIf_DeviceProcessorInterface::get_Device_DeviceInfo_Processor_Architecture
int get_Device_DeviceInfo_Processor_Architecture(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function use to get the architecture of the processor on the underlying hardware.
Definition: Device_DeviceInfo_Processor.cpp:173
_HostIf_MsgData_t::paramValue
char paramValue[(4 *1024)]
Definition: hostIf_tr69ReqHandler.h:172
hostIf_DeviceInfo::get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL
int get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL.
Definition: Device_DeviceInfo.cpp:1561
hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload(HOSTIF_MsgData_t *)
This method set the firmware download file path which is present in "/opt/fwdnldstatus....
Definition: Device_DeviceInfo.cpp:2186
hostIf_DeviceInfo::get_Device_DeviceInfo_AdditionalHardwareVersion
int get_Device_DeviceInfo_AdditionalHardwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_AdditionalHardwareVersion.
Definition: Device_DeviceInfo.cpp:878
IARM_BUS_TR69HOSTIFMGR_NAME
#define IARM_BUS_TR69HOSTIFMGR_NAME
Definition: hostIf_tr69ReqHandler.h:85
DeviceClientReqHandler
This class provides the interface for getting device client request handler information.
Definition: hostIf_DeviceClient_ReqHandler.h:86
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType.
Definition: Device_DeviceInfo.cpp:1945
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset.
Definition: Device_DeviceInfo.cpp:1717
DeviceClientReqHandler::init
virtual bool init()
This function is used to initialize all the current process and processor to '0' using memset.
Definition: hostIf_DeviceClient_ReqHandler.cpp:85
hostIf_DeviceProcessStatusInterface
This class provides the interface for getting device processor status information.
Definition: Device_DeviceInfo_ProcessStatus.h:67
hostIf_DeviceProcess::get_Device_DeviceInfo_ProcessStatus_Process_State
int get_Device_DeviceInfo_ProcessStatus_Process_State(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function provides The current state of the process.
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:555
hostIf_DeviceInfo::get_xOpsDMMoCALogEnabled
int get_xOpsDMMoCALogEnabled(HOSTIF_MsgData_t *)
get_xOpsDMMoCALogEnabled.
Definition: Device_DeviceInfo.cpp:2525
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus.
Definition: Device_DeviceInfo.cpp:1545
msgHandler
Definition: hostIf_msgHandler.h:103
hostIf_msgHandler.h
The header file provides HostIf message handler information APIs.
hostIf_DeviceInfo::get_xOpsRPC_Profile
int get_xOpsRPC_Profile(HOSTIF_MsgData_t *)
set_xOpsDeviceMgmtRPCRebootNow
Definition: Device_DeviceInfo.cpp:4299
_HostIf_MsgData_t::requestor
HostIf_Source_Type_t requestor
Definition: hostIf_tr69ReqHandler.h:180
hostIf_DeviceInfo::get_xOpsDMUploadLogsNow
int get_xOpsDMUploadLogsNow(HOSTIF_MsgData_t *)
get_xOpsDMLogsUploadStatus.
Definition: Device_DeviceInfo.cpp:1973
XrdkBlueTooth.h
The header file provides components Xrdk SDCard information APIs.
hostIf_DeviceInfo::set_xOpsReverseSshTrigger
int set_xOpsReverseSshTrigger(HOSTIF_MsgData_t *)
set_xOpsReverseSshTrigger
Definition: Device_DeviceInfo.cpp:2757
hostIf_DeviceInfo::get_Device_DeviceInfo_ModelName
int get_Device_DeviceInfo_ModelName(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_ModelName.
Definition: Device_DeviceInfo.cpp:640
put_int
void put_int(char *ptr, int val)
This function converts the input data to integer type.
Definition: hostIf_utils.cpp:152
hostIf_DeviceInfo::get_Device_DeviceInfo_ProvisioningCode
int get_Device_DeviceInfo_ProvisioningCode(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_ProvisioningCode.
Definition: Device_DeviceInfo.cpp:965
IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED
@ IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED
Definition: hostIf_tr69ReqHandler.h:189
hostIf_DeviceInfo::get_Device_DeviceInfo_MemoryStatus_Free
int get_Device_DeviceInfo_MemoryStatus_Free(HOSTIF_MsgData_t *, bool *pChanged=NULL)
Get the device total free memory status.
Definition: Device_DeviceInfo.cpp:1768
hostIf_DeviceInfo::get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareFilename
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareFilename(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareFilename.
Definition: Device_DeviceInfo.cpp:1425
hostIf_DeviceInfo::set_xOpsDMMoCALogEnabled
int set_xOpsDMMoCALogEnabled(HOSTIF_MsgData_t *)
set_xOpsDMMoCALogEnabled.
Definition: Device_DeviceInfo.cpp:2258
DeviceClientReqHandler::handleGetMsg
virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData)
This function is used to get the Process information such as "PID", "Command" "Size",...
Definition: hostIf_DeviceClient_ReqHandler.cpp:326
hostIf_DeviceInfo::get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol
int get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol.
Definition: Device_DeviceInfo.cpp:1553
hostIf_DeviceInfo::get_xOpsDMMoCALogPeriod
int get_xOpsDMMoCALogPeriod(HOSTIF_MsgData_t *)
get_xOpsDMMoCALogPeriod.
Definition: Device_DeviceInfo.cpp:2689
hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus(HOSTIF_MsgData_t *)
This method set the status of the firmware download which is present in "/opt/fwdnldstatus....
Definition: Device_DeviceInfo.cpp:2207
hostIf_DeviceProcess::get_Device_DeviceInfo_ProcessStatus_Process_Command
int get_Device_DeviceInfo_ProcessStatus_Process_Command(HOSTIF_MsgData_t *, bool *pChanged=NULL)
This function provides The name of the command that has caused the process to exist.
Definition: Device_DeviceInfo_ProcessStatus_Process.cpp:408