nmpUpdate (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2i pro, CX1 pro/flex/warp, SX1, MX2 turbo, NX-200, NX-400, NX-900, LX2

Firmware version:

2.62 / 1.00.00

Nav. API level:

2


This function is used to update the NMP device when new versions of the software are released.

When called, it will start transferring an update file from the file system of the RTCU device to the NMP, and when the transfer is done (see navWaitEvent for event #10), the user is notified of the update. By using the "force" parameter, it can be controlled whether the update should be installed immediately or postponed until its next restart to avoid losing access to the NMP while driving.

During the update process, the RTCU device cannot communicate with the NMP device.

An "NMP Update Progress" event is raised when there are changes to the progress and/or status of the update. See also navWaitEvent for event # 10.

 

If the user declines an update or it fails, e.g. due to being shut down, the NMP navigation device will try to install it when the system is restarted.

 

The file used for the upgrade is usually supplied by Logic IO or its partners.

 

 

Input:

filename : STRING

The name and path of the file to transfer.

 

force : BOOL

Determines whether the user is asked if the update should be installed or if it should be forced.

 

 

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.

-11

- This is not supported by the device (the device is not an NMP device).

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpUpdate : INT;
VAR_INPUT
  filename : STRING;
  force   : BOOL := FALSE;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NMPExample;
VAR
  rc : INT;
END_VAR;
BEGIN
  ...
  // Start transfer of update
  rc := nmpUpdate(filename := "A:\update.zip", force := FALSE);
  IF rc <> 0 THEN
    DebugFmt(message := "Error: nmpUpdate=\1", v1 := rc);
  END_IF;
  ...
END;
END_PROGRAM;