RDK Documentation (Open Sourced RDK Components)
HDMI-CEC Messages and Frames Classes

Description

Described the details of High Level Class diagram and its functionalities.

Data Structures

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

Data Structure Documentation

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