RDK Documentation (Open Sourced RDK Components)
mfrMgrInternal.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 Internal API.
24 *
25 * This API defines the operations used to starting and stopping IARM-Bus
26 * MFR Manager.
27 *
28 * @par Document
29 * Document reference.
30 *
31 * @par Open Issues (in no particular order)
32 * -# None
33 *
34 * @par Assumptions
35 * -# None
36 *
37 * @par Abbreviations
38 * - BE: ig-Endian.
39 * - cb: allback function (suffix).
40 * - DS: Device Settings.
41 * - FPD: Front-Panel Display.
42 * - HAL: Hardware Abstraction Layer.
43 * - LE: Little-Endian.
44 * - LS: Least Significant.
45 * - MBZ: Must be zero.
46 * - MS: Most Significant.
47 * - RDK: Reference Design Kit.
48 * - _t: Type (suffix).
49 *
50 * @par Implementation Notes
51 * -# None
52 *
53 */
54 
55 /** @defgroup IARM_BUS IARM-Bus HAL API
56 * @ingroup IARM_RDK
57 *
58 * IARM-Bus is a platform agnostic Inter-process communication (IPC) interface. It allows
59 * applications to communicate with each other by sending Events or invoking Remote
60 * Procedure Calls. The common programming APIs offered by the RDK IARM-Bus interface is
61 * independent of the operating system or the underlying IPC mechanism.
62 *
63 * Two applications connected to the same instance of IARM-Bus are able to exchange events
64 * or RPC calls. On a typical system, only one instance of IARM-Bus instance is needed. If
65 * desired, it is possible to have multiple IARM-Bus instances. However, applications
66 * connected to different buses will not be able to communicate with each other.
67 */
68 
69 
70 
71 
72 
73 
74 /**
75 * @defgroup iarmmgrs
76 * @{
77 * @defgroup mfr
78 * @{
79 **/
80 
81 
82 #ifndef _MFRMGRINTERNAL_H_
83 #define _MFRMGRINTERNAL_H_
84 
85 
86 #include "libIARM.h"
87 #include <string.h>
88 #include "iarmUtil.h"
89 
90 #ifdef RDK_LOGGER_ENABLED
91 #include "rdk_debug.h"
92 extern int b_rdk_logger_enabled;
93 
94 #define LOG(...) INT_LOG(__VA_ARGS__, "")
95 #define INT_LOG(FORMAT, ...) if(b_rdk_logger_enabled) {\
96 RDK_LOG(RDK_LOG_DEBUG, "LOG.RDK.MFRMGR", FORMAT , __VA_ARGS__);\
97 }\
98 else\
99 {\
100 printf(FORMAT, __VA_ARGS__);\
101 }
102 
103 #else
104 
105 #define LOG(...) printf(__VA_ARGS__)
106 
107 #endif
108 
109 
110 
111 
112 /** @defgroup IARM_BUS MFR Manager MFR lib
113 * @ingroup IARM_RDK
114 *
115 */
116 
117 /** @addtogroup IARM_BUS_MFR_INTERNAL_API IARM-MFR Manager internal API
118 * @ingroup IARM_BUS
119 *
120 * Described herein are functions that are used to initialize and manage MFR library.
121 *
122 * @{
123 */
124 
125  /**
126  * @brief Starts the MFR lib.
127  *
128  * This function registers and connects MFR Manager to the iarm bus.
129  * Register Events that this module publishes and register APIs that
130  * can be RPCs by other entities on the bus.
131  *
132  * @return IARM_Result_t Error Code.
133  * @retval IARM_RESULT_SUCCESS on success
134  */
135 IARM_Result_t MFRLib_Start(void);
136 
137 /**
138  * @brief Terminates the MFR lib
139  *
140  * This function disconnects MFR Manager from the iarm bus and terminates
141  * MFR Manager.
142  *
143  * @return IARM_Result_t Error Code.
144  * @retval IARM_RESULT_SUCCESS on success
145  */
146 IARM_Result_t MFRLib_Stop(void);
147 
148 /**
149  * @brief Listens for component specific events from drivers.
150  *
151  * @return IARM_Result_t Error Code.
152  * @retval IARM_RESULT_SUCCESS on success
153  */
154 IARM_Result_t MFRLib_Loop(void);
155 
156 IARM_Result_t mfrMgr_start(void);
157 
158 #endif
159 
160 
161 /* End of IARM_BUS_MFR_INTERNAL_API doxygen group */
162 /**
163  * @}
164  */
165 
166 
167 /** @} */
168 /** @} */
rdk_debug.h
MFRLib_Start
IARM_Result_t MFRLib_Start(void)
Starts the MFR lib.
Definition: mfrMgr.c:40
MFRLib_Loop
IARM_Result_t MFRLib_Loop(void)
Listens for component specific events from drivers.
Definition: mfrMgr.c:66
MFRLib_Stop
IARM_Result_t MFRLib_Stop(void)
Terminates the MFR lib.
Definition: mfrMgr.c:61