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;
fsMediaOpen(media := 1);
fsDirChange(path := "B:\");
upg();
IF NOT upg.transfer AND NOT upg.firmware AND NOT upg.application THEN
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;
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;
|