+ else if (command == "lang")
+ {
+ CStdString strDev;
+ if (GetWord(input, strDev))
+ {
+ int iDev = atoi(strDev);
+ if (iDev >= 0 && iDev < 15)
+ {
+ CStdString strLog;
+ cec_menu_language language;
+ if (parser->GetDeviceMenuLanguage((cec_logical_address) iDev, &language))
+ strLog.Format("menu language '%s'", language.language);
+ else
+ strLog = "failed!";
+ cout << strLog.c_str() << endl;
+ }
+ }
+ }
+ else if (command == "ven")
+ {
+ CStdString strDev;
+ if (GetWord(input, strDev))
+ {
+ int iDev = atoi(strDev);
+ if (iDev >= 0 && iDev < 15)
+ {
+ uint64_t iVendor = parser->GetDeviceVendorId((cec_logical_address) iDev);
+ CStdString strLog;
+ strLog.Format("vendor id: %06x", iVendor);
+ cout << strLog.c_str() << endl;
+ }
+ }
+ }
+ else if (command == "ver")
+ {
+ CStdString strDev;
+ if (GetWord(input, strDev))
+ {
+ int iDev = atoi(strDev);
+ if (iDev >= 0 && iDev < 15)
+ {
+ cec_version iVersion = parser->GetDeviceCecVersion((cec_logical_address) iDev);
+ switch (iVersion)
+ {
+ case CEC_VERSION_1_2:
+ cout << "CEC version 1.2" << endl;
+ break;
+ case CEC_VERSION_1_2A:
+ cout << "CEC version 1.2a" << endl;
+ break;
+ case CEC_VERSION_1_3:
+ cout << "CEC version 1.3" << endl;
+ break;
+ case CEC_VERSION_1_3A:
+ cout << "CEC version 1.3a" << endl;
+ break;
+ default:
+ cout << "unknown CEC version" << endl;
+ break;
+ }
+ }
+ }
+ }
+ else if (command == "pow")
+ {
+ CStdString strDev;
+ if (GetWord(input, strDev))
+ {
+ int iDev = atoi(strDev);
+ if (iDev >= 0 && iDev < 15)
+ {
+ cec_power_status iPower = parser->GetDevicePowerStatus((cec_logical_address) iDev);
+ switch (iPower)
+ {
+ case CEC_POWER_STATUS_ON:
+ cout << "powered on" << endl;
+ break;
+ case CEC_POWER_STATUS_IN_TRANSITION_ON_TO_STANDBY:
+ cout << "on -> standby" << endl;
+ break;
+ case CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON:
+ cout << "standby -> on" << endl;
+ break;
+ case CEC_POWER_STATUS_STANDBY:
+ cout << "standby" << endl;
+ break;
+ default:
+ cout << "unknown power status" << endl;
+ break;
+ }
+ }
+ }
+ }