RDK Documentation (Open Sourced RDK Components)
diskMgrInternal.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 diskMgrInternal.h
22 *
23 * @brief IARM-Bus Disk Manager Internal API.
24 *
25 * This API defines the operations for Disk manager
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-Disk Manager 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 /** @addtogroup IARM_BUS_DISKMGR_INTERNAL_API IARM-Disk Manager internal API.
69 * @ingroup IARM_BUS
70 *
71 * Described herein are the Disk Manager types and functions.
72 *
73 * @{
74 */
75 
76 /**
77  * @brief Starts the Disk manager.
78  *
79  * This function registers and connects Disk Manager to the iarm bus.
80  * Register Events that this module publishes and register APIs that
81  * can be RPCs by other entities on the bus.
82  *
83  * @return Error code if start fails.
84  */
85 
86 
87 
88 /**
89 * @defgroup iarmmgrs
90 * @{
91 * @defgroup disk
92 * @{
93 **/
94 
95 
96 #ifndef _IARM_PWRMGR_INTERNAL_
97 #define _IARM_PWRMGR_INTERNAL_
98 #include "libIARM.h"
99 #include <string.h>
100 
101 #ifdef RDK_LOGGER_ENABLED
102 #include "iarmUtil.h"
103 #include "rdk_debug.h"
104 
105 extern int b_rdk_logger_enabled;
106 
107 #define LOG(...) INT_LOG(__VA_ARGS__, "")
108 #define INT_LOG(FORMAT, ...) if(b_rdk_logger_enabled) {\
109 RDK_LOG(RDK_LOG_DEBUG, "LOG.RDK.DISKMGR", FORMAT , __VA_ARGS__);\
110 }\
111 else\
112 {\
113 printf(FORMAT, __VA_ARGS__);\
114 }
115 
116 #else
117 
118 #define LOG(...) printf(__VA_ARGS__)
119 
120 #endif
121 
122 
123 
124 IARM_Result_t DISKMgr_Start(void);
125 
126 /**
127  * @brief Listens for component specific events from drivers.
128  *
129  * @return Error code if fails.
130  */
131 IARM_Result_t DISKMgr_Loop(void);
132 
133 /**
134  * @brief Terminates the Disk manager.
135  *
136  * This function disconnects Disk Manager from the iarm bus and terminates it.
137  *
138  * @return Error code if stop fails.
139  */
140 IARM_Result_t DISKMgr_Stop(void);
141 
142 
143 #endif
144 
145 
146 /** @} */
147 /** @} */
rdk_debug.h
DISKMgr_Stop
IARM_Result_t DISKMgr_Stop(void)
Terminates the Disk manager.
Definition: diskMgr.c:67
DISKMgr_Loop
IARM_Result_t DISKMgr_Loop()
Listens for component specific events from drivers.
Definition: diskMgr.c:54