cec: fixed setting the ackmask. deprecated SetAckMask()/cec_set_ack_mask(). use SetLo...
[deb_libcec.git] / src / testclient / main.cpp
index 1aa790b250735397904d1fda89d67f0a52d5b493..bfbec5e7aada7061c2d370c99cf72135d38e5faf 100644 (file)
@@ -42,7 +42,7 @@
 using namespace CEC;
 using namespace std;
 
-#define CEC_TEST_CLIENT_VERSION 1
+#define CEC_TEST_CLIENT_VERSION 2
 
 void flush_log(ICECDevice *cecParser)
 {
@@ -105,7 +105,7 @@ void show_help(const char* strExec)
 
 int main (int argc, char *argv[])
 {
-  ICECDevice *parser = LoadLibCec("CEC Test Client");
+  ICECDevice *parser = LoadLibCec("CEC Tester");
   if (!parser && parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION)
   {
     cout << "Unable to create parser. Is libcec.dll present?" << endl;
@@ -203,10 +203,18 @@ int main (int argc, char *argv[])
         {
           string strvalue;
           int    ackmask;
-          vector<uint8_t> bytes;
           if (GetWord(input, strvalue) && HexStrToInt(strvalue, ackmask))
           {
-            parser->SetAckMask((cec_logical_address) ackmask);
+            parser->SetAckMask(ackmask);
+          }
+        }
+        else if (command == "la")
+        {
+          string strvalue;
+          int    iLogicalAddress;
+          if (GetWord(input, strvalue))
+          {
+            parser->SetLogicalAddress((cec_logical_address) atoi(strvalue.c_str()));
           }
         }
         else if (command == "ping")