NAME
Travel::Status::DE::IRIS::Result - Information about a single arrival/departure received by Travel::Status::DE::IRIS
SYNOPSIS
for my $result ($status->results) {
printf(
"At %s: %s to %s from platform %s\n",
$result->time,
$result->line,
$result->destination,
$result->platform,
);
}
VERSION
version 1.93
DESCRIPTION
Travel::Status::DE::IRIs::Result describes a single arrival/departure as obtained by Travel::Status::DE::IRIS. It contains information about the platform, time, route and more.
METHODS
ACCESSORS
- $result->additional_stops
-
Returns served stops which are not part of the schedule. I.e., this is the set of actual stops (route_post) minus the set of scheduled stops (sched_route_post).
- $result->arrival
-
DateTime(3pm) object for the arrival date and time. undef if the train starts here. Contains realtime data if available.
- $result->arrival_delay
-
Estimated arrival delay in minutes (integer number). undef if no realtime data is available, the train starts at the specified station, or there is no scheduled arrival time (e.g. due to diversions). May be negative.
- $result->arrival_has_realtime
-
True if "arrival" is based on real-time data.
-
True if arrival should not be displayed to customers. This often indicates an entry-only stop near the beginning of a train's journey.
- $result->arrival_is_additional
-
True if the arrival at this stop is an additional (unscheduled) event, i.e., if the train started its journey earlier than planned.
- $result->arrival_is_cancelled
-
True if the arrival at this stop has been cancelled.
- $result->arrival_wings
-
Returns a list of weakened references to Travel::Status::DE::IRIS::Result(3pm) objects which are coupled to this train on arrival. Returns nothing (false / empty list) otherwise.
- $result->canceled_stops
-
Returns stops which are scheduled, but will not be served by this train. I.e., this is the set of scheduled stops (sched_route_post) minus the set of actual stops (route_post).
- $result->classes
-
List of characters indicating the class(es) of this train, may be empty. This is slighty related to type, but more generic. At this time, the following classes are known:
D Non-DB train. Usually local transport D,F Non-DB train, long distance transport F "Fernverkehr", long-distance transport N "Nahverkehr", local and regional transport S S-Bahn, rather slow local/regional transport
- $result->date
-
Scheduled departure date if available, arrival date otherwise (e.g. if the train ends here). String in dd.mm.YYYY format. Does not contain realtime data.
- $result->datetime
-
DateTime(3pm) object for departure if available, arrival otherwise. Does not contain realtime data.
- $result->delay
-
Estimated delay in minutes (integer number). Defaults to the departure delay, except for trains which terminate at the specifed station. Similar to
$result->departure_delay // $result->arrival_delay
. undef if no realtime data is available. May be negative. - $result->delay_messages
-
Get all delay messages entered for this train. Returns a list of [datetime, string] listrefs sorted by newest first. The datetime part is a DateTime(3pm) object corresponding to the point in time when the message was entered, the string is the message. If a delay reason was entered more than once, only its most recent record will be returned.
- $result->departure
-
DateTime(3pm) object for the departure date and time. undef if the train ends here. Contains realtime data if available.
- $result->departure_delay
-
Estimated departure delay in minutes (integer number). undef if no realtime data is available, the train terminates at the specified station, or there is no scheduled departure time (e.g. due to diversions). May be negative.
- $result->departure_has_realtime
-
True if "departure" is based on real-time data.
-
True if departure should not be displayed to customers. This often indicates an exit-only stop near the end of a train's journey.
- $result->departure_is_additional
-
True if the train's departure at this stop is unscheduled (additional), i.e., the route has been extended past its scheduled terminal stop.
- $result->departure_is_cancelled
-
True if the train's departure at this stop has been cancelled, i.e., the train terminates here and does not continue its scheduled journey.
- $result->departure_wings
-
Returns a list of weakened references to Travel::Status::DE::IRIS::Result(3pm) objects which are coupled to this train on departure. Returns nothing (false / empty list) otherwise.
- $result->destination
-
Alias for route_end.
- $result->has_realtime
-
True if arrival or departure time are based on real-time data. Note that this is different from
defined($esult->delay)
. If delay is defined, some kind of realtime information for the train is available, but not necessarily its arrival/departure time. If has_realtime is true, arrival/departure time are available. This behaviour may change in the future. - $result->info
-
List of information strings. Contains both reasons for delays (which may or may not be up-to-date) and generic information such as missing carriages or broken toilets.
- $result->is_additional
-
True if the train's arrival and departure at the stop are unscheduled additional stops, false otherwise.
- $result->is_cancelled
-
True if the train was cancelled, false otherwise. Note that this does not contain information about replacement trains or route diversions.
- $result->is_transfer
-
True if the train changes its ID at the current station, false otherwise.
An ID change means: There are two results in the system (e.g. RE 10228 Münster -> Duisburg, RE 30028 Duisburg -> Düsseldorf), but they are the same train (RE line 2 from Münster to Düsseldorf in this case) and should be treated as such. In this case, Travel::Status::DE::IRIS merges the results and indicates it by setting is_transfer to a true value.
In case of a transfer, train_id and train_no are set to the "new" value, the old ones are available in old_train_id and old_train_no.
- $result->is_unscheduled
-
True if the train does not appear in the requested plans. This can happen because of two reasons: Either the scheduled time and the actual time are so far apart that it should've arrived/departed long ago, or it really is an unscheduled train. In that case, it can be a replacement or an additional train. There is no logic to distinguish these cases yet.
- $result->is_wing
-
Returns true if this result is a wing, false otherwise. A wing is a train which has its own ID and destination, but is currently coupled to another train and shares all or some of its route.
- $result->line
-
Train type with line (such as
S 1
) if available, type with number (suc asRE 10126
) otherwise. - $result->line_no
-
Number of the line, undef if unknown. Seems to be set only for S-Bahn and regional trains. Note that some regional and most long-distance trains do not have this field set, even if they have a common line number.
Example: For the line
S 1
, line_no will return1
. - $result->messages
-
Get all qos and delay messages ever entered for this train. Returns a list of [datetime, string] listrefs sorted by newest first. The datetime part is a DateTime(3pm) object corresponding to the point in time when the message was entered, the string is the message. Note that neither duplicates nor superseded messages are filtered from this list.
- $result->old_train_id
-
Numeric ID of the pre-transfer train. Seems to be unique for a year and trackable across stations. Only defined if a transfer took place, see also is_transfer.
- $result->old_train_no
-
Number of the pre-tarnsfer train, unique per day. E.g.
2225
forIC 2225
. Only defined if a transfer took place, see also is_transfer. - $result->origin
-
Alias for route_start.
- $result->qos_messages
-
Get all current qos messages for this train. Returns a list of [datetime, string] listrefs sorted by newest first. The datetime part is a DateTime(3pm) object corresponding to the point in time when the message was entered, the string is the message. Contains neither superseded messages nor duplicates (in case of a duplicate, only the most recent message is present)
- $result->platform
-
Arrival/departure platform as string, undef if unknown. Note that this is not neccessarily a number, platform sections may be included (e.g.
3a/b
). - $result->raw_id
-
Raw ID of the departure, e.g.
-4642102742373784975-1401031322-6
. The first part appears to be this train's UUID (can be tracked across multiple stations), the second the YYmmddHHMM departure timestamp at its start station, and the third the count of this station in the train's schedule (in this case, it's the sixth from thestart station).About half of all departure IDs do not contain the leading minus (
-
) seen in this example. The reason for this is unknown.This is a developer option. It may be removed without prior warning.
- $result->realtime_xml
-
XML::LibXML::Node(3pm) object containing all realtime data. undef if none is available.
This is a developer option. It may be removed without prior warning.
- $result->replaced_by
-
Returns a list of weakened references to Travel::Status::DE::IRIS::Result(3pm) objects which replace the (usually cancelled) arrival/departure of this train. Returns nothing (false / empty list) otherwise.
- $result->replacement_for
-
Returns a list of weakened references to Travel::Status::DE::IRIS::Result(3pm) objects which this (usually unplanned) train is meant to replace. Returns nothing (false / empty list) otherwise.
- $result->route
-
List of all stations served by this train, according to its schedule. Does not contain realtime data.
- $result->route_end
-
Name of the last station served by this train.
- $result->route_interesting
-
List of up to three "interesting" stations served by this train, subset of route_post. Usually contains the next stop and one or two major stations after that. Does not contain realtime data.
- $result->route_pre
-
List of station names the train passed (or will have passed) before this stop.
- $result->route_post
-
List of station names the train will pass after this stop.
- $result->route_start
-
Name of the first station served by this train.
- $result->sched_arrival
-
DateTime(3pm) object for the scheduled arrival date and time. undef if the train starts here.
- $result->sched_departure
-
DateTime(3pm) object for the scheduled departure date and time. undef if the train ends here.
- $result->sched_platform
-
Scheduled Arrival/departure platform as string, undef if unknown. Note that this is not neccessarily a number, platform sections may be included (e.g.
3a/b
). - $result->sched_route
-
List of all stations served by this train, according to its schedule. Does not contain realtime data.
- $result->sched_route_end
-
Name of the last station served by this train according to its schedule.
- $result->sched_route_pre
-
List of station names the train is scheduled to pass before this stop.
- $result->sched_route_post
-
List of station names the train is scheduled to pass after this stop.
- $result->sched_route_start
-
Name of the first station served by this train according to its schedule.
- $result->start
-
DateTime(3pm) object for the scheduled start of the train on its route (i.e. the departure time at its first station).
- $result->station
-
Name of the station this train result belongs to.
- $result->station_uic
-
EVA number of the station this train result belongs to. This is often, but not always, identical with the UIC station number.
- $result->stop_no
-
Number of this stop on the train's route. 1 if it's the start station, 2 for the stop after that, and so on.
- $result->time
-
Scheduled departure time if available, arrival time otherwise (e.g. if the train ends here). String in HH:MM format. Does not contain realtime data.
- $result->train
-
Alias for line.
- $result->train_id
-
Numeric ID of this train, trackable across stations and days. For instance, the S 31128 (S1) to Solingen, starting in Dortmund on 19:23, has the ID 2404170432985554630 on each station it passes and (usually) on every day of the year. Note that it may change during the yearly itinerary update in december.
- $result->train_no
-
Number of this train, unique per day. E.g.
2225
forIC 2225
. - $result->type
-
Type of this train, e.g.
S
for S-Bahn,RE
for Regional-Express,ICE
for InterCity-Express. - $result->wing_of
-
If is_wing is true, returns a weakened reference to the Travel::Status::DE::IRIS::Result(3pm) object which this train is a wing of. So far, it seems that a train is either not a wing or a wing of exactly one other train. Returns undef if is_wing is false.
INTERNAL
- $result = Travel::Status::DE::IRIS::Result->new(%data)
-
Returns a new Travel::Status::DE::IRIS::Result object. You usually do not need to call this.
MESSAGES
A dump of all messages entered for the result is available. Each message consists of a timestamp (when it was entered), a type (d for delay reasons, q for other train-related information) and a value (numeric ID).
At the time of this writing, the following messages are known:
- d 2 : "Polizeiliche Ermittlung"
- d 3 : "Feuerwehreinsatz neben der Strecke"
- d 5 : "Ärztliche Versorgung eines Fahrgastes"
- d 6 : "Betätigen der Notbremse"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 7 : "Personen im Gleis"
- d 8 : "Notarzteinsatz am Gleis"
- d 9 : "Streikauswirkungen"
- d 10 : "Ausgebrochene Tiere im Gleis"
- d 11 : "Unwetter"
- d 13 : "Pass- und Zollkontrolle"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 15 : "Beeinträchtigung durch Vandalismus"
- d 16 : "Entschärfung einer Fliegerbombe"
- d 17 : "Beschädigung einer Brücke"
- d 18 : "Umgestürzter Baum im Gleis"
- d 19 : "Unfall an einem Bahnübergang"
- d 20 : "Tiere im Gleis"
- d 21 : "Warten auf weitere Reisende"
- d 22 : "Witterungsbedingte Störung"
- d 23 : "Feuerwehreinsatz auf Bahngelände"
- d 24 : "Verspätung aus dem Ausland"
- d 25 : "Warten auf verspätete Zugteile"
- d 28 : "Gegenstände im Gleis"
- d 29 : "Ersatzverkehr mit Bus ist eingerichtet"
- d 31 : "Bauarbeiten"
- d 32 : "Verzögerung beim Ein-/Ausstieg"
- d 33 : "Oberleitungsstörung"
- d 34 : "Signalstörung"
- d 35 : "Streckensperrung"
- d 36 : "Technische Störung am Zug"
- d 37 : "Technische Störung am Wagen"
- d 38 : "Technische Störung an der Strecke"
- d 39 : "Anhängen von zusätzlichen Wagen"
- d 40 : "Stellwerksstörung/-ausfall"
- d 41 : "Störung an einem Bahnübergang"
- d 42 : "Außerplanmäßige Geschwindigkeitsbeschränkung"
- d 43 : "Verspätung eines vorausfahrenden Zuges"
- d 44 : "Warten auf einen entgegenkommenden Zug"
- d 45 : "Überholung durch anderen Zug"
- d 46 : "Warten auf freie Einfahrt"
- d 47 : "Verspätete Bereitstellung"
- d 48 : "Verspätung aus vorheriger Fahrt"
- d 55 : "Technische Störung an einem anderen Zug"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 56 : "Warten auf Fahrgäste aus einem Bus"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 57 : "Zusätzlicher Halt"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 58 : "Umleitung"
-
Source: Correlation between IRIS and DB RIS (bahn.de). Several entries, related to "Notarzteinsatz am Gleis".
- d 59 : "Schnee und Eis"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 60 : "Reduzierte Geschwindigkeit wegen Sturm"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 61 : "Türstörung"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 62 : "Behobene technische Störung am Zug"
-
Source: Correlation between IRIS and DB RIS (bahn.de).
- d 63 : "Technische Untersuchung am Zug"
- d 64 : "Weichenstörung"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- d 65 : "Erdrutsch"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- d 66 : "Hochwasser"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- f 67 : "Behördliche Anordnung"
-
Source: https://twitter.com/DodoMedia/status/1238816272240070659.
- q 70 : "WLAN nicht verfügbar"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 71 : "WLAN in einzelnen Wagen nicht verfügbar"
- q 72 : "Info/Entertainment nicht verfügbar"
- q 73 : "Mehrzweckabteil vorne"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 74 : "Mehrzweckabteil hinten"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 75 : "1. Klasse vorne"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 76 : "1. Klasse hinten"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 77 : "Ohne 1. Klasse"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 78 : "Ersatzverkehr mit Bus ist eingerichtet"
- q 79 : "Ohne Mehrzweckabteil"
-
Source: correlation between IRIS and DB RIS (bahn.de).
- q 80 : "Abweichende Wagenreihung"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 81 : "Fahrzeugtausch"
- q 82 : "Mehrere Wagen fehlen"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 83 : "Störung der fahrzeuggebundenen Einstiegshilfe"
- q 84 : "Zug verkehrt richtig gereiht"
-
Obsoletes messages 80, 82, 85. Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 85 : "Ein Wagen fehlt"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 86 : "Keine Reservierungsanzeige"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 87 : "Einzelne Wagen ohne Reservierungsanzeige"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 88 : "Keine Qualitätsmängel"
-
Obsoletes messages 80, 82, 83, 85, 86, 87, 90, 91, 92, 93, 96, 97, 98. Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 89 : "Reservierungen sind wieder vorhanden"
-
Obsoletes messages 86, 87. Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 90 : "Kein gastronomisches Angebot"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 91 : "Eingeschränkte Fahrradbeförderung"
- q 92 : "Keine Fahrradbeförderung"
- q 93 : "Fehlende oder gestörte behindertengerechte Einrichtung"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration. Might also mean "Kein rollstuhlgerechtes WC" (source: frubi).
- q 94 : "Ersatzbewirtschaftung"
-
Estimated from a comparison with bahn.de/ris messages. Needs to be verified.
- q 95 : "Ohne behindertengerechtes WC"
-
Estimated from a comparison with bahn.de/iris messages.
- q 96 : "Der Zug ist stark überbesetzt"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 97 : "Der Zug ist überbesetzt"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration.
- q 98 : "Sonstige Qualitätsmängel"
-
Verified by https://iris.noncd.db.de/irisWebclient/Configuration. Might also mean "Kein rollstuhlgerechter Wagen" (source: frubi).
- d 99 : "Verzögerungen im Betriebsablauf"
DIAGNOSTICS
None.
DEPENDENCIES
BUGS AND LIMITATIONS
Unknown.
SEE ALSO
Travel::Status::DE::IRIS(3pm).
AUTHOR
Copyright (C) 2013-2023 by Birte Kristina Friesel <derf@finalrewind.org>
LICENSE
This module is licensed under the same terms as Perl itself.