-
Notifications
You must be signed in to change notification settings - Fork 0
SIRI framework
SIRI provides several functional services that can be used to exchange public transport information. These services are defined in the SIRI XSD schema.
Service Name | Definition |
---|---|
Production Timetable (SIRI-PT) | Allows clients to request and receive the timetable for a specific public transport service. |
Estimated Timetable (SIRI-ET) | Allows clients to request and receive the estimated timetable for a specific public transport service. |
Stop Timetable (SIRI-ST) | Allows clients to request and receive the timetable for a specific stop. |
Stop Monitoring (SIRI-SM) | Allows clients to request and receive real-time information about the arrival and departure of vehicles at a specific stop. |
Vehicle Monitoring (SIRI-VM) | Allows clients to request and receive real-time information about the location and status of vehicles. |
Connection Timetable (SIRI-CT) | Allows clients to request and receive the timetable for a journey that involves multiple public transport services. |
Connection Monitoring (SIRI-CM) | Allows clients to request and receive real-time information about the arrival and departure of vehicles at a specific stop that are part of a journey that involves multiple public transport services. |
General Message (SIRI-GM) | Allows clients to exchange general messages about public transport services. |
Examples of these services can be found here.
Benefits of using SIRI functional services
SIRI functional services can be used to develop a wide range of public transport applications. For example, SIRI can be used to develop:
- Public transport information websites and apps
- Real-time vehicle tracking systems
- Passenger information systems
- Journey planning systems
- Traffic management systems
The table below details which SIRI functional services to use in response to the most common use-cases of real-time information exchange. The list of use-cases is not exhaustive.
Identified use-cases are:
Code | Use-case name | Description |
---|---|---|
UC1 | Inter systems | Information exchange between different systems (e.g., Passenger Information Display, Routing, Planning, etc.) |
UC2 | Light terminal | Real-time information on timetables at a specific stop to be displayed on a light terminal (e.g., cell phone) |
UC3 | Trip planning | Real-time information to adjust trip planning offers for travelers |
UC4 | In-vehicle display | Real-time information displayed within a vehicle |
UC5 | Disruption management | Real-time detailed description of a disruption in the transport service |
UC6 | Accessibility information | Information on availability of equipment for travelers with specific needs (e.g., visually impaired, travel with luggage) |
UC7 | Aggregator | Aggregation of real-time information from several mobility providers |
The below table details the conditionality of SIRI functional services based on the above-described use-cases.
The convention is:
-
M: mandatory
-
R: recommended
Service Name | UC1 | UC2 | UC3 | UC4 | UC5 | UC6 | UC7 |
---|---|---|---|---|---|---|---|
Estimated Timetable | M | M | M | ||||
Discovery Line | R | ||||||
Stop Monitoring | M | R | R | ||||
Discovery Stop | R | ||||||
Vehicle Monitoring | M | R | |||||
Connection Monitoring | R | ||||||
General Message | R | R | R | M | R | R | M |
Situation Exchange | M | R | M | M | R | ||
Facility Monitoring | R | M |
The SIRI XML model is a set of XML elements and attributes that are used to exchange public transport information. The SIRI XML model is defined in the SIRI XSD schema.
The SIRI XML model includes elements for representing a wide range of public transport data, such as:
- Vehicles
- Journeys
- Stops
- Lines
- Services
- Schedules
- Real-time information
Below is an example of a simple SIRI XML message:
<?xml version="1.0" encoding="UTF-8"?>
<Siri xmlns="http://www.siri.org.uk/siri">
<ServiceRequest>
<VehicleMonitoringRequest>
<VehicleRef>
<VehicleID>12345</VehicleID>
</VehicleRef>
</VehicleMonitoringRequest>
</ServiceRequest>
</Siri>
This message is a request for the current location of the vehicle with the ID 12345. The response to this message would be a SIRI XML message containing the vehicle's location information.
<?xml version="1.0" encoding="UTF-8"?>
<Siri xmlns="http://www.siri.org.uk/siri">
<ServiceDelivery>
<VehicleMonitoringDelivery>
<VehicleMonitoringResponse>
<VehicleActivity>
<VehicleRef>
<VehicleID>12345</VehicleID>
</VehicleRef>
<Position>
<Latitude>57.7</Latitude>
<Longitude>12.1</Longitude>
</Position>
<Bearing>0</Bearing>
<Speed>50</Speed>
</VehicleActivity>
</VehicleMonitoringResponse>
</VehicleMonitoringDelivery>
</ServiceDelivery>
</Siri>
This response contains the current location of the vehicle with the ID 12345. The vehicle is currently located at latitude 57.7 and longitude 12.1, and it is traveling at a speed of 50 km/h on a bearing of 0 degrees.
This is just a simple example of a SIRI request/response message. The SIRI XML model can be used to exchange a wide variety of public transport data, including journey plans, real-time information, and service disruptions. See more information on the SIRI XML schema or see examples of SIRI services use cases.
The description of SIRI services refers to a LEADER structure. It is a container element that is used to exchange SIRI messages between different systems.
The Leader is (indirectly) defined in the SIRI specification by the following attributes
xxxDelivery | xxxDelivery | Min : Max | Data Type | Delivery for xxx Service |
---|---|---|---|---|
Log | ResponseTimestamp | 1:1 | xsd:dateTime | Time individual response element was created |
Endpoint properties | RequestMessageRef | 0:1 | ➡️ MessageQualifier | For direct requests, Identifier of request that this Delivery satisfies |
Endpoint properties | SubscriberRef | 0:1 | ➡️ ParticipantCode | Required if Delivery is for a Subscription, Participant Reference of Subscriber |
Endpoint properties | SubscriptionFilterRef | 0:1 | ➡️SubcriptionFilterCode | Unique identifier of Subscription filter to which this subscription is assigned. If there is only a single filter, then can be omitted |
Endpoint properties | SubscriptionRef | 1:1 | ➡️SubscriptionQualifier | Required if Delivery is for a Subscription, Identifier of Subscription issued by Requestor. Unique within Subscriber (i.e. within ParticipantRef of Subscriber), and SIRI Functional Service type. |
Delegation | DelegatorAddress | 0:1 | Xsd:anyURI | Address of original Consumer, i.e. requesting system to which delegating response is to be returned |
Delegation | DelegatorRef | 0:1 | ➡️ ParticipantCode | Identifier of delegating system that originated message |
Status | Status | 0:1 | xsd:boolean | Whether the complete request could be processed successfully or not. Default is true. If any of the individual requests within the delivery failed, should be set to false |
Status | ErrorCondition | 0:1 | +Structure | Description of any error or warning conditions that apply to the specific functional request or response |
Status | choice | One of the following Error codes | ||
Status | a)CapabilityNotSupportedError | -1:1 | + Error | Error: Capability not supported |
Status | b)AccessNotAllowedError | -1:1 | + Error | Error: Requestor is not authorised to the service or data requested |
Status | c)NoInfoForTopicError | -1:1 | + Error | Error: Valid request was made but service does not hold any data for the requested topic expression |
Status | d)AllowedResourceUsageExceededError | -1:1 | + Error | Error: Valid request was made but request would exceed the permitted resource usage of the client |
Status | e)OtherError | -1:1 | + Error | Error other than a well-defined category. |
Status | Description | 0:1 | ➡️ ErrorDescription | Description of Error |
Status | ValidUntil | 0:1 | xsd:dateTime | End of data horizon of the data producer |
Status | ShortestPossibleCycle | 0:1 | PositiveDurationType | Minimum interval at which updates can be sent |
DefaultLanguage | 0:1 | Xsd:language | Default language for text elements |
The LEADER structure is used in both SIRI request/response and publish/subscribe communication patterns. In SIRI request/response, the LEADER message is used to return the response to a SIRI service request. In SIRI publish/subscribe, the LEADER message is used to deliver updates to subscribers.