RDK Documentation (Open Sourced RDK Components)
mfrMgr.h
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 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
22 *
23 * @brief IARM-Bus MFR Manager Public API.
24 *
25 * This API defines the operations for the IARM-Bus MFR Manager interface.
26 *
27 * @par Document
28 * Document reference.
29 *
30 * @par Open Issues (in no particular order)
31 * -# None
32 *
33 * @par Assumptions
34 * -# None
35 *
36 * @par Abbreviations
37 * - BE: ig-Endian.
38 * - cb: allback function (suffix).
39 * - DS: Device Settings.
40 * - FPD: Front-Panel Display.
41 * - HAL: Hardware Abstraction Layer.
42 * - LE: Little-Endian.
43 * - LS: Least Significant.
44 * - MBZ: Must be zero.
45 * - MS: Most Significant.
46 * - RDK: Reference Design Kit.
47 * - _t: Type (suffix).
48 *
49 * @par Implementation Notes
50 * -# None
51 *
52 */
53 
54 /** @defgroup IARM_BUS IARM-Bus HAL API
55 * @ingroup IARM_RDK
56 *
57 * IARM-Bus is a platform agnostic Inter-process communication (IPC) interface. It allows
58 * applications to communicate with each other by sending Events or invoking Remote
59 * Procedure Calls. The common programming APIs offered by the RDK IARM-Bus interface is
60 * independent of the operating system or the underlying IPC mechanism.
61 *
62 * Two applications connected to the same instance of IARM-Bus are able to exchange events
63 * or RPC calls. On a typical system, only one instance of IARM-Bus instance is needed. If
64 * desired, it is possible to have multiple IARM-Bus instances. However, applications
65 * connected to different buses will not be able to communicate with each other.
66 */
67 
68 /** @defgroup IARM_BUS MFR Manager MFR lib
69 * @ingroup IARM_RDK
70 *
71 */
72 
73 /** @addtogroup IARM_BUS_MFR_LIB_API IARM-MFR Manager API
74 * @ingroup IARM_BUS
75 *
76 * Described herein are functions and structures exposed by MFR library.
77 *
78 * @{
79 */
80 
81 
82 
83 /**
84 * @defgroup iarmmgrs
85 * @{
86 * @defgroup mfr
87 * @{
88 **/
89 
90 
91 #ifndef _MFR_MGR_H_
92 #define _MFR_MGR_H_
93 
94 #include "libIBus.h"
95 #include "libIARM.h"
96 #include "mfrTypes.h"
97 
98 #define IARM_BUS_MFRLIB_NAME "MFRLib" /*!< Well-known Name for MFR libarary */
99 
100 #define IARM_BUS_MFRLIB_API_GetSerializedData "mfrGetSerializedData" /*!< Retrives manufacturer specific data from the box*/
101 #define IARM_BUS_MFRLIB_API_SetSerializedData "mfrSetSerializedData"
102 #define IARM_BUS_MFRLIB_API_WriteImage "mfrWriteImage" /*!< Validate and Write the image into flash*/
103 #define IARM_BUS_MFRLIB_API_SetImageWriteProgress "mfrSetImageWriteProgress"
104 #define IARM_BUS_MFRLIB_API_GetImageWriteProgress "mfrGetImageWriteProgress"
105 #define IARM_BUS_MFRLIB_API_DeletePDRI "mfrDeletePDRI" /*!< delete PDRI image from the box*/
106 #define IARM_BUS_MFRLIB_API_ScrubAllBanks "mfrScrubAllBanks" /*!< scrub all banks from the box*/
107 #define IARM_BUS_MFRLIB_API_Reboot "mfrReboot"
108 #define IARM_BUS_MFRLIB_API_SetCableCardType "mfrSetCableCardType"
109 #define IARM_BUS_MFRLIB_API_SetHostFirmwareInfo "mfrSetHostFirmwareInfo"
110 #define IARM_BUS_MFRLIB_API_GetBootImageName "mfrGetBootImageName"
111 #define IARM_BUS_MFRLIB_API_GetPathConfiguration "mfrGetPathConfiguration"
112 #define IARM_BUS_MFRLIB_API_GetDFAST2Data "mfrGetDFAST2Data"
113 
114 
115 #define IARM_BUS_MFRLIB_COMMON_API_WriteImageCb "WriteImageCb" /*!< This method shall be implemented by the caller calling WriteImage*/
116 
117 #define IARM_BUS_MFRLIB_API_Init "mfrInit"
118 #define IARM_BUS_MFRLIB_API_Shutdown "mfrShutdown"
119 
120 #define MAX_BUF 255
121 #define MAX_SERIALIZED_BUF 1280
123  mfrSerializedType_t type; /*!< [in] Type of data to be queried*/
124  char crypto[64];
125  int bufLen; /*!< [out] Indicates length of buffer pointed by pBuffer */
126  char buffer[MAX_SERIALIZED_BUF];
128 
130  char name[MAX_BUF]; /*!< [in] the path of the image file in the STB file system. */
131  char path[MAX_BUF]; /*!< [in] the filename of the image file. */
132  mfrImageType_t type; /*!< [in] the type (e.g. format, signature type) of the image.*/
133  int interval; /*!< [in] number of seconds between two callbacks */
135 
137  char imageName[MAX_BUF];
138  mfrImageType_t imageType;
139  mfrUpgradeProgress_t progress;
141 
143  char imageName[MAX_BUF];
144  mfrImageType_t imageType;
145  mfrUpgradeProgress_t progress;
147 
149  char imageName[MAX_BUF];
151 
153  mfrCableCardType_t type;
155 
157  char version[MFR_MAX_STR_SIZE];
158  int day;
159  int month;
160  int year;
162 
164  int bootInstance;
165  char imageName[MAX_BUF];
166  int len;
167  mfrImageType_t type;
169 
171  mfrConfigPathType_t type;
172  char path[MFR_MAX_STR_SIZE];
173  int len;
175 
177  unsigned int seedIn [MFR_DFAST_INPUT_BYTES];
178  unsigned int keyOut [MFR_DFAST_OUTPUT_BYTES];
180 
181 /*! Data associated with WriteImage callback call*/
183  mfrUpgradeStatus_t status; /*! upgrade status, set by WriteImage callback*/
184  char cbData[MAX_BUF]; /*! callback data, which was passed through WriteImage call*/
186 
187 typedef enum _MfrMgr_EventId_t {
188  IARM_BUS_MFRMGR_EVENT_STATUS_UPDATE= 0, /*!< Event to notify status update change */
189  IARM_BUS_MFRMGR_EVENT_MAX, /*!< Max event id from this module */
190 } IARM_Bus_MfrMgr_EventId_t;
191 
192 /*! Event data*/
194  mfrUpgradeStatus_t status; /*!< New status*/
196 
197 
198 #endif //_MFR_MGR_H_
199 
200 
201 /* End of IARM_BUS_MFR_LIB_API doxygen group */
202 /**
203  * @}
204  */
205 
206 
207 /** @} */
208 /** @} */
_IARM_Bus_MFRLib_SerializedData_Param_t::bufLen
int bufLen
Definition: mfrMgr.h:125
_mfrUpgradeStatus_t
Definition: mfrTypes.h:218
_IARM_Bus_MFRLib_Reboot_Param_t
Definition: mfrMgr.h:148
_IARM_Bus_MFRLib_SerializedData_Param_t::type
mfrSerializedType_t type
Definition: mfrMgr.h:123
_IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t::cbData
char cbData[255]
Definition: mfrMgr.h:184
_IARM_Bus_MFRLib_GetDFAST2Data_Param_t
Definition: mfrMgr.h:176
_IARM_BUS_MfrMgr_StatusUpdate_EventData_t
Definition: mfrMgr.h:193
IARM_BUS_MFRMGR_EVENT_MAX
@ IARM_BUS_MFRMGR_EVENT_MAX
Definition: mfrMgr.h:189
IARM_BUS_MfrMgr_StatusUpdate_EventData_t
struct _IARM_BUS_MfrMgr_StatusUpdate_EventData_t IARM_BUS_MfrMgr_StatusUpdate_EventData_t
_IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t
Definition: mfrMgr.h:182
libIBus.h
RDK IARM-Bus API Declarations.
_IARM_Bus_MFRLib_SetImageWriteProgress_Param_t
Definition: mfrMgr.h:142
IARM_BUS_MFRMGR_EVENT_STATUS_UPDATE
@ IARM_BUS_MFRMGR_EVENT_STATUS_UPDATE
Definition: mfrMgr.h:188
_IARM_BUS_MfrMgr_StatusUpdate_EventData_t::status
mfrUpgradeStatus_t status
Definition: mfrMgr.h:194
_MfrMgr_EventId_t
_MfrMgr_EventId_t
Definition: mfrMgr.h:187
_IARM_Bus_MFRLib_WriteImage_Param_t
Definition: mfrMgr.h:129
_IARM_Bus_MFRLib_SetHostFirmwareInfo_Param_t
Definition: mfrMgr.h:156
_IARM_Bus_MFRLib_WriteImage_Param_t::interval
int interval
Definition: mfrMgr.h:133
_IARM_Bus_MFRLib_WriteImage_Param_t::path
char path[255]
Definition: mfrMgr.h:131
_IARM_Bus_MFRLib_GetPathConfiguration_Param_t
Definition: mfrMgr.h:170
IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t
struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t
_IARM_Bus_MFRLib_GetImageWriteProgress_Param_t
Definition: mfrMgr.h:136
_IARM_Bus_MFRLib_GetBootImageName_Param_t
Definition: mfrMgr.h:163
_IARM_Bus_MFRLib_WriteImage_Param_t::name
char name[255]
Definition: mfrMgr.h:130
_IARM_Bus_MFRLib_SerializedData_Param_t
Definition: mfrMgr.h:122
_IARM_Bus_MFRLib_SetCableCardType_Param_t
Definition: mfrMgr.h:152
_IARM_Bus_MFRLib_WriteImage_Param_t::type
mfrImageType_t type
Definition: mfrMgr.h:132