|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
105 #ifndef DEVICE_DEVICEINFO_H_
106 #define DEVICE_DEVICEINFO_H_
112 #include "hostIf_tr69ReqHandler.h"
113 #include "hostIf_utils.h"
115 #ifndef NEW_HTTP_SERVER_DISABLE
116 #include "XrdkCentralComRFCStore.h"
117 #include "XrdkCentralComRFC.h"
119 #include "XrdkCentralComRFC.h"
121 #include "XrdkCentralComBSStore.h"
122 #include "hostIf_updateHandler.h"
124 #define CDL_FLASH_FILE "/opt/cdl_flashed_file_name"
125 #define CURENT_FW_FILE "/tmp/currently_running_image_name"
126 #define LOG_UPLOAD_SCR "/lib/rdk/UploadLogsNow.sh"
127 #define CURRENT_LOG_UPLOAD_STATUS "/opt/loguploadstatus.txt"
129 #define XRDK_BOOT_TIME "Device.DeviceInfo.X_RDKCENTRAL-COM_BootTime"
130 #define xFirmwareDownloadNow_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadNow"
131 #define X_RDKCENTRAL_COM_LastRebootReason "Device.DeviceInfo.X_RDKCENTRAL-COM_LastRebootReason"
132 #define X_RDKCENTRAL_COM_Experience "Device.DeviceInfo.X_RDKCENTRAL-COM_Experience"
133 #define X_RDK_FirmwareName "Device.DeviceInfo.X_RDK_FirmwareName"
136 #define X_RDKDownloadManager_InstallPackage "Device.DeviceInfo.X_RDKCENTRAL-COM_RDKDownloadManager.InstallPackage"
138 #define xOpsDMUploadLogsNow_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.Logging.xOpsDMUploadLogsNow"
139 #define xOpsDMLogsUploadStatus_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.Logging.xOpsDMLogsUploadStatus"
140 #define xOpsDMMoCALogEnabled "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.Logging.xOpsDMMoCALogEnabled"
141 #define xOpsDMMoCALogPeriod "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.Logging.xOpsDMMoCALogPeriod"
143 #define xOpsReverseSshTrigger_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.ReverseSSH.xOpsReverseSshTrigger"
144 #define xOpsReverseSshArgs_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.ReverseSSH.xOpsReverseSshArgs"
145 #define xOpsReverseSshStatus_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.ReverseSSH.xOpsReverseSshStatus"
146 #define xOpsForwardSshEnable_STR "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.ForwardSSH.Enable"
148 #define X_OPS_RPC_PROFILE "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC."
149 #define X_OPS_RPC_REBOOTNOW "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.RebootNow"
150 #define X_OPS_RPC_DEV_MANAGEABLE_NOTIFICATION "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.DeviceManageableNotification"
151 #define X_OPS_RPC_FW_DNLD_STARTED_NOTIFICATION "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.FirmwareDownloadStartedNotification"
152 #define X_OPS_RPC_FW_DNLD_COMPLETED_NOTIFICATION "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.FirmwareDownloadCompletedNotification"
153 #define X_OPS_RPC_REBOOT_PENDING_NOTIFICATION "Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.RebootPendingNotification"
154 #define X_RDK_RFC_MANGEBLENOTIFICATION_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ManageableNotification.Enable"
156 #define TR181_RFC_PREFIX "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC"
157 #define TR181_RFC_RESET_DATA_START "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ClearDB"
158 #define TR181_RFC_RESET_DATA_END "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ClearDBEnd"
159 #define HDR_DV_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.DolbyVision.Enable"
161 #define RFC_WL_ROAM_TRIGGER_RF "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RoamTrigger"
162 #define MS12_DAPV2_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.MS12.DAPv2_Enable"
163 #define MS12_DE_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.MS12.DE_Enable"
164 #define LE_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.LoudnessEquivalence.Enable"
165 #define HDR_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.HdrEnable.Enable"
166 #define UHD_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.UhdEnable.Enable"
167 #define XRE_CONTAINER_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.LXC.XRE.Enable"
168 #define TR181_AUTOREBOOT_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AutoReboot.Enable"
169 #define SHORTS_RFC_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.SHORTS.Enable"
171 #define RFC_CTL_RETRIEVE_NOW "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.RetrieveNow"
173 #define IPREMOTE_SUPPORT "Device.DeviceInfo.X_RDKCENTRAL-COM_IPRemoteSupport.Enable"
174 #define IPREMOTE_IPADDRESS "Device.DeviceInfo.X_RDKCENTRAL-COM_IPRemoteSupport.IPAddr"
175 #define IPREMOTE_MACADDRESS "Device.DeviceInfo.X_RDKCENTRAL-COM_IPRemoteSupport.MACAddr"
177 #define XRPOLLING_ACTION "Device.DeviceInfo.X_RDKCENTRAL-COM_XRPolling.Action"
179 #define PARTNER_ID "Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.PartnerId"
181 #define FWDNLD_DEFER_REBOOT "Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadDeferReboot"
184 #ifdef USE_REMOTE_DEBUGGER
185 #define RDK_REMOTE_DEBUGGER_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.Enable"
186 #define RDK_REMOTE_DEBUGGER_ISSUETYPE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType"
189 #define APPARMOR_BLOCKLIST_PROCESS "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.NonRootSupport.ApparmorBlocklist"
196 static GHashTable *ifHash;
198 static GHashTable *m_notifyHash;
200 static GMutex *m_mutex;
208 bool bCalledSoftwareVersion;
209 bool bCalledX_COMCAST_COM_STB_IP;
210 bool bCalledX_COMCAST_COM_FirmwareFilename;
211 bool bCalledManufacturer;
212 bool bCalledManufacturerOUI;
213 bool bCalledModelName;
214 bool bCalledHardwareVersion;
215 bool bCalledDeviceMAC;
216 bool bCalledSerialNumber;
217 bool bCalledProductClass;
218 bool bCalledAdditionalSoftwareVersion;
220 char backupSoftwareVersion[_BUF_LEN_16];
221 char backupX_COMCAST_COM_STB_IP[_BUF_LEN_64];
222 char backupX_COMCAST_COM_FirmwareFilename[_BUF_LEN_64];
223 char backupSerialNumber[_BUF_LEN_16];
224 char backupProductClass[_BUF_LEN_16];
225 char backupManufacturer[_BUF_LEN_16];
226 char backupManufacturerOUI[_BUF_LEN_16];
227 char backupModelName[_BUF_LEN_16];
228 char backupHardwareVersion[_BUF_LEN_16];
229 char backupDeviceMAC[_BUF_LEN_32];
230 char backupAdditionalSoftwareVersion[_BUF_LEN_16];
232 static string m_xFirmwareDownloadProtocol;
233 static string m_xFirmwareDownloadURL;
234 static string m_xFirmwareToDownload;
235 static bool m_xFirmwareDownloadNow;
236 static bool m_xFirmwareDownloadUseCodebig;
237 static bool m_xFirmwareDownloadDeferReboot;
239 #ifndef NEW_HTTP_SERVER_DISABLE
246 static string m_xrPollingAction;
248 std::string m_strXOpsDevManageableNotification;
249 std::string m_strXOpsRPCFwDwldStartedNotification;
250 bool m_bXOpsRPCFwDwldCompletedNotification;
254 bool isShortsEnabled();
255 int findLocalPortAvailable();
256 size_t findIgnoreCase (std::string haystack, std::string needle,
size_t pos = 0);
257 string getStbMacIf_fr_devProperties();
270 #ifdef ENABLE_LLAMA_PLATCO
277 int ScheduleAutoReboot(
bool);
292 static void systemMgmtTimePathMonitorThr();
300 static GList* getAllInstances();
302 static void closeAllInstances();
304 static void getLock();
306 static void releaseLock();
308 static void send_DeviceManageableNotification();
310 GHashTable* getNotifyHash();
748 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadDeferReboot(
HOSTIF_MsgData_t *,
bool *pChanged = NULL);
750 int get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadPercent (
HOSTIF_MsgData_t *,
bool *pChanged = NULL);
752 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareUpdateState (
HOSTIF_MsgData_t *,
bool *pChanged = NULL);
917 int get_X_RDKCENTRAL_COM_BootTime(
HOSTIF_MsgData_t *,
bool *pChanged = NULL);
980 int set_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol(
HOSTIF_MsgData_t *);
981 int set_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL (
HOSTIF_MsgData_t *);
982 int set_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType(
HOSTIF_MsgData_t *);
983 int set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig(
HOSTIF_MsgData_t *);
984 int set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadDeferReboot(
HOSTIF_MsgData_t *);
1097 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportEnable(
HOSTIF_MsgData_t *,
bool *pChanged = NULL);
1098 int set_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportEnable(
HOSTIF_MsgData_t *);
1112 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportIpaddress(
HOSTIF_MsgData_t *);
1126 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_IPRemoteSupportMACaddress(
HOSTIF_MsgData_t *);
1128 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_XRPollingAction(
HOSTIF_MsgData_t *,
bool *pChanged = NULL);
1129 int set_Device_DeviceInfo_X_RDKCENTRAL_COM_XRPollingAction(
HOSTIF_MsgData_t *);
1131 #ifdef USE_REMOTE_DEBUGGER
1144 int set_Device_DeviceInfo_X_RDKCENTRAL_COM_RDKRemoteDebuggerIssueType(
HOSTIF_MsgData_t *);
1158 int get_Device_DeviceInfo_X_RDKCENTRAL_COM_Syndication_PartnerId(
HOSTIF_MsgData_t *);
1173 #ifdef USE_HWSELFTEST_PROFILE
1274 int set_xOpsDeviceMgmt_hwHealthTest_PeriodicRunFrequency(
HOSTIF_MsgData_t *);
1329 int set_xRDKCentralComRFC_hwHealthTest_ResultFilter_Enable(
HOSTIF_MsgData_t *);
1342 int set_xRDKCentralComRFC_hwHealthTest_ResultFilter_QueueDepth(
HOSTIF_MsgData_t *);
1355 int set_xRDKCentralComRFC_hwHealthTest_ResultFilter_FilterParams(
HOSTIF_MsgData_t *);
1368 int set_xRDKCentralComRFC_hwHealthTest_ResultFilter_ResultsFiltered(
HOSTIF_MsgData_t *);
int get_Device_DeviceInfo_ManufacturerOUI(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_Manufacturer.
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_Syndication_PartnerId(HOSTIF_MsgData_t *)
set_Device.DeviceInfo_X_RDKCENTRAL-COM_Syndication_PartnerId
int get_xOpsDMLogsUploadStatus(HOSTIF_MsgData_t *)
get_xOpsDMLogsUploadStatus.
int get_Device_DeviceInfo_UpTime(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_UpTime.
int get_Device_DeviceInfo_MemoryStatus_Total(HOSTIF_MsgData_t *, bool *pChanged=NULL)
Get the device total memory status.
int set_xOpsDMMoCALogPeriod(HOSTIF_MsgData_t *)
set_xOpsDMMoCALogPeriod.
int get_Device_DeviceInfo_Manufacturer(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_Manufacturer.
int get_Device_DeviceInfo_FirstUseDate(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_FirstUseDate.
size_t findIgnoreCase(std::string haystack, std::string needle, size_t pos=0)
Finds if one string occurs within another string. The search is case-insensitive.
int get_Device_DeviceInfo_AdditionalSoftwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_AdditionalSoftwareVersion.
int set_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(HOSTIF_MsgData_t *)
set_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset.
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_BootStatus(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_BootStatus.
int get_Device_DeviceInfo_VendorLogFileNumberOfEntries(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_VendorLogFileNumberOfEntries.
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.
int get_Device_DeviceInfo_X_COMCAST_COM_PowerStatus(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_PowerStatus.
int get_Device_DeviceInfo_X_COMCAST_COM_STB_IP(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_STB_IP.
int get_Device_DeviceInfo_VendorConfigFileNumberOfEntries(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_VendorConfigFileNumberOfEntries.
static int get_Device_DeviceInfo_ProcessorNumberOfEntries(HOSTIF_MsgData_t *)
get_Device_DeviceInfo_ProcessorNumberOfEntries.
int get_Device_DeviceInfo_SerialNumber(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_SerialNumber.
int get_xOpsReverseSshArgs(HOSTIF_MsgData_t *)
get_xOpsReverseSshArgs
int get_Device_DeviceInfo_Description(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_Description.
int get_Device_DeviceInfo_SupportedDataModelNumberOfEntries(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_SupportedDataModelNumberOfEntries.
int get_xOpsReverseSshStatus(HOSTIF_MsgData_t *)
get_xOpsReverseSshStatus
int set_xOpsReverseSshArgs(HOSTIF_MsgData_t *)
set_xOpsReverseSshArgs
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadUseCodebig.
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload.
int get_Device_DeviceInfo_ProductClass(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_ProductClass.
int get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_STB_MAC.
int get_Device_DeviceInfo_HardwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_HardwareVersion.
int get_Device_DeviceInfo_SoftwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_SoftwareVersion.
int set_xOpsDMUploadLogsNow(HOSTIF_MsgData_t *)
set_xOpsDMUploadLogsNow.
int get_X_RDK_FirmwareName(HOSTIF_MsgData_t *)
This function identifying the imagename of the running image This Value comes from "imagename" proper...
This class provides the interface for getting device information.
int readFirmwareInfo(char *, HOSTIF_MsgData_t *)
This method read the firmware information which is present in "/opt/fwdnldstatus.txt".
int writeFirmwareInfo(char *, HOSTIF_MsgData_t *)
This method writes the firmware information which is present in "/opt/fwdnldstatus....
int get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadURL.
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....
int get_Device_DeviceInfo_AdditionalHardwareVersion(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_AdditionalHardwareVersion.
hostIf_DeviceInfo(int dev_id)
Class Constructor of the class hostIf_DeviceInfo.
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_PreferredGatewayType.
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_Reset.
int get_xOpsDMMoCALogEnabled(HOSTIF_MsgData_t *)
get_xOpsDMMoCALogEnabled.
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareDownloadStatus.
int get_xOpsRPC_Profile(HOSTIF_MsgData_t *)
set_xOpsDeviceMgmtRPCRebootNow
int get_xOpsDMUploadLogsNow(HOSTIF_MsgData_t *)
get_xOpsDMLogsUploadStatus.
int set_xOpsReverseSshTrigger(HOSTIF_MsgData_t *)
set_xOpsReverseSshTrigger
int get_Device_DeviceInfo_ModelName(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_ModelName.
int get_Device_DeviceInfo_ProvisioningCode(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_ProvisioningCode.
int get_Device_DeviceInfo_MemoryStatus_Free(HOSTIF_MsgData_t *, bool *pChanged=NULL)
Get the device total free memory status.
int get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareFilename(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareFilename.
int set_xOpsDMMoCALogEnabled(HOSTIF_MsgData_t *)
set_xOpsDMMoCALogEnabled.
int get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol(HOSTIF_MsgData_t *, bool *pChanged=NULL)
get_Device_DeviceInfo_X_COMCAST_COM_FirmwareDownloadProtocol.
int get_xOpsDMMoCALogPeriod(HOSTIF_MsgData_t *)
get_xOpsDMMoCALogPeriod.
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....