SmartWAV2-SerialMode_R1
SMARTWAV 2
Serial Mode
Vizic Technologies ©2020 | 109
9.9 Test End of File - 0x46, 0x51hex - ‘F, ‘Q’ ascii
Commands (host)
byte(s)
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x51 (hex), Q (ascii). *Test File.
3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii).
4.- 0x45 (hex), E (ascii). *End of File.
Responses (device)
byte(s)
1.- 0x00 (hex) for FALSE condition or
0x01 (hex) for TRUE condition.
2.- 0xXX - FAT ACK/NAK List Byte Reply
3.- 0x4F (hex), O (ascii) - Success ACK or
0x46 (hex), F (ascii) - Fail NAK.
Description
The test End of File command, checks for an
end of file of the allocated file in the
received workspace#, End of File means
that the Current File Pointer is pointing at the
very last data byte of the file. This command
is helpful when reading to know if the file
pointer has reached the last byte of the file
and no more data can be read.
A file must be already opened/allocated in
the selected workspace for this command to
work.
Examples (sent and
received commands)
Example 1:
Sent data:
-46,51,02,45- Test file in workspace# 2 for a
EOF condition.
Received data:
-01,00,4F- OK, OK. End of File is TRUE, then the
current file pointer is pointing to the very last
data byte of file.
*All data is in hex.