navFormReceive (Functionblock)

Top  Previous  Next

Architecture:

NX32 / NX32L

Device support:

MX2 turbo/encore/warp, AX9 turbo, NX-200, NX-400, NX-900

Firmware version:

4.70 / 1.30.00

Nav. API level:

12


navFormReceive returns information about a form that has been received from the navigation device.

 

Note that the received form is only valid after a "Form received" event is raised; the event will not be removed until the navFormReceiveDone function is called.

A "Form received" event is raised when a custom form is submitted by the user on the navigation device.

 

To create custom forms, see navFormCreate, navFormUpload and navFormUploadFile.

 

 

Input:

None.

 

 

Output:

ready : BOOL

TRUE:

If data is ready.

FALSE:

If data is not ready.

 

count : SINT

The number of valid items available in the form.

 

ID : DINT

The ID of the form that was received.

This is the value that is specified in navFormCreate when the form was created.

 

version : DINT

The version number of the received form.

 

submit_id : DINT

An unique ID for the received form. When a custom form is submitted multiple times, this can be used for keeping track of each submission.

 

time : DINT

The timestamp when the form was submitted.

 

 

Declaration:

FUNCTION_BLOCK navFormReceive;
VAR_OUTPUT
  ready     : BOOL;
  count     : SINT;
  ID       : DINT;
  version   : DINT;
  submit_id : DINT;
  time     : DINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
VAR
  form : navFormReceive;
END_VAR;
 
FUNCTION ReadForm;
  form();
  IF form.ready THEN
    DebugMsg(message := "*** submitted form received ***");
    DebugFmt(message := "-id=\4", v4 := form.ID);
    DebugFmt(message := "-version=\4", v4 := form.version);
    DebugFmt(message := "-time=\4", v4 := form.time);
 
    navFormReceiveDone();
  END_IF;
END_FUNCTION;
 
THREAD_BLOCK navMonitor;
VAR
  event : INT := 0;
END_VAR;
 
WHILE event <> -1 DO
  event := navWaitEvent(timeout := -1);
  CASE event OF
     ...
    14: ReadForm();
     ...
  END_CASE;
END_WHILE;
END_THREAD_BLOCK;