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

ParamDescription
SrcAddrSpecPointer to source address specification
DstAddrSpecPointer to destination address specification
msduLengthNumber of octets contained in MSDU
msduPointer to MSDU
mpduLinkQualityLQI measured during reception of the MPDU
DSNThe DSN of the received data frame
TimestampThe time, in symbols, at which the data were received, this parameter is only available if timestamping is enabled via compile switch ENABLE_TSTAMP
SecurityLevelUsed security level; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP
KeyIdModeUsed mode to identify the key; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP
KeyIndexUsed 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.