RDK Documentation (Open Sourced RDK Components)
TRMMgr.h
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 #ifndef TRMMGR_H_
21 #define TRMMGR_H_
22 
23 
24 #include <stdint.h>
25 #include <errno.h>
26 #include <stdlib.h>
27 #include <string>
28 
29 
30 using namespace std;
31 
32 
33 #define IARM_BUS_TRMMGR_NAME "TRMMgr" /*!< TRM manager IARM bus name */
34 
35 /*
36  * Declare RPC API names and their arguments
37  */
38 #define IARM_BUS_TRMMGR_API_GetTRMDiagInfo "GetTRMDiagInfo" /*!< Get TRM Message */
39 
40 
41 #define MAX_PAYLOAD_LEN 4096 // need to re-visit the size . TBD
42 
43 
44 typedef enum {
45  TRMMgr_ERR_NONE = 0, /**< No Error */
46  TRMMgr_ERR_FAILED, /**< API failure */
47  TRMMgr_ERR_INVALID_PARAM, /**< Invalid input parameter. */
48  TRMMgr_ERR_OPERATION_NOT_SUPPORTED, /**< Operation not supported. */
49  TRMMgr_ERR_UNKNOWN /**< Unknown error. */
50 }TRMMgr_Error_t;
51 
52 
53 typedef enum _TRMMessageType_t {
54  TRMMgr_MSG_TYPE_GET_TRM_VERSION = 0,
55  TRMMgr_MSG_TYPE_GET_NUM_IN_BAND_TUNERS,
56  TRMMgr_MSG_TYPE_GET_CONN_DEVICE_IDS,
57  TRMMgr_MSG_TYPE_GET_TUNER_RESERVATION,
58  TRMMgr_MSG_TYPE_GET_CONNECTION_ERRORS,
59  TRMMgr_MSG_TYPE_GET_TUNER_CONFLICTS,
60  TRMMgr_MSG_TYPE_GET_NUM_TRM_ERRORS,
61  TRMMgr_MSG_TYPE_MAX,
62 }TRMMessageType_t;
63 
64 
65 typedef struct _TRMDiagInfo_t {
66  TRMMgr_Error_t retCode; // return code of the API.
67  TRMMessageType_t msgType; // Requested Message Type.
68  uint8_t numOfTuner; // Num of supported Tuners.
69  uint8_t numOfTRMError; // Count of TRM Errors
70  uint32_t bufLen; // Length of the data buffer;
71  char buf[MAX_PAYLOAD_LEN]; // Buffer containing the TRM Message.
73 
74 
75 #endif
76 
_TRMDiagInfo_t
Definition: TRMMgr.h:65