1.4.3.17 PAL_PLC_RxParamsIndication Typedef

C

typedef void (*PAL_PLC_RxParamsIndication)(MAC_RT_RX_PARAMETERS_OBJ *pParameters);

Summary

Pointer to a PLC PAL event handler function to get parameters from the last received message.

Description

This data type defines the required function signature for the PLC PAL reception parameters 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

ParamDescription
pParametersPointer to the parameters of the last received message.

Returns

None.

Example

static MAC_RT_RX_PARAMETERS_OBJ rxParameters;

static void _plcRxParamsIndication(MAC_RT_RX_PARAMETERS_OBJ *pParameters)
{
    // extract all parameters from received message
    memcpy(rxParameters, pParameters, sizeof(MAC_RT_RX_PARAMETERS_OBJ));
}

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

This handler function is called before the data indication callback.