1) In the Sink example project, I saw in app_cli.c there are these lines:
/// The destination endpoint of the outgoing message
#define DATA_ENDPOINT 1
#define TX_TEST_ENDPOINT 2
and I see that cli_data() sends to DATA_ENDPOINT via EmberMessageSend.
2) In the Sensor example project the EmberMessageSend sends sensor data to endpoint=0. Is there any specific reason to use endpoint=0 in sensor and endpoint=1 in sink? Is it justa matter of convenience and we can use different endpoints in case we need to send to different "parts" of the receiving device?
I have experimented with sending to endpoint=0 from sink to sensor and it has worked too.
Thanks,
Arun
Discussion Forums
Proprietary
Answered
Answered
Hi,
You can think of "endpoints" as ports in case of TCP/IP. The purpose is to separate messages by their types.
Basically, you can use any endpoint freely - one thing to consider avoid collision, that Mailbox component uses endpoint 0x0f (although, it is just the default setting, you can reconfigure it to use other endpoint).
BR,
/sza2
Correct Answer
0
Great, that answers my question.
By the way, as I will be using Mailbox feature soon, is there any example project or code which illustrates the use of Mailboxes?