X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=048182985923f58af7ce76c3764fe6603c02c06f;hb=57f45e6c93ae094071e8a2f3f3786d4f26265a1d;hp=8efffedc4165c47fa01c7d57a747a76cdad765ad;hpb=e6e63f5d844124caa7bb47f2ac96e9cbc66ee1fc;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 8efffed..0481829 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -230,6 +230,9 @@ void show_console_help(void) "pow {addr} get the power status of the specified device." << endl << "[pow 0] get the power status of the TV" << endl << endl << + "poll {addr} poll the specified device." << endl << + "[poll 0] sends a poll message to the TV" << endl << + endl << "[mon] {1|0} enable or disable CEC bus monitoring." << endl << "[log] {1 - 31} change the log level. see cectypes.h for values." << endl << "[ping] send a ping command to the CEC adapter." << endl << @@ -451,6 +454,22 @@ int main (int argc, char *argv[]) cout << "invalid destination" << endl; } } + else if (command == "poll") + { + string strValue; + uint8_t iValue = 0; + if (GetWord(input, strValue) && HexStrToInt(strValue, iValue) && iValue <= 0xF) + { + if (parser->PollDevice((cec_logical_address) iValue)) + cout << "POLL message sent" << endl; + else + cout << "POLL message not sent" << endl; + } + else + { + cout << "invalid destination" << endl; + } + } else if (command == "la") { string strvalue;