libCEC 8.1.0
C / C++ API — control CEC-capable HDMI devices
Loading...
Searching...
No Matches
CEC::ICECAdapter Class Referenceabstract

To create a new libCEC instance, call CECInitialise() and pass the configuration as argument. More...

#include <cec.h>

Public Member Functions

virtual ~ICECAdapter ()
 
Adapter methods
virtual bool Open (const char *strPort, uint32_t iTimeoutMs=10000)=0
 Open a connection to the CEC adapter.
 
virtual void Close (void)=0
 Close the connection to the CEC adapter.
 
virtual bool PingAdapter (void)=0
 Sends a ping command to the adapter, to check if it's responding.
 
virtual bool StartBootloader (void)=0
 Start the bootloader of the CEC adapter.
 
virtual bool Transmit (const cec_command &data)=0
 Transmit a raw CEC command over the CEC line.
 
virtual bool SetLogicalAddress (cec_logical_address iLogicalAddress=CECDEVICE_PLAYBACKDEVICE1)=0
 Change the logical address on the CEC bus of the CEC adapter.
 
virtual bool SetPhysicalAddress (uint16_t iPhysicalAddress=0x1000)=0
 Change the physical address (HDMI port) of the CEC adapter.
 
virtual bool PowerOnDevices (cec_logical_address address=CECDEVICE_TV)=0
 Power on the given CEC capable devices.
 
virtual bool StandbyDevices (cec_logical_address address=CECDEVICE_BROADCAST)=0
 Put the given CEC capable devices in standby mode.
 
virtual bool SetActiveSource (cec_device_type type=CEC_DEVICE_TYPE_RESERVED)=0
 Change the active source to a device type handled by libCEC.
 
virtual bool SetDeckControlMode (cec_deck_control_mode mode, bool bSendUpdate=true)=0
 Change the deck control mode, if this adapter is registered as playback or recording device.
 
virtual bool SetDeckInfo (cec_deck_info info, bool bSendUpdate=true)=0
 Change the deck info, if this adapter is a playback or recording device.
 
virtual bool SetInactiveView (void)=0
 Broadcast a message that notifies connected CEC capable devices that this device is no longer the active source.
 
virtual bool SetMenuState (cec_menu_state state, bool bSendUpdate=true)=0
 Change the menu state.
 
virtual bool SetOSDString (cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage)=0
 Display a message on the device with the given logical address.
 
virtual bool SwitchMonitoring (bool bEnable)=0
 Enable or disable monitoring mode, for debugging purposes.
 
virtual cec_version GetDeviceCecVersion (cec_logical_address iLogicalAddress)=0
 Get the CEC version of the device with the given logical address.
 
virtual std::string GetDeviceMenuLanguage (cec_logical_address iLogicalAddress)=0
 Get the menu language of the device with the given logical address.
 
virtual uint32_t GetDeviceVendorId (cec_logical_address iLogicalAddress)=0
 Get the vendor ID of the device with the given logical address.
 
virtual cec_power_status GetDevicePowerStatus (cec_logical_address iLogicalAddress)=0
 Get the power status of the device with the given logical address.
 
virtual bool PollDevice (cec_logical_address iLogicalAddress)=0
 Sends a POLL message to a device, to check if it's present and responding.
 
virtual cec_logical_addresses GetActiveDevices (void)=0
 
virtual bool IsActiveDevice (cec_logical_address iLogicalAddress)=0
 Check whether a device is active on the bus.
 
virtual bool IsActiveDeviceType (cec_device_type type)=0
 Check whether a device of the given type is active on the bus.
 
virtual uint8_t VolumeUp (bool bSendRelease=true)=0
 Sends a volume up keypress to an audiosystem if it's present.
 
virtual uint8_t VolumeDown (bool bSendRelease=true)=0
 Sends a volume down keypress to an audiosystem if it's present.
 
virtual uint8_t MuteAudio (void)=0
 Toggles the mute status of an audiosystem, if it's present.
 
virtual bool SendKeypress (cec_logical_address iDestination, cec_user_control_code key, bool bWait=false)=0
 Send a keypress to a device on the CEC bus.
 
