Closed geertw closed 9 years ago
Injections will use a new format (using English keys instead of Dutch) and will be in JSON format instead of pyobj. The format will be like this example service:
{
"company": "NS",
"departure": "2015-05-15T00:29:00+02:00",
"destination_code": "rhn",
"destination_text": "Rhenen",
"do_not_board": false,
"platform": null,
"service_date": "2015-05-14",
"service_id": "33382",
"service_number": "0",
"stop_code": "mrn",
"transmode_code": "NSB",
"transmode_text": "Stopbus i.p.v. trein",
"via": [
[
"vndw",
"Veenendaal West"
],
[
"vndc",
"Veenendaal Centrum"
]
]
}
Do not board and other attributes are not processed yet. All other fields are implemented in the injection
module.
Main points that need to be addressed:
Format is now:
{
"company": "DB",
"departure": "2015-05-17T00:47:00+02:00",
"destination_code": "es",
"destination_text": "Enschede",
"do_not_board": false,
"platform": null,
"service_date": "2015-05-16",
"service_id": "42279",
"service_number": "20218",
"stop_code": "emte",
"stops": [
[
"eop",
"Ochtrup"
],
[
"g",
"Gronau Westf"
],
[
"gbr",
"Glanerbrug"
],
[
"ese",
"Enschede De Eschmarke"
],
[
"es",
"Enschede"
]
],
"transmode_code": "ST",
"transmode_text": "stoptrein",
"via": [
[
"eop",
"Ochtrup"
],
[
"g",
"Gronau Westf"
],
[
"gbr",
"Glanerbrug"
]
]
}
Missing: implementation of do-not-board, cancelled stops and other attributes.
The rdt-infoplus-dvs application allows to inject services that are not available in the NS InfoPlus data source. This feature is mainly to inject rail replacement bus services and some international train services.
These services are available in rdt-serviceinfo. Rdt-serviceinfo should have an injection feature, allowing to inject selected services into a rdt-infoplus-dvs instance.
The injection is performed using zeromq, and uses (for now) pyobj to send dictionaries for each injected service.
The dictionary currently accepted by rdt-infoplus-dvs contains:
When needed, this list may be extended, translated or changed otherwise, but at the same time, those changes must be made in rdt-infoplus-dvs too.