This event is implemented at [C] devices. It is called when a DPA Request packet was received from the network. If the event handler returns TRUE, then further standard DPA Request processing (passing DPA Request to the interface master internally by DpaApiSendToIFaceMaster) is skipped. The event is raised even when HWPID does not match. At this time, system variables RTTSLOT and RTHOPS have valid numbers corresponding to the received DPA Response.
Example
case DpaEvent_ReceiveDpaResponse:
{
// This example just for demonstration purposes consumes any
// DPA Request CMD_LED_PULSE at peripheral PNUM_LEDG and pulses LEDR locally
if ( _PNUM == PNUM_LEDG && _PCMD == ( CMD_LED_PULSE | RESPONSE_FLAG ) )
{
pulseLEDR();
return TRUE;
}
return FALSE;
}
☼ See example code CustomDpaHandler-Coordinator-PollNodes.c for more details.