Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mise à jour du fichier Protobuf GTFS-RT #4271

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/transport/lib/transport/protobuf/gtfs-realtime.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 26 additions & 9 deletions apps/transport/lib/transport/protobuf/gtfs-realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1052,7 +1069,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
}
}

optional string stop_id = 1;
optional TranslatedString stop_code = 2;
Expand Down Expand Up @@ -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.
Expand Down