virtual bool SendKeyRelease (cec_logical_address iDestination, bool bWait=false)=0
 Send a key release to a device on the CEC bus.
 
virtual std::string GetDeviceOSDName (cec_logical_address iAddress)=0
 Get the OSD name of a device on the CEC bus.
 
virtual cec_logical_address GetActiveSource (void)=0
 Get the logical address of the device that is currently the active source on the CEC bus.
 
virtual bool IsActiveSource (cec_logical_address iLogicalAddress)=0
 Check whether a device is currently the active source on the CEC bus.
 
virtual bool SetStreamPath (cec_logical_address iLogicalAddress)=0
 Sets the stream path to the device on the given logical address.
 
virtual bool SetStreamPath (uint16_t iPhysicalAddress)=0
 Sets the stream path to the device on the given physical address.
 
virtual cec_logical_addresses GetLogicalAddresses (void)=0
 
virtual bool GetCurrentConfiguration (libcec_configuration *configuration)=0
 Get libCEC's current configuration.
 
virtual bool SetConfiguration (const libcec_configuration *configuration)=0
 Change libCEC's configuration.
 
virtual bool CanSaveConfiguration (void)=0
 
virtual void RescanActiveDevices (void)=0
 Tell libCEC to poll for active devices on the bus.
 
virtual bool IsLibCECActiveSource (void)=0
 
virtual bool GetDeviceInformation (const char *strPort, libcec_configuration *config, uint32_t iTimeoutMs=10000)=0
 Get information about the given CEC adapter.
 
virtual bool SetCallbacks (ICECCallbacks *callbacks, void *cbParam)=0
 Set and enable the callback methods.
 
virtual bool DisableCallbacks (void)=0
 Disable all callbacks.
 
virtual bool SetHDMIPort (cec_logical_address iBaseDevice, uint8_t iPort)=0
 Changes the active HDMI port.
 
virtual uint16_t GetDevicePhysicalAddress (cec_logical_address iLogicalAddress)=0
 Get the physical address of the device with the given logical address.
 
virtual const char * GetLibInfo (void)=0
 
virtual void InitVideoStandalone (void)=0
 Calling this method will initialise the host on which libCEC is running.
 
virtual uint16_t GetAdapterVendorId (void) const =0
 
virtual uint16_t GetAdapterProductId (void) const =0
 
virtual const char * ToString (const cec_menu_state state)=0
 
virtual const char * ToString (const cec_version version)=0
 
virtual const char * ToString (const cec_power_status status)=0
 
virtual const char * ToString (const cec_logical_address address)=0
 
virtual const char * ToString (const cec_deck_control_mode mode)=0
 
virtual const char * ToString (const cec_deck_info status)=0
 
virtual const char * ToString (const cec_opcode opcode)=0
 
virtual const char * ToString (const cec_system_audio_status mode)=0
 
virtual const char * ToString (const cec_audio_status status)=0
 
virtual const char * ToString (const cec_vendor_id vendor)
 
virtual const char * ToString (const cec_device_type type)=0
 
virtual const char * ToString (const cec_user_control_code key)=0
 
virtual const char * ToString (const cec_adapter_type type)=0
 
virtual std::string VersionToString (uint32_t version)=0
 
virtual void PrintVersion (uint32_t version, char *buf, size_t bufSize)=0
 
virtual const char * VendorIdToString (uint32_t vendor)=0
 
virtual uint8_t AudioToggleMute (void)=0
 Toggle the mute status of the AVR (if present)
 
virtual uint8_t AudioMute (void)=0
 Mute the AVR (if present)
 
virtual uint8_t AudioUnmute (void)=0
 Mute the AVR (if connected)
 
virtual uint8_t AudioStatus (void)=0
 Get the current audio status (if an AVR is connected)
 
virtual int8_t DetectAdapters (cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath=nullptr, bool bQuickScan=false)=0
 Try to find all connected CEC adapters.
 
virtual cec_command CommandFromString (const char *strCommand)=0
 Create a new cec_command from a string.
 
