|
RDK Documentation (Open Sourced RDK Components)
|
33 #include "ccec/Messages.hpp"
34 #include "ccec/Assert.hpp"
35 #include "ccec/Connection.hpp"
36 #include "ccec/host/RDK.hpp"
37 #include "ccec/MessageEncoder.hpp"
38 #include "ccec/LibCCEC.hpp"
41 int main(
int argc,
char *argv[])
48 Connection conn(LogicalAddress::UNREGISTERED,
false);;
54 printf(
"Got logical Address here logicalAddress : %d !!\n", logicalAddress);
56 catch (
const std::exception e) {
57 printf(
"getLogicalAddress caught exception %s \r\n",e.what());
61 IARM_Result_t ret = IARM_RESULT_SUCCESS;
65 unsigned int option,i,j = 20;
66 printf(
"\n Enter test option : \n 1 - Connected Device Test \n 2 - Logical Address Test \n 3 - Default test\n");
74 IARM_Bus_Call(IARM_BUS_CECHOST_NAME,IARM_BUS_CEC_HOST_EnableDevMgr,(
void *)¶m1,
sizeof(param1));
80 ret =
IARM_Bus_Call(IARM_BUS_CECHOST_NAME, IARM_BUS_CEC_HOST_GetDevStatus, (
void*)¶m,
sizeof(param));
81 if (ret != IARM_RESULT_SUCCESS )
83 printf(
"%s :: IARM_BUS_CEC_HOST_GetDevStatus failes \n",__FUNCTION__);
85 printf(
"Connected Devices : \n");
86 for (i = 0; i < 14; i++)
88 if (0 != param.devices[i].isConnected)
90 printf(
"Logical Address : %d \n", param.devices[i].logicalAddress);
94 catch (
const std::exception e) {
95 printf(
"%s failed \n", __FUNCTION__);
109 printf(
"Got logical Address here logicalAddress : %d !!\n", logicalAddress);
111 catch (
const std::exception e) {
112 printf(
"getLogicalAddress caught exception %s \r\n",e.what());
123 printf(
"Send ActiveSource completed\r\n");
129 printf(
"===================Sending ImageViewOn completed\r\n");
134 printf(
"===================Sending TextViewOn completed\r\n");
139 printf(
"===================Sending Standby completed...\r\n");
IARM_Result_t IARM_Bus_Term(void)
This API is used to terminate the IARM-Bus library.
static LibCCEC & getInstance(void)
This function is used to create the instance for CEC.
IARM_Result_t IARM_Bus_Call(const char *ownerName, const char *methodName, void *arg, size_t argLen)
This API is used to Invoke RPC method by its application name and method name.
void init(const char *name=0)
This function is used to initialize CEC by starting the driver and doing host-specific initialization...
The connection class provides APIs that allows the application to access CEC Bus. A connection is a t...
IARM_Result_t IARM_Bus_Disconnect(void)
This API disconnect Application from IARM Bus so the application will not receive any IARM event or R...
RDK IARM-Bus API Declarations.
High-level messages are encoded by the MessageEncoder into raw bytes and placed in a CECFrame.
The Message API allows the application to send or receive high-level CEC message construct instead of...
int getLogicalAddress(int devType)
This function is used to get CEC device logical address starting the connection.
IARM_Result_t IARM_Bus_Connect(void)
This API is used to connect application to the IARM bus daemon. After connected, the application can ...
void term(void)
This function is used to stop CEC by terminating the connection and stoping the driver.
IARM_Result_t IARM_Bus_Init(const char *name)
This API is used to initialize the IARM-Bus library.