how do i know which address is selected when i use the funtion send_reliable_message() in the example? speciflicly in the section where is simple_on_off_client_set() funtion.
how do i know which address is selected when i use the funtion send_reliable_message() in the example? speciflicly in the section where is simple_on_off_client_set() funtion.
Hi davidesteban13, what you can do is search all of the instances that the send_reliable_message() function is called. It is called in the simple_on_off_client_set() & in the simple_on_off_client_get() functions. The simple_on_off_client_set function is called once in the button_event_handler() function in main.c. This is when you press one of the buttons to only turn one LED on or off. Therefore, it makes sense that this requires a unicast address, as the client only wants to talk to the relevant server in this example.
The publication address of m_clients[GROUP_CLIENT_INDEX] is 0xCAFE, which is the group address that the servers are subscribed to. For m_clients[button_number], the publication address is set to the unicast address.
Hi davidesteban13, what you can do is search all of the instances that the send_reliable_message() function is called. It is called in the simple_on_off_client_set() & in the simple_on_off_client_get() functions. The simple_on_off_client_set function is called once in the button_event_handler() function in main.c. This is when you press one of the buttons to only turn one LED on or off. Therefore, it makes sense that this requires a unicast address, as the client only wants to talk to the relevant server in this example.
The publication address of m_clients[GROUP_CLIENT_INDEX] is 0xCAFE, which is the group address that the servers are subscribed to. For m_clients[button_number], the publication address is set to the unicast address.