return false;
CStdString strLog;
- strLog.Format("powering on devices with logical address %d", (int8_t)address);
+ strLog.Format("<< powering on device with logical address %d", (int8_t)address);
m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
cec_frame frame;
frame.clear();
return false;
CStdString strLog;
- strLog.Format("putting all devices with logical address %d in standby mode", (int8_t)address);
+ strLog.Format("<< putting device with logical address %d in standby mode", (int8_t)address);
m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
cec_frame frame;
frame.clear();
if (!IsRunning())
return false;
- m_controller->AddLog(CEC_LOG_DEBUG, "setting active view");
+ m_controller->AddLog(CEC_LOG_DEBUG, "<< setting active view");
cec_frame frame;
frame.clear();
if (!IsRunning())
return false;
- m_controller->AddLog(CEC_LOG_DEBUG, "setting inactive view");
+ m_controller->AddLog(CEC_LOG_DEBUG, "<< setting inactive view");
cec_frame frame;
frame.clear();
bool CCECProcessor::SetLogicalAddress(cec_logical_address iLogicalAddress)
{
CStdString strLog;
- strLog.Format("setting logical address to %d", iLogicalAddress);
+ strLog.Format("<< setting logical address to %d", iLogicalAddress);
m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
m_iLogicalAddress = iLogicalAddress;
cec_frame frame;
frame.clear();
- m_controller->AddLog(CEC_LOG_NOTICE, "reporting CEC version as 1.3a");
+ m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting CEC version as 1.3a");
frame.push_back(GetSourceDestination(address));
frame.push_back((uint8_t) CEC_OPCODE_CEC_VERSION);
frame.push_back((uint8_t) CEC_VERSION_1_3A);
frame.clear();
if (bOn)
- m_controller->AddLog(CEC_LOG_NOTICE, "reporting \"On\" power status");
+ m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting \"On\" power status");
else
- m_controller->AddLog(CEC_LOG_NOTICE, "reporting \"Off\" power status");
+ m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting \"Off\" power status");
frame.push_back(GetSourceDestination(address));
frame.push_back((uint8_t) CEC_OPCODE_REPORT_POWER_STATUS);
frame.clear();
if (bActive)
- m_controller->AddLog(CEC_LOG_NOTICE, "reporting menu state as active");
+ m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting menu state as active");
else
- m_controller->AddLog(CEC_LOG_NOTICE, "reporting menu state as inactive");
+ m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting menu state as inactive");
frame.push_back(GetSourceDestination(address));
frame.push_back((uint8_t) CEC_OPCODE_MENU_STATUS);
void CCECProcessor::ReportVendorID(cec_logical_address address /* = CECDEVICE_TV */)
{
- m_controller->AddLog(CEC_LOG_NOTICE, "vendor ID requested, feature abort");
+ m_controller->AddLog(CEC_LOG_NOTICE, "<< vendor ID requested, feature abort");
TransmitAbort(address, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID);
}
const char *osdname = m_strDeviceName.c_str();
CStdString strLog;
- strLog.Format("reporting OSD name as %s", osdname);
+ strLog.Format("<< reporting OSD name as %s", osdname);
m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
frame.push_back(GetSourceDestination(address));
frame.push_back((uint8_t) CEC_OPCODE_SET_OSD_NAME);
frame.clear();
CStdString strLog;
- strLog.Format("reporting physical address as %04x", m_physicaladdress);
+ strLog.Format("<< reporting physical address as %04x", m_physicaladdress);
m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
frame.push_back(GetSourceDestination(CECDEVICE_BROADCAST));
frame.push_back((uint8_t) CEC_OPCODE_REPORT_PHYSICAL_ADDRESS);
uint8_t destination = frame.data[0] & 0xF;
CStdString dataStr;
- dataStr.Format("received frame: initiator: %u destination: %u", initiator, destination);
+ dataStr.Format(">> received frame: initiator: %u destination: %u", initiator, destination);
if (frame.size > 1)
{
CStdString strLog;
if (opCode == CEC_OPCODE_REQUEST_ACTIVE_SOURCE)
{
- strLog.Format("%i requests active source", initiator);
+ strLog.Format(">> %i requests active source", initiator);
m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
BroadcastActiveSource();
}
if (frame.size >= 4)
{
int streamaddr = ((int)frame.data[2] << 8) | ((int)frame.data[3]);
- strLog.Format("%i requests stream path from physical address %04x", initiator, streamaddr);
+ strLog.Format(">> %i requests stream path from physical address %04x", initiator, streamaddr);
m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
if (streamaddr == m_physicaladdress)
BroadcastActiveSource();
"tx {bytes} transfer bytes over the CEC line." << endl <<
"[tx 40 00 FF 11 22 33] sends bytes 0x40 0x00 0xFF 0x11 0x22 0x33" << endl <<
endl <<
+ "on {address} power on the device with the given logical address." << endl <<
+ "[on 5] power on a connected audio system" << endl <<
+ endl <<
+ "standby {address} put the device with the given address in standby mode." << endl <<
+ "[standby 0] powers off the TV" << endl <<
+ endl <<
"la {logical_address} change the logical address of the CEC adapter." << endl <<
"[la 4] logical address 4" << endl <<
endl <<
"[ping] send a ping command to the CEC adapter." << endl <<
- "[bl] to let the adapter enter the bootloader, to upgrade the flash rom." << endl <<
+ "[bl] to let the adapter enter the bootloader, to upgrade" << endl <<
+ " the flash rom." << endl <<
+ "[r] reconnect to the CEC adapter." << endl <<
"[h] or [help] show this help." << endl <<
- "[q] or [quit] to quit the CEC test client and switch off all connected CEC devices." << endl <<
+ "[q] or [quit] to quit the CEC test client and switch off all" << endl <<
+ " connected CEC devices." << endl <<
"================================================================================" << endl;
}
parser->Transmit(bytes);
}
+ else if (command == "on")
+ {
+ string strValue;
+ uint8_t iValue = 0;
+ if (GetWord(input, strValue) && HexStrToInt(strValue, iValue) && iValue <= 0xF)
+ {
+ parser->PowerOnDevices((cec_logical_address) iValue);
+ }
+ else
+ {
+ cout << "invalid destination" << endl;
+ }
+ }
+ else if (command == "standby")
+ {
+ string strValue;
+ uint8_t iValue = 0;
+ if (GetWord(input, strValue) && HexStrToInt(strValue, iValue) && iValue <= 0xF)
+ {
+ parser->StandbyDevices((cec_logical_address) iValue);
+ }
+ else
+ {
+ cout << "invalid destination" << endl;
+ }
+ }
else if (command == "la")
{
string strvalue;