This function will show an alert on the display of the navigation unit.
It will disappear after the configurable timeout or when the user presses anywhere on the display.
Input:
id : INT
Unique ID to identify this alert.
icon : INT (0..22, default: 0)
The icon to use for the alert:
0
|
- No icon needed
|
1
|
- Driver Behavior
|
2
|
- Tire Pressure
|
3
|
- Temperature
|
4
|
- Door Ajar
|
5
|
- Vehicle Maintenance
|
6
|
- OBD-II Generic Sensor
|
7
|
- Generic Sensor 1
|
8
|
- Generic Sensor 2
|
9
|
- Generic Sensor 3
|
10
|
- No signal
|
11
|
- Day Hours counter
|
12
|
- Weekly Hours counter
|
13
|
- Rest Hours counter
|
14
|
- Break Hours counter
|
15
|
- Dispatcher Tasks
|
16
|
- Weight
|
17
|
- Information
|
18
|
- Fuel
|
19
|
- Available (EU symbol)
|
20
|
- Driving (EU symbol)
|
21
|
- Rest (EU symbol)
|
22
|
- Working (EU symbol)
|
timeout : SINT (0..15, default: 0)
1-15
|
- The number of seconds to show the alert for.
|
0
|
- Show the alert for two hours
|
severity : SINT (0..2, default: 0)
The severity of the alert:
0
|
- Normal
|
1
|
- Medium
|
2
|
- High
|
play_sound : BOOL (default FALSE)
Set to true to play a sound when the alert is received.
text : STRING
The text for the alert. Max. 109 characters.
Returns: INT
0
|
- Success.
|
-1
|
- Navigation interface is not open.
|
-2
|
- Error communicating with navigation device.
|
-4
|
- The navigation device rejected the command.
|
-8
|
- Invalid parameter.
|
-11
|
- Popup alerts are not supported.
|
-12
|
- Navigation interface is busy.
|
Declaration:
FUNCTION navPopupAlert : INT;
VAR_INPUT
ID : DINT;
icon : INT := 0;
timeout : SINT := 0;
severity : SINT := 0;
play_sound : BOOL := FALSE;
text : STRING;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM NavigationExample;
BEGIN
...
navPopupAlert(ID := 5, text := "Overheating", severity := 2, icon := 3, play_sound := TRUE);
...
END;
END_PROGRAM;
|