navSpeedLimitAlertSetup (Function)

Top  Previous  Next

Architecture:

NX32 / NX32L

Device support:

MX2 turbo/encore/warp, AX9 turbo, NX-200, NX-400, NX-900, LX2, LX4, LX5

Firmware version:

4.70 / 1.30.00

Nav. API level:

8


This function will enable and configure the Speed Limit Alerts(SLA) on the navigation unit.

SLAs are used to alert the application of speed limit violations.

An "SLA" event is raised when the vehicle has exceeded the speed limit for the provided time. See also navWaitEvent for event # 15.

If the database on the navigation device does not contain the speed limit, it will behave as if the speed limit is arbitrarily large.

Some navigation devices allow the user to update the posted speed. In that case the original speed limit will still be used for SLA.

 

Input:

mode : SINT (default: 0)

The mode of the SLA:

0

- Off. Do not monitor the speed limit.

1

- Car mode. Uses speed limits for cars.

2

- Truck mode. Uses speed limits for trucks.

 

alert_user : BOOL (default: FALSE)

Determines if the user should be alerted when the threshold is exceeded.

 

time_over : SINT (0..255, default 10)

The number of seconds the speed limit must be exceeded to trigger the alert.

 

time_under : SINT (0..255, default 10)

The number of seconds the speed must be kept under the speed limit before the alert is stopped.

 

threshold : INT (default: 5)

Speed in km/hr above or below the actual speed limit to consider speeding. Negative values should only be used for testing.

 

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- The navigation device rejected the command.

-7

- The selected mode is not supported on this device.

-8

- Invalid parameter.

-11

- SLA is not supported.

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION navSpeedLimitAlertSetup : INT;
VAR_INPUT
  mode       : SINT := 0;
  alert_user : BOOL := FALSE;
  time_over : INT := 10;
  time_under : INT := 10;
  threshold : INT := 5;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
 
BEGIN
  ...
  // Create sensor 55
  navSpeedLimitAlertSetup(alert_user := TRUE, threshold := 10);
  ...
END;
END_PROGRAM;