NavCom LAND-PAK Rev.N User Manual

Page 97

Advertising
background image

Technical Reference Manual Rev. N

Blk = All;

Blu = IOP w/Internal Radio

;

Red = IOP & LBM

;

Grn = Engine only

95

0x02 – Directory (of files specified by date/time)

Obtaining a directory of files on the file system generally involves multiple requests. To
initiate a directory request, the user should send a directory request specifying a date and
time as well as setting bit 0 of W4 to 1 or 0 depending on whether files before or after the
specified date are desired. In the initial request, the page number should be set equal to
zero. The IOP will respond with a message containing up to 18 directory entries matching
the specified time stamp criterion. If there are additional matching entries, bit 2 of W5 will be
set to zero, indicating “this is not the final page.” In this case, the user should send another
request identical to the previous request except with the page number incremented by 1.
The IOP will then respond with the next 18 matching entries. This process continues until
an IOP response is received with B2=1 in W5. At that time, the user has received directory
entries for all matching files.

In order to preserve word alignment, the length of each file name, including null terminators,
should be even. If necessary, an extra null terminator (‘\0’ character) should be appended
to support this requirement. For example, a file name TEST.TXT consists of eight
characters plus a null terminator, for a total of nine. An extra null terminator should be
added in this case to bring the total number of bytes to ten. The same convention will be
used for the file names in the response message.

Request

Record
Usage

Command - Yes
Response - No

Input: DOS file directory request;
Output: see table below

Ref

Message Field Description

Data

Type

Units

Range

Scale

Byte

Count

STX

02

(hex)

U08

1

PRA1 99 (hex)

U08

1

PRA2 66 (hex)

U08

1

ID

7e(hex)

U08

1

Length 0xXXXX

U16

2

W1

Sub ID 0x02

U08

1

W2

0x00 (request)

U08

1

W3

Page Number

U16

2

W4

Control

B0=1: Files Before Specified Date

0: Files Later Than Or Equal

To

Specified

Date

U08

1

W5

Spare

U08

1

W6

Selected Date

B15-B9: Years since
B8-B5:
B4:B0:

U16

years

month

day

0-65535

1-12
1-31

n+1980

2

W7

Selected Time

B15-B11:
B10-B5:
B4-B0:

U16

hrs

min
sec

0-23
0-59
0-29



n/2

2

CKSM Checksum

U08

1

ETX

03

(hex)

U08

1

Advertising