How to use built-in ZCL handlers e.g. zcl_time_client

In the xbee programmable sdk there are a couple of good examples on how to do things like handle custom clusters. The thing I still don’t really understand is how to then take advantage of the ZCL library to parse and handle messages.

I’ll give a concrete example. The ZCL library has a Time Cluster with methods to process time messages. It appears that the entry point is:

zcl_time_client (const wpan_envelope_t FAR *envelope, void FAR *context)]/code]

What I'm not clear on is how I'm supposed to use this.  Am I supposed to create a custom endpoint handler, recognize which messages are in the time cluster (what profile? what endpoint?) and if I see one pass them to zcl_time_client?

OR ... does that all happen automatically for me?

Try querying the active end point from the module. that should then allow you to see if the one you want is enabled at the module or if you need to implement it in your device.