virtual bool AudioEnable (bool enable)=0
 Enable or disable system audio mode.
 
virtual uint8_t SystemAudioModeStatus (void)=0
 Get the current system audio mode status (if an AVR is connected)
 
virtual bool GetStats (struct cec_adapter_stats *stats)=0
 

Detailed Description

To create a new libCEC instance, call CECInitialise() and pass the configuration as argument.

Then call Open() to open a connection to the adapter. Close() closes the connection and CECDestroy() cleans up the libCEC instance.

libCEC can send commands to other devices on the CEC bus via the methods on this interface, and all commands that libCEC received are sent back to the application via callback methods. The callback methods can be found in cectypes.h, ICECCallbacks.

Definition at line 53 of file cec.h.

Constructor & Destructor Documentation

◆ ~ICECAdapter()

virtual CEC::ICECAdapter::~ICECAdapter ( )
inlinevirtual

Definition at line 56 of file cec.h.

Member Function Documentation

◆ Open()

virtual bool CEC::ICECAdapter::Open ( const char *  strPort,
uint32_t  iTimeoutMs = 10000 
)
pure virtual

Open a connection to the CEC adapter.

Parameters
strPortThe path to the port.
iTimeoutMsConnection timeout in ms.
Returns
True when connected, false otherwise.

◆ Close()

virtual void CEC::ICECAdapter::Close ( void  )
pure virtual

Close the connection to the CEC adapter.

◆ PingAdapter()

virtual bool CEC::ICECAdapter::PingAdapter ( void  )
pure virtual

Sends a ping command to the adapter, to check if it's responding.

Returns
True when the ping was successful, false otherwise.

◆ StartBootloader()

virtual bool CEC::ICECAdapter::StartBootloader ( void  )
pure virtual

Start the bootloader of the CEC adapter.

Closes the connection when successful.

Returns
True when the command was sent successfully, false otherwise.

◆ Transmit()

virtual bool CEC::ICECAdapter::Transmit ( const cec_command data)
pure virtual

Transmit a raw CEC command over the CEC line.

Parameters
dataThe command to send.
Returns
True when the data was sent and acked, false otherwise.

◆ SetLogicalAddress()

virtual bool CEC::ICECAdapter::SetLogicalAddress ( cec_logical_address  iLogicalAddress = CECDEVICE_PLAYBACKDEVICE1)
pure virtual

Change the logical address on the CEC bus of the CEC adapter.

libCEC automatically assigns a logical address, and this method is only available for debugging purposes.

Parameters
iLogicalAddressThe CEC adapter's new logical address.
Returns
True when the logical address was set successfully, false otherwise.

◆ SetPhysicalAddress()

virtual bool CEC::ICECAdapter::SetPhysicalAddress ( uint16_t  iPhysicalAddress = 0x1000)
pure virtual

Change the physical address (HDMI port) of the CEC adapter.

libCEC will try to autodetect the physical address when connecting. If it did, it's set in libcec_configuration.

Parameters
iPhysicalAddressThe CEC adapter's new physical address.

True when the physical address was set successfully, false otherwise.

◆ PowerOnDevices()

virtual bool CEC::ICECAdapter::PowerOnDevices ( cec_logical_address  address = CECDEVICE_TV)
pure virtual

Power on the given CEC capable devices.

If CECDEVICE_BROADCAST is used, then wakeDevice in libcec_configuration will be used.

Parameters
addressThe logical address to power on.
Returns
True when the command was sent successfully, false otherwise.

◆ StandbyDevices()

virtual bool CEC::ICECAdapter::StandbyDevices ( cec_logical_address  address = CECDEVICE_BROADCAST)
pure virtual

Put the given CEC capable devices in standby mode.

If CECDEVICE_BROADCAST is used, then standbyDevices in libcec_configuration will be used.

address The logical address of the device to put in standby.

Returns
True when the command was sent successfully, false otherwise.

◆ SetActiveSource()

virtual bool CEC::ICECAdapter::SetActiveSource ( cec_device_type  type = CEC_DEVICE_TYPE_RESERVED)
pure virtual

