RDK Documentation (Open Sourced RDK Components)
manager.hpp
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  * @defgroup DSSETTINGS Device Settings Module
22  * RDK Device Settings library is a cross-platform library for controlling the following hardware configurations:
23  * - Audio Output Ports (Volume, Mute, etc.)
24  * - Video Ouptut Ports (Resolutions, Aspect Ratio, etc.)
25  * - Front Panel Indicators
26  * - Zoom Settings
27  * - Display (Aspect Ratio, EDID data etc.)
28  * - General Host configuration (Power managements, event management etc.)
29  *
30  * The library is split into three major components
31  * - Application Level APIs. (Comcast component)
32  * - SoC level APIs. (SoC component)
33  * - IARM support. (Comcast Component)
34  *
35  * @par Application Level API
36  * This is the API that application should use to control hardware configurations in a platform independent way.
37  * It also hides single-app and multi-app difference of the implementation from the applications.
38  * This allows the application to switch among different SoC versions or between single or multi app mode freely.
39  * Eg : API to get the current video resolution : const VideoResolution & VideoOutputPort::getResolution() const
40  *
41  * @par SoC Level API
42  * SoC Level APIs that that need to implement by SoC vendors.
43  * It provides primitive and hardware specific implementation for each controllable aspect of their device.
44  * This level API is considered single-app mode only, even though its SoC implementation may potentially support
45  * multiple-app mode.
46  * Eg: API to get the current video resolution : dsError_t dsGetResolution ( intptr_t handle, dsVideoPortResolution_t *resolution )
47  *
48  * @par IARM Support
49  * If multiple applications need to control the device settings simultaneously, this component turns the single-app
50  * mode SoC level API into multi-app mode.
51  * Even though some SoC vendors implement the SoC level API to be multi-app capable, we still use Comcast’s IARM
52  * support to achieve multiple-app mode. This allows the Application level API to remain truly platform neutral.
53  *
54  * @par Architectural Overview
55  * The Device Settings (DS) registers its services with the service manager.
56  * The Application uses/calls the DS Public API through service manager and DS Public API’s intern calls the
57  * underlying SoC level API’s to perform the required functionality.
58  *
59  * @image html dsArch.png
60  *
61  * @defgroup devicesettingsclass Device Settings Classes
62  * @ingroup DSSETTINGS
63  */
64 
65 
66 /**
67  * @defgroup devicesettingsapi Device Settings API list
68  * Described the details about Public APIs provided by Device Settings module
69  * @ingroup DSSETTINGS
70  *
71  * @defgroup dssettingsmanagerapi Device Settings - Manager APIs
72  * RDK Device Settings module is a cross-platform device for controlling the following hardware configurations:
73  * - Audio Output Ports (Volume, Mute, etc.)
74  * - Video Ouptut Ports (Resolutions, Aspect Ratio, etc.)
75  * - Front Panel Indicators such as DFC[zoom] Settings, Display (Aspect Ratio, EDID data etc.),
76  * General Host configuration (Power managements, event management etc.)
77  * @ingroup devicesettingsapi
78  *
79  * @defgroup dssettingshostapi Device Settings - Host APIs
80  * The host module is the central module of the Device Settings module.
81  * Each devices establishes one and only one host instance that represents the entire host device.
82  * @ingroup devicesettingsapi
83  *
84  * @defgroup dssettingsvideodeviceapi Device Settings - Video Device APIs
85  * - Video Device is also called "Decoder". VideoDevice objects are instantiated by the
86  * Device Settings module upon initialization.
87  * - Applications do not need to create any such objects on its own.
88  * - References to these objects can be retrieved by applications via Host::getVideoDevices()
89  * @ingroup devicesettingsapi
90  *
91  * @defgroup dssettingsvidoutportapi Device Settings - Video Output Port APIs
92  * - VideoOutputPort objects are instantiated by the Device Settings module upon initialization.
93  * Applications do not need to create any such objects on its own.
94  * - References to the preallocated objects can be retrieved by applications via
95  * Host::getVideoOutputPort(const std::string &name).
96  * - Each VideoOutputPort is associated with an instance of VideoOutputPortType.
97  * @ingroup devicesettingsapi
98  *
99  * @defgroup dssettingsvidoutporttypeapi Device Settings - Video Output Port Types APIs
100  * - VideoOutputPortType objects are instantiated by the Device Settings module upon initialization.
101  * - Applications do not need to create any such objects on its own.
102  * - References to these objects can be retrieved using a VideoOutputPort object invoking VideoOutputPort::getType().
103  * - A VideoOutputPortType object represent the shared properties of all output ports of same type.
104  * - Control over a specific instance of Video Output Port is access over a Video Output Port object
105  * @ingroup devicesettingsapi
106  *
107  * @defgroup dssettingsvidresolutionapi Device Settings - Video Resolution APIs
108  * This defines the videoResolution objects by the device settings module upon intialization.
109  * @ingroup devicesettingsapi
110  *
111  * @defgroup dssettingsaudoutportapi Device Settings - Audio Output Port APIs
112  * - AudioOutputPort objects are instantiated by the Device Settings module upon initialization.
113  * - Applications do not need to create any such objects on its own.
114  * - References to these objects can be retrieved by applications via the VideoOutputPort
115  * - connected to the AudioOutputPort: VideoOutputPort::getAudioOutputPort()
116  * @ingroup devicesettingsapi
117  *
118  * @defgroup dssettingsaudoutporttypeapi Device Settings - Audio Outport Types APIs
119  * - AudioOutputPortType objects are instantiated by the Device Settings module upon initialization.
120  * - Applications do not need to create any such objects on its own.
121  * - References to these objects can be retrieved using a AudioOutputPort object invoking AudioOutputPort::getType()
122  * @ingroup devicesettingsapi
123  *
124  * @defgroup dssettingsfpindicatorapi Device Settings - Front Panel Indicator APIs
125  * Configuration of individual indicators are managed here. The blink rate, color, and maximum
126  * cycle rate of the front panel indicator can be configured.
127  * @ingroup devicesettingsapi
128  *
129  * @defgroup dssettingsfptextdisplayapi Device Settings - Front Panel text display APIs
130  * Configuration of individual text display sub-panel to display system time or text is managed here.
131  * The scroll speed, time format (12Hour or 24 Hour format) and a string to display can be configured.
132  * @ingroup devicesettingsapi
133  *
134  * @defgroup dssettingsaudencodingapi Device Settings - Audio Encoding APIs
135  * This contains implementation of AudioEncoding class methods, support functions and
136  * variable assignments to manage the audio encoding types.
137  * @ingroup devicesettingsapi
138  */
139 
140 
141 /**
142 * @defgroup devicesettings
143 * @{
144 * @defgroup ds
145 * @{
146 **/
147 
148 
149 #ifndef _DS_MANAGER_HPP_
150 #define _DS_MANAGER_HPP_
151 
152 
153 /**
154  * @file manager.hpp
155  * @brief It contains class referenced by manager.cpp file
156  */
157 namespace device {
158 
159 
160 /**
161  * @class Manager
162  * @brief Class to implement the manager interface.
163  * @ingroup devicesettingsclass
164  */
165 class Manager {
166  Manager();
167  virtual ~Manager();
168 public:
169  static void Initialize();
170  static void DeInitialize();
171  static int IsInitialized; //!< Indicates the application has initialized with devicettings modules.
172 };
173 
174 }
175 
176 #endif /* _DS_MANAGER_HPP_ */
177 
178 
179 /** @} */
180 /** @} */
device::Manager::IsInitialized
static int IsInitialized
Indicates the application has initialized with devicettings modules.
Definition: manager.hpp:171
device::Manager
Class to implement the manager interface.
Definition: manager.hpp:165
device::Manager::Initialize
static void Initialize()
This API is used to initialize the Device Setting module. Each API should be called by any client of ...
Definition: manager.cpp:97
device::Manager::DeInitialize
static void DeInitialize()
This API is used to deinitialize the device settings module. DeInitialize() must be called to release...
Definition: manager.cpp:138