
File system API frames
Local File System Request - 0x3B
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
295
Offset
Size
Frame Field
Description
7
16-bit
Directory
Handle
Value returned in initial Directory Open Response.
9
32-bit
File Size/Entry
Flags
File's size in lower 24 bits, combined with the
following flags:
n
0x80000000 (ENTRY_IS_DIR): Entry is a
directory.
n
0x40000000 (ENTRY_IS_SECURE): File is
secure (write-only).
n
0x01000000 (ENTRY_IS_LAST): This is the last
entry.
n
Other flags in the top 8 bits (0x3E) are
currently reserved and set to zero.
13-n
variable
Entry Name
File or directory name.
If there is enough room in the frame, there may be additional entries after the first.
n+1
8-bit
Null
Terminator
0x00 byte to separate entries
n+2
32-bit
File Size and
Flags
Refer to description
n+6
variable
Entry Name
Refer to description
Process the entries in a
Directory Open Response
or
as follows:
n
Split the
File Size and Flags
field into separate
File Size
and
Flags
.
n
Look for a null terminator after the
File Size and Flags
field.
n
Extract
Entry Name
as bytes after
File Size and Flags
and before either the null terminator or
the end of the frame.
n
Repeat this sequence if
Entry Name
had a null terminator and the packet contains
unprocessed entries.
n
If the final entry of the frame does not have ENTRY_IS_LAST set, send another
to get additional entries.
Directory Close - 0x12
Description
The host can send this frame to indicate that it is done reading the directory and no longer needs the
Directory Handle
. Note that the
Directory Handle
is automatically closed and no longer valid after
receiving a
Response
with the ENTRY_IS_LAST flag set.