navGetAPILevel (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

2.20 / 1.00.00

Nav. API level:

1


This function will determine the maximum navigation API level that is supported by the navigation device.

 

Note: Some devices that report support for level 8 and above may not support every level below. Check the return code for the specific functions to see if the feature is supported.

 

Input:

None.

 

 

Returns: INT

The navigation API level supported by navigation device.

0

- Navigation device not present.

-1

- Navigation interface is not open.

 

Declaration:

FUNCTION navGetAPILevel : INT;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
VAR
   rc : INT;
END_VAR;
 
   DebugMsg(message := "Initializing navigation...");
   navOpen();
   ...
 
BEGIN
   ...
   rc := navGetAPILevel();
   IF rc = 2 THEN
      // Waypoints are only awailable in navigation API level 2 
      navWaypointSet(ID := 5, symbol := 18, latitude := 666377598, longitude := 117525954, categories := 16#1000, name := "Logic IO", comment := "Main office");
   END_IF;
   ...
END_PROGRAM;