GMTDDeliveryVehicleReporter
@interface GMTDDeliveryVehicleReporter : GMTDVehicleReporterObject for sending information to the Fleet Engine backend. Used for deliveries.
-
Updates the remaining VehicleStops for the vehicle. Results are reflected asynchronously in
remainingVehicleStops. The vehicle is expected to visit the stops in the same order as the array.Declaration
Swift
func setVehicleStops(_ vehicleStops: [GMTDVehicleStop]) async throws -> [GMTDVehicleStop]Objective-C
- (void)setVehicleStops:(nonnull NSArray<GMTDVehicleStop *> *)vehicleStops completion: (nonnull GMTDVehicleReporterStopCompletionHandler)completion;Parameters
vehicleStopsThe ordered array of
GMTDVehicleStopobjects the vehicle will visit. This must be non-nil and all stops other than the first stop must have a state ofGMTDVehicleStopStateNew.completionA block to run after the stops have been updated.
-
Updates the state of the first
GMTDVehicleStopinremainingVehicleStopstoGMTDVehicleStopStateEnroute.remainingVehicleStopsmust contain at least one stop when this function is called.Declaration
Swift
func reportEnrouteToNextStop() async throws -> [GMTDVehicleStop]Objective-C
- (void)reportEnrouteToNextStopWithCompletion: (nonnull GMTDVehicleReporterStopCompletionHandler)completion;Parameters
completionA block to run after the stops have been updated.
-
Updates the state of the first
GMTDVehicleStopinremainingVehicleStopstoGMTDVehicleStopStateArrived.remainingVehicleStopsmust contain at least one stop when this function is called.Declaration
Swift
func reportArrivedAtStop() async throws -> [GMTDVehicleStop]Objective-C
- (void)reportArrivedAtStopWithCompletion: (nonnull GMTDVehicleReporterStopCompletionHandler)completion;Parameters
completionA block to run after the stops have been updated.
-
Removes the first
GMTDVehicleStopinremainingVehicleStops.remainingVehicleStopsmust contain at least one stop when this function is called.Declaration
Swift
func reportCompletedStop() async throws -> [GMTDVehicleStop]Objective-C
- (void)reportCompletedStopWithCompletion: (nonnull GMTDVehicleReporterStopCompletionHandler)completion;Parameters
completionA block to run after the stops have been updated.
-
Gets the remaining
GMTDVehicleStopobjects that the vehicle still needs to visit.Declaration
Swift
func remainingVehicleStops() async throws -> [GMTDVehicleStop]Objective-C
- (void)getRemainingVehicleStopsWithCompletion: (nonnull GMTDVehicleReporterStopCompletionHandler)completion;Parameters
completionA completion to run with the retrieved
GMTDVehicleStopobjects. The completion will be run asynchronously on the main thread.