Child_ID



  • If I'm waiting for a message in my sensor, I can get the message, I can checks it type, but how do I check for the incoming Child_ID from the gateway... ( or any other field in the message header)

    Thanks
    ver 2.0b

    
    void incomingMessage(const MyMessage &message) 
    {
      if (message.type==V_VAR1) 
      {
        unsigned long gwPulseCount=message.getULong();
      }
    }
    
    

  • Contest Winner

    @lafleur You can use the 'sensor' member

    void incomingMessage(const MyMessage &message) 
    {
      if (message.sensor == Child_ID && message.type==V_VAR1) 
      {
        unsigned long gwPulseCount=message.getULong();
      }
    }
    

Log in to reply
 

Suggested Topics

  • 1
  • 10
  • 5
  • 1
  • 2
  • 3

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts