summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-01-14 06:49:27 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-01-14 06:49:27 +0100
commit8990e34bc3d122baa93920e6b596bad9db52c439 (patch)
treec44005421dabd1ce911069e11e32e1fa0dd93a1c /lib/Travel/Status/DE
parentdb1ba4444ece2118c189da182f9da8235d0da962 (diff)
filter out message ID 900 as it is useless for us
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm9
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm4
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 803ab38..94b9856 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -445,9 +445,12 @@ sub get_realtime {
my $msgid = $e_m->getAttribute('id');
my $ts = $e_m->getAttribute('ts');
- # 0 and 1 (with key "f") are related to canceled trains and
- # do not appear to hold information
- if ( defined $value and $value > 1 ) {
+ # 0 and 1 (with key "f") are related to canceled trains and
+ # do not appear to hold information (or at least none we can access).
+ # All observed cases of message ID 900 were related to bus
+ # connections ("Anschlussbus wartet"). We can't access which bus
+ # it refers to, so we don't show that either.
+ if ( defined $value and $value > 1 and $value != 900 ) {
$messages{$msgid} = [ $ts, $type, $value ];
}
}
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index adba3c1..d5efd2c 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -99,7 +99,9 @@ my %translation = (
98 => 'Sonstige Qualitätsmängel',
99 => 'Verzögerungen im Betriebsablauf',
- #900 => 'Anschlussbus wartet(?)',
+ # Occasionally, there's a message with ID 900. In all cases observed so far,
+ # it was used for "Anschlussbus wartet". However, as we don't know which bus
+ # it refers to, we don't show it to users.
);
Travel::Status::DE::IRIS::Result->mk_ro_accessors(