voicePresent (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

4.34 / 1.00.00


Will return information about if voice-messages are present on device.

 

 

Input:

None

 

Returns:

TRUE:

Voice messages are present.

FALSE:

No voice messages are present.

 

Declaration:

FUNCTION voicePresent : BOOL;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
   upg : verCheckUpgrade;
END_VAR;
 
   // Initialize file system
   fsMediaOpen(media := 1);
   // Change media
   fsDirChange(path := "B:\");
 
   // Restore voice
   upg();
   IF NOT upg.transfer AND NOT upg.firmware AND NOT upg.application THEN
      //
      // Restore voice
      //
      IF NOT voicePresent() AND fsFileExists(name := "b:\voice.bak") THEN
         DebugMsg(message := "Restoring voice...");
         DebugFmt(message := "voiceRestore = \1", v1 := voiceRestore(filename := "voice.bak"));
      END_IF;
 
      //
      // Backup voice
      //
      IF voicePresent() AND NOT fsFileExists(name := "b:\voice.bak") THEN
         DebugMsg(message := "Backing up voice...");
         DebugFmt(message := "voiceBackup = \1", v1 := voiceBackup(filename := "voice.bak"));
      END_IF;
   END_IF;
 
BEGIN
   ...
END;
END_PROGRAM;