From 56685ea830077964eaa5fc083d2b0cd17bb90aa5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 14 Feb 2014 22:59:22 +0100 Subject: parse fields in fchg. not used in db-iris yet. --- lib/Travel/Status/DE/IRIS/Result.pm | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'lib/Travel/Status/DE/IRIS/Result.pm') diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index 6b4ebb1..75f02cc 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -17,10 +17,10 @@ our $VERSION = '0.03'; Travel::Status::DE::IRIS::Result->mk_ro_accessors( qw(arrival classes date datetime delay departure is_cancelled is_transfer - line_no old_train_id old_train_no platform raw_id realtime_xml - route_start route_end sched_arrival sched_departure sched_platform - sched_route_start sched_route_end start stop_no time train_id train_no - transfer type unknown_t unknown_o) + line_no train_no_transfer old_train_id old_train_no platform raw_id + realtime_xml route_start route_end sched_arrival sched_departure + sched_platform sched_route_start sched_route_end start stop_no time + train_id train_no transfer type unknown_t unknown_o) ); sub new { @@ -171,6 +171,16 @@ sub add_realtime { return $self; } +sub add_ref { + my ( $self, %attrib ) = @_; + + $self->{train_no_transfer} = $attrib{train_no}; + + # TODO + + return $self; +} + sub add_tl { my ( $self, %attrib ) = @_; @@ -766,6 +776,15 @@ stations. Number of this train, unique per day. E.g. C<< 2225 >> for C<< IC 2225 >>. +=item $result->train_no_transfer + +Number of this train after a following transfer, undefined if no such transfer +exists. See B for a note about this. + +Note that unlike B, this information is always based on realtime +data (not included in any schedule) and only set for stations before the +transfer station, not the transfer station itself. + =item $result->type Type of this train, e.g. C<< S >> for S-Bahn, C<< RE >> for Regional-Express, -- cgit v1.2.3