Michael Piepers homepage | |||||
BeOS Programs | |||||
PalmBeach | |||||
PSION Link Protocol description | |||||
RFSV Protocol description |
The command FDIRREAD requests contents of a complete directory. However the implementation in the PSION has only a Buffer of 590 byte size. Thus the command must be transmitted with bigger directories several times around all file entries to receive. The end of the list is achieved if the message " eof " is transmitted as result.
The command FINFO is comparable with this command. FINFO returns the delivery the information however only for an already well-known directory entry.
It is to be noted that; all values, which are more greater than 8 bits in reverse order will transfer. The LOW byte sent as the first over the line and only then follows the HIGH byte!
That command FDIRREAD has always the same format. It is as a consequence;en built into the PLP:
Header | PLP | RFSV FDIRREAD | Footer | CRC | ||
---|---|---|---|---|---|---|
16 10 02 | 32 03 02 01 | Command 00 00 |
Size 02 00 |
file handle 01 00 |
10 03 | 12 34 |
A valid response takes place with the command RESPONSE and returns the delivery an error code and several file information.
The block "Fileinfo" contains all information of a file or folder. Whenever this section is repeated, until all entries of the directory are contained, or which is filled internal buffers! Thereby if the max. length of the PLP is exceeded, then the message is divided into several partial messages!
Header | PLP | RFSV RESPONSE | ... | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
16 10 02 | 33 02 03 01 | Command 2a 00 |
Size 5a 00 |
Result 00 00 |
Size 2 56 00 |
... ... |
... | File info. can be several times contained! | ... | |||||
---|---|---|---|---|---|---|---|
... ... |
Version 02 00 |
Status 21 05 |
File Size a8 02 00 00 |
Mod.Date 14 5d 6f 33 |
Reserve ff ff ff ff |
File name "agenda.agn" |
... ... |
Footer | CRC | |
---|---|---|
10 03 | 12 34 |
bold | Values represent fixed of values, which are used accurately in such a way! |
italic | Values represent examples, which have a different meaning on the basis the command. |
The command FDIRREAD consists of 3 information units. These have the following meanings:
Length in byte | possible values | Meaning | |
---|---|---|---|
Command | 2 byte | 00 06 (fixed) | The command identifier has always the same value! |
Size | 2 byte | 00 02 (fixed) | Always two bytes will transfer. |
File handle | 2 byte | variable | The file handle is to be transferred, which was returned the delivery, when with FOPEN the directory was opened. |
The command FDIRREAD is answered with RESPONSE. This returns the delivery an error code as result. If 00 00 is returned the delivery, then no error occurred.
Length in byte | possible values | Meaning | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Command | 2 byte | 00 2a (fixed) | The command identifier has always the same value! | ||||||||||||||||||||||||||||||
Size | 2 byte | variable | Dependent on the number of transmitted information units | ||||||||||||||||||||||||||||||
Result | 2 byte | variable | The result can obtain the following values:
|
||||||||||||||||||||||||||||||
Size 2 | 2 byte | variable | The length supplies to bytes, in which the information of the files is stored. | ||||||||||||||||||||||||||||||
The following block can occur several times and describes accurately in each case a file or a folder! | |||||||||||||||||||||||||||||||||
Version | 2 byte | 00 02 | At present only the version 2 is supported. | ||||||||||||||||||||||||||||||
Status | 2 byte | variable | Describes the status of file or a folder. The following status are possible:
|
||||||||||||||||||||||||||||||
File Size | 4 byte | variable | The size of the file in absolute bytes is returned the delivery. | ||||||||||||||||||||||||||||||
Modification date | 4 byte | variable | The modification date of the file is indicated in secondes since the Jan. 1. 1970 | ||||||||||||||||||||||||||||||
Reserve | 4 byte | ff ff ff ff | For extensions of the log 4 bytes were kept free | ||||||||||||||||||||||||||||||
File name | at least 1 byte | 0-terminated string | Only the file name is entered. The path may not be indicated. There is max. possible for 128 byte! | ||||||||||||||||||||||||||||||
The preceding block up to the first yellow beam can occur repeatedly! |
Michael Piepers homepage | |||||
BeOS Programs | |||||
PalmBeach | |||||
PSION Link Protocol description | |||||
RFSV Protocol description |