navMessageSend (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2, AX9, CX1 pro/flex/warp, SX1, MX2 turbo/encore/warp, AX9 turbo, NX-200, NX-400, NX-900, LX2, LX4, LX5

Firmware version:

1.40 / 1.00.00

Nav. API level:

1


This function will send a simple text message to the navigation device.

Depending on the type of the message, it is either displayed immediately (pop-up message) or a small notification is presented.

 

With the introduction of navigation API level 2, support for simple HTML tags for text formatting is included.

The supported tags are:

<br>, <center>, <h1>, <h2>, <b>, <i>, <u>, <strike>, <ol>, <ul>, <li>.

 

 

Input:

id : INT

Unique ID to identify this message.

 

text : STRING

The text message to send.

If using firmware 5.0 / 1.30.00 or newer and if the navigation device supports navigation API level 11, the text can be up to 1999 characters for some message types.

Otherwise the text is limited to 199 characters.

 

type : SINT (0..4, default: 0)

The type of message to send.

0

- Normal message.

1

- Pop-up message.

2

- Message with acknowledgment (reply ID zero).  The text is limited to 199 characters.

3

- Message with "yes" (reply ID 1) or "no" (reply ID 2). The text is limited to 199 characters.

4

- Message with user-defined reply.

 

count : SINT (1..10)

The number of user-defined replies used.

This parameter is ignored if type is not 4.

 

reply1 : INT

The ID of the reply to use for reply option 1.

This parameter is ignored if type is not 4.

 

reply2 : INT

The ID of the reply to use for reply option 2.

This parameter is ignored if type is not 4.

 

reply3 : INT

The ID of the reply to use for reply option 3.

This parameter is ignored if type is not 4.

 

reply4 : INT

The ID of the reply to use for reply option 4.

This parameter is ignored if type is not 4.

 

reply5 : INT

The ID of the reply to use for reply option 5.

This parameter is ignored if type is not 4.

 

reply6 : INT

The ID of the reply to use for reply option 6.

This parameter is ignored if type is not 4.

 

reply7 : INT

The ID of the reply to use for reply option 7.

This parameter is ignored if type is not 4.

 

reply8 : INT

The ID of the reply to use for reply option 8.

This parameter is ignored if type is not 4.

 

reply9 : INT

The ID of the reply to use for reply option 9.

This parameter is ignored if type is not 4.

 

reply10 : INT

The ID of the reply to use for reply option 10.

This parameter is ignored if type is not 4.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- The navigation device rejected the command.

-7

- Invalid or duplicate IDs (reply and/or message).

-8

- Invalid number of replies.

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION navMessageSend : INT;
VAR_INPUT
  ID     : INT;
  text   : STRING;
  type   : SINT := 0;
  count   : SINT;
  reply1 : INT;
  reply2 : INT;
  reply3 : INT;
  reply4 : INT;
  reply5 : INT;
  reply6 : INT;
  reply7 : INT;
  reply8 : INT;
  reply9 : INT;
  reply10 : INT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
 
BEGIN
  ...
  // Send a text message to the navigation device
  navMessageSend(id := 55, text := "Remember to pick up lunch on the way", type := 1);
  ...
  // Ask a question on the navigation device
  navMessageSend(id := 56, text := "Did you pick up lunch?", type := 4, count := 3, reply1 := 20, reply2 := 21, reply3 := 22);
  ...
END;
END_PROGRAM;