roCecInterface

 

This object provides access to the HDMI® CEC channel.

Object Creation: The roCecInterface object is created with no parameters.

CreateObject("roCecInterface")

When possible, JavaScript APIs should be used instead of BrightScript-Javascript Objects. The JavaScript API equivalent to this object is cec.

IfCecInterface

SendRawMessage(packet As roByteArray) As Void

Sends a message on the CEC bus. The frame data should be provided as an roByteArray, with the destination address in the low 4 bits of the first octet.

The system software automatically replaces the high 4 bits of the first octet with the source address. It also copies the physical address of the player into the following messages automatically prior to transmission: ActiveSource, InactiveSource, SystemAudioModeRequest.

As of BrightSign OS 8.2.55, the CEC implementation for AU series 5 products will reply to these messages with the correct data, without involving the script:

  • CEC_MSG_GET_CEC_VERSION

  • CEC_MSG_ABORT

  • CEC_MSG_GIVE_DEVICE_POWER_STATUS

  • CEC_MSG_GIVE_OSD_NAME

  • CEC_MSG_GIVE_DEVICE_VENDOR_ID

  • CEC_MSG_GIVE_FEATURES

  • CEC_MSG_GIVE_PHYSICAL_ADDR

  • CEC_MSG_USER_CONTROL_PRESSED

  • CEC_MSG_USER_CONTROL_RELEASED

  • CEC_MSG_REPORT_PHYSICAL_ADDR

Tip

Use the UseInitiatorAddressFromPacket() method to prevent the system software from replacing source bits.

UseInitiatorAddressFromPacket(enable As Boolean) As Boolean

Removes the source address included in CEC messages by system software if passed true. This method allows you to transmit unmodified bytes via CEC.

GetLogicalAddress() As Integer

Returns the current logical address. This method will return the unregistered address (0x0f) to indicate that the logical address has not been negotiated. In this case, messages can still be sent, but the receivers will behave differently and may not process all messages.

EnableCecDebug(filename As String) As Void

Enables CEC debugging. This method will write a log of all CEC packets to the specified file.

GetPhysicalAddress() As roByteArray

Returns the CEC physical address, which is sometimes required when processing CEC messages.

PortName ()

Optional. This can be:

  • default: the default output for the platform, normally HDMI-1

  • HDMI-X : X is a number from 1 up to the number of HDMI outputs on the platform

  • eARC: on the AU335 (the default)

ifUserData

SetUserData(user_data As Object)

Sets the user data that will be returned when events are raised.

GetUserData() As Object

Returns the user data that has previously been set via SetUserData(). It will return Invalid if no data has been set.

ifMessagePort

SetPort(port As roMessagePort)

Posts messages of type roCecRxFrameEvent and roCecTxCompleteEvent to the attached message port.

ON THIS PAGE