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 like

    send(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


    Log in to reply
     


  • 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.


  • Hardware Contributor

    @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.


Log in to reply
 

1 out of 4

Suggested Topics


  • Bug Reports   24 Mar 2014, 22:52

    4

  • General Discussion   2 days ago

    1

  • General Discussion   10 days ago

    5

  • General Discussion   4 Mar 2025, 00:29

    95
  • 10
  • 4

1
Online

11.5k
Users

11.1k
Topics

112.8k
Posts