NAME

Travel::Routing::DE::HAFAS::Connection - A single connection between two stops

SYNOPSIS

for my $connection ( $hafas->connections ) {
	# $connection is a Travel::Routing::DE::HAFAS::Connection object
	for my $section ( $connection->sections ) {
		# $section is a Travel::Routing::DE::HAFAS::Connection::Section object
	}
}

VERSION

version 0.04

DESCRIPTION

Travel::Routing::DE::HAFAS::Connection describes a single connection (or itinerary) for getting from one stop to another. In addition to overall connection information, it holds a list of Travel::Routing::DE::HAFAS::Connection::Section(3pm) objects that describe the individual parts of the connection.

METHODS

ACCESSORS

$connection->arr_cancelled

True if the arrival of the last section in this connection has been cancelled, false otherwise.

$connection->arr

DateTime(3pm) object holding the arrival time and date. Based on real-time data if available, falls back to schedule data otherwise.

$connection->arr_loc

Travel::Status::DE::HAFAS::Location(3pm) object describing the arrival stop.

$connection->arr_platform

Arrival platform. Undef if unknown.

$connection->changes

Number of changes between different modes of transport.

$connection->dep_cancelled

True if the departure of the first section in this connection has been cancelled, false otherwise.

$connection->dep

DateTime(3pm) object holding the departure time and date. Based on real-time data if available, falls back to schedule data otherwise.

$connection->dep_loc

Travel::Status::DE::HAFAS::Location(3pm) object describing the departure stop.

$connection->dep_platform

Departure platform. Undef if unknown.

$connection->duration

DateTime::Duration(3pm) object describing the duration of this connection, i.e., the time between departure and arrival.

$connection->is_cancelled

True if part of this connection has been cancelled. Depending on the availability of replacement service, this may or may not indicate that the connection is no longer possible.

$connection->load

Maximum expected occupancy along the connection. Returns a hashref with keys FIRST and SECOND; each value ranges from 1 (low occupancy) to 4 (fully booked). Returns undef if occupancy data is not available.

$connection->messages

List of Travel::Status::DE::HAFAS::Message(3pm) objects associated with this connection. Typically contains messages along the lines of "current information available", "journey cancelled", or "a change between two connection sections may not be feasible".

$connection->rt_arr

DateTime(3pm) object holding real-time arrival if available. Undef otherwise.

$connection->rt_dep

DateTime(3pm) object holding real-time departure if available. Undef otherwise.

$connection->sched_arr

DateTime(3pm) object holding scheduled arrival if available. Undef otherwise.

$connection->sched_dep

DateTime(3pm) object holding scheduled departure if available. Undef otherwise.

$connection->sections

List of Travel::Routing::DE::HAFAS::Connection::Section(3pm) objects that describe the individual sections of this connection.

DIAGNOSTICS

None.

DEPENDENCIES

None.

BUGS AND LIMITATIONS

None known.

SEE ALSO

Travel::Routing::DE::HAFAS(3pm), Travel::Routing::DE::HAFAS::Connection::Section(3pm).

AUTHOR

Copyright (C) 2023 by Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

This program is licensed under the same terms as Perl itself.