PreviousNext
Coordinator
Help > Custom DPA Handler > Events Flow > Coordinator

The pseudo-code applies to the [C] device. For details of the device startup please see a dedicated chapter.

 

if IO Setup enabled

    Run IO Setup

 

DPA Service Mode

[Reset]

[Init]

 

Send Reset response to Interface

loop

    if DPA Request packet received from Interface

        if [IFaceReceive]

            Return ERROR_IFACE_CUSTOM_HANDLER to Interface

        else

            if [C] is addressed

                if not [ReceiveDpaRequest]

                    if embedded peripheral

                        Execute embedded DPA peripheral Request

                    else

                        [Handle Peripheral Request]

                    [BeforeSendingDpaResponse]

                Send DPA Response to Interface

                [Notification]

                Execute optional [sync] part of request

                [AfterRouting]

            else

                Wait for the previous routing timeout to finish

                Send DPA Confirmation to Interface

                Transmit DPA Request packet to the network

                Set routing timeout to the real [C]>[N] plus optimistic [N]>[C] routing

 

    if packet (typically DPA Response) received from the network

        if not system packet

            if not peer to peer packet

                if not same DPA packet already received last time

                    if not [ReceiveDpaResponse]

                        Set routing timeout to remaining [N]>[C] routing

                        if [C] addressed

                            if not [ReceiveDpaRequest]

                                if embedded peripheral

                                    Execute embedded DPA peripheral Request

                                else

                                    [Handle Peripheral Request]

                                [BeforeSendingDpaResponse]

                            [Notification]

                            Execute optional [sync] part of the DPA Request

                            [AfterRouting]

                        else

                            Send received packet to Interface

            else

                if peer to peer packet enabled

                    [PeerToPeer]

    else

        [Idle]

endloop