Overview
Object that contains logistical information about a trip such as `vehicleId`, type of trip, pickup or dropoff times, and route.
Inherits GMTCImmutableData.
Public Member Functions | |
(nullable GMTCFleetEngineIDString *) | - tripID |
Returns the tripID for the current trip, converted from tripName. | |
(nullable GMTSTripWaypoint *) | - nextTripWaypoint |
Returns the first waypoint in the remaining waypoints list. | |
(nullable GMTSTripWaypoint *) | - nextWaypoint |
Returns the next waypoint to be visited. | |
(nullable NSArray< GMTSLatLng * > *) | - activeRoute |
Returns the active route of the given trip. | |
(nullable NSArray< GMTSLatLng * > *) | - remainingRoute |
Returns the remaining route of the given trip. | |
(nullable GMTSTrafficData *) | - activeRouteTraffic |
Returns the traffic data for the active route of this trip. | |
(nullable GMTSTrafficData *) | - remainingRouteTraffic |
Returns the traffic data for the remaining route of this trip. | |
(int32_t) | - remainingDistanceOfActiveRouteInMeters |
Returns the remaining distance of the active route. | |
(int32_t) | - distanceOfRemainingRouteInMeters |
Returns the distance of the remaining route. | |
(instancetype) | - initWithTripName:vehicleID:tripType:tripStatus:pickupLocation:pickupTime:dropoffLocation:dropoffTime:lastVehicleLocation:numberOfPassengers:remainingWaypoints:intermediateDestinations:intermediateDestinationIndex: |
Instantiates an instance of this class. | |
Static Public Member Functions | |
(GMTSTripPropertyFields) | + propertyValueDifferencesBetweenTrip1:andTrip2: |
Calculate the difference between two given trips. | |
Properties | |
NSString * | tripName |
Name of the trip. | |
GMTCFleetEngineIDString * | vehicleID |
ID of vehicle servicing the trip. | |
GMTSTripType | tripType |
The current trip type, see GMTSTripType for all the options. | |
GMTSTripStatus | tripStatus |
The current trip status, GMTSTripStatus listed for all the possible statuses. | |
GMTSTerminalLocation * | pickupLocation |
The pickup location of the trip. | |
NSTimeInterval | pickupTime |
The estimated time of arrival at the pickup location. | |
GMTSTerminalLocation * | dropoffLocation |
The drop off location of the trip. | |
NSTimeInterval | dropoffTime |
The estimated time of arrival at the drop off location. | |
GMTSVehicleLocation * | lastVehicleLocation |
The last location information of the vehicle for the trip. | |
NSUInteger | numberOfPassengers |
The number of passengers allowed for the current trip. | |
NSArray< GMTSTripWaypoint * > * | remainingWaypoints |
Array of waypoints on the trip route. | |
NSArray< GMTSTerminalLocation * > * | intermediateDestinations |
The array of the consumer's remaining waypoints. | |
int32_t | intermediateDestinationIndex |
Index of the intermediate waypoint that the vehicle will arrive at next. |
Member Function Documentation
- (nullable GMTCFleetEngineIDString *) tripID |
Returns the tripID for the current trip, converted from tripName.
- (nullable GMTSTripWaypoint *) nextTripWaypoint |
Returns the first waypoint in the remaining waypoints list.
- (nullable GMTSTripWaypoint *) nextWaypoint |
Returns the next waypoint to be visited.
The next waypoint might not belong to this trip if this trip is chained or shared.
- (nullable NSArray<GMTSLatLng *> *) activeRoute |
Returns the active route of the given trip.
This route is from the current location of the vehicle to the current user's next destination. Unlike the next waypoint in a back-to-back or carpool trip, the next waypoint may not be related to the current user. The return value is generated the first time it is accessed, and then cached.
- (nullable NSArray<GMTSLatLng *> *) remainingRoute |
Returns the remaining route of the given trip.
The remaining route is the route segment from the current user's next destination to the user's final destination.
- (nullable GMTSTrafficData *) activeRouteTraffic |
Returns the traffic data for the active route of this trip.
This route is from the current location of the vehicle to the current user's next destination. Unlike the next waypoint in a back-to-back or carpool trip, the next waypoint may not be related to the current user. The return value is generated the first time it is accessed, and then cached.
- (nullable GMTSTrafficData *) remainingRouteTraffic |
Returns the traffic data for the remaining route of this trip.
The remaining route is the route segment from the current user's next destination to the user's final destination.
- (int32_t) remainingDistanceOfActiveRouteInMeters |
Returns the remaining distance of the active route.
The active route means the route segment from the vehicle's location to the current user's next destination.
- (int32_t) distanceOfRemainingRouteInMeters |
Returns the distance of the remaining route.
The remaining route means the route segment from the current user's next destination to their last destination.
+ (GMTSTripPropertyFields) propertyValueDifferencesBetweenTrip1: | (GMTSTrip *) | trip1 | |
andTrip2: | (GMTSTrip *) | trip2 | |
Calculate the difference between two given trips.
Each property difference will be accumulated into the return result.
- Parameters:
-
trip1 The first trip candidate. trip2 The second trip candidate.
- (instancetype) initWithTripName: | (nullable NSString *) | tripName | |
vehicleID: | (nullable GMTCFleetEngineIDString *) | vehicleID | |
tripType: | (GMTSTripType) | tripType | |
tripStatus: | (GMTSTripStatus) | tripStatus | |
pickupLocation: | (nullable GMTSTerminalLocation *) | pickupLocation | |
pickupTime: | (NSTimeInterval) | pickupTime | |
dropoffLocation: | (nullable GMTSTerminalLocation *) | dropoffLocation | |
dropoffTime: | (NSTimeInterval) | dropoffTime | |
lastVehicleLocation: | (nullable GMTSVehicleLocation *) | lastVehicleLocation | |
numberOfPassengers: | (NSUInteger) | numberOfPassengers | |
remainingWaypoints: | (nullable NSArray< GMTSTripWaypoint * > *) | remainingWaypoints | |
intermediateDestinations: | (nullable NSArray< GMTSTerminalLocation * > *) | intermediateDestinations | |
intermediateDestinationIndex: | (int32_t) | intermediateDestinationIndex | |
Instantiates an instance of this class.
- Parameters:
-
tripName Name of the trip. vehicleID The ID of vehicle servicing the trip. tripType Trip type, see enum GMTSTripType for all the options. tripStatus Trip status, see enum GMTSTripStatus for all the possible statuses. pickupLocation The target pickup location. pickupTime The estimated time for arriving at the pickup location. dropoffLocation The target drop off location. dropoffTime The estimated time for arriving at the drop off location. lastVehicleLocation The last vehicle location information. numberOfPassengers The number of passengers allowed in the trip. remainingWaypoints The array of waypoints remaining on the trip. intermediateDestinations The array of the consumer's remaining waypoints. intermediateDestinationIndex Index of the intermediate waypoint that the vehicle will arrive at next.
Property Documentation
- (NSString*) tripName [read, assign] |
Name of the trip.
- (GMTCFleetEngineIDString*) vehicleID [read, assign] |
ID of vehicle servicing the trip.
- (GMTSTripType) tripType [read, assign] |
The current trip type, see GMTSTripType for all the options.
- (GMTSTripStatus) tripStatus [read, assign] |
The current trip status, GMTSTripStatus listed for all the possible statuses.
- (GMTSTerminalLocation*) pickupLocation [read, assign] |
The pickup location of the trip.
- (NSTimeInterval) pickupTime [read, assign] |
The estimated time of arrival at the pickup location.
- (GMTSTerminalLocation*) dropoffLocation [read, assign] |
The drop off location of the trip.
- (NSTimeInterval) dropoffTime [read, assign] |
The estimated time of arrival at the drop off location.
- (GMTSVehicleLocation*) lastVehicleLocation [read, assign] |
The last location information of the vehicle for the trip.
- (NSUInteger) numberOfPassengers [read, assign] |
The number of passengers allowed for the current trip.
- (NSArray<GMTSTripWaypoint *>*) remainingWaypoints [read, assign] |
Array of waypoints on the trip route.
- (NSArray<GMTSTerminalLocation *>*) intermediateDestinations [read, assign] |
The array of the consumer's remaining waypoints.
- (int32_t) intermediateDestinationIndex [read, assign] |
Index of the intermediate waypoint that the vehicle will arrive at next.
If there are no intermediate waypoints, this field is ignored.