MBNNNavigationStatus.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <MapboxNavigationNative/MBNNRouteState.h>
  4. @class MBNNActiveGuidanceInfo;
  5. @class MBNNBannerInstruction;
  6. @class MBNNFixLocation;
  7. @class MBNNMapMatcherOutput;
  8. @class MBNNRoad;
  9. @class MBNNSpeedLimit;
  10. @class MBNNUpcomingRouteAlert;
  11. @class MBNNVoiceInstruction;
  12. NS_SWIFT_NAME(NavigationStatus)
  13. __attribute__((visibility ("default")))
  14. @interface MBNNNavigationStatus : NSObject
  15. // This class provides custom init which should be called
  16. - (nonnull instancetype)init NS_UNAVAILABLE;
  17. // This class provides custom init which should be called
  18. + (nonnull instancetype)new NS_UNAVAILABLE;
  19. - (nonnull instancetype)initWithRouteState:(MBNNRouteState)routeState
  20. locatedAlternativeRouteId:(nullable NSString *)locatedAlternativeRouteId
  21. stale:(BOOL)stale
  22. location:(nonnull MBNNFixLocation *)location
  23. routeIndex:(uint32_t)routeIndex
  24. legIndex:(uint32_t)legIndex
  25. stepIndex:(uint32_t)stepIndex
  26. isFallback:(BOOL)isFallback
  27. inTunnel:(BOOL)inTunnel
  28. predicted:(NSTimeInterval)predicted
  29. geometryIndex:(uint32_t)geometryIndex
  30. shapeIndex:(uint32_t)shapeIndex
  31. intersectionIndex:(uint32_t)intersectionIndex
  32. roads:(nonnull NSArray<MBNNRoad *> *)roads
  33. voiceInstruction:(nullable MBNNVoiceInstruction *)voiceInstruction
  34. bannerInstruction:(nullable MBNNBannerInstruction *)bannerInstruction
  35. speedLimit:(nullable MBNNSpeedLimit *)speedLimit
  36. keyPoints:(nonnull NSArray<MBNNFixLocation *> *)keyPoints
  37. mapMatcherOutput:(nonnull MBNNMapMatcherOutput *)mapMatcherOutput
  38. offRoadProba:(float)offRoadProba
  39. activeGuidanceInfo:(nullable MBNNActiveGuidanceInfo *)activeGuidanceInfo
  40. upcomingRouteAlerts:(nonnull NSArray<MBNNUpcomingRouteAlert *> *)upcomingRouteAlerts
  41. nextWaypointIndex:(uint32_t)nextWaypointIndex
  42. layer:(nullable NSNumber *)layer;
  43. @property (nonatomic, readonly) MBNNRouteState routeState;
  44. /**
  45. * Id of alternative route that we matched. This field calculated in OffRoute `routeState`.
  46. * `nullopt` for non-OffRoute `routeState` or if no one alternative route matches.
  47. */
  48. @property (nonatomic, readonly, nullable, copy) NSString *locatedAlternativeRouteId;
  49. /**
  50. * We didn't have location updates for too much time.
  51. * This can be handled as "grey puck" or "No GPS" on client side.
  52. */
  53. @property (nonatomic, readonly, getter=isStale) BOOL stale;
  54. /** enhanced location */
  55. @property (nonatomic, readonly, nonnull) MBNNFixLocation *location;
  56. /** index of route */
  57. @property (nonatomic, readonly) uint32_t routeIndex;
  58. /** index of current leg in route bounds */
  59. @property (nonatomic, readonly) uint32_t legIndex;
  60. /** index of current step in leg bounds */
  61. @property (nonatomic, readonly) uint32_t stepIndex;
  62. /**
  63. * `true` if status was produced in "fallback" mode, i.e. navigation tiles were not used
  64. * (e.g. they are not available), usually it means worse user experience
  65. */
  66. @property (nonatomic, readonly, getter=isIsFallback) BOOL isFallback;
  67. /** is current location belongs to tunnel */
  68. @property (nonatomic, readonly, getter=isInTunnel) BOOL inTunnel;
  69. /** "prediction" time, i.e. duration between this status and the latest location update */
  70. @property (nonatomic, readonly) NSTimeInterval predicted;
  71. /** index in full rotue geometry */
  72. @property (nonatomic, readonly) uint32_t geometryIndex;
  73. /** index in leg shape */
  74. @property (nonatomic, readonly) uint32_t shapeIndex;
  75. /** index in step bounds(i.e. on each new step we start indexing from 0) */
  76. @property (nonatomic, readonly) uint32_t intersectionIndex;
  77. /**
  78. * List of known names and shields for the current road.
  79. * Semantically corresponds to `BannerSection.components`.
  80. *
  81. * To retrieve legacy data:
  82. * - roadName - join `text` field of `roads` from beginning until `roads` end or `text == "/"`
  83. * - imageBaseUrl - use the first non-empty `imageBaseUrl` in `roads`
  84. * - shieldName - get the last path component of `imageBaseUrl`
  85. */
  86. @property (nonatomic, readonly, nonnull, copy) NSArray<MBNNRoad *> *roads;
  87. /** voice instruction to be presented */
  88. @property (nonatomic, readonly, nullable) MBNNVoiceInstruction *voiceInstruction;
  89. /** banner instruction to be presented */
  90. @property (nonatomic, readonly, nullable) MBNNBannerInstruction *bannerInstruction;
  91. /**
  92. * current speed limit
  93. * `nullopt` for unknown speed limit
  94. * For more accurate speed limit, depending on time / weather / etc conditions use GraphAccessor.getAdasAttributes(EdgeId)
  95. */
  96. @property (nonatomic, readonly, nullable) MBNNSpeedLimit *speedLimit;
  97. /**
  98. * Contains key points(for example corners) of route shape passed by pack between `getStatus` calls or from last notification of observer.
  99. * For now can be used in route mode only, always contain at least one point besides the very first `getStatus` call.
  100. * Only `coordinate`, ``bearing`, `monotonicTimestampNanoseconds` and `time` fields are filled. Last point is always the same as `location`.
  101. */
  102. @property (nonatomic, readonly, nonnull, copy) NSArray<MBNNFixLocation *> *keyPoints;
  103. /** Output of map matcher on this status. */
  104. @property (nonatomic, readonly, nonnull) MBNNMapMatcherOutput *mapMatcherOutput;
  105. /**
  106. * Probability of vehicle to be off-road:
  107. * 1.0 - vehicle is definitely off-road, 0.0 - vehicle is definitely on-road
  108. */
  109. @property (nonatomic, readonly) float offRoadProba;
  110. /** Will be empty if we are in free-drive now(i.e. routeState == invalid) */
  111. @property (nonatomic, readonly, nullable) MBNNActiveGuidanceInfo *activeGuidanceInfo;
  112. /** Array of upcoming route alerts, doesn't contain route alerts that were already passed by user */
  113. @property (nonatomic, readonly, nonnull, copy) NSArray<MBNNUpcomingRouteAlert *> *upcomingRouteAlerts;
  114. /** Index of next waypoint on the route in the initial list of waypoints. If no waypoints - 0 */
  115. @property (nonatomic, readonly) uint32_t nextWaypointIndex;
  116. /** current Z-level, can be used to build route from proper level of road */
  117. @property (nonatomic, readonly, nullable) NSNumber *layer;
  118. @end