m_iLastCommandSent(0),
m_iLastActive(0),
m_cecVersion(CEC_VERSION_UNKNOWN),
- m_deviceStatus(CEC_DEVICE_STATUS_UNKNOWN)
+ m_deviceStatus(CEC_DEVICE_STATUS_UNKNOWN),
+ m_iTransmitTimeout(1000)
{
m_handler = new CCECCommandHandler(this);
AddLog(CEC_LOG_DEBUG, strLog.c_str());
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_IMAGE_VIEW_ON);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_IMAGE_VIEW_ON, m_iTransmitTimeout);
if (m_processor->Transmit(command))
{
{
AddLog(CEC_LOG_DEBUG, strLog.c_str());
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_STANDBY);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_STANDBY, m_iTransmitTimeout);
return m_processor->Transmit(command);
}
strLog.Format("<< requesting CEC version of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GET_CEC_VERSION);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GET_CEC_VERSION, m_iTransmitTimeout);
CLockObject lock(&m_transmitMutex);
if (m_processor->Transmit(command))
bReturn = m_condition.Wait(&m_transmitMutex, 1000);
strLog.Format("<< requesting menu language of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GET_MENU_LANGUAGE);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GET_MENU_LANGUAGE, m_iTransmitTimeout);
CLockObject lock(&m_transmitMutex);
if (m_processor->Transmit(command))
bReturn = m_condition.Wait(&m_transmitMutex, 1000);
strLog.Format("<< requesting OSD name of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_OSD_NAME);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_OSD_NAME, m_iTransmitTimeout);
CLockObject lock(&m_transmitMutex);
if (m_processor->Transmit(command))
bReturn = m_condition.Wait(&m_transmitMutex, 1000);
strLog.Format("<< requesting physical address of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_PHYSICAL_ADDRESS);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_PHYSICAL_ADDRESS, m_iTransmitTimeout);
CLockObject lock(&m_transmitMutex);
if (m_processor->Transmit(command))
bReturn = m_condition.Wait(&m_transmitMutex, 1000);
strLog.Format("<< requesting power status of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_DEVICE_POWER_STATUS);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_DEVICE_POWER_STATUS, m_iTransmitTimeout);
CLockObject lock(&m_transmitMutex);
if (m_processor->Transmit(command))
bReturn = m_condition.Wait(&m_transmitMutex, 1000);
strLog.Format("<< requesting vendor ID of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID);
+ cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID, m_iTransmitTimeout);
CLockObject lock(&m_transmitMutex);
if (m_processor->Transmit(command))
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_ACTIVE_SOURCE);
+ cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_ACTIVE_SOURCE, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
command.parameters.PushBack((uint8_t) (m_iPhysicalAddress & 0xFF));
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_CEC_VERSION);
+ cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_CEC_VERSION, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t)m_cecVersion);
lock.Leave();
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, CECDEVICE_TV, CEC_OPCODE_INACTIVE_SOURCE);
+ cec_command::Format(command, m_iLogicalAddress, CECDEVICE_TV, CEC_OPCODE_INACTIVE_SOURCE, m_iTransmitTimeout);
command.parameters.PushBack((m_iPhysicalAddress >> 8) & 0xFF);
command.parameters.PushBack(m_iPhysicalAddress & 0xFF);
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_MENU_STATUS);
+ cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_MENU_STATUS, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t)m_menuState);
return m_processor->Transmit(command);
AddLog(CEC_LOG_NOTICE, strLog.c_str());
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_NAME);
+ cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_NAME, m_iTransmitTimeout);
for (unsigned int iPtr = 0; iPtr < m_strDeviceName.length(); iPtr++)
command.parameters.PushBack(m_strDeviceName.at(iPtr));
AddLog(CEC_LOG_NOTICE, strLog.c_str());
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_STRING);
+ cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_STRING, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t)duration);
unsigned int iLen = strlen(strMessage);
AddLog(CEC_LOG_NOTICE, strLog.c_str());
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_REPORT_PHYSICAL_ADDRESS);
+ cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_REPORT_PHYSICAL_ADDRESS, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
command.parameters.PushBack((uint8_t) (m_iPhysicalAddress & 0xFF));
command.parameters.PushBack((uint8_t) (m_type));
AddLog(CEC_LOG_NOTICE, strLog.c_str());
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_NONE);
+ cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_NONE, m_iTransmitTimeout);
command.retries = 0;
{
AddLog(CEC_LOG_NOTICE, strLog.c_str());
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_REPORT_POWER_STATUS);
+ cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_REPORT_POWER_STATUS, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t) m_powerStatus);
lock.Leave();
AddLog(CEC_LOG_NOTICE, strLog);
cec_command command;
- cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_DEVICE_VENDOR_ID);
+ cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_DEVICE_VENDOR_ID, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t) (((uint64_t)m_vendor >> 16) & 0xFF));
command.parameters.PushBack((uint8_t) (((uint64_t)m_vendor >> 8) & 0xFF));
{
CLockObject lock(&m_transmitMutex);
cec_command command;
- cec_command::Format(command, m_processor->GetLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_USER_CONTROL_PRESSED);
+ cec_command::Format(command, m_processor->GetLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_USER_CONTROL_PRESSED, m_iTransmitTimeout);
command.parameters.PushBack((uint8_t)key);
if (bWait)
{
CLockObject lock(&m_transmitMutex);
cec_command command;
- cec_command::Format(command, m_processor->GetLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_USER_CONTROL_RELEASE);
+ cec_command::Format(command, m_processor->GetLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_USER_CONTROL_RELEASE, m_iTransmitTimeout);
if (bWait)
{