RDK Documentation (Open Sourced RDK Components)

Description

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)
 

Data Structures

struct  DriverContext_t
 
struct  _CECMgr_EventData_t
 
struct  _IARM_Bus_CECMgr_Send_Param_t
 
struct  _IARM_Bus_CECMgr_GetLogicalAddress_Param_t
 
struct  _IARM_Bus_CECMgr_AddLogicalAddress_Param_t
 
struct  _IARM_Bus_CECMgr_GetPhysicalAddress_Param_t
 
struct  _IARM_Bus_CECMgr_Enable_Param_t
 
struct  _IARM_Bus_CECMgr_Status_Updated_Param_t
 
class  CECFrame
 
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. More...
 
class  DataBlock
 
class  Driver
 
struct  _Throw_e
 
class  Exception
 
class  CECNoAckException
 
class  OperationNotSupportedException
 
class  IOException
 
class  InvalidStateException
 
class  InvalidParamException
 
class  AddressNotAvailableException
 
class  FrameListener
 
class  FrameFilter
 
class  Header
 
struct  _CECHost_Policy_t
 
struct  _CECHost_DeviceStatus_t
 
union  _CECHost_DeviceStatus_t.data
 
struct  _CECHost_Callback_t
 
class  LibCCEC
 
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. More...
 
class  MessageEncoder
 High-level messages are encoded by the MessageEncoder into raw bytes and placed in a CECFrame. More...
 
class  MessageProcessor
 The MessageProcessor class implements a set of overloaded process() methods, with each handling a specific message type. More...
 
class  ActiveSource
 The Message API allows the application to send or receive high-level CEC message construct instead of raw bytes. More...
 
class  ImageViewOn
 
class  TextViewOn
 
class  InActiveSource
 
class  RequestActiveSource
 
class  Standby
 
class  GetCECVersion
 
class  CECVersion
 
class  SetMenuLanguage
 
class  GetMenuLanguage
 
class  GiveOSDName
 
class  SetOSDName
 
class  SetOSDString
 
class  GivePhysicalAddress
 
class  ReportPhysicalAddress
 
class  GiveDeviceVendorID
 
class  DeviceVendorID
 
class  GiveDevicePowerStatus
 
class  ReportPowerStatus
 
class  Abort
 
class  FeatureAbort
 
class  RoutingChange
 
class  RoutingInformation
 
class  SetStreamPath
 
class  RequestShortAudioDescriptor
 
class  ReportShortAudioDescriptor
 
class  SystemAudioModeRequest
 
class  SetSystemAudioMode
 
class  GiveAudioStatus
 
class  ReportAudioStatus
 
class  UserControlPressed
 
class  UserControlReleased
 
class  Polling
 
class  RequestArcInitiation
 
class  ReportArcInitiation
 
class  RequestArcTermination
 
class  ReportArcTermination
 
class  InitiateArc
 
class  TerminateArc
 
class  OpCode
 
class  Operand
 
class  CECBytes
 
class  OSDString
 
class  OSDName
 
class  AbortReason
 
class  DeviceType
 
class  Language
 
class  VendorID
 
class  PhysicalAddress
 
class  LogicalAddress
 
class  Version
 
class  PowerStatus
 
class  RequestAudioFormat
 
class  ShortAudioDescriptor
 
class  SystemAudioStatus
 
class  AudioStatus
 
class  UICommand
 
class  Noop
 
class  Bus
 
class  DriverImpl
 

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 DriverDriver::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)
 
IncomingQueueDriverImpl::getIncomingQueue (int nativeHandle)
 
void MessageDecoder::decode (const CECFrame &in)
 

Variables

static DriverContext_tdriverCtx = 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]
 

Data Structure Documentation

◆ DriverContext_t

struct DriverContext_t

Definition at line 51 of file hdmi_cec_driver.c.

Collaboration diagram for DriverContext_t:
Collaboration graph
Data Fields
pthread_mutex_t lock
HdmiCecTxCallback_t txCB
void * txCBdata
HdmiCecRxCallback_t rxCB
void * rxCBdata

◆ _CECMgr_EventData_t

struct _CECMgr_EventData_t

Key Event Data

Definition at line 66 of file CecIARMBusMgr.h.

Collaboration diagram for _CECMgr_EventData_t:
Collaboration graph
Data Fields
uint8_t length
uint8_t data[62+1]

◆ _IARM_Bus_CECMgr_Send_Param_t

struct _IARM_Bus_CECMgr_Send_Param_t

Definition at line 71 of file CecIARMBusMgr.h.

Collaboration diagram for _IARM_Bus_CECMgr_Send_Param_t:
Collaboration graph
Data Fields
uint8_t length
uint8_t data[62+1]
uint8_t retVal

◆ _IARM_Bus_CECMgr_GetLogicalAddress_Param_t

struct _IARM_Bus_CECMgr_GetLogicalAddress_Param_t

Definition at line 77 of file CecIARMBusMgr.h.

Collaboration diagram for _IARM_Bus_CECMgr_GetLogicalAddress_Param_t:
Collaboration graph
Data Fields
int devType
int logicalAddress

◆ _IARM_Bus_CECMgr_AddLogicalAddress_Param_t

struct _IARM_Bus_CECMgr_AddLogicalAddress_Param_t

Definition at line 82 of file CecIARMBusMgr.h.

Collaboration diagram for _IARM_Bus_CECMgr_AddLogicalAddress_Param_t:
Collaboration graph
Data Fields
int logicalAddress

◆ _IARM_Bus_CECMgr_GetPhysicalAddress_Param_t

struct _IARM_Bus_CECMgr_GetPhysicalAddress_Param_t

Definition at line 87 of file CecIARMBusMgr.h.

Collaboration diagram for _IARM_Bus_CECMgr_GetPhysicalAddress_Param_t:
Collaboration graph
Data Fields
unsigned int physicalAddress

◆ _IARM_Bus_CECMgr_Enable_Param_t

struct _IARM_Bus_CECMgr_Enable_Param_t

Definition at line 91 of file CecIARMBusMgr.h.

Collaboration diagram for _IARM_Bus_CECMgr_Enable_Param_t:
Collaboration graph
Data Fields
int enabled

◆ _IARM_Bus_CECMgr_Status_Updated_Param_t

struct _IARM_Bus_CECMgr_Status_Updated_Param_t

Definition at line 95 of file CecIARMBusMgr.h.

Collaboration diagram for _IARM_Bus_CECMgr_Status_Updated_Param_t:
Collaboration graph
Data Fields
int logicalAddress

◆ CECFrame

class CECFrame

Definition at line 40 of file CECFrame.hpp.

Collaboration diagram for CECFrame:
Collaboration graph

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_
 

◆ Connection

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.

Collaboration diagram for Connection:
Collaboration graph

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 LogicalAddressgetSource (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
 
Busbus
 
DefaultFilter busFrameFilter
 
DefaultFrameListener busFrameListener
 
std::list< FrameListener * > frameListeners
 
Mutex mutex
 

◆ DataBlock

class DataBlock

Definition at line 45 of file DataBlock.hpp.

Inheritance diagram for DataBlock:
Inheritance graph
Collaboration diagram for DataBlock:
Collaboration graph

Public Member Functions

virtual std::string toString (void) const
 
virtual void print (void) const
 
virtual CECFrameserialize (CECFrame &frame) const
 
virtual Op_t opCode (void) const =0
 

◆ Driver

class Driver

Definition at line 45 of file Driver.hpp.

Inheritance diagram for Driver:
Inheritance graph
Collaboration diagram for Driver:
Collaboration graph

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 DrivergetInstance (void)
 

Static Private Attributes

static Mutex instanceMutex
 

◆ _Throw_e

struct _Throw_e

Definition at line 37 of file Exception.hpp.

Collaboration diagram for _Throw_e:
Collaboration graph

◆ Exception

class Exception

Definition at line 42 of file Exception.hpp.

Inheritance diagram for Exception:
Inheritance graph
Collaboration diagram for Exception:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ CECNoAckException

class CECNoAckException

Definition at line 52 of file Exception.hpp.

Inheritance diagram for CECNoAckException:
Inheritance graph
Collaboration diagram for CECNoAckException:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ OperationNotSupportedException

class OperationNotSupportedException

Definition at line 61 of file Exception.hpp.

Inheritance diagram for OperationNotSupportedException:
Inheritance graph
Collaboration diagram for OperationNotSupportedException:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ IOException

class IOException

Definition at line 71 of file Exception.hpp.

Inheritance diagram for IOException:
Inheritance graph
Collaboration diagram for IOException:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ InvalidStateException

class InvalidStateException

Definition at line 81 of file Exception.hpp.

Inheritance diagram for InvalidStateException:
Inheritance graph
Collaboration diagram for InvalidStateException:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ InvalidParamException

class InvalidParamException

Definition at line 90 of file Exception.hpp.

Inheritance diagram for InvalidParamException:
Inheritance graph
Collaboration diagram for InvalidParamException:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ AddressNotAvailableException

class AddressNotAvailableException

Definition at line 99 of file Exception.hpp.

Inheritance diagram for AddressNotAvailableException:
Inheritance graph
Collaboration diagram for AddressNotAvailableException:
Collaboration graph

Public Member Functions

virtual const char * what () const throw ()
 

◆ FrameListener

class FrameListener

Definition at line 39 of file FrameListener.hpp.

Inheritance diagram for FrameListener:
Inheritance graph
Collaboration diagram for FrameListener:
Collaboration graph

Public Member Functions

virtual void notify (const CECFrame &) const =0
 

◆ FrameFilter

class FrameFilter

Definition at line 46 of file FrameListener.hpp.

Inheritance diagram for FrameFilter:
Inheritance graph
Collaboration diagram for FrameFilter:
Collaboration graph

Public Member Functions

virtual bool isFiltered (const CECFrame &frame)=0
 

◆ Header

class Header

Definition at line 41 of file Header.hpp.

Collaboration diagram for Header:
Collaboration graph

Public Types

enum  
 

Public Member Functions

 Header (const LogicalAddress &from, const LogicalAddress &to)
 
 Header (const CECFrame &frame, size_t startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 

Data Fields

LogicalAddress from
 
LogicalAddress to
 

◆ _CECHost_Policy_t

struct _CECHost_Policy_t

Definition at line 58 of file Host.hpp.

Collaboration diagram for _CECHost_Policy_t:
Collaboration graph
Data Fields
int32_t turnOffTv
int32_t turnOffSTB

◆ _CECHost_DeviceStatus_t

struct _CECHost_DeviceStatus_t

Definition at line 69 of file Host.hpp.

Collaboration diagram for _CECHost_DeviceStatus_t:
Collaboration graph
Data Fields
CECHost_DeviceStatusType_t statusType
union _CECHost_DeviceStatus_t data

◆ _CECHost_DeviceStatus_t.data

union _CECHost_DeviceStatus_t.data

Definition at line 72 of file Host.hpp.

Collaboration diagram for _CECHost_DeviceStatus_t.data:
Collaboration graph
Data Fields
int powerState
int isConnected
char osdName[14+1]

◆ _CECHost_Callback_t

struct _CECHost_Callback_t

Definition at line 102 of file Host.hpp.

Collaboration diagram for _CECHost_Callback_t:
Collaboration graph
Data Fields
CECHost_HdmiHotplugCallback_t hotplugCb
CECHost_PowerStateCallback_t pwrStateCb
CECHost_DevMgrStatusCallback_t devMgrStatusCb
CECHost_OSDNameCallback_t osdCb
CECHost_PolicyCallback_t policyCb

◆ LibCCEC

class LibCCEC

Definition at line 42 of file LibCCEC.hpp.

Collaboration diagram for LibCCEC:
Collaboration graph

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 LibCCECgetInstance (void)
 This function is used to create the instance for CEC. More...
 

Private Attributes

bool initialized
 
bool connected
 
Mutex mutex
 

◆ MessageDecoder

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.

Collaboration diagram for MessageDecoder:
Collaboration graph

Public Member Functions

 MessageDecoder (MessageProcessor &processor)
 
void decode (const CECFrame &in)
 

Private Attributes

MessageProcessorprocessor
 

◆ MessageEncoder

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.

Collaboration diagram for MessageEncoder:
Collaboration graph

Static Public Member Functions

static CECFrameencode (const Header &h, const DataBlock &m, CECFrame &out)
 
static CECFrame encode (const Header &h, const DataBlock &m)
 
static CECFrameencode (const DataBlock &m, CECFrame &out)
 
static CECFrame encode (const DataBlock &m)
 

◆ MessageProcessor

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,

CECFrame frame = (MessageEncoder().encode(
ActiveSource(PhysicalAddress(phy0, phy1, phy2, phy3)));
Connection(LogicalAddress(TUNER_1)).send(frame);

Definition at line 58 of file MessageProcessor.hpp.

Inheritance diagram for MessageProcessor:
Inheritance graph
Collaboration diagram for MessageProcessor:
Collaboration graph

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)
 

◆ ActiveSource

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.

Inheritance diagram for ActiveSource:
Inheritance graph
Collaboration diagram for ActiveSource:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 ActiveSource (const PhysicalAddress &physicalAddress)
 
 ActiveSource (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

PhysicalAddress physicalAddress
 

◆ ImageViewOn

class ImageViewOn

Definition at line 112 of file Messages.hpp.

Inheritance diagram for ImageViewOn:
Inheritance graph
Collaboration diagram for ImageViewOn:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ TextViewOn

class TextViewOn

Definition at line 119 of file Messages.hpp.

Inheritance diagram for TextViewOn:
Inheritance graph
Collaboration diagram for TextViewOn:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ InActiveSource

class InActiveSource

Definition at line 125 of file Messages.hpp.

Inheritance diagram for InActiveSource:
Inheritance graph
Collaboration diagram for InActiveSource:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 InActiveSource (const PhysicalAddress &physicalAddress)
 
 InActiveSource (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

PhysicalAddress physicalAddress
 

◆ RequestActiveSource

class RequestActiveSource

Definition at line 149 of file Messages.hpp.

Inheritance diagram for RequestActiveSource:
Inheritance graph
Collaboration diagram for RequestActiveSource:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ Standby

class Standby

Definition at line 155 of file Messages.hpp.

Inheritance diagram for Standby:
Inheritance graph
Collaboration diagram for Standby:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ GetCECVersion

class GetCECVersion

Definition at line 161 of file Messages.hpp.

Inheritance diagram for GetCECVersion:
Inheritance graph
Collaboration diagram for GetCECVersion:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ CECVersion

class CECVersion

Definition at line 167 of file Messages.hpp.

Inheritance diagram for CECVersion:
Inheritance graph
Collaboration diagram for CECVersion:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 CECVersion (const Version &version)
 
 CECVersion (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

Version version
 

◆ SetMenuLanguage

class SetMenuLanguage

Definition at line 190 of file Messages.hpp.

Inheritance diagram for SetMenuLanguage:
Inheritance graph
Collaboration diagram for SetMenuLanguage:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 SetMenuLanguage (const Language &language)
 
 SetMenuLanguage (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

Language language
 

◆ GetMenuLanguage

class GetMenuLanguage

Definition at line 214 of file Messages.hpp.

Inheritance diagram for GetMenuLanguage:
Inheritance graph
Collaboration diagram for GetMenuLanguage:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ GiveOSDName

class GiveOSDName

Definition at line 220 of file Messages.hpp.

Inheritance diagram for GiveOSDName:
Inheritance graph
Collaboration diagram for GiveOSDName:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ SetOSDName

class SetOSDName

Definition at line 226 of file Messages.hpp.

Inheritance diagram for SetOSDName:
Inheritance graph
Collaboration diagram for SetOSDName:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 SetOSDName (const OSDName &osdName)
 
 SetOSDName (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

OSDName osdName
 

◆ SetOSDString

class SetOSDString

Definition at line 249 of file Messages.hpp.

Inheritance diagram for SetOSDString:
Inheritance graph
Collaboration diagram for SetOSDString:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 SetOSDString (const OSDString &osdString)
 
 SetOSDString (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

OSDString osdString
 

◆ GivePhysicalAddress

class GivePhysicalAddress

Definition at line 272 of file Messages.hpp.

Inheritance diagram for GivePhysicalAddress:
Inheritance graph
Collaboration diagram for GivePhysicalAddress:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ ReportPhysicalAddress

class ReportPhysicalAddress

Definition at line 278 of file Messages.hpp.

Inheritance diagram for ReportPhysicalAddress:
Inheritance graph
Collaboration diagram for ReportPhysicalAddress:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 ReportPhysicalAddress (const PhysicalAddress &physicalAddress, const DeviceType &deviceType)
 
 ReportPhysicalAddress (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (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
 

◆ GiveDeviceVendorID

class GiveDeviceVendorID

Definition at line 305 of file Messages.hpp.

Inheritance diagram for GiveDeviceVendorID:
Inheritance graph
Collaboration diagram for GiveDeviceVendorID:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ DeviceVendorID

class DeviceVendorID

Definition at line 311 of file Messages.hpp.

Inheritance diagram for DeviceVendorID:
Inheritance graph
Collaboration diagram for DeviceVendorID:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 DeviceVendorID (const VendorID &vendorId)
 
 DeviceVendorID (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

VendorID vendorId
 

◆ GiveDevicePowerStatus

class GiveDevicePowerStatus

Definition at line 334 of file Messages.hpp.

Inheritance diagram for GiveDevicePowerStatus:
Inheritance graph
Collaboration diagram for GiveDevicePowerStatus:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ ReportPowerStatus

class ReportPowerStatus

Definition at line 340 of file Messages.hpp.

Inheritance diagram for ReportPowerStatus:
Inheritance graph
Collaboration diagram for ReportPowerStatus:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 ReportPowerStatus (const PowerStatus &status)
 
 ReportPowerStatus (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

PowerStatus status
 

◆ Abort

class Abort

Definition at line 363 of file Messages.hpp.

Inheritance diagram for Abort:
Inheritance graph
Collaboration diagram for Abort:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ FeatureAbort

class FeatureAbort

Definition at line 369 of file Messages.hpp.

Inheritance diagram for FeatureAbort:
Inheritance graph
Collaboration diagram for FeatureAbort:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 FeatureAbort (const OpCode &feature, const AbortReason &reason)
 
 FeatureAbort (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (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
 

◆ RoutingChange

class RoutingChange

Definition at line 394 of file Messages.hpp.

Inheritance diagram for RoutingChange:
Inheritance graph
Collaboration diagram for RoutingChange:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 RoutingChange (const PhysicalAddress &from, const PhysicalAddress &to)
 
 RoutingChange (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (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
 

◆ RoutingInformation

class RoutingInformation

Definition at line 419 of file Messages.hpp.

Inheritance diagram for RoutingInformation:
Inheritance graph
Collaboration diagram for RoutingInformation:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 RoutingInformation (const PhysicalAddress &toSink)
 
 RoutingInformation (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

PhysicalAddress toSink
 

◆ SetStreamPath

class SetStreamPath

Definition at line 443 of file Messages.hpp.

Inheritance diagram for SetStreamPath:
Inheritance graph
Collaboration diagram for SetStreamPath:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 SetStreamPath (const PhysicalAddress &toSink)
 
 SetStreamPath (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

PhysicalAddress toSink
 

◆ RequestShortAudioDescriptor

class RequestShortAudioDescriptor

Definition at line 466 of file Messages.hpp.

Inheritance diagram for RequestShortAudioDescriptor:
Inheritance graph
Collaboration diagram for RequestShortAudioDescriptor:
Collaboration graph

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)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

std::vector< RequestAudioFormatrequestAudioFormat
 
uint8_t numberofdescriptor
 

◆ ReportShortAudioDescriptor

class ReportShortAudioDescriptor

Definition at line 515 of file Messages.hpp.

Inheritance diagram for ReportShortAudioDescriptor:
Inheritance graph
Collaboration diagram for ReportShortAudioDescriptor:
Collaboration graph

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)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

std::vector< ShortAudioDescriptorshortAudioDescriptor
 
uint8_t numberofdescriptor
 

◆ SystemAudioModeRequest

class SystemAudioModeRequest

Definition at line 564 of file Messages.hpp.

Inheritance diagram for SystemAudioModeRequest:
Inheritance graph
Collaboration diagram for SystemAudioModeRequest:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 SystemAudioModeRequest (const PhysicalAddress &physicaladdress={0xf, 0xf, 0xf, 0xf})
 
 SystemAudioModeRequest (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 

Data Fields

PhysicalAddress physicaladdress
 

◆ SetSystemAudioMode

class SetSystemAudioMode

Definition at line 591 of file Messages.hpp.

Inheritance diagram for SetSystemAudioMode:
Inheritance graph
Collaboration diagram for SetSystemAudioMode:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 SetSystemAudioMode (const SystemAudioStatus &status)
 
 SetSystemAudioMode (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 
virtual void print (void) const
 

Data Fields

SystemAudioStatus status
 

◆ GiveAudioStatus

class GiveAudioStatus

Definition at line 608 of file Messages.hpp.

Inheritance diagram for GiveAudioStatus:
Inheritance graph
Collaboration diagram for GiveAudioStatus:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ ReportAudioStatus

class ReportAudioStatus

Definition at line 613 of file Messages.hpp.

Inheritance diagram for ReportAudioStatus:
Inheritance graph
Collaboration diagram for ReportAudioStatus:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 ReportAudioStatus (const AudioStatus &status)
 
 ReportAudioStatus (const CECFrame &frame, int startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 
virtual void print (void) const
 

Data Fields

AudioStatus status
 

◆ UserControlPressed

class UserControlPressed

Definition at line 628 of file Messages.hpp.

Inheritance diagram for UserControlPressed:
Inheritance graph
Collaboration diagram for UserControlPressed:
Collaboration graph

Public Member Functions

Op_t opCode (void) const
 
 UserControlPressed (const UICommand &command)
 
CECFrameserialize (CECFrame &frame) const
 
- Public Member Functions inherited from DataBlock
virtual std::string toString (void) const
 
virtual void print (void) const
 

Data Fields

UICommand uiCommand
 

◆ UserControlReleased

class UserControlReleased

Definition at line 642 of file Messages.hpp.

Inheritance diagram for UserControlReleased:
Inheritance graph
Collaboration diagram for UserControlReleased:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ Polling

class Polling

Definition at line 649 of file Messages.hpp.

Inheritance diagram for Polling:
Inheritance graph
Collaboration diagram for Polling:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ RequestArcInitiation

class RequestArcInitiation

Definition at line 655 of file Messages.hpp.

Inheritance diagram for RequestArcInitiation:
Inheritance graph
Collaboration diagram for RequestArcInitiation:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ ReportArcInitiation

class ReportArcInitiation

Definition at line 662 of file Messages.hpp.

Inheritance diagram for ReportArcInitiation:
Inheritance graph
Collaboration diagram for ReportArcInitiation:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ RequestArcTermination

class RequestArcTermination

Definition at line 668 of file Messages.hpp.

Inheritance diagram for RequestArcTermination:
Inheritance graph
Collaboration diagram for RequestArcTermination:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ ReportArcTermination

class ReportArcTermination

Definition at line 674 of file Messages.hpp.

Inheritance diagram for ReportArcTermination:
Inheritance graph
Collaboration diagram for ReportArcTermination:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ InitiateArc

class InitiateArc

Definition at line 680 of file Messages.hpp.

Inheritance diagram for InitiateArc:
Inheritance graph
Collaboration diagram for InitiateArc:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ TerminateArc

class TerminateArc

Definition at line 685 of file Messages.hpp.

Inheritance diagram for TerminateArc:
Inheritance graph
Collaboration diagram for TerminateArc:
Collaboration graph

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 CECFrameserialize (CECFrame &frame) const
 

◆ OpCode

class OpCode

Definition at line 123 of file OpCode.hpp.

Inheritance diagram for OpCode:
Inheritance graph
Collaboration diagram for OpCode:
Collaboration graph

Public Types

enum  
 

Public Member Functions

 OpCode (Op_t opCode)
 
 OpCode (const CECFrame &frame, int startPos)
 
CECFrameserialize (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_
 

◆ Operand

class Operand

Definition at line 45 of file Operand.hpp.

Inheritance diagram for Operand:
Inheritance graph
Collaboration diagram for Operand:
Collaboration graph

Public Member Functions

virtual CECFrameserialize (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
 

◆ CECBytes

class CECBytes

Definition at line 48 of file Operands.hpp.

Inheritance diagram for CECBytes:
Inheritance graph
Collaboration diagram for CECBytes:
Collaboration graph

Public Member Functions

CECFrameserialize (CECFrame &frame) const
 
virtual const std::string toString (void) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ OSDString

class OSDString

Definition at line 114 of file Operands.hpp.

Inheritance diagram for OSDString:
Inheritance graph
Collaboration diagram for OSDString:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ OSDName

class OSDName

Definition at line 135 of file Operands.hpp.

Inheritance diagram for OSDName:
Inheritance graph
Collaboration diagram for OSDName:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ AbortReason

class AbortReason

Definition at line 156 of file Operands.hpp.

Inheritance diagram for AbortReason:
Inheritance graph
Collaboration diagram for AbortReason:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ DeviceType

class DeviceType

Definition at line 211 of file Operands.hpp.

Inheritance diagram for DeviceType:
Inheritance graph
Collaboration diagram for DeviceType:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ Language

class Language

Definition at line 266 of file Operands.hpp.

Inheritance diagram for Language:
Inheritance graph
Collaboration diagram for Language:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ VendorID

class VendorID

Definition at line 288 of file Operands.hpp.

Inheritance diagram for VendorID:
Inheritance graph
Collaboration diagram for VendorID:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
virtual const std::string toString (void) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ PhysicalAddress

class PhysicalAddress

Definition at line 314 of file Operands.hpp.

Inheritance diagram for PhysicalAddress:
Inheritance graph
Collaboration diagram for PhysicalAddress:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ LogicalAddress

class LogicalAddress

Definition at line 409 of file Operands.hpp.

Inheritance diagram for LogicalAddress:
Inheritance graph
Collaboration diagram for LogicalAddress:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ Version

class Version

Definition at line 514 of file Operands.hpp.

Inheritance diagram for Version:
Inheritance graph
Collaboration diagram for Version:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ PowerStatus

class PowerStatus

Definition at line 564 of file Operands.hpp.

Inheritance diagram for PowerStatus:
Inheritance graph
Collaboration diagram for PowerStatus:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ RequestAudioFormat

class RequestAudioFormat

Definition at line 619 of file Operands.hpp.

Inheritance diagram for RequestAudioFormat:
Inheritance graph
Collaboration diagram for RequestAudioFormat:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ ShortAudioDescriptor

class ShortAudioDescriptor

Definition at line 683 of file Operands.hpp.

Inheritance diagram for ShortAudioDescriptor:
Inheritance graph
Collaboration diagram for ShortAudioDescriptor:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ SystemAudioStatus

class SystemAudioStatus

Definition at line 772 of file Operands.hpp.

Inheritance diagram for SystemAudioStatus:
Inheritance graph
Collaboration diagram for SystemAudioStatus:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ AudioStatus

class AudioStatus

Definition at line 818 of file Operands.hpp.

Inheritance diagram for AudioStatus:
Inheritance graph
Collaboration diagram for AudioStatus:
Collaboration graph

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
CECFrameserialize (CECFrame &frame) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ UICommand

class UICommand

Definition at line 861 of file Operands.hpp.

Inheritance diagram for UICommand:
Inheritance graph
Collaboration diagram for UICommand:
Collaboration graph

Public Types

enum  
 
enum  
 

Public Member Functions

 UICommand (int command)
 
int toInt (void) const
 
- Public Member Functions inherited from CECBytes
CECFrameserialize (CECFrame &frame) const
 
virtual const std::string toString (void) const
 
bool operator== (const CECBytes &in) const
 
virtual CECFrameserialize (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
 

◆ Noop

class Noop

Definition at line 37 of file Util.hpp.

Collaboration diagram for Noop:
Collaboration graph

Public Member Functions

size_t deserialize (const CECFrame &frame, size_t startPos=0)
 
CECFrameserialize (CECFrame &frame) const
 
void print (void) const
 

◆ Bus

class Bus

Definition at line 53 of file Bus.hpp.

Collaboration diagram for Bus:
Collaboration graph

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 BusgetInstance (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 &)
 
Busoperator= (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
 

◆ DriverImpl

class DriverImpl

Definition at line 48 of file DriverImpl.hpp.

Inheritance diagram for DriverImpl:
Inheritance graph
Collaboration diagram for DriverImpl:
Collaboration graph

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 DrivergetInstance (void)
 

Private Member Functions

IncomingQueuegetIncomingQueue (int nativeHandle)
 
 DriverImpl (const DriverImpl &)
 
DriverImploperator= (const DriverImpl &)
 

Private Attributes

int status
 
int nativeHandle
 
IncomingQueue rQueue
 
Mutex mutex
 
std::list< LogicalAddresslogicalAddresses
 

Macro Definition Documentation

◆ CECDriverAssert

#define CECDriverAssert (   cond)
Value:
do\
{\
if (!(cond)) {\
printf("Assert Failed at [%s][%d]\r\n", __FUNCTION__, __LINE__);\
}\
}while(0)

Definition at line 44 of file hdmi_cec_driver.c.

◆ IARM_BUS_CECMGR_NAME

#define IARM_BUS_CECMGR_NAME   "CECMgr"

CEC Manager IARM-bus name

Definition at line 41 of file CecIARMBusMgr.h.

◆ Assert

#define Assert (   expr)
Value:
do{\
if (!(expr)) printf("[%s] failed at [%s][%d]\r\n", "Assert ", __FILE__, __LINE__);\
assert(expr);\
} while (0)

Definition at line 53 of file Assert.hpp.

◆ __TIMESTAMP

#define __TIMESTAMP ( )
Value:
do { /*YYMMDD-HH:MM:SS:usec*/ \
struct tm __tm; \
struct timeval __tv; \
gettimeofday(&__tv, NULL); \
localtime_r(&__tv.tv_sec, &__tm); \
printf("\r\n%02d%02d%02d-%02d:%02d:%02d:%06d ", \
__tm.tm_year+1900-2000, \
__tm.tm_mon+1, \
__tm.tm_mday, \
__tm.tm_hour, \
__tm.tm_min, \
__tm.tm_sec, \
(int)__tv.tv_usec); \
} while(0)

Definition at line 43 of file Util.cpp.

Typedef Documentation

◆ IARM_Bus_CECMgr_EventId_t

Events published from IR Mananger

◆ IARM_Bus_CECMgr_EventData_t

Enumeration Type Documentation

◆ _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.

Function Documentation

◆ HdmiCecOpen()

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.

Parameters
[in]None.
[out]handle used by application to uniquely identify the driver instance.
Returns
Error Code: If error code is returned, the open is failed.

Definition at line 68 of file hdmi_cec_driver.c.

◆ HdmiCecClose()

int HdmiCecClose ( int  handle)

close an instance of CEC driver.
This function should close the currently opened driver instance.

Parameters
[in]handle returned from the HdmiCecOpen() function.
[out]None
Returns
Error Code: If error code is returned, the open is failed.

Definition at line 106 of file hdmi_cec_driver.c.

◆ HdmiCecAddLogicalAddress()

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.

Parameters
[in]handle returned from the HdmiCecOpen() function.
[in]logicalAddresses to be acquired.
[out]None
Returns
Error Code: See above.

Definition at line 146 of file hdmi_cec_driver.c.

◆ HdmiCecRemoveLogicalAddress()

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.

Parameters
[in]handle returned from the HdmiCecOpen() function.
[in]logicalAddresses to be released.
[out]None
Returns
Error Code: see above.

Definition at line 172 of file hdmi_cec_driver.c.

◆ HdmiCecGetLogicalAddress()

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.

Parameters
[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.
Returns
Error Code: If error code is returned, the get is failed.

Get the Logical Address obtained by the driver.

This function get the logical address for the specified device type.

Parameters
[in]handle returned from the HdmiCecOpen() function.
[in]device type (tuner, record, playback etc.).
[out]logical address acquired
Returns
Error Code: If error code is returned, the get is failed.

Definition at line 179 of file hdmi_cec_driver.c.

◆ HdmiCecGetPhysicalAddress()

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.

Parameters
[in]handle returned from the HdmiCecOpen() function.
[out]physical address acquired
Returns
None.

Definition at line 211 of file hdmi_cec_driver.c.

◆ HdmiCecSetRxCallback()

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.

Parameters
[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.
Returns
Error Code: If error code is returned, the set is failed.

Definition at line 242 of file hdmi_cec_driver.c.

◆ HdmiCecSetTxCallback()

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.

Parameters
[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.
Returns
Error Code: If error code is returned, the set is failed.

Definition at line 255 of file hdmi_cec_driver.c.

◆ HdmiCecTxAsync()

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.

Parameters
[in]handle returned from the HdmiCecOpen(() function.
[in]buf contains a complete CEC packet.
[in]len number of bytes in the packet.
Returns
Error Code: If error code is returned, the transmit did not happen.

Definition at line 268 of file hdmi_cec_driver.c.

◆ HdmiCecTx()

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

Parameters
bufthat 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).
Returns
Error Code: If error code is returned, the transmit did not happen.

Definition at line 284 of file hdmi_cec_driver.c.

◆ HdmiCecSetLogicalAddress()

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.

Parameters
[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
Returns
Error Code: If error code is returned, the set is failed.

Definition at line 324 of file hdmi_cec_driver.c.

◆ CECHost_Init()

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.

Parameters
[in]nameOSD name.
Return values
CECHost_ERR_NONEReturns for successful condition.

Definition at line 101 of file Host.cpp.

◆ CECHost_Term()

CECHost_Err_t CECHost_Term ( void  )

This function is used to de-initialize CEC host device, disconnects and terminates the CEC connection.

Return values
CECHost_ERR_NONEReturns for successful condition.

Definition at line 116 of file Host.cpp.

◆ CECHost_SetCallback()

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.

Parameters
[in]cbCECHost_Callback_t type structure.
Return values
CECHost_ERR_NONEReturns for successful condition.

Definition at line 130 of file Host.cpp.

◆ CECHost_GetHdmiOuputPhysicalAddress()

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.

Parameters
[out]byte0First byte of physical address.
[out]byte1Second byte of physical address.
[out]byte2Third byte of physical address.
[out]byte3Fourth byte of physical address.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_STATEReturns on error condition.

Definition at line 144 of file Host.cpp.

◆ CECHost_IsHdmiOutputConnected()

CECHost_Err_t CECHost_IsHdmiOutputConnected ( int32_t *  connect)

This function is used to check whether the HDMI output is connected or not.

Parameters
[out]connectState of connection, 1 for connected and 0 for not connected..
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 159 of file Host.cpp.

◆ CECHost_GetPowerState()

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.

Parameters
[out]stateState of power, ON or STANDBY.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 174 of file Host.cpp.

◆ CECHost_SetPowerState()

CECHost_Err_t CECHost_SetPowerState ( int32_t  state)

This function is used to set the device power state to be ON or STANDBY.

Parameters
[in]statePower state value to be updated.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 201 of file Host.cpp.

◆ CECHost_SetDeviceStatus()

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.

Parameters
[in]logicalAddressLogical address of cec device.
[in]devicesCECHost_DeviceStatus_t type pointer containing info about device.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 188 of file Host.cpp.

◆ CECHost_GetOSDName()

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.

Parameters
[in]bufThe ASCII bytes of the OSD name
[in]lenThe number of ASCII bytes.
Return values
CECHost_ERR_NONEReturns for success condition.
CECHost_ERR_INVALIDReturns for failure condition.

Definition at line 216 of file Host.cpp.

◆ CECHost_IsActive()

CECHost_Err_t CECHost_IsActive ( int32_t *  active)

This function is used to check whether host device is active or not.

Parameters
[out]activeVariable that stores the state of box.
Return values
CECHost_ERR_NONEBy default it returns success condition.

Definition at line 231 of file Host.cpp.

◆ check_cec_log_status()

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.

Returns
None

Definition at line 75 of file Util.cpp.

◆ dump_buffer()

void dump_buffer ( unsigned char *  buf,
int  len 
)

This function is used to print the content of log buffer in hexadecimal format.

Parameters
[in]bufBuffer where CEC log is stored.
[in]lenLength of the buffer to be printed.
Returns
None.

Definition at line 142 of file Util.cpp.

◆ CCEC_LOG()

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.

Parameters
[in]levelCEC Log level
[in]formatFormat of the received data.
Returns
None

Definition at line 120 of file Util.cpp.

◆ open()

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.

Returns
None.

Definition at line 62 of file Connection.cpp.

◆ close()

void Connection::close ( void  )

brief Close the CEC connection from bus so that the application will stop receiving CEC packets from the bus.

Returns
None.

Definition at line 73 of file Connection.cpp.

◆ addFrameListener()

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.

Parameters
[in]listenerA listener structure which need be added in the frameListeners Queue.
Returns
None.

Definition at line 88 of file Connection.cpp.

◆ removeFrameListener()

void Connection::removeFrameListener ( FrameListener listener)

This function is used to remove the listener information from the queue.

Parameters
[in]listenerAddress of the pointer which need to be removed from the Queue.
Returns
None.

Definition at line 104 of file Connection.cpp.

◆ sendTo() [1/2]

void Connection::sendTo ( const LogicalAddress to,
const CECFrame frame,
int  timeout = 0 
)

This function is used to send CEC frame to CEC Bus.

Parameters
[in]toLogical address of the connection where CEC frame can be sent.
[in]frameCEC Frame which is a byte stream that contains raw bytes.
[in]timeoutIt is an upper bound on the amount of time to wait so that the application will not hang during sending.
Returns
None.

Definition at line 121 of file Connection.cpp.

◆ sendTo() [2/2]

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.

Parameters
[in]toLogical address of the connection where CEC frame can be sent.
[in]frameCEC Frame which is a byte stream that contains raw bytes.
[in]timeoutIt is an upper bound on the amount of time to wait so that the application will not hang during sending.
[in]doThrowThrow an exception if the CEC frame is unable to send.
Returns
None.

Definition at line 141 of file Connection.cpp.

◆ sendToAsync()

void Connection::sendToAsync ( const LogicalAddress to,
const CECFrame frame 
)

sends HDMI-CEC frame to CEC Bus using asynchronized method.

Parameters
[in]toLogical address of the connection where CEC frame can be sent.
[in]frameCEC Frame which is a byte stream that contains raw bytes.
Returns
None.

Definition at line 167 of file Connection.cpp.

◆ send() [1/2]

void Connection::send ( const CECFrame frame,
int  timeout = 0 
)

This function is used to send CEC frame to CEC Bus.

Parameters
[in]frameCEC Frame which is a byte stream that contains raw bytes.
[in]timeoutIt is an upper bound on the amount of time to wait so that the application will not hang during sending.
Returns
None.

Definition at line 184 of file Connection.cpp.

◆ send() [2/2]

void Connection::send ( const CECFrame frame,
int  timeout,
const Throw_e doThrow 
)

This function is used to send CEC frame to CEC Bus.

Parameters
[in]frameCEC Frame which is a byte stream that contains raw bytes.
[in]timeoutIt is an upper bound on the amount of time to wait so that the application will not hang during sending.
[in]doThrowThrow an exception if the CEC frame is unable to send.
Returns
None.

Definition at line 208 of file Connection.cpp.

◆ poll()

void Connection::poll ( const LogicalAddress from,
const Throw_e doThrow 
)

This function is used to send poll message to the Bus.

Parameters
[in]logicaladdress of Initiator, in case of poll the initiator and follower is same.
[in]doThrowThrow an exception if there is NACK received.
Returns
None.

Definition at line 232 of file Connection.cpp.

◆ ping()

void Connection::ping ( const LogicalAddress from,
const LogicalAddress to,
const Throw_e doThrow 
)

This function is used to send ping message to the Bus.

Parameters
[in]logicaladdress of Initiator, in case of ping the initiator and follower should be different.
[in]doThrowThrow an exception if there is NACK received.
Returns
None.

Definition at line 257 of file Connection.cpp.

◆ sendAsync()

void Connection::sendAsync ( const CECFrame frame)

This function is used to send the CEC frame to physical CEC Bus using asynchronous method.

Parameters
[in]frameCEC Frame which is a byte stream that contains raw bytes.
Returns
None.

Definition at line 283 of file Connection.cpp.

◆ isFiltered()

bool Connection::DefaultFilter::isFiltered ( const CECFrame frame)
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.

Parameters
[in]frameCEC Frame which is a byte stream that contains raw bytes.
Returns
TRUE if the filter is set for the CEC Connection, otherwise return FALSE.

Implements FrameFilter.

Definition at line 300 of file Connection.cpp.

◆ notify()

void Connection::DefaultFrameListener::notify ( const CECFrame frame) const
virtual

Notify to the application if CECFrame is received. The CEC frame contains the raw bytes.

Parameters
[in]frameCEC Frame which is a byte stream that contains raw bytes.
Returns
None.

Implements FrameListener.

Definition at line 328 of file Connection.cpp.

◆ matchSource()

void Connection::matchSource ( const CECFrame frame)
private

Match the source address and update the logical address for the Connection.

Parameters
[in]frameCEC Frame which is a byte stream that contains raw bytes.
Returns
None.

Definition at line 351 of file Connection.cpp.

Variable Documentation

◆ logLevel

const char* logLevel[][2]
static
Initial value:
=
{ {"FATAL","0"},
{"ERROR","1"},
{"WARN","2"},
{"EXP","3"},
{"NOTICE","4"},
{"INFO","5"},
{"DEBUG","6"},
{"TRACE","7"}
}

Definition at line 58 of file Util.cpp.

Connection::send
void send(const CECFrame &frame, int timeout, const Throw_e &doThrow)
This function is used to send CEC frame to CEC Bus.
Definition: Connection.cpp:208
Connection
The connection class provides APIs that allows the application to access CEC Bus. A connection is a t...
Definition: Connection.hpp:57
LogicalAddress
Definition: Operands.hpp:409
PhysicalAddress
Definition: Operands.hpp:314
Header
Definition: Header.hpp:41
MessageEncoder
High-level messages are encoded by the MessageEncoder into raw bytes and placed in a CECFrame.
Definition: MessageEncoder.hpp:46
ActiveSource
The Message API allows the application to send or receive high-level CEC message construct instead of...
Definition: Messages.hpp:88
CECFrame
Definition: CECFrame.hpp:40