2.9.3 USR_MCPS_DataInd callback Function
C
USR_MCPS_DataInd(WPAN_AddrSpec_t * SrcAddrSpec, WPAN_AddrSpec_t * DstAddrSpec,uint8_t msduLength,uint8_t * msdu, uint8_t mpduLinkQuality,uint8_t DSN, uint32_t Timestamp)
Summary
Callback function that must be implemented by application (NHLE) for MAC service MCPS-DATA.indication.
Description
This function implemented by application (NHLE) for MAC service MCPS-DATA.indication.
Precondition
WPAN_Init() should have been called before calling this function.
Parameters
| Param | Description |
|---|---|
| SrcAddrSpec | Pointer to source address specification |
| DstAddrSpec | Pointer to destination address specification |
| msduLength | Number of octets contained in MSDU |
| msdu | Pointer to MSDU |
| mpduLinkQuality | LQI measured during reception of the MPDU |
| DSN | The DSN of the received data frame |
| Timestamp | The time, in symbols, at which the data were received, this parameter is only available if timestamping is enabled via compile switch ENABLE_TSTAMP |
| SecurityLevel | Used security level; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP |
| KeyIdMode | Used mode to identify the key; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP |
| KeyIndex | Used index of the key; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP |
Returns
None.
Example
USR_MCPS_DataInd(WPAN_AddrSpec_t * SrcAddrSpec,
WPAN_AddrSpec_t * DstAddrSpec,
uint8_t msduLength,
uint8_t * msdu,
uint8_t mpduLinkQuality,
uint8_t DSN,
uint32_t Timestamp)
{
SrcAddrSpec = SrcAddrSpec;
DstAddrSpec = DstAddrSpec;
msduLength = msduLength;
msdu = msdu;
mpduLinkQuality = mpduLinkQuality;
DSN = DSN;
Timestamp = Timestamp;
}Remarks
There is weak function for this callback. User has to define own implementation for required operation on the reception of particular callback.
