ADVANCED: navStopSetRouteFile (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:

14


This function will start to transfer a route file to the navigation device.

A "GPI progress" event is raised when there are changes to the progress and/or status of the file transfer. See also navWaitEvent for event # 9.

The route file is a binary file that follows the format specified in "5.1.6.2.1 Path Specific Stop (PSS) file data format" in the "Garmin Fleet Management Interface Control

Specification", which is part of the Garmin Fleet Management SDK, available at http://developer.garmin.com/fleet-management/overview/.

The file can optionally be compressed with the GZIP format.

 

When the upload is completed, navGPIProgressReceive will report any errors with the route.

In addition to the common errors, the following errors can happen:

257

- Unexpected signature

258

- Unexpected version.

259

- Zero length Stop text name.

261

- Exceeded text maximum length.

262

- Invalid Unique ID.

263

- Invalid Latitude value.

264

- Invalid Longitude value.

265

- Invalid point type found.

266

- First point type is not a Destination.

267

- Last point type is not a Destination.

268

- Exceeded maximum number of shaping points.

269

- Exceeded maximum number of Destination points.

270

- Exceeded maximum total number of points.

271

- Less than 2 destination points found.

 

 

Note: To create a route on the RTCU device, use the navStopRouteCreate and navStopSetRoute functions instead.

 

Input:

filename : STRING

The name and path of the file to transfer.

 

ID : STRING

A small text message to identify the file.

Must be between 1 and 16 characters.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-3

- File not found.

-4

- The navigation device rejected the command.

-8

- Invalid ID.

-11

- Routes are not supported.

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION navStopSetRouteFile : INT;
VAR_INPUT
  filename : STRING;
  id       : STRING;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
 
BEGIN
  ...
  // Start transfer of a route
  navStopSetRouteFile(filename := "route01.pss", id := "Route 1");
  ...
END;
END_PROGRAM;