Use Case 12 is dedicated to information related to the protection in real time of workers who carry out conservation actions on the roads.
Receipt and publication of data related to the real-time positioning of:
-
Maintenance workers
-
Construction and maintenance vehicles found on the tracks
This information can be sent to the DGT 3.0 platform either by IoT devices or by Apps that can be used to position these elements on the road.
The platform has two different functionalities for the publication (sending) and for the subscription (reception) of information. The first is through a REST API and the second through a real-time MQTT service.
Both the publication and subscription functionality require different access certificates that must be requested and supplied by DGT 3.0. If these certificates have not already been requested, they should be requested from soporte@cmobility30.es.
Below are the URLs with which each functionality is accessed:
Mode | URL | Description |
---|---|---|
Publication | https://use-case-12-dev.cmobility30.es:8443 | Current endpoint of the development environment that will be disabled as of July 26 |
Publication | https://pre.cmobility30.es/use-case-12 | Client integration environment endpoint for publishing |
Subscription | mqtt://mqtt.pre.cmobility30.es:8883 | Integration environment endpoint for subscription |
The two functionalities are described below.
Publication
This use case has a REST API for the publication (sending) of the data by the companies that request it. Details of this can be found in the following sections:
- General details for making a request:
- The details of the master tables and data that can compose the event:
- The structure of the event can be seen here:
Subscription
This use case also has a subscription service (reception) to the data for the companies that request it through the MQTT protocol. Below you can find the details of this:
MQTT (MQ Telemetry Transport) is a messaging protocol used as a simple and lightweight method to transfer data to / from low-power devices.
The protocol supports a single messaging pattern, the Publish-Subscribe pattern: each message is published on a topic that must be subscribed to in order to receive the information.
Subscription to the service of this use case must be through the topic:
usecase12/events
In the topic, the events are published in JSON format. Here you can see an example:
{
"beaconTypeId": 1,
"timestamp": "2021-06-02T13:34:56.747Z",
"lon": -4.304818,
"lat": 41.312456,
"eventTypeId": 1,
"speed": 85,
"provinceId": 40,
"road": "A-601",
"pk": 64.73,
"direction": "UP"
}
-
beaconTypeId (integer number): beacon type identifier. 1 = Start, 2 = End, 3 = Intermediate, 4 = Unique
-
timestamp (UTC time): date and time in UTC format of when the event was generated. It must be a maximum of 30 seconds old with respect to UTC time. The date must end with the character 'Z' that marks that it is in UTC
-
lon (decimal number): longitude in WGS 84 coordinate system where the event was generated
-
lat (decimal number): latitude in WGS 84 coordinate system where the event was generated
-
vehicleTypeId (integer number): vehicle type identifier. 1 = Car, 2 = Motorbike
-
deviceTypeId (integer number): identifier of the type of device from which the information is sent. 1 = Baliza, 2 = Chaleco, 3 = Cono
-
deviceUseTypeId (integer number): identifier of the type of use of the device that sends the information. 1 = Worker, 2 = Vehicle
-
speed (integer number): speed measured in kilometers per hour at which the element is at the moment it sends the event
-
provinceId (integer number): identifier of the province where the event is generated according to the INE
-
road (integer number): official name of the road where the event is generated
-
pk (integer number): kilometer point where the event is generated
-
direction (String): direction of the road where the event is generated. UP = Upward direction, DOWN = Downward direction, UNKNOWN = Unknown
See more information and a connection example here.
Note: The information that is being published in the development environment is a simulation with non-real information that changes throughout the day, so that the consumer interface can be tested.