# Define sampleapp_endpoint 20
// Setup for the periodic message's destination address // broadcast to everyone broadcast = (afaddrmode_t) addrbroadcast; sampleapp_periodic_dstaddr.endpoint = sampleapp_endpoint; expires = 0 xFFFF; // setup for the flash Command's destination address-group 1 outcome = (afaddrmode_t) afaddrgroup; Outcome = sampleapp_endpoint; Outcome = sampleapp_flash_group; // point-to-point communication definition outcome = (afaddrmode_t) addr16bit; // VOD point_to_point_dstaddr.endpoint = sampleapp_endpoint; point_to_point_dstaddr.addr.shortaddr = 0x0000; // send it to the Coordinator
Why do we need a sampleapp_endpoint for broadcast, multicast, and on-demand broadcast in ZigBee? That is, the endpoint (called the "endpoint" on the Internet ").
It's as if you need to send a "message" over Ethernet to another computer. You only need an IP address to find the computer, this "message" only knows which computer to send, but does not know which application on the computer to receive the "message ", therefore, to identify the application that receives the message, you must add "Other recognition information ". In ZigBee, the "other recognition information" is the "endpoint". Through the endpoint, you can know which application receives the message.
Personally, in ZigBee, the endpoint is defined by the programmer. For example, endpoint 20 indicates the application of the LEDs of all terminals, and Endpoint 21 indicates the temperature of all terminals.
ZigBee endpoint analytical