... | @@ -41,17 +41,17 @@ This use case has a REST API for the publication (sending) of the data by the co |
... | @@ -41,17 +41,17 @@ This use case has a REST API for the publication (sending) of the data by the co |
|
|
|
|
|
## ~~Subscription~~
|
|
## ~~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:
|
|
~~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.
|
|
**~~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.
|
|
~~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:
|
|
~~Subscription to the service of this use case must be through the topic:~~
|
|
|
|
|
|
> usecase12/events
|
|
> ~~usecase12/events~~
|
|
|
|
|
|
In the topic, the events are published in JSON format. Here you can see an example:
|
|
~~In the topic, the events are published in JSON format. Here you can see an example:~~
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
... | @@ -70,35 +70,35 @@ In the topic, the events are published in JSON format. Here you can see an examp |
... | @@ -70,35 +70,35 @@ In the topic, the events are published in JSON format. Here you can see an examp |
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
- actionId (text): unique identifier of the event
|
|
- ~~actionId (text): unique identifier of the event~~
|
|
|
|
|
|
- beaconId (text): unique identifier of the beacon (for example, the MAC)
|
|
- ~~beaconId (text): unique identifier of the beacon (for example, the MAC)~~
|
|
|
|
|
|
- beaconTypeId (integer number): beacon type identifier. 1 = Start, 2 = End, 3 = Intermediate, 4 = Unique
|
|
- ~~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
|
|
- ~~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
|
|
- ~~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
|
|
- ~~lat (decimal number): latitude in WGS 84 coordinate system where the event was generated~~
|
|
|
|
|
|
- vehicleTypeId (integer number): vehicle type identifier. 0 = None, 1 = Car, 2 = Motorbike
|
|
- ~~vehicleTypeId (integer number): vehicle type identifier. 0 = None, 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
|
|
- ~~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, 3 = Infrastructure
|
|
- ~~deviceUseTypeId (integer number): identifier of the type of use of the device that sends the information. 1 = Worker, 2 = Vehicle, 3 = Infrastructure~~
|
|
|
|
|
|
- speed (integer number): speed measured in kilometers per hour at which the element is at the moment it sends the event
|
|
- ~~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](https://www.ine.es/daco/daco42/codmun/cod_provincia_estandar.htm)
|
|
- ~~provinceId (integer number): identifier of the province where the event is generated according to the [INE](https://www.ine.es/daco/daco42/codmun/cod_provincia_estandar.htm)~~
|
|
|
|
|
|
- road (integer number): official name of the road where the event is generated
|
|
- ~~road (integer number): official name of the road where the event is generated~~
|
|
|
|
|
|
- pk (integer number): kilometer point 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
|
|
- ~~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](https://gitlab.cs.cmobility30.es/dgt3.0_eng/general/-/wikis/MQTT).
|
|
~~See more information and a connection example [here](https://gitlab.cs.cmobility30.es/dgt3.0_eng/general/-/wikis/MQTT).~~
|
|
|
|
|
|
## Errors
|
|
## Errors
|
|
|
|
|
... | | ... | |