1.4.3.15 PAL_PLC_DataIndication Typedef
C
typedef void (*PAL_PLC_DataIndication)(uint8_t *pData, uint16_t length);
Summary
Pointer to a PLC PAL Data Indication event handler function.
Description
This data type defines the required function signature for the PLC PAL reception data indication event handling callback function. When PAL_PLC_Initialize is called, a client must register a pointer whose function signature (parameter and return value types) matches the types specified by this function pointer in order to receive transfer related event calls back from the PLC PAL.
The parameters and return values are described here and a partial example implementation is provided.
Parameters
Param | Description |
---|---|
pData | Pointer to the data buffer containing received data. |
length | Length of the received data in bytes. |
Returns
None.
Example
static void _plcDataIndication(uint8_t *pData, uint16_t length)
{
// Reception handling here.
}
PAL_PLC_INIT palPlcInitData;
SYS_MODULE_OBJ palPlcObj;
palPlcInitData.macRtBand = G3_FCC;
palPlcInitData.macRtHandlers.palPlcDataIndication = _plcDataIndication;
palPlcInitData.macRtHandlers.palPlcTxConfirm = _plcTxConfirm;
palPlcInitData.macRtHandlers.palPlcCommStatusIndication = _plcCommStatusIndication;
palPlcInitData.macRtHandlers.palPlcRxParamsIndication = _plcRxParamsIndication;
palPlcInitData.initMIB = true;
// Initialize the PLC PAL module
palPlcObj = PAL_PLC_Initialize(PAL_PLC_PHY_INDEX, (const SYS_MODULE_INIT *) &palPlcInitData);
Remarks
None.