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.0bvoid incomingMessage(const MyMessage &message) { if (message.type==V_VAR1) { unsigned long gwPulseCount=message.getULong(); } }
-
@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(); } }
2 out of 2
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33