What is the concept of endpoint in EmberMessageSend? I looked at the documentation at https://docs.silabs.com/connect-stack/latest/group-message but it is not clear what this is used for.
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.
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).
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?
Currently, there is no example which contains Mailbox however, the usage of this component is relatively straightforward. You can find some details in UG435.07 section 1.5.2 and in API docs under Application Framework API reference.
Additionally, you may also want to check Connect Indirect Queue which is part of the stack (Mailbox also uses Indirect Queue).
Furthermore, I forgot to mention that OTA also uses endpoint (0x0e).
Thanks for the links. I have read them but will refresh before implementing.