2.3.30 PHY_IsFramePendingFromNextLayer Function

C

bool PHY_IsFramePendingFromNextLayer(PHY_Addr_t *addr, uint8_t *addrMode)

Summary

Function to check whether Any frame is pending from higher layer upon reception of Datarequest command frame (Ex: MAC/APP).

Description

Function to check whether Any frame is pending from higher layer upon reception of Datarequest command frame (Ex: MAC/APP) so that the automatic acknowledgement frame will have proper FramePending bit status

Precondition

PHY_Init() should have been called before calling this function.

Parameters

ParamDescription
addrSource Address of the Datarequest (Either Short/Long) frame received
addrModeEither FCF_SHORT_ADDR or FCF_LONG_ADDR

Returns

true - If Frame is pending for the RFD false - Otherwise

Example

bool PHY_IsFramePendingFromNextLayer(PHY_Addr_t *addr, uint8_t *addrMode)
{
     bool isFramePending = true;
     return isFramePending;
}  

Remarks

This function is invloked by phy layer on the reception of Datarequest frame in ISR context. The higher layer has to implement this function approprietely to set the framepending bit in Acknoewledgement frame. This function is weak by default with FramePending bit set to true.