Is it possible to extract child ID from a just sent message?
-
Hi,
In my ongoing effort to ensure end to end data transmission of some more critical data, is it possible to extract / retrieve the constituent elements of a message, just sent. in the manner of an incoming message in the receive() function?
i.e. can I in a separate function, handling the "logging" of outgoing messages (to be compared to incoming echos) do something likesend(msgSPFlag.set(SPupdateFlag), true); ChildIDtoCheck = message.sensor;
My aim would be to put the sent childID's into a buffer and then loop through the childID's (in the buffer) in the receive function, and then remove them from the buffer on successful receipt of an echo, if this works, I could possibly expand this to check the actual message payload against what was sent, but that is probably unnecessary.
If that isn't possible, than I'll just have to pass the child to my function as well, but it would be nicer if I can "extract" it.
Many thanks Nigel
-
I Guess given the lack of response, that the answer is no.
I am passing the child ID to my function as a separate int.
-
@Nigel31 Hello, if you have a message variable (msgSPFlag I guess ?) then you have the child ID in it in the destination property of the message.
-
It seems you can access the child ID from the sent message by looking at the destination property. If you have the message object, you can extract the ID directly from there.
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
is this project dead?
General Discussion • 2 days ago • perfectom 2 days ago -
ESP32 with LoRa
General Discussion • 31 Jan 2023, 11:06 • dhanushmh 10 days ago -
Meet in Malmö, Summer 2016?
General Discussion • 1 Feb 2016, 15:34 • bjacobse 4 Mar 2025, 00:29 -
No merge into master in the last 5 years, should we use development?
General Discussion • 23 Sept 2024, 17:48 • kiesel 18 days ago -
Why is the output of ACS712 current measurement module unchanged?
General Discussion • 19 Jul 2021, 09:09 • Tessie T 14 days ago