RDK Documentation (Open Sourced RDK Components)
|
Modules | |
HDMI-CEC BUS | |
HDMI-CEC CCEC | |
HDMI-CEC Driver APIs | |
The Driver component access the HDMI-CEC SoC Driver via the CEC HAL API. Vendors are responsible in delivering a SoC Driver that conforms to the HAL API (see hdmi_cec_driver.h) | |
Macros | |
#define | CECDriverAssert(cond) |
#define | DRIVER_LOCK() do{/*printf("LOCKING DRV [%s]\r\n", __FUNCTION__);*/ pthread_mutex_lock(&DriverMutex);}while(0) |
#define | DRIVER_UNLOCK() do{/*printf("UNLOCKING DRV [%s]\r\n", __FUNCTION__);*/pthread_mutex_unlock(&DriverMutex);}while(0) |
#define | IARM_BUS_CECMGR_NAME "CECMgr" |
#define | IARM_BUS_CECMGR_MAX_DATA_LENGTH 62 |
#define | IARM_BUS_CECMGR_API_Enable "Enable" |
#define | IARM_BUS_CECMGR_API_Send "Send" |
#define | IARM_BUS_CECMGR_API_GetLogicalAddress "GetLogicalAddress" |
#define | IARM_BUS_CECMGR_API_AddLogicalAddress "AddLogicalAddress" |
#define | IARM_BUS_CECMGR_API_GetPhysicalAddress "GetPhysicalAddress" |
#define | IARM_BUS_CECMGR_API_isAvailable "isAvailable" |
#define | Assert(expr) |
#define | CEC_NAMESPACE |
#define | CCEC_BEGIN_NAMESPACE |
#define | CCEC_END_NAMESPACE |
#define | CECHost_HDMI_CONNECTED 0 |
#define | CECHost_HDMI_DISCONNECTED 1 |
#define | CECHost_POWERSTATE_ON 0 |
#define | CECHost_POWERSTATE_STANDBY 1 |
#define | BYTE_TO_BCD(byte_) (((((byte_) / 10) & 0x0F) << 4) | (((byte_) % 10) & 0x0F)) |
#define | BCD_TO_BYTE(byte_) (((((byte_) & 0xF0) >> 4) * 10) + (((byte_) & 0x0F))) |
#define | LOG_FATAL 0 |
#define | LOG_ERROR 1 |
#define | LOG_WARN 2 |
#define | LOG_EXP 3 |
#define | LOG_NOTICE 4 |
#define | LOG_INFO 5 |
#define | LOG_DEBUG 6 |
#define | LOG_TRACE 7 |
#define | LOG_MAX 8 |
#define | BYTE_TO_BCD(byte_) (((((byte_) / 10) & 0x0F) << 4) | (((byte_) % 10) & 0x0F)) |
#define | BCD_TO_BYTE(byte_) (((((byte_) & 0xF0) >> 4) * 10) + (((byte_) & 0x0F))) |
#define | MAX_LOG_BUFF 500 |
#define | __TIMESTAMP() |
Typedefs | |
typedef struct DriverContext_t | DriverContext_t |
typedef enum _CECMgr_EventId_t | IARM_Bus_CECMgr_EventId_t |
typedef enum _CECMgr_DataDirection_t | IARM_Bus_CECMgr_DataDirection_t |
typedef struct _CECMgr_EventData_t | IARM_Bus_CECMgr_EventData_t |
typedef struct _IARM_Bus_CECMgr_Send_Param_t | IARM_Bus_CECMgr_Send_Param_t |
typedef struct _IARM_Bus_CECMgr_GetLogicalAddress_Param_t | IARM_Bus_CECMgr_GetLogicalAddress_Param_t |
typedef struct _IARM_Bus_CECMgr_AddLogicalAddress_Param_t | IARM_Bus_CECMgr_AddLogicalAddress_Param_t |
typedef struct _IARM_Bus_CECMgr_GetPhysicalAddress_Param_t | IARM_Bus_CECMgr_GetPhysicalAddress_Param_t |
typedef struct _IARM_Bus_CECMgr_Enable_Param_t | IARM_Bus_CECMgr_Enable_Param_t |
typedef struct _IARM_Bus_CECMgr_Status_Updated_Param_t | IARM_Bus_CECMgr_Status_Updated_Param_t |
typedef uint32_t | Op_t |
typedef void(* | HdmiCecRxCallback_t) (int handle, void *callbackData, unsigned char *buf, int len) |
typedef void(* | HdmiCecTxCallback_t) (int handle, void *callbackData, int result) |
typedef struct _Throw_e | Throw_e |
typedef struct _CECHost_Policy_t | CECHost_Policy_t |
typedef enum _CECHost_DeviceStatusType_t | CECHost_DeviceStatusType_t |
typedef struct _CECHost_DeviceStatus_t | CECHost_DeviceStatus_t |
typedef CECHost_Err_t(* | CECHost_HdmiHotplugCallback_t) (int32_t connect) |
typedef CECHost_Err_t(* | CECHost_PowerStateCallback_t) (int32_t curState, int32_t newState) |
typedef CECHost_Err_t(* | CECHost_DevMgrStatusCallback_t) (bool ipStatus, bool *opStatus) |
typedef CECHost_Err_t(* | CECHost_OSDNameCallback_t) (uint8_t *name, size_t len) |
typedef CECHost_Err_t(* | CECHost_PolicyCallback_t) (CECHost_Policy_t policy) |
typedef struct _CECHost_Callback_t | CECHost_Callback_t |
Enumerations | |
enum | |
enum | _CECMgr_EventId_t |
enum | _CECMgr_DataDirection_t |
enum | |
enum | CECHost_Err_t |
enum | _CECHost_DeviceStatusType_t |
enum | |
enum | |
Functions | |
static void | cecRecvEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
int | HdmiCecOpen (int *handle) |
opens an instance of CEC driver. This function should be call once before the functions in this API can be used. More... | |
int | HdmiCecClose (int handle) |
close an instance of CEC driver. This function should close the currently opened driver instance. More... | |
int | HdmiCecAddLogicalAddress (int handle, int logicalAddresses) |
Add one Logical Addresses to be used by host device. More... | |
int | HdmiCecRemoveLogicalAddress (int handle, int logicalAddresses) |
Clear the Logical Addresses claimed by host device. More... | |
int | HdmiCecGetLogicalAddress (int handle, int devType, int *logicalAddress) |
Get the Logical Addresses claimed by host device. More... | |
void | HdmiCecGetPhysicalAddress (int handle, unsigned int *physicalAddress) |
Get the Physical Address obtained by the driver. More... | |
int | HdmiCecSetRxCallback (int handle, HdmiCecRxCallback_t cbfunc, void *data) |
Sets CEC packet Receive callback. More... | |
int | HdmiCecSetTxCallback (int handle, HdmiCecTxCallback_t cbfunc, void *data) |
Sets CEC packet Transmit callback. More... | |
int | HdmiCecTxAsync (int handle, const unsigned char *buf, int len) |
Writes CEC packet onto bus asynchronously. More... | |
int | HdmiCecTx (int handle, const unsigned char *buf, int len, int *result) |
Writes CEC packet onto bus. More... | |
int | HdmiCecSetLogicalAddress (int handle, int *logicalAddresses, int num) |
This API is DEPRECATED due to possible race conditions competing for a logical address. More... | |
int | main (int argc, char *argv[]) |
const char * | GetOpName (Op_t) |
CECHost_Err_t | CECHost_Init (const char *name) |
This function is used to initialize CEC host device by registering event handlers and calls like status, name etc. More... | |
CECHost_Err_t | CECHost_Term (void) |
This function is used to de-initialize CEC host device, disconnects and terminates the CEC connection. More... | |
CECHost_Err_t | CECHost_SetCallback (CECHost_Callback_t cb) |
This function is used to set the callback function. It is called by Device Manager application to set Dev manager status, OSD name, hot plug event handler, power state event handler etc. More... | |
CECHost_Err_t | CECHost_GetHdmiOuputPhysicalAddress (uint8_t *byte0, uint8_t *byte1, uint8_t *byte2, uint8_t *byte3) |
This function is used to get the physical address of the HDMI output port byte by byte. More... | |
CECHost_Err_t | CECHost_IsHdmiOutputConnected (int32_t *connect) |
This function is used to check whether the HDMI output is connected or not. More... | |
CECHost_Err_t | CECHost_GetPowerState (int32_t *state) |
This function is used to get the state of power whether it is ON or in STANDBY state. More... | |
CECHost_Err_t | CECHost_SetPowerState (int32_t state) |
This function is used to set the device power state to be ON or STANDBY. More... | |
CECHost_Err_t | CECHost_SetDeviceStatus (int logicalAddress, CECHost_DeviceStatus_t *deviceStatus) |
This function is used to set and update the device status like power status, logical address, osd name etc based on status type. More... | |
CECHost_Err_t | CECHost_GetOSDName (uint8_t *name, size_t *len) |
This function is used to get OSD name of Host module. Here 'buf' need not to be null terminated. If it is, the 'len' does not include the 'null' termintator. More... | |
CECHost_Err_t | CECHost_GetPolicy (CECHost_Policy_t *policy) |
CECHost_Err_t | CECHost_IsActive (int32_t *active) |
This function is used to check whether host device is active or not. More... | |
CECHost_Err_t | CECHost_LoadPlugin (void) |
CECHost_Err_t | CECHost_UnloadPlugin (void) |
void | check_cec_log_status (void) |
This function is used to get the cec log from the log file and checks the level of log received. More... | |
void | CCEC_LOG (int level, const char *format,...) |
void | dump_buffer (unsigned char *buf, int len) |
This function is used to print the content of log buffer in hexadecimal format. More... | |
CCEC_BEGIN_NAMESPACE size_t | write (const unsigned char *buf, size_t len) |
void | CCEC_LOG (int level, const char *format ...) |
This function is used to gets the logs depending on the level of log and print these to standard output. More... | |
CECFrame::CECFrame (const uint8_t *buf=NULL, size_t len=0) | |
CECFrame | CECFrame::subFrame (size_t start, size_t len=0) const |
void | CECFrame::append (uint8_t byte) |
void | CECFrame::append (const uint8_t *buf, size_t len) |
void | CECFrame::append (const CECFrame &frame) |
void | CECFrame::reset (void) |
void | CECFrame::getBuffer (const uint8_t **buf, size_t *len) const |
const uint8_t * | CECFrame::getBuffer (void) const |
const uint8_t | CECFrame::at (size_t i) const |
uint8_t & | CECFrame::operator[] (size_t i) |
const size_t | CECFrame::length (void) const |
void | CECFrame::hexDump (int level=6) const |
Connection::Connection (const LogicalAddress &source=LogicalAddress::UNREGISTERED, bool opened=true, const std::string &name="") | |
void | Connection::open (void) |
Open a connection to receive CEC packets from the bus. More... | |
void | Connection::close (void) |
void | Connection::addFrameListener (FrameListener *listener) |
This function is used to listen for CECFrame, which is a byte stream that contains raw bytes received from CEC bus. More... | |
void | Connection::removeFrameListener (FrameListener *listener) |
This function is used to remove the listener information from the queue. More... | |
void | Connection::sendTo (const LogicalAddress &to, const CECFrame &frame, int timeout=0) |
This function is used to send CEC frame to CEC Bus. More... | |
void | Connection::sendTo (const LogicalAddress &to, const CECFrame &frame, int timeout, const Throw_e &doThrow) |
This function is used to send CEC frame to CEC Bus. More... | |
void | Connection::sendToAsync (const LogicalAddress &to, const CECFrame &frame) |
sends HDMI-CEC frame to CEC Bus using asynchronized method. More... | |
void | Connection::send (const CECFrame &frame, int timeout=0) |
This function is used to send CEC frame to CEC Bus. More... | |
void | Connection::send (const CECFrame &frame, int timeout, const Throw_e &doThrow) |
This function is used to send CEC frame to CEC Bus. More... | |
void | Connection::poll (const LogicalAddress &from, const Throw_e &doThrow) |
This function is used to send poll message to the Bus. More... | |
void | Connection::ping (const LogicalAddress &from, const LogicalAddress &to, const Throw_e &doThrow) |
This function is used to send ping message to the Bus. More... | |
void | Connection::sendAsync (const CECFrame &frame) |
This function is used to send the CEC frame to physical CEC Bus using asynchronous method. More... | |
bool | Connection::DefaultFilter::isFiltered (const CECFrame &frame) |
Check the filtered is set for this connection. More... | |
void | Connection::DefaultFrameListener::notify (const CECFrame &frame) const |
Notify to the application if CECFrame is received. The CEC frame contains the raw bytes. More... | |
void | Connection::matchSource (const CECFrame &frame) |
Match the source address and update the logical address for the Connection. More... | |
static Driver & | Driver::getInstance (void) |
static void | DriverImpl::DriverReceiveCallback (int handle, void *callbackData, unsigned char *buf, int len) |
static void | DriverImpl::DriverTransmitCallback (int handle, void *callbackData, int result) |
virtual void | DriverImpl::open (void) throw (InvalidStateException, IOException) |
virtual void | DriverImpl::close (void) throw (InvalidStateException, IOException) |
virtual void | DriverImpl::read (CECFrame &frame) throw (InvalidStateException, IOException) |
virtual void | DriverImpl::writeAsync (const CECFrame &frame) throw (InvalidStateException, IOException, CECNoAckException) |
virtual void | DriverImpl::write (const CECFrame &frame) throw (InvalidStateException, IOException, CECNoAckException) |
virtual int | DriverImpl::getLogicalAddress (int devType) |
virtual void | DriverImpl::getPhysicalAddress (unsigned int *physicalAddress) |
virtual void | DriverImpl::removeLogicalAddress (const LogicalAddress &source) |
virtual bool | DriverImpl::addLogicalAddress (const LogicalAddress &source) |
virtual bool | DriverImpl::isValidLogicalAddress (const LogicalAddress &source) const |
virtual void | DriverImpl::poll (const LogicalAddress &from, const LogicalAddress &to) throw (InvalidStateException, IOException, CECNoAckException) |
IncomingQueue & | DriverImpl::getIncomingQueue (int nativeHandle) |
void | MessageDecoder::decode (const CECFrame &in) |
Variables | |
static DriverContext_t * | driverCtx = 0 |
pthread_mutex_t | DriverMutex = PTHREAD_MUTEX_INITIALIZER |
static int | cec_log_level = LOG_INFO |
static const char * | logLevel [][2] |
char | _CEC_LOG_PREFIX [64] |
struct DriverContext_t |
Definition at line 51 of file hdmi_cec_driver.c.
Data Fields | ||
---|---|---|
pthread_mutex_t | lock | |
HdmiCecTxCallback_t | txCB | |
void * | txCBdata | |
HdmiCecRxCallback_t | rxCB | |
void * | rxCBdata |
struct _CECMgr_EventData_t |
Key Event Data
Definition at line 66 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
uint8_t | length | |
uint8_t | data[62+1] |
struct _IARM_Bus_CECMgr_Send_Param_t |
Definition at line 71 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
uint8_t | length | |
uint8_t | data[62+1] | |
uint8_t | retVal |
struct _IARM_Bus_CECMgr_GetLogicalAddress_Param_t |
Definition at line 77 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
int | devType | |
int | logicalAddress |
struct _IARM_Bus_CECMgr_AddLogicalAddress_Param_t |
Definition at line 82 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
int | logicalAddress |
struct _IARM_Bus_CECMgr_GetPhysicalAddress_Param_t |
Definition at line 87 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
unsigned int | physicalAddress |
struct _IARM_Bus_CECMgr_Enable_Param_t |
Definition at line 91 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
int | enabled |
struct _IARM_Bus_CECMgr_Status_Updated_Param_t |
Definition at line 95 of file CecIARMBusMgr.h.
Data Fields | ||
---|---|---|
int | logicalAddress |
class CECFrame |
Definition at line 40 of file CECFrame.hpp.
Public Types | |
enum | |
Public Member Functions | |
CECFrame (const uint8_t *buf=NULL, size_t len=0) | |
void | reset (void) |
CECFrame | subFrame (size_t start, size_t len=0) const |
void | append (uint8_t byte) |
void | append (const uint8_t *buf, size_t len) |
void | append (const CECFrame &frame) |
void | getBuffer (const uint8_t **buf, size_t *len) const |
const uint8_t * | getBuffer (void) const |
const uint8_t | at (size_t i) const |
const size_t | length (void) const |
void | hexDump (int level=6) const |
uint8_t & | operator[] (size_t i) |
Private Attributes | |
uint8_t | buf_ [MAX_LENGTH] |
size_t | len_ |
class Connection |
The connection class provides APIs that allows the application to access CEC Bus. A connection is a tap into the CEC bus. The application can use a connection to send raw bytes (in form of CECFrame) onto CEC bus or receive raw bytes from it.
Definition at line 57 of file Connection.hpp.
Public Member Functions | |
Connection (const LogicalAddress &source=LogicalAddress::UNREGISTERED, bool opened=true, const std::string &name="") | |
void | open (void) |
Open a connection to receive CEC packets from the bus. More... | |
void | close (void) |
void | addFrameListener (FrameListener *listener) |
This function is used to listen for CECFrame, which is a byte stream that contains raw bytes received from CEC bus. More... | |
void | removeFrameListener (FrameListener *listener) |
This function is used to remove the listener information from the queue. More... | |
void | send (const CECFrame &frame, int timeout, const Throw_e &doThrow) |
This function is used to send CEC frame to CEC Bus. More... | |
void | sendTo (const LogicalAddress &to, const CECFrame &frame, int timeout, const Throw_e &doThrow) |
This function is used to send CEC frame to CEC Bus. More... | |
void | send (const CECFrame &frame, int timeout=0) |
This function is used to send CEC frame to CEC Bus. More... | |
void | sendTo (const LogicalAddress &to, const CECFrame &frame, int timeout=0) |
This function is used to send CEC frame to CEC Bus. More... | |
void | sendToAsync (const LogicalAddress &to, const CECFrame &frame) |
sends HDMI-CEC frame to CEC Bus using asynchronized method. More... | |
void | poll (const LogicalAddress &from, const Throw_e &doThrow) |
This function is used to send poll message to the Bus. More... | |
void | ping (const LogicalAddress &from, const LogicalAddress &to, const Throw_e &doThrow) |
This function is used to send ping message to the Bus. More... | |
void | sendAsync (const CECFrame &frame) |
This function is used to send the CEC frame to physical CEC Bus using asynchronous method. More... | |
const LogicalAddress & | getSource (void) |
const void | setSource (LogicalAddress &from) |
Private Member Functions | |
void | matchSource (const CECFrame &frame) |
Match the source address and update the logical address for the Connection. More... | |
Private Attributes | |
std::string | name |
LogicalAddress | source |
Bus & | bus |
DefaultFilter | busFrameFilter |
DefaultFrameListener | busFrameListener |
std::list< FrameListener * > | frameListeners |
Mutex | mutex |
class DataBlock |
Definition at line 45 of file DataBlock.hpp.
Public Member Functions | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
virtual Op_t | opCode (void) const =0 |
class Driver |
Definition at line 45 of file Driver.hpp.
Public Types | |
enum | |
Public Member Functions | |
virtual void | open (void)=0 throw (InvalidStateException, IOException) |
virtual void | close (void)=0 throw (InvalidStateException, IOException) |
virtual void | read (CECFrame &frame)=0 throw (InvalidStateException, IOException) |
virtual void | write (const CECFrame &frame)=0 throw (InvalidStateException, IOException, CECNoAckException) |
virtual void | writeAsync (const CECFrame &frame)=0 throw (InvalidStateException, IOException, CECNoAckException) |
virtual void | removeLogicalAddress (const LogicalAddress &source)=0 |
virtual bool | addLogicalAddress (const LogicalAddress &source)=0 |
virtual int | getLogicalAddress (int devType)=0 |
virtual void | getPhysicalAddress (unsigned int *physicalAddress)=0 |
virtual bool | isValidLogicalAddress (const LogicalAddress &source) const =0 |
virtual void | poll (const LogicalAddress &from, const LogicalAddress &to)=0 throw (InvalidStateException, IOException, CECNoAckException) |
Static Public Member Functions | |
static Driver & | getInstance (void) |
Static Private Attributes | |
static Mutex | instanceMutex |
struct _Throw_e |
class Exception |
Definition at line 42 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class CECNoAckException |
Definition at line 52 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class OperationNotSupportedException |
Definition at line 61 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class IOException |
Definition at line 71 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class InvalidStateException |
Definition at line 81 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class InvalidParamException |
Definition at line 90 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class AddressNotAvailableException |
Definition at line 99 of file Exception.hpp.
Public Member Functions | |
virtual const char * | what () const throw () |
class FrameListener |
Definition at line 39 of file FrameListener.hpp.
Public Member Functions | |
virtual void | notify (const CECFrame &) const =0 |
class FrameFilter |
Definition at line 46 of file FrameListener.hpp.
Public Member Functions | |
virtual bool | isFiltered (const CECFrame &frame)=0 |
class Header |
Definition at line 41 of file Header.hpp.
Public Types | |
enum | |
Public Member Functions | |
Header (const LogicalAddress &from, const LogicalAddress &to) | |
Header (const CECFrame &frame, size_t startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Data Fields | |
LogicalAddress | from |
LogicalAddress | to |
struct _CECHost_Policy_t |
struct _CECHost_DeviceStatus_t |
Data Fields | ||
---|---|---|
CECHost_DeviceStatusType_t | statusType | |
union _CECHost_DeviceStatus_t | data |
union _CECHost_DeviceStatus_t.data |
struct _CECHost_Callback_t |
class LibCCEC |
Definition at line 42 of file LibCCEC.hpp.
Public Member Functions | |
LibCCEC (void) | |
This is Constructor for LibCEC class. It initializes variables with default values. | |
void | init (const char *name=0) |
This function is used to initialize CEC by starting the driver and doing host-specific initialization. More... | |
void | term (void) |
This function is used to stop CEC by terminating the connection and stoping the driver. More... | |
int | getLogicalAddress (int devType) |
This function is used to get CEC device logical address starting the connection. More... | |
void | getPhysicalAddress (unsigned int *physicalAddress) |
int | addLogicalAddress (const LogicalAddress &source) |
This function is used to add logical address to the driver, so that it can ACK if there a direct messages received. More... | |
Static Public Member Functions | |
static LibCCEC & | getInstance (void) |
This function is used to create the instance for CEC. More... | |
Private Attributes | |
bool | initialized |
bool | connected |
Mutex | mutex |
class MessageDecoder |
When receiving the message, the raw bytes arrived in a CECFrame are converted to the corresponding High-level message by MessageDecoder and then dispatched for processing via class MessageProcessor or its extensions.
Definition at line 45 of file MessageDecoder.hpp.
Public Member Functions | |
MessageDecoder (MessageProcessor &processor) | |
void | decode (const CECFrame &in) |
Private Attributes | |
MessageProcessor & | processor |
class MessageEncoder |
High-level messages are encoded by the MessageEncoder into raw bytes and placed in a CECFrame.
A CECFrame is then sent out via an opened connection.
Definition at line 46 of file MessageEncoder.hpp.
Static Public Member Functions | |
static CECFrame & | encode (const Header &h, const DataBlock &m, CECFrame &out) |
static CECFrame | encode (const Header &h, const DataBlock &m) |
static CECFrame & | encode (const DataBlock &m, CECFrame &out) |
static CECFrame | encode (const DataBlock &m) |
class MessageProcessor |
The MessageProcessor class implements a set of overloaded process() methods, with each handling a specific message type.
When a CEC frame is received, the MessageDecoder converts the raw bytes into a message object and invoke the corresponding process() function.
Application that desires to process certain CEC messages should extend MessageProcessor class and provide customized implementation of the overloaded process() method. The default processing in the base class is simply discarding the message (and by doing so, serves as a message filter for the application).
Here is an example code that sends an ActiveSource message by a Tuner device,
Definition at line 58 of file MessageProcessor.hpp.
Public Member Functions | |
virtual void | process (const ActiveSource &msg, const Header &header) |
virtual void | process (const InActiveSource &msg, const Header &header) |
virtual void | process (const ImageViewOn &msg, const Header &header) |
virtual void | process (const TextViewOn &msg, const Header &header) |
virtual void | process (const RequestActiveSource &msg, const Header &header) |
virtual void | process (const Standby &msg, const Header &header) |
virtual void | process (const GetCECVersion &msg, const Header &header) |
virtual void | process (const CECVersion &msg, const Header &header) |
virtual void | process (const SetMenuLanguage &msg, const Header &header) |
virtual void | process (const GiveOSDName &msg, const Header &header) |
virtual void | process (const GivePhysicalAddress &msg, const Header &header) |
virtual void | process (const GiveDeviceVendorID &msg, const Header &header) |
virtual void | process (const SetOSDString &msg, const Header &header) |
virtual void | process (const SetOSDName &msg, const Header &header) |
virtual void | process (const RoutingChange &msg, const Header &header) |
virtual void | process (const RoutingInformation &msg, const Header &header) |
virtual void | process (const SetStreamPath &msg, const Header &header) |
virtual void | process (const GetMenuLanguage &msg, const Header &header) |
virtual void | process (const ReportPhysicalAddress &msg, const Header &header) |
virtual void | process (const DeviceVendorID &msg, const Header &header) |
virtual void | process (const GiveDevicePowerStatus &msg, const Header &header) |
virtual void | process (const ReportPowerStatus &msg, const Header &header) |
virtual void | process (const FeatureAbort &msg, const Header &header) |
virtual void | process (const Abort &msg, const Header &header) |
virtual void | process (const Polling &msg, const Header &header) |
virtual void | process (const InitiateArc &msg, const Header &header) |
virtual void | process (const TerminateArc &msg, const Header &header) |
virtual void | process (const RequestShortAudioDescriptor &msg, const Header &header) |
virtual void | process (const ReportShortAudioDescriptor &msg, const Header &header) |
virtual void | process (const SystemAudioModeRequest &msg, const Header &header) |
virtual void | process (const SetSystemAudioMode &msg, const Header &header) |
virtual void | process (const ReportAudioStatus &msg, const Header &header) |
class ActiveSource |
The Message API allows the application to send or receive high-level CEC message construct instead of raw bytes.
Basically for each CEC message (such as ActiveSource), there is a C++ class implementation representing it. Each message class provides necessary getter and setter methods to access the properties of each message.
Definition at line 88 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
ActiveSource (const PhysicalAddress &physicalAddress) | |
ActiveSource (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | physicalAddress |
class ImageViewOn |
Definition at line 112 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class TextViewOn |
Definition at line 119 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class InActiveSource |
Definition at line 125 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
InActiveSource (const PhysicalAddress &physicalAddress) | |
InActiveSource (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | physicalAddress |
class RequestActiveSource |
Definition at line 149 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class Standby |
Definition at line 155 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class GetCECVersion |
Definition at line 161 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class CECVersion |
Definition at line 167 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
CECVersion (const Version &version) | |
CECVersion (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
Version | version |
class SetMenuLanguage |
Definition at line 190 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
SetMenuLanguage (const Language &language) | |
SetMenuLanguage (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
Language | language |
class GetMenuLanguage |
Definition at line 214 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class GiveOSDName |
Definition at line 220 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class SetOSDName |
Definition at line 226 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
SetOSDName (const OSDName &osdName) | |
SetOSDName (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
OSDName | osdName |
class SetOSDString |
Definition at line 249 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
SetOSDString (const OSDString &osdString) | |
SetOSDString (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
OSDString | osdString |
class GivePhysicalAddress |
Definition at line 272 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class ReportPhysicalAddress |
Definition at line 278 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
ReportPhysicalAddress (const PhysicalAddress &physicalAddress, const DeviceType &deviceType) | |
ReportPhysicalAddress (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | physicalAddress |
DeviceType | deviceType |
class GiveDeviceVendorID |
Definition at line 305 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class DeviceVendorID |
Definition at line 311 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
DeviceVendorID (const VendorID &vendorId) | |
DeviceVendorID (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
VendorID | vendorId |
class GiveDevicePowerStatus |
Definition at line 334 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class ReportPowerStatus |
Definition at line 340 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
ReportPowerStatus (const PowerStatus &status) | |
ReportPowerStatus (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PowerStatus | status |
class Abort |
Definition at line 363 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class FeatureAbort |
Definition at line 369 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
FeatureAbort (const OpCode &feature, const AbortReason &reason) | |
FeatureAbort (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
OpCode | feature |
AbortReason | reason |
class RoutingChange |
Definition at line 394 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
RoutingChange (const PhysicalAddress &from, const PhysicalAddress &to) | |
RoutingChange (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | from |
PhysicalAddress | to |
class RoutingInformation |
Definition at line 419 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
RoutingInformation (const PhysicalAddress &toSink) | |
RoutingInformation (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | toSink |
class SetStreamPath |
Definition at line 443 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
SetStreamPath (const PhysicalAddress &toSink) | |
SetStreamPath (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | toSink |
class RequestShortAudioDescriptor |
Definition at line 466 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
RequestShortAudioDescriptor (const std::vector< uint8_t > formatid, const std::vector< uint8_t > audioFormatCode, uint8_t number_of_descriptor=1) | |
RequestShortAudioDescriptor (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
std::vector< RequestAudioFormat > | requestAudioFormat |
uint8_t | numberofdescriptor |
class ReportShortAudioDescriptor |
Definition at line 515 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
ReportShortAudioDescriptor (const std::vector< uint32_t > shortaudiodescriptor, uint8_t numberofdescriptor=1) | |
ReportShortAudioDescriptor (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
std::vector< ShortAudioDescriptor > | shortAudioDescriptor |
uint8_t | numberofdescriptor |
class SystemAudioModeRequest |
Definition at line 564 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
SystemAudioModeRequest (const PhysicalAddress &physicaladdress={0xf, 0xf, 0xf, 0xf}) | |
SystemAudioModeRequest (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
void | print (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
Data Fields | |
PhysicalAddress | physicaladdress |
class SetSystemAudioMode |
Definition at line 591 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
SetSystemAudioMode (const SystemAudioStatus &status) | |
SetSystemAudioMode (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
Data Fields | |
SystemAudioStatus | status |
class GiveAudioStatus |
Definition at line 608 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class ReportAudioStatus |
Definition at line 613 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
ReportAudioStatus (const AudioStatus &status) | |
ReportAudioStatus (const CECFrame &frame, int startPos=0) | |
CECFrame & | serialize (CECFrame &frame) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
Data Fields | |
AudioStatus | status |
class UserControlPressed |
Definition at line 628 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
UserControlPressed (const UICommand &command) | |
CECFrame & | serialize (CECFrame &frame) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
Data Fields | |
UICommand | uiCommand |
class UserControlReleased |
Definition at line 642 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class Polling |
Definition at line 649 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class RequestArcInitiation |
Definition at line 655 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class ReportArcInitiation |
Definition at line 662 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class RequestArcTermination |
Definition at line 668 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class ReportArcTermination |
Definition at line 674 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class InitiateArc |
Definition at line 680 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class TerminateArc |
Definition at line 685 of file Messages.hpp.
Public Member Functions | |
Op_t | opCode (void) const |
Public Member Functions inherited from DataBlock | |
virtual std::string | toString (void) const |
virtual void | print (void) const |
virtual CECFrame & | serialize (CECFrame &frame) const |
class OpCode |
Definition at line 123 of file OpCode.hpp.
Public Types | |
enum | |
Public Member Functions | |
OpCode (Op_t opCode) | |
OpCode (const CECFrame &frame, int startPos) | |
CECFrame & | serialize (CECFrame &frame) const |
virtual Op_t | opCode (void) const |
virtual std::string | toString (void) const |
virtual void | print (void) const |
Private Attributes | |
Op_t | opCode_ |
class Operand |
Definition at line 45 of file Operand.hpp.
Public Member Functions | |
virtual CECFrame & | serialize (CECFrame &frame) const =0 |
virtual const std::string | toString (void) const |
virtual const std::string | name (void) const |
virtual bool | validate (void) const |
CECFrame | serialize (void) const |
class CECBytes |
Definition at line 48 of file Operands.hpp.
Public Member Functions | |
CECFrame & | serialize (CECFrame &frame) const |
virtual const std::string | toString (void) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
virtual size_t | getMaxLen (void) const |
Protected Attributes | |
std::vector< uint8_t > | str |
class OSDString |
Definition at line 114 of file Operands.hpp.
Public Types | |
enum | |
Public Member Functions | |
OSDString (const char *str) | |
OSDString (const CECFrame &frame, size_t startPos) | |
const std::string | toString (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class OSDName |
Definition at line 135 of file Operands.hpp.
Public Types | |
enum | |
Public Member Functions | |
OSDName (const char *str) | |
OSDName (const CECFrame &frame, size_t startPos) | |
const std::string | toString (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class AbortReason |
Definition at line 156 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
AbortReason (int reason) | |
const std::string | toString (void) const |
bool | validate (void) const |
int | toInt (void) const |
AbortReason (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class DeviceType |
Definition at line 211 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
DeviceType (int type) | |
const std::string | toString (void) const |
bool | validate (void) const |
DeviceType (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class Language |
Definition at line 266 of file Operands.hpp.
Public Types | |
enum | |
Public Member Functions | |
Language (const char *str) | |
Language (const CECFrame &frame, size_t startPos) | |
const std::string | toString (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class VendorID |
Definition at line 288 of file Operands.hpp.
Public Types | |
enum | |
Public Member Functions | |
VendorID (uint8_t byte0, uint8_t byte1, uint8_t byte2) | |
VendorID (const uint8_t *buf, size_t len) | |
VendorID (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
virtual const std::string | toString (void) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class PhysicalAddress |
Definition at line 314 of file Operands.hpp.
Public Types | |
enum | |
Public Member Functions | |
PhysicalAddress (uint8_t byte0, uint8_t byte1, uint8_t byte2, uint8_t byte3) | |
PhysicalAddress (uint8_t *buf, size_t len=MAX_LEN) | |
PhysicalAddress (const CECFrame &frame, size_t startPos) | |
PhysicalAddress (std::string &addr) | |
const uint8_t | getByteValue (int index) const |
const std::string | toString (void) const |
const std::string | name (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class LogicalAddress |
Definition at line 409 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
LogicalAddress (int addr=UNREGISTERED) | |
const std::string | toString (void) const |
int | toInt (void) const |
bool | validate (void) const |
int | getType (void) const |
LogicalAddress (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Static Public Attributes | |
static const LogicalAddress | kTv |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class Version |
Definition at line 514 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
Version (int version) | |
bool | validate (void) const |
const std::string | toString (void) const |
Version (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class PowerStatus |
Definition at line 564 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
PowerStatus (int status) | |
bool | validate (void) const |
const std::string | toString (void) const |
int | toInt (void) const |
PowerStatus (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class RequestAudioFormat |
Definition at line 619 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
RequestAudioFormat (uint8_t AudioFormatIdCode) | |
RequestAudioFormat (const CECFrame &frame, size_t startPos) | |
const std::string | toString (void) const |
int | getAudioformatId (void) const |
int | getAudioformatCode (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class ShortAudioDescriptor |
Definition at line 683 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
ShortAudioDescriptor (uint8_t *buf, size_t len=MAX_LEN) | |
ShortAudioDescriptor (const CECFrame &frame, size_t startPos) | |
const std::string | toString (void) const |
uint32_t | getAudiodescriptor (void) const |
int | getAudioformatCode (void) const |
uint8_t | getAtmosbit (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class SystemAudioStatus |
Definition at line 772 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
SystemAudioStatus (int status) | |
bool | validate (void) const |
const std::string | toString (void) const |
int | toInt (void) const |
SystemAudioStatus (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class AudioStatus |
Definition at line 818 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
AudioStatus (uint8_t status) | |
bool | validate (void) const |
const std::string | toString (void) const |
int | getAudioMuteStatus (void) const |
int | getAudioVolume (void) const |
AudioStatus (const CECFrame &frame, size_t startPos) | |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class UICommand |
Definition at line 861 of file Operands.hpp.
Public Types | |
enum | |
enum | |
Public Member Functions | |
UICommand (int command) | |
int | toInt (void) const |
Public Member Functions inherited from CECBytes | |
CECFrame & | serialize (CECFrame &frame) const |
virtual const std::string | toString (void) const |
bool | operator== (const CECBytes &in) const |
virtual CECFrame & | serialize (CECFrame &frame) const=0 |
CECFrame | serialize (void) const |
Public Member Functions inherited from Operand | |
virtual const std::string | name (void) const |
CECFrame | serialize (void) const |
Protected Member Functions | |
size_t | getMaxLen () const |
Protected Member Functions inherited from CECBytes | |
CECBytes (const uint8_t val) | |
CECBytes (const uint8_t *buf, size_t len) | |
bool | validate (void) const |
CECBytes (const CECFrame &frame, size_t startPos, size_t len) | |
Additional Inherited Members | |
Protected Attributes inherited from CECBytes | |
std::vector< uint8_t > | str |
class Noop |
class Bus |
Public Member Functions | |
void | addFrameListener (FrameListener *listener) |
This function is used to add new listener for reading frames. More... | |
void | removeFrameListener (FrameListener *listener) |
This function is used to remove the listener. More... | |
void | send (const CECFrame &frame, int timeout=0) |
This function is used to write the frame to the driver. If it fails, as it is a synchronous function, it retries every 250ms till the retry count lapse. More... | |
void | sendAsync (const CECFrame &frame) |
This function is used to keep asynchronously sending the frame by keeping copy of cec frame in the queue of the driver. More... | |
void | poll (const LogicalAddress &from, const LogicalAddress &to) |
This function is used to poll the logical address and returns the ACK or NACK received from other devices. If NACK then the device can use this logical address. More... | |
void | ping (const LogicalAddress &from, const LogicalAddress &to) |
This function is used to ping devices, to know whether it present and returns the ACK or NACK received from other devices. If ACK is received, then the device is present. More... | |
void | start (void) |
This function starts the threads and gets the instance for Bus. More... | |
void | stop (void) |
This function stops the reader & writer threads and removes the instance for Bus. More... | |
Static Public Member Functions | |
static Bus & | getInstance (void) |
This function is used to create the instance of Bus class. More... | |
Private Member Functions | |
Bus (void) | |
This function is a constructor for the class Bus. It is used to starts the read and write thread which creates its instance. More... | |
Bus (const Bus &) | |
Bus & | operator= (const Bus &) |
~Bus (void) | |
This is a destructor for class BUS. This function initiates the closing of threads and the instance for Bus will be freed. More... | |
Private Attributes | |
Bus::Reader | reader |
Bus::Writer | writer |
std::list< FrameListener * > | listeners |
Mutex | rMutex |
Mutex | wMutex |
EventQueue< CECFrame * > | wQueue |
volatile bool | started |
class DriverImpl |
Definition at line 48 of file DriverImpl.hpp.
Public Types | |
enum | |
typedef EventQueue< CECFrame * > | IncomingQueue |
Public Types inherited from Driver | |
enum | |
Public Member Functions | |
virtual void | open (void) throw (InvalidStateException, IOException) |
virtual void | close (void) throw (InvalidStateException, IOException) |
virtual void | read (CECFrame &frame) throw (InvalidStateException, IOException) |
virtual void | write (const CECFrame &frame) throw (InvalidStateException, IOException, CECNoAckException) |
virtual void | writeAsync (const CECFrame &frame) throw (InvalidStateException, IOException, CECNoAckException) |
virtual void | removeLogicalAddress (const LogicalAddress &source) |
virtual bool | addLogicalAddress (const LogicalAddress &source) |
virtual int | getLogicalAddress (int devType) |
virtual void | getPhysicalAddress (unsigned int *physicalAddress) |
virtual bool | isValidLogicalAddress (const LogicalAddress &source) const |
virtual void | poll (const LogicalAddress &from, const LogicalAddress &to) throw (InvalidStateException, IOException, CECNoAckException) |
Static Public Member Functions | |
static void | DriverReceiveCallback (int handle, void *callbackData, unsigned char *buf, int len) |
static void | DriverTransmitCallback (int handle, void *callbackData, int result) |
Static Public Member Functions inherited from Driver | |
static Driver & | getInstance (void) |
Private Member Functions | |
IncomingQueue & | getIncomingQueue (int nativeHandle) |
DriverImpl (const DriverImpl &) | |
DriverImpl & | operator= (const DriverImpl &) |
Private Attributes | |
int | status |
int | nativeHandle |
IncomingQueue | rQueue |
Mutex | mutex |
std::list< LogicalAddress > | logicalAddresses |
#define CECDriverAssert | ( | cond | ) |
Definition at line 44 of file hdmi_cec_driver.c.
#define IARM_BUS_CECMGR_NAME "CECMgr" |
CEC Manager IARM-bus name
Definition at line 41 of file CecIARMBusMgr.h.
#define Assert | ( | expr | ) |
Definition at line 53 of file Assert.hpp.
#define __TIMESTAMP | ( | ) |
typedef enum _CECMgr_EventId_t IARM_Bus_CECMgr_EventId_t |
Events published from IR Mananger
typedef struct _CECMgr_EventData_t IARM_Bus_CECMgr_EventData_t |
Key Event Data
enum _CECMgr_EventId_t |
Events published from IR Mananger
Enumerator | |
---|---|
IARM_BUS_CECMGR_EVENT_SEND | Request to Send CEC Data |
IARM_BUS_CECMGR_EVENT_RECV | Notify Availability of CEC Data |
IARM_BUS_CECMGR_EVENT_ENABLE | Notify Enable/Disable of CEC Driver |
IARM_BUS_CECMGR_EVENT_DAEMON_INITIALIZED | Notify CEC Daemon initialized |
IARM_BUS_CECMGR_EVENT_MAX | Maximum event id |
IARM_BUS_CECMGR_EVENT_STATUS_UPDATED | CEC Status Updated |
Definition at line 51 of file CecIARMBusMgr.h.
int HdmiCecOpen | ( | int * | handle | ) |
opens an instance of CEC driver.
This function should be call once before the functions in this API can be used.
[in] | None. | |
[out] | handle used by application to uniquely identify the driver instance. |
Definition at line 68 of file hdmi_cec_driver.c.
int HdmiCecClose | ( | int | handle | ) |
close an instance of CEC driver.
This function should close the currently opened driver instance.
[in] | handle returned from the HdmiCecOpen() function. | |
[out] | None |
Definition at line 106 of file hdmi_cec_driver.c.
int HdmiCecAddLogicalAddress | ( | int | handle, |
int | logicalAddresses | ||
) |
Add one Logical Addresses to be used by host device.
This function can block until the intended logical address is secured by the driver.
In driver implementation, this API would trigger driver sending a POLL CEC packet to the CEC Bus,
Packet::HeaderBlock::Initiator = Requested LogicalAddress. Packet::HeaderBlock::Destination = Requested LogicalAddress. Packet::DataBlock = Empty.
The function shall return HDMI_CEC_IO_SUCCESS if the POLL message is sent successfully and not ACK'd by any device on the bus. From this point on the driver shall forward all received messages with destination being the acquired logical address. Driver should ACK all POLL messsges destined to this logical address.
The function shall return HDMI_CEC_IO_LOGICALADDRESS_UNAVAILABLE if the POLL message is sent and ACK'd by a device on the bus.
The function shall return relevant error code if the POLL message is not sent successfully.
[in] | handle returned from the HdmiCecOpen() function. | |
[in] | logicalAddresses to be acquired. | |
[out] | None |
Definition at line 146 of file hdmi_cec_driver.c.
int HdmiCecRemoveLogicalAddress | ( | int | handle, |
int | logicalAddresses | ||
) |
Clear the Logical Addresses claimed by host device.
This function release the previously acquired logical address. Once released, driver should not ACK any POLL message destined to the released address.
[in] | handle returned from the HdmiCecOpen() function. | |
[in] | logicalAddresses to be released. | |
[out] | None |
Definition at line 172 of file hdmi_cec_driver.c.
int HdmiCecGetLogicalAddress | ( | int | handle, |
int | devType, | ||
int * | logicalAddress | ||
) |
Get the Logical Addresses claimed by host device.
This function gets multiple logical addresses set by the host. It also means that the driver is actively pick up unicast messages destined to the set of logical addresses returned.
[in] | handle returned from the HdmiCecOpen() function. | |
[out] | logicalAddresses list of addresses currently set. | |
[in/out] | : size of the logicalAddress list. Returned number is the total number of addresses currently set. This can be larger than the input value. An returned value 0 indicate that no address is set. |
Get the Logical Address obtained by the driver.
This function get the logical address for the specified device type.
[in] | handle returned from the HdmiCecOpen() function. | |
[in] | device type (tuner, record, playback etc.). | |
[out] | logical address acquired |
Definition at line 179 of file hdmi_cec_driver.c.
void HdmiCecGetPhysicalAddress | ( | int | handle, |
unsigned int * | physicalAddress | ||
) |
Get the Physical Address obtained by the driver.
This function get the Physical address for the specified device type.
[in] | handle returned from the HdmiCecOpen() function. | |
[out] | physical address acquired |
Definition at line 211 of file hdmi_cec_driver.c.
int HdmiCecSetRxCallback | ( | int | handle, |
HdmiCecRxCallback_t | cbfunc, | ||
void * | data | ||
) |
Sets CEC packet Receive callback.
This function sets a callback function to be invoked for each packet arrival.
The packet contained in the buffer is expected to follow this format:
(ref <HDMI Specification 1-4> Section <CEC 6.1>)
complete packet = header block + data block; header block = destination logical address (4-bit) + source address (4-bit) data block = opcode block (8-bit) + oprand block (N-bytes)
|---------------------------------------------— | header block | data blocks | |---------------------------------------------— |3|2|1|0|3|2|1|0|7|6|5|4|3|2|1|0|7|6|5|4|3|2|1|0|
|---------------------------------------------— | Dest | src | opcode block | operand block | |---------------------------------------------—
when receiving, the returned buffer should not contain EOM and ACK bits.
When transmitting, it is driver's responsibility to insert EOM bit and ACK bit for each header or data block
When HdmiCecSetRxCallback is called, it replaces the previous set cbfunc and data values. Setting a value of (cbfunc=null) turns off the callback.
This function should block if callback invocation is in progress.
[in] | handle returned from the HdmiCecOpen(() function. | |
[in] | cbfunc to be invoked when a complete packet is received. | |
[in] | data, used when invoking callback function. |
Definition at line 242 of file hdmi_cec_driver.c.
int HdmiCecSetTxCallback | ( | int | handle, |
HdmiCecTxCallback_t | cbfunc, | ||
void * | data | ||
) |
Sets CEC packet Transmit callback.
This function sets a callback function to be invoked once the async tranmit result is available. This is only necessary if application choose to transmit the packet asynchronously.
This function should block if callback invocation is in progress.
[in] | handle returned from the HdmiCecOpen(() function. | |
[in] | cbfunc to be invoked when a complete packet is received. | |
[in] | data, used when invoking callback function. |
Definition at line 255 of file hdmi_cec_driver.c.
int HdmiCecTxAsync | ( | int | handle, |
const unsigned char * | buf, | ||
int | len | ||
) |
Writes CEC packet onto bus asynchronously.
This function writes a complete CEC packet onto the CEC bus but does not wait for ACK. The result will be reported via HdmiCecRxCallback_t if return value of this function is 0.
[in] | handle returned from the HdmiCecOpen(() function. | |
[in] | buf contains a complete CEC packet. | |
[in] | len number of bytes in the packet. |
Definition at line 268 of file hdmi_cec_driver.c.
int HdmiCecTx | ( | int | handle, |
const unsigned char * | buf, | ||
int | len, | ||
int * | result | ||
) |
Writes CEC packet onto bus.
This function writes a complete CEC packet onto the CEC bus and wait for ACK. application should check for result when return value of the function is 0;
The bytes in
buf | that is to be transmitted should follow the buffer byte format required for receiving buffer. (See detailed description from HdmiCecSetRxCallback) | |
[in] | handle returned from the HdmiCecOpen(() function. | |
[in] | buf contains a complete CEC packet. | |
[in] | len number of bytes in the packet. | |
[out] | result of the send. Possbile results are SENT_AND_ACKD, SENT_BUT_NOT_ACKD (e.g. no follower at the destionation), SENT_FAILED (e.g. collision). |
Definition at line 284 of file hdmi_cec_driver.c.
int HdmiCecSetLogicalAddress | ( | int | handle, |
int * | logicalAddresses, | ||
int | num | ||
) |
This API is DEPRECATED due to possible race conditions competing for a logical address.
Set the Logical Addresses claimed by host device. This function sets multiple logical addresses used by the host. The host has claimed these logical address through the Discovery process. Once set, the host shall receive all CEC packets destined to these addresses.
Once the driver is opened, the host shall receive all broadcast messages regardless the Logical addresses.
when there is no logical address set, the host shall only receive broadcast messages.
[in] | handle returned from the HdmiCecOpen() function. | |
[in] | logicalAddresses set or replace addresses claimed by host. A null value clears the current list. | |
[in] | number of logical addresses. If any logical address in the list cannot be set, none of them should be set upon return. Success return indicates that all addresses in the list are set. | |
[out] | None |
Definition at line 324 of file hdmi_cec_driver.c.
CECHost_Err_t CECHost_Init | ( | const char * | name | ) |
CECHost_Err_t CECHost_Term | ( | void | ) |
CECHost_Err_t CECHost_SetCallback | ( | CECHost_Callback_t | cb | ) |
This function is used to set the callback function. It is called by Device Manager application to set Dev manager status, OSD name, hot plug event handler, power state event handler etc.
[in] | cb | CECHost_Callback_t type structure. |
CECHost_ERR_NONE | Returns for successful condition. |
CECHost_Err_t CECHost_GetHdmiOuputPhysicalAddress | ( | uint8_t * | byte0, |
uint8_t * | byte1, | ||
uint8_t * | byte2, | ||
uint8_t * | byte3 | ||
) |
This function is used to get the physical address of the HDMI output port byte by byte.
[out] | byte0 | First byte of physical address. |
[out] | byte1 | Second byte of physical address. |
[out] | byte2 | Third byte of physical address. |
[out] | byte3 | Fourth byte of physical address. |
CECHost_ERR_NONE | Returns for successful condition. |
CECHost_ERR_STATE | Returns on error condition. |
CECHost_Err_t CECHost_IsHdmiOutputConnected | ( | int32_t * | connect | ) |
This function is used to check whether the HDMI output is connected or not.
[out] | connect | State of connection, 1 for connected and 0 for not connected.. |
CECHost_ERR_NONE | Returns for successful condition. |
CECHost_ERR_HOST | Returns on fail condition. |
CECHost_Err_t CECHost_GetPowerState | ( | int32_t * | state | ) |
CECHost_Err_t CECHost_SetPowerState | ( | int32_t | state | ) |
CECHost_Err_t CECHost_SetDeviceStatus | ( | int | logicalAddress, |
CECHost_DeviceStatus_t * | devices | ||
) |
This function is used to set and update the device status like power status, logical address, osd name etc based on status type.
[in] | logicalAddress | Logical address of cec device. |
[in] | devices | CECHost_DeviceStatus_t type pointer containing info about device. |
CECHost_ERR_NONE | Returns for successful condition. |
CECHost_ERR_HOST | Returns on fail condition. |
CECHost_Err_t CECHost_GetOSDName | ( | uint8_t * | buf, |
size_t * | len | ||
) |
This function is used to get OSD name of Host module. Here 'buf' need not to be null terminated. If it is, the 'len' does not include the 'null' termintator.
[in] | buf | The ASCII bytes of the OSD name |
[in] | len | The number of ASCII bytes. |
CECHost_ERR_NONE | Returns for success condition. |
CECHost_ERR_INVALID | Returns for failure condition. |
CECHost_Err_t CECHost_IsActive | ( | int32_t * | active | ) |
void check_cec_log_status | ( | void | ) |
void dump_buffer | ( | unsigned char * | buf, |
int | len | ||
) |
void CCEC_LOG | ( | int | level, |
const char * | format ... | ||
) |
void Connection::open | ( | void | ) |
Open a connection to receive CEC packets from the bus.
When a connection is opened without a given logical address this connection will pick up all messages destined to the host device, regardless what roles the device has. This is useful if the application wants to sniff all available CEC packets from the bus.
Definition at line 62 of file Connection.cpp.
void Connection::close | ( | void | ) |
brief Close the CEC connection from bus so that the application will stop receiving CEC packets from the bus.
Definition at line 73 of file Connection.cpp.
void Connection::addFrameListener | ( | FrameListener * | listener | ) |
This function is used to listen for CECFrame, which is a byte stream that contains raw bytes received from CEC bus.
[in] | listener | A listener structure which need be added in the frameListeners Queue. |
Definition at line 88 of file Connection.cpp.
void Connection::removeFrameListener | ( | FrameListener * | listener | ) |
This function is used to remove the listener information from the queue.
[in] | listener | Address of the pointer which need to be removed from the Queue. |
Definition at line 104 of file Connection.cpp.
void Connection::sendTo | ( | const LogicalAddress & | to, |
const CECFrame & | frame, | ||
int | timeout = 0 |
||
) |
This function is used to send CEC frame to CEC Bus.
[in] | to | Logical address of the connection where CEC frame can be sent. |
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
[in] | timeout | It is an upper bound on the amount of time to wait so that the application will not hang during sending. |
Definition at line 121 of file Connection.cpp.
void Connection::sendTo | ( | const LogicalAddress & | to, |
const CECFrame & | frame, | ||
int | timeout, | ||
const Throw_e & | doThrow | ||
) |
This function is used to send CEC frame to CEC Bus.
[in] | to | Logical address of the connection where CEC frame can be sent. |
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
[in] | timeout | It is an upper bound on the amount of time to wait so that the application will not hang during sending. |
[in] | doThrow | Throw an exception if the CEC frame is unable to send. |
Definition at line 141 of file Connection.cpp.
void Connection::sendToAsync | ( | const LogicalAddress & | to, |
const CECFrame & | frame | ||
) |
sends HDMI-CEC frame to CEC Bus using asynchronized method.
[in] | to | Logical address of the connection where CEC frame can be sent. |
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
Definition at line 167 of file Connection.cpp.
void Connection::send | ( | const CECFrame & | frame, |
int | timeout = 0 |
||
) |
This function is used to send CEC frame to CEC Bus.
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
[in] | timeout | It is an upper bound on the amount of time to wait so that the application will not hang during sending. |
Definition at line 184 of file Connection.cpp.
This function is used to send CEC frame to CEC Bus.
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
[in] | timeout | It is an upper bound on the amount of time to wait so that the application will not hang during sending. |
[in] | doThrow | Throw an exception if the CEC frame is unable to send. |
Definition at line 208 of file Connection.cpp.
void Connection::poll | ( | const LogicalAddress & | from, |
const Throw_e & | doThrow | ||
) |
This function is used to send poll message to the Bus.
[in] | logical | address of Initiator, in case of poll the initiator and follower is same. |
[in] | doThrow | Throw an exception if there is NACK received. |
Definition at line 232 of file Connection.cpp.
void Connection::ping | ( | const LogicalAddress & | from, |
const LogicalAddress & | to, | ||
const Throw_e & | doThrow | ||
) |
This function is used to send ping message to the Bus.
[in] | logical | address of Initiator, in case of ping the initiator and follower should be different. |
[in] | doThrow | Throw an exception if there is NACK received. |
Definition at line 257 of file Connection.cpp.
void Connection::sendAsync | ( | const CECFrame & | frame | ) |
This function is used to send the CEC frame to physical CEC Bus using asynchronous method.
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
Definition at line 283 of file Connection.cpp.
|
virtual |
Check the filtered is set for this connection.
All incoming CECFrame arrived at the Physical CEC bus will be dispatched to all opened connections, based on the filtering criteria of the connection.
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
Implements FrameFilter.
Definition at line 300 of file Connection.cpp.
|
virtual |
Notify to the application if CECFrame is received. The CEC frame contains the raw bytes.
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
Implements FrameListener.
Definition at line 328 of file Connection.cpp.
|
private |
Match the source address and update the logical address for the Connection.
[in] | frame | CEC Frame which is a byte stream that contains raw bytes. |
Definition at line 351 of file Connection.cpp.