Skip to content

Commit

Permalink
Merge branch 'master' into gbfs_metadata_vehicle_status
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineAugusti authored Oct 24, 2024
2 parents 6a0bfdb + 1d75bf4 commit dc5b363
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
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

0 comments on commit dc5b363

Please sign in to comment.