Receiving and sending messages
NAP uses 3.4 version of DATEX II protocol. 2 operating modes have been implemented:
- Push on Occurrence – in this mode NAP sends messages after changes in difficulties to the given address
- Client Pull – in this mode the client can download the whole content of current difficulties set.
In both modes, the call proceeds with the WebService protocol. Use of Push on Occurence is the preferred mode of operation. Client Pull mode is intended for use after the registration, after a longer pause in the work of receiving software or in the case of recovering the work after failure.
Receiving information – Push Occurence
NAP attempts sending a message about difficulties immediately after receiving information about it. Every occurrence of a new difficulty will result in NAP attempt to contact registered data recipients.
Downloading all available information – Client Snapshot Pull
Data recipient can download all information about difficulties by means of one call. The use of this method involves some restrictions.
Additional method of situations data downloading is "D2Light" mode. Data Recipient can download all information about difficulties.
D2Light interface implementation was made according to https://docs.datex2.eu/downloads/d2light.html. JSON Schema of the response matches JSON Situation Publication Schema Definition mapping.
EXEMPLARY CLIENT WEBSERVICE
Files to download with exemplary clients can be found below:
Download exemplary client.Net and C#