How to define, if router has routed frame? Is there any event?
There are no event foo the fact of routing, but you can detect if your frame was received directly on the receiving side. In the APS_DataInd_t structure there are members srcAddrMode, srcAddress and prevHopAddr.
prevHopAddr is always a short address. srcAddress can be a long address or a short address depending on a srcAddrMode. If it is a long address, you can do a lookup and get the corresponding short address. It is guaranteed to get a result, since translation short->long would have been performed locally.
Now compare that short address to prevHopAddr. If they are equal, then frame was received directly. If they are different, then prevHopAddr indicates the last device in the chain.