Please login or register.

Login with username, password and session length

Author Topic: recvaction  (Read 4095 times)

bastien

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
recvaction
« on: November 29, 2010, 11:41:09 AM »

hello I look for the function code recvation in C + +, I want to display the signals received in a listbox, I tried this drawing on a C # example found on this forum that I converted to C + +:


public: void cm15_RecvAction(System::Object^ bszAction, System::Object^ bszParm1, System::Object^ bszParm2, System::Object^ bszParm3, System::Object^ bszParm4, System::Object^ bszParm5, System::Object^ bszReserved)
       {         

          String^ cmd = Convert::ToString(bszAction);


          if (String::Compare(cmd, "recvrf",true) == 0 || String::Compare(cmd, "recvplc", true) == 0)
          {
          String^ address = Convert::ToString(bszParm1);
          String^ state = Convert::ToString(bszParm2);
          if (String::Compare(state, "on", true) == 0)
          {
          OnX10Message_OnReceived(address);
          }
          else if (String::Compare(state, "off", true) == 0)
          {
          OnX10Message_OffReceived(address);
          }
          else if (String::Compare(state, "Bright", true) == 0)
          {
          OnX10Message_BrightenReceived(address, (int)bszParm3);
          }
          else if (String::Compare(state, "Dim", true) == 0)
          {
             OnX10Message_DimReceived(address, (int)bszParm3);
          }
          }

this->listBox1->Items->AddRange(gcnew cli::array< System::Object^  >(7) {bszAction,bszParm1,bszParm2,bszParm3,bszParm4, bszParm5});

       }



but it does not work, nothing happens when I send a signal, I think that the parameters of the function is empty, could someone help me please, thank you in advance (sorry for my English)
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.