SIRI-ET 2.0

SIRI-ET is used to model the status of existing journeys and to ensure that deviations from the planned data (for the same operating day) such as cancellations, additional departures, delays, detours and changes in stops, can be published on short notice. The data should be linked to objects in the planned data through matching ids.

Structure

The root element estimatedTimetableDeliveryStructure includes a response timestamp (when the XML structure was rendered), subscriptionRef in case publish/subscribe is used for the data transfer, and exactly one EstimatedJourneyVersionFrame.

EstimatedJourneyVersionFrame contains a recorded timestamp RecordedAtTime, which is the time at which the source data was updated, along with one or more EstimatedVehicleJourney elements detailing deviations for one trip each.

The tables below list which fields are supported by Samtrafiken. Any fields or attributes not on the list are ignored.

Element

Required

Notes

Element

Required

Notes

RecordedAtTime

Required

Timestamp, e.g. 2024-11-12T14:26:37+01:00

EstimatedVehicleJourney

Required

One or more estimated vehicle journeys, see below

EstimatedVehicleJourney

Element

Required

Notes

Element

Required

Notes

FramedVehicleJourneyRef > DatedVehicleJourneyRef

Required

Reference to ServiceJourney in the static data, for example SE:022:ServiceJourney:1234567-12345.

FramedVehicleJourneyRef > DataFrameRef

Required

Trip start date in YYYY-MM-DD format. Used to match with static data

DataSource

Required

Ignored by Samtrafiken, but required by the Nordic SIRI profile.

Cancellation

Optional

True if trip is cancelled

LineRef

Required

A reference to a NeTex Line, for example SE:025:Line:9011025002800000

DirectionRef

Required

Ignored by Samtrafiken, but required by the Nordic SIRI profile. Set to 0 if not used.

isPredictionInaccurate

Optional

Optional indicator when the prediction is unreliable.

EstimatedCalls

At least two calls, estimated or recorded, should be present

The list of stops which the vehicle still has to pass on its trip.

See SIRI-ET 2.0 | RecordedCalls.RecordedCall

RecordedCalls

At least two calls, estimated or recorded, should be present

The list of stops which the vehicle has passed on its trip

See SIRI-ET 2.0 | RecordedCalls.RecordedCall

IsCompleteStopSequence

Required

Should be true, the entire trip should be included in the data

EstimatedCalls.EstimatedCall

Element

Required

Notes

Element

Required

Notes

Order

Required

The index of this call in a trip

AimedDepartureTime

Required, except for last call

The originally planned departure time

AimedArrivalTime

Required, except for first call

The originally planned arrival time

ExpectedDepartureTime

Optional, ignored on last call

The prognosis for what the actual departure time will be

ExpectedArrivalTime

Optional, ignored on first call

The prognosis for what the actual arrival time will be

StopPointRef

Required

The quay where the vehicle will call, should match with static data

DepartureStopAssignment > AimedQuayRef

Optional

The scheduled quay for departure

DepartureStopAssignment > ExpectedQuayRef

Optional

The expected quay for departure

ArrivalStopAssignment > AimedQuayRef

Optional

The scheduled quay for arrival

ArrivalStopAssignment > ExpectedQuayRef

Optional

The expected quay for arrival

DepartureStatus

Optional

If not set, onTime will be used as a default value

ArrivalStatus

Optional

If not set, onTime will be used as a default value

RecordedCalls.RecordedCall

Element

Required

Notes

Element

Required

Notes

Order

Required

The index of this call in a trip

ExpectedDepartureTime

Required, except for last call

The originally planned departure time

ExpectedArrivalTime

Required, except for first call

The originally planned arrival time

ActualDepartureTime

Optional, ignored on last call

The actual departure time

ActualArrivalTime

Optional, ignored on first call

The actual arrival time

StopPointRef

Required

The quay where the vehicle has called, should match with static data

Valid example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <estimatedTimetableDeliveryStructure xmlns:ns5="http://www.siri.org.uk/siri" xmlns:ns2="http://www.ifopt.org.uk/acsb" xmlns:ns4="http://datex2.eu/schema/2_0RC1/2_0" xmlns:ns3="http://www.ifopt.org.uk/ifopt"> <ns5:ResponseTimestamp>2024-11-12T14:26:37+01:00</ns5:ResponseTimestamp> <ns5:SubscriptionRef>estimated_timetable-1731421595</ns5:SubscriptionRef> <ns5:EstimatedJourneyVersionFrame> <ns5:RecordedAtTime>2024-11-12T14:26:37+01:00</ns5:RecordedAtTime> <ns5:EstimatedVehicleJourney> <ns5:LineRef>SE:022:Line:9011022000001000</ns5:LineRef> <ns5:DirectionRef>1</ns5:DirectionRef> <ns5:FramedVehicleJourneyRef> <ns5:DataFrameRef>2024-11-12</ns5:DataFrameRef> <ns5:DatedVehicleJourneyRef>SE:022:ServiceJourney:1234567-1234567</ns5:DatedVehicleJourneyRef> </ns5:FramedVehicleJourneyRef> <ns5:DataSource>DinTur</ns5:DataSource> <ns5:EstimatedCalls> <ns5:EstimatedCall> <ns5:StopPointRef>SE:022:Quay:9022000000001001</ns5:StopPointRef> <ns5:Order>1</ns5:Order> <ns5:Cancellation>false</ns5:Cancellation> <ns5:AimedDepartureTime>2024-11-12T17:25:00+01:00</ns5:AimedDepartureTime> <ns5:ExpectedDepartureTime>2024-11-12T17:25:00+01:00</ns5:ExpectedDepartureTime> </ns5:EstimatedCall> <ns5:EstimatedCall> <ns5:StopPointRef>SE:022:Quay:9022000000002001</ns5:StopPointRef> <ns5:Order>2</ns5:Order> <ns5:Cancellation>false</ns5:Cancellation> <ns5:AimedArrivalTime>2024-11-12T17:25:15+01:00</ns5:AimedArrivalTime> <ns5:ExpectedArrivalTime>2024-11-12T17:25:15+01:00</ns5:ExpectedArrivalTime> <ns5:AimedDepartureTime>2024-11-12T17:25:15+01:00</ns5:AimedDepartureTime> <ns5:ExpectedDepartureTime>2024-11-12T17:25:15+01:00</ns5:ExpectedDepartureTime> </ns5:EstimatedCall> <ns5:EstimatedCall> <ns5:StopPointRef>SE:022:Quay:9022000000003001</ns5:StopPointRef> <ns5:Order>3</ns5:Order> <ns5:Cancellation>false</ns5:Cancellation> <ns5:AimedArrivalTime>2024-11-12T18:20:00+01:00</ns5:AimedArrivalTime> <ns5:ExpectedArrivalTime>2024-11-12T18:21:00+01:00</ns5:ExpectedArrivalTime> <ns5:ArrivalStatus>delayed</ns5:ArrivalStatus> </ns5:EstimatedCall> <ns5:IsCompleteStopSequence>true</ns5:IsCompleteStopSequence> </ns5:EstimatedVehicleJourney> </ns5:EstimatedJourneyVersionFrame> </estimatedTimetableDeliveryStructure>
Bert
December 3, 2024

Den är optional i vår kod, men vi löser det med ett default-värde vilket kan förändra datat. Skulle vi ändra vår default till “onTime” blir konsekvenserna inte lika allvarligt och går det att skriva optional tycker jag.