Change the active source to a device type handled by libCEC.

Use CEC_DEVICE_TYPE_RESERVED to make the default type used by libCEC active.

Parameters
typeThe new active source. Leave empty to use the primary type
Returns
True when the command was sent successfully, false otherwise.

◆ SetDeckControlMode()

virtual bool CEC::ICECAdapter::SetDeckControlMode ( cec_deck_control_mode  mode,
bool  bSendUpdate = true 
)
pure virtual

Change the deck control mode, if this adapter is registered as playback or recording device.

Parameters
modeThe new control mode.
bSendUpdateTrue to send the new status over the CEC line.
Returns
True if set, false otherwise.

◆ SetDeckInfo()

virtual bool CEC::ICECAdapter::SetDeckInfo ( cec_deck_info  info,
bool  bSendUpdate = true 
)
pure virtual

Change the deck info, if this adapter is a playback or recording device.

Parameters
infoThe new deck info.
bSendUpdateTrue to send the new status over the CEC line.
Returns
True if set, false otherwise.

◆ SetInactiveView()

virtual bool CEC::ICECAdapter::SetInactiveView ( void  )
pure virtual

Broadcast a message that notifies connected CEC capable devices that this device is no longer the active source.

Returns
True when the command was sent successfully, false otherwise.

◆ SetMenuState()

virtual bool CEC::ICECAdapter::SetMenuState ( cec_menu_state  state,
bool  bSendUpdate = true 
)
pure virtual

Change the menu state.

This value is already changed by libCEC automatically if a device is (de)activated.

Parameters
stateThe new state.
bSendUpdateTrue to send the new status over the CEC line.
Returns
True if set, false otherwise.

◆ SetOSDString()

virtual bool CEC::ICECAdapter::SetOSDString ( cec_logical_address  iLogicalAddress,
cec_display_control  duration,
const char *  strMessage 
)
pure virtual

Display a message on the device with the given logical address.

Not supported by most TVs.

Parameters
iLogicalAddressThe logical address of the device to display the message on.
durationThe duration of the message
strMessageThe message to display.
Returns
True when the command was sent, false otherwise.

◆ SwitchMonitoring()

virtual bool CEC::ICECAdapter::SwitchMonitoring ( bool  bEnable)
pure virtual

Enable or disable monitoring mode, for debugging purposes.

If monitoring mode is enabled, libCEC won't respond to any command, but only log incoming data.

Parameters
bEnableTrue to enable, false to disable.
Returns
True when switched successfully, false otherwise.

◆ GetDeviceCecVersion()

virtual cec_version CEC::ICECAdapter::GetDeviceCecVersion ( cec_logical_address  iLogicalAddress)
pure virtual

Get the CEC version of the device with the given logical address.

Parameters
iLogicalAddressThe logical address of the device to get the CEC version for.
Returns
The version or CEC_VERSION_UNKNOWN when the version couldn't be fetched.

◆ GetDeviceMenuLanguage()

virtual std::string CEC::ICECAdapter::GetDeviceMenuLanguage ( cec_logical_address  iLogicalAddress)
pure virtual

Get the menu language of the device with the given logical address.

Parameters
iLogicalAddressThe logical address of the device to get the menu language for.
Returns
The requested menu language, or '???' if unknown

◆ GetDeviceVendorId()

virtual uint32_t CEC::ICECAdapter::GetDeviceVendorId ( cec_logical_address  iLogicalAddress)
pure virtual

Get the vendor ID of the device with the given logical address.

Parameters
iLogicalAddressThe logical address of the device to get the vendor ID for.
Returns
The vendor ID or 0 if it wasn't found.

◆ GetDevicePowerStatus()

virtual cec_power_status CEC::ICECAdapter::GetDevicePowerStatus ( cec_logical_address  iLogicalAddress)
pure virtual

Get the power status of the device with the given logical address.

Parameters
iLogicalAddressThe logical address of the device to get the power status for.
Returns
The power status or CEC_POWER_STATUS_UNKNOWN if it wasn't found.

◆ PollDevice()

virtual bool CEC::ICECAdapter::PollDevice ( cec_logical_address  iLogicalAddress)
pure virtual

Sends a POLL message to a device, to check if it's present and responding.

Parameters
iLogicalAddressThe device to send the message to.
Returns
True if the POLL was acked, false otherwise.

◆ GetActiveDevices()

virtual cec_logical_addresses CEC::ICECAdapter::GetActiveDevices ( void  )
pure virtual
Returns
The logical addresses of the devices that are active on the bus, including those handled by libCEC.

◆ IsActiveDevice()

virtual bool CEC::ICECAdapter::IsActiveDevice ( cec_logical_address  iLogicalAddress)
pure virtual

Check whether a device is active on the bus.

Parameters
iLogicalAddressThe address to check.
Returns
True when active, false otherwise.

◆ IsActiveDeviceType()

virtual bool CEC::ICECAdapter::IsActiveDeviceType ( cec_device_type  type)
pure virtual

Check whether a device of the given type is active on the bus.

Parameters
typeThe type to check.
Returns
True when active, false otherwise.

◆ VolumeUp()

virtual uint8_t CEC::ICECAdapter::VolumeUp ( bool  bSendRelease = true)
pure virtual

Sends a volume up keypress to an audiosystem if it's present.

Parameters
bSendReleaseSend a key release after the keypress.
Returns
The new audio status.

◆ VolumeDown()

virtual uint8_t CEC::ICECAdapter::VolumeDown ( bool  bSendRelease = true)
pure virtual

Sends a volume down keypress to an audiosystem if it's present.

Parameters
bSendReleaseSend a key release after the keypress.
Returns
The new audio status.

◆ MuteAudio()

virtual uint8_t CEC::ICECAdapter::MuteAudio ( void  )
pure virtual

Toggles the mute status of an audiosystem, if it's present.

Returns
The new audio status.

◆ SendKeypress()

virtual bool CEC::ICECAdapter::SendKeypress ( cec_logical_address  iDestination,
cec_user_control_code  key,
bool  bWait = false 
)
pure virtual

Send a keypress to a device on the CEC bus.

Parameters
iDestinationThe logical address of the device to send the message to.
keyThe key to send.
bWaitTrue to wait for a response, false otherwise.
Returns
True when the keypress was acked, false otherwise.

◆ SendKeyRelease()

virtual bool CEC::ICECAdapter::SendKeyRelease ( cec_logical_address  iDestination,
bool  bWait = false 
)
pure virtual

Send a key release to a device on the CEC bus.

Parameters
iDestinationThe logical address of the device to send the message to.
bWaitTrue to wait for a response, false otherwise.
Returns
True when the key release was acked, false otherwise.

◆ GetDeviceOSDName()

virtual std::string CEC::ICECAdapter::GetDeviceOSDName ( cec_logical_address  iAddress)
pure virtual

Get the OSD name of a device on the CEC bus.

Parameters
iLogicalAddressThe device to get the OSD name for.
Returns
The requested OSD name, or an empty string if unknown

◆ GetActiveSource()

virtual cec_logical_address CEC::ICECAdapter::GetActiveSource ( void  )
pure virtual

Get the logical address of the device that is currently the active source on the CEC bus.

Returns
The active source or CECDEVICE_UNKNOWN when unknown.

◆ IsActiveSource()

virtual bool CEC::ICECAdapter::IsActiveSource ( cec_logical_address  iLogicalAddress)
pure virtual

Check whether a device is currently the active source on the CEC bus.

Parameters
iLogicalAddressThe logical address of the device to check.
Returns
True when it is the active source, false otherwise.

◆ SetStreamPath() [1/2]

virtual bool CEC::ICECAdapter::SetStreamPath ( cec_logical_address  iLogicalAddress)
pure virtual

Sets the stream path to the device on the given logical address.

Parameters
iLogicalAddressThe address to activate.
Returns
True when the command was sent, false otherwise.

◆ SetStreamPath() [2/2]

virtual bool CEC::ICECAdapter::SetStreamPath ( uint16_t  iPhysicalAddress)
pure virtual

Sets the stream path to the device on the given physical address.

Parameters
iPhysicalAddressThe address to activate.
Returns
True when the command was sent, false otherwise.

◆ GetLogicalAddresses()

virtual cec_logical_addresses CEC::ICECAdapter::GetLogicalAddresses ( void  )
pure virtual
Returns
The list of logical addresses that libCEC is controlling

◆ GetCurrentConfiguration()

virtual bool CEC::ICECAdapter::GetCurrentConfiguration ( libcec_configuration configuration)
pure virtual

Get libCEC's current configuration.

Parameters
configurationThe configuration.
Returns
True when the configuration was updated, false otherwise.

◆ SetConfiguration()

virtual bool CEC::ICECAdapter::SetConfiguration ( const libcec_configuration configuration)
pure virtual

Change libCEC's configuration.

Store it updated settings in the eeprom of the device (if supported)

Parameters
configurationThe new configuration.
Returns
True when the configuration was changed successfully, false otherwise.

◆ CanSaveConfiguration()

virtual bool CEC::ICECAdapter::CanSaveConfiguration ( void  )
pure virtual
Returns
True if this CEC adapter can save the user configuration, false otherwise.

◆ RescanActiveDevices()

virtual void CEC::ICECAdapter::RescanActiveDevices ( void  )
pure virtual

Tell libCEC to poll for active devices on the bus.

◆ IsLibCECActiveSource()

virtual bool CEC::ICECAdapter::IsLibCECActiveSource ( void  )
pure virtual
Returns
true when libCEC is the active source on the bus, false otherwise.

◆ GetDeviceInformation()

virtual bool CEC::ICECAdapter::GetDeviceInformation ( const char *  strPort,
libcec_configuration config,
uint32_t  iTimeoutMs = 10000 
)
pure virtual

Get information about the given CEC adapter.

Parameters
strPortThe port to which the device is connected
configThe device configuration
iTimeoutMsThe timeout in milliseconds
Returns
True when the device was found, false otherwise

◆ SetCallbacks()

virtual bool CEC::ICECAdapter::SetCallbacks ( ICECCallbacks callbacks,
void *  cbParam 
)
pure virtual

Set and enable the callback methods.

Parameters
callbacksThe callbacks to set.
cbParamParameter to pass to callback methods.
Returns
True if enabled, false otherwise.

◆ DisableCallbacks()

virtual bool CEC::ICECAdapter::DisableCallbacks ( void  )
pure virtual

Disable all callbacks.

Returns
True if disabled, false otherwise.

◆ SetHDMIPort()

virtual bool CEC::ICECAdapter::SetHDMIPort ( cec_logical_address  iBaseDevice,
uint8_t  iPort 
)
pure virtual

Changes the active HDMI port.

Parameters
iBaseDeviceThe device to which this libCEC is connected.
iPortThe new port number.
Returns
True when changed, false otherwise.

◆ GetDevicePhysicalAddress()

virtual uint16_t CEC::ICECAdapter::GetDevicePhysicalAddress ( cec_logical_address  iLogicalAddress)
pure virtual

Get the physical address of the device with the given logical address.

Parameters
iLogicalAddressThe logical address of the device to get the physical address for.
Returns
The physical address or 0 if it wasn't found.

◆ GetLibInfo()

virtual const char * CEC::ICECAdapter::GetLibInfo ( void  )
pure virtual
Returns
A string with information about how libCEC was compiled.

◆ InitVideoStandalone()

virtual void CEC::ICECAdapter::InitVideoStandalone ( void  )
pure virtual

Calling this method will initialise the host on which libCEC is running.

Calling this method will initialise the host on which libCEC is running. On the RPi, it calls bcm_host_init(), which may only be called once per process, and is called by any process using the video api on that system. So only call this method if libCEC is used in an application that does not already initialise the video api.

Should be called as first call to libCEC, directly after CECInitialise() and before using Open()

◆ GetAdapterVendorId()

virtual uint16_t CEC::ICECAdapter::GetAdapterVendorId ( void  ) const
pure virtual
Returns
The (virtual) USB vendor id

◆ GetAdapterProductId()

virtual uint16_t CEC::ICECAdapter::GetAdapterProductId ( void  ) const
pure virtual
Returns
The (virtual) USB product id

◆ ToString() [1/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_menu_state  state)
pure virtual

◆ ToString() [2/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_version  version)
pure virtual

◆ ToString() [3/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_power_status  status)
pure virtual

◆ ToString() [4/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_logical_address  address)
pure virtual

◆ ToString() [5/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_deck_control_mode  mode)
pure virtual

◆ ToString() [6/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_deck_info  status)
pure virtual

◆ ToString() [7/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_opcode  opcode)
pure virtual

◆ ToString() [8/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_system_audio_status  mode)
pure virtual

◆ ToString() [9/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_audio_status  status)
pure virtual

◆ ToString() [10/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_vendor_id  vendor)
inlinevirtual

Definition at line 431 of file cec.h.

◆ ToString() [11/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_device_type  type)
pure virtual

◆ ToString() [12/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_user_control_code  key)
pure virtual

◆ ToString() [13/13]

virtual const char * CEC::ICECAdapter::ToString ( const cec_adapter_type  type)
pure virtual

◆ VersionToString()

virtual std::string CEC::ICECAdapter::VersionToString ( uint32_t  version)
pure virtual

◆ PrintVersion()

virtual void CEC::ICECAdapter::PrintVersion ( uint32_t  version,
char *  buf,
size_t  bufSize 
)
pure virtual

◆ VendorIdToString()

virtual const char * CEC::ICECAdapter::VendorIdToString ( uint32_t  vendor)
pure virtual

◆ AudioToggleMute()

virtual uint8_t CEC::ICECAdapter::AudioToggleMute ( void  )
pure virtual

Toggle the mute status of the AVR (if present)

Returns
The new audio status.

◆ AudioMute()

virtual uint8_t CEC::ICECAdapter::AudioMute ( void  )
pure virtual

Mute the AVR (if present)

Returns
The new audio status.

◆ AudioUnmute()

virtual uint8_t CEC::ICECAdapter::AudioUnmute ( void  )
pure virtual

Mute the AVR (if connected)

Returns
The new audio status.

◆ AudioStatus()

virtual uint8_t CEC::ICECAdapter::AudioStatus ( void  )
pure virtual

Get the current audio status (if an AVR is connected)

Returns
The current audio status, or cec_audio_status if unknown.

◆ DetectAdapters()

virtual int8_t CEC::ICECAdapter::DetectAdapters ( cec_adapter_descriptor deviceList,
uint8_t  iBufSize,
const char *  strDevicePath = nullptr,
bool  bQuickScan = false 
)
pure virtual

Try to find all connected CEC adapters.

Parameters
deviceListThe vector to store device descriptors in.
iBufSizeThe size of the deviceList buffer.
strDevicePathOptional device path. Only adds device descriptors that match the given device path.
bQuickScanTrue to do a "quick scan", which will not open a connection to the adapter. Firmware version information and the exact device type will be missing
Returns
The number of devices that were found, or -1 when an error occurred.

◆ CommandFromString()

virtual cec_command CEC::ICECAdapter::CommandFromString ( const char *  strCommand)
pure virtual

Create a new cec_command from a string.

Parameters
strCommandThe string with the command data
Returns
The command

◆ AudioEnable()

virtual bool CEC::ICECAdapter::AudioEnable ( bool  enable)
pure virtual

Enable or disable system audio mode.

Parameters
enableTrue to enable, false to disable
Returns
True if the command was sent, false otherwise

◆ SystemAudioModeStatus()

virtual uint8_t CEC::ICECAdapter::SystemAudioModeStatus ( void  )
pure virtual

Get the current system audio mode status (if an AVR is connected)

Returns
The current system audio mode status, or -1 if unknown

◆ GetStats()

virtual bool CEC::ICECAdapter::GetStats ( struct cec_adapter_stats stats)
pure virtual

The documentation for this class was generated from the following file: