WarnerEngine class abstract
Provides the core functionality for generating and managing navigation warnings.
WarnerEngine processes Electronic Horizon data and determines when various types
of warnings should be issued. It is used with ElectronicHorizonListener,
which supply the road topology and positional updates required for warning evaluation.
The engine monitors enabled warning types and notifies registered listeners when new warnings become available.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
- Implemented types
Constructors
-
WarnerEngine.WithEnabledWarnings(List<
WarningType> enabledWarnings) -
Creates a new instance of this class.
factory
-
WarnerEngine.WithEngine(SDKNativeEngine sdkEngine, List<
WarningType> enabledWarnings) -
Creates a new instance of this class.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timingProfile ↔ TimingProfile
-
The timing profile that defines when navigation warnings should be triggered.
Configures the base notification thresholds used for delivering
navigation warnings. The effective thresholds depend on the selected
TimingProfile and may adjust automatically according to
the current speed limit:
getter/setter pair
- warningOptions ↔ WarningOptions
-
Options that define warning behavior for all the warners.
Provides configuration parameters for all the warners.
Gets the currently configured WarningOptions.
getter/setter pair
Methods
-
addCustomWarningProvider(
CustomWarningProvider customWarningProvider, SegmentDataLoaderOptions segmentDataLoaderOptions) → void - Registers a custom warning provider.
-
addEnabledWarnings(
List< WarningType> warningTypes) → void - Adds the given warning types to the set of warnings monitored by the engine.
-
addWarningListener(
WarningListener warningListener) → void - Registers a listener that will receive warning notifications.
-
clearCustomWarningProviders(
) → void - Unregisters all custom warning providers.
-
finalizeGivenWarnings(
) → void -
Marks all currently active warnings as passed (
DistanceType.PASSED), notifies all registered WarningListener instances on the main thread, and then clears these warnings from their corresponding registries by invoking the appropriateWarningsRegistry.clear<Type>methods. -
getCustomWarningNotificationDistances(
int customWarningType) → WarningNotificationDistances - Returns the warning notification distances for the specified custom warning type.
-
getEnabledWarnings(
) → List< WarningType> - Returns the current list of enabled warning types.
-
getWarningNotificationDistances(
WarningType warningType) → WarningNotificationDistances - Returns the warning notification distances for the requested warning type.
-
getWarningsRegistry(
) → WarningsRegistry - Returns the centralized access point for retrieving full metadata of any supported warning category (e.g., safety cameras, truck restrictions, etc.).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onElectronicHorizonUpdated(
ElectronicHorizonErrorCode? errorCode, ElectronicHorizonUpdate? update) → void -
Called whenever the electronic horizon subsystem produces:
inherited
-
removeCustomWarningProvider(
CustomWarningProvider customWarningProvider) → void - Unregisters a custom warning provider.
-
removeEnabledWarnings(
List< WarningType> warningTypes) → void - Removes the given warning types from the set of warnings monitored by the engine.
-
removeWarningListener(
WarningListener warningListener) → void - Unregisters a previously added warning listener.
-
setCustomWarningNotificationDistances(
int customWarningType, WarningNotificationDistances warningNotificationDistances) → void - Sets the warning notification distances for the specified custom warning type.
-
setEnabledWarnings(
List< WarningType> warningTypes) → void - Replaces the current set of enabled warning types with the provided list.
-
setWarningNotificationDistances(
WarningType warningType, WarningNotificationDistances warningNotificationDistances) → void - Sets the warning notification distances for the specified warning type.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited