From 2af90fc653446c910b3dc88593194660dd31fe0d Mon Sep 17 00:00:00 2001 From: Antoine Augusti Date: Wed, 23 Oct 2024 09:29:22 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20du=20fichier=20Protobuf?= =?UTF-8?q?=20GTFS-RT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transport/protobuf/gtfs-realtime.pb.ex | 4 +++ .../transport/protobuf/gtfs-realtime.proto | 35 ++++++++++++++----- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/apps/transport/lib/transport/protobuf/gtfs-realtime.pb.ex b/apps/transport/lib/transport/protobuf/gtfs-realtime.pb.ex index cc0cf89825..19a4b50b16 100644 --- a/apps/transport/lib/transport/protobuf/gtfs-realtime.pb.ex +++ b/apps/transport/lib/transport/protobuf/gtfs-realtime.pb.ex @@ -405,6 +405,10 @@ defmodule TransitRealtime.TripDescriptor.ModifiedTripSelector do field(:modifications_id, 1, optional: true, type: :string) field(:affected_trip_id, 2, optional: true, type: :string) + field(:start_time, 3, optional: true, type: :string) + field(:start_date, 4, optional: true, type: :string) + + extensions([{1000, 2000}, {9000, 10000}]) end defmodule TransitRealtime.TripDescriptor do diff --git a/apps/transport/lib/transport/protobuf/gtfs-realtime.proto b/apps/transport/lib/transport/protobuf/gtfs-realtime.proto index 9d5c0aa114..8cef74164f 100644 --- a/apps/transport/lib/transport/protobuf/gtfs-realtime.proto +++ b/apps/transport/lib/transport/protobuf/gtfs-realtime.proto @@ -252,7 +252,7 @@ message TripUpdate { UNSCHEDULED = 3; } optional ScheduleRelationship schedule_relationship = 5 - [default = SCHEDULED]; + [default = SCHEDULED]; // Provides the updated values for the stop time. // NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future. @@ -641,10 +641,10 @@ message Alert { // Severity of this alert. enum SeverityLevel { - UNKNOWN_SEVERITY = 1; - INFO = 2; - WARNING = 3; - SEVERE = 4; + UNKNOWN_SEVERITY = 1; + INFO = 2; + WARNING = 3; + SEVERE = 4; } optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; @@ -810,7 +810,7 @@ message TripDescriptor { CANCELED = 3; // Should not be used - for backwards-compatibility only. - REPLACEMENT = 5 [deprecated=true]; + REPLACEMENT = 5 [deprecated = true]; // An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to // respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date, @@ -848,7 +848,24 @@ message TripDescriptor { // The trip_id from the GTFS feed that is modified by the modifications_id optional string affected_trip_id = 2; + + // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor. + optional string start_time = 3; + + // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor. + optional string start_date = 4; + + // The extensions namespace allows 3rd-party developers to extend the + // GTFS Realtime Specification in order to add and evaluate new features and + // modifications to the spec. + extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } + + // Linkage to any modifications done to this trip (shape changes, removal or addition of stops). + // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value. optional ModifiedTripSelector modified_trip = 7; // The extensions namespace allows 3rd-party developers to extend the @@ -1052,7 +1069,7 @@ message Stop { UNKNOWN = 0; AVAILABLE = 1; NOT_AVAILABLE = 2; - } + } optional string stop_id = 1; optional TranslatedString stop_code = 2; @@ -1130,9 +1147,9 @@ message TripModifications { // The following extension IDs are reserved for private use by any organization. extensions 9000 to 9999; -} + } - // A list of selected trips affected by this TripModifications. + // A list of selected trips affected by this TripModifications. repeated SelectedTrips selected_trips = 1; // A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.