navFormReceiveDone (Function)

Top  Previous  Next

Architecture:

NX32 / NX32L

Firmware version:

4.70 / 1.30.00

Nav. API level:

12


This function must be called when the program is done using the received form.

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

 

Input:

None.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-3

- No received form could be found.

 

Declaration:

FUNCTION navFormReceiveDone : INT;

 

Example:

INCLUDE rtcu.inc
 
VAR
   form : navFormReceive;
   str  : STRING;
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);
 
      // Read field 13
      navFormReceiveReadText(ID := 13, text := str);
 
      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;