Michael Piepers homepage
BeOS Programs
PalmBeach
PSION Link Protocol description
RFSV Protocol description

RFSV command FDEVICEREAD


Description of command

This command requests information to each individual DEVICE. Beforehand must; with the command FOPEN a file descriptor for a DEVICE to be requested. This value is to be transferred here. In order information to a well-known DEVICE too received, the command knows STATUSDEVICE are used.

The information of the first DEVICE returned the delivery with a further call is supplied the information of the next DEVICE. The end of the list is achieved if the message " eof " is transmitted as result.

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!


Transmission direction (command) in the interface format

That command FDEVICEREAD has always the same format. It is as a consequence;en built into the PLP:

Header PLP RFSV FDEVICEREAD Foot CRC
16 10 02 32 03 02 01 Command
08 00
Size
02 00
file handle
01 00
10 03 12 34

Receipt direction (result) in the interface format

A valid response takes place with the command RESPONSE and returns the delivery an error code. Per call the information is supplied by exactly one DEVICE. If one wants to have information to next DEVICES, must; one FDEVICEREAD transmit the command again.

Header PLP RFSV RESPONSE ...
16 10 02 33 02 03 01 Command
2a 00
Size
5a 00
Result
00 00
...
...

... DEVICE info.
...
...
Version
02 00
Type
02 00
changeable
00 00
Device Size
00 00 00 00
Free space
00 00 00 00
Name
"boot"
Battery
ff ff
Reserve
16 * ff
DEVICE name
"BeOS"
...
...

Foot CRC

10 03 12 34

boldValues represent fixed of values, which are used accurately in such a way!
italicValues represent examples, which have a different meaning on the basis the command.


Description of command

The command FDIRREAD consists of 3 information units. These have the following meanings:

Length in byte possible values Meaning
Command 2 byte 00 08 (fixed) The command identifier has always the same value!
Size 2 byte 00 02 (fixed) Always two bytes will transfer.
File name 2 byte variable The file handle is to be transferred, which was returned the delivery, when with FOPEN the DEVICE was opened.

Description of result

The command FDEVICEREAD 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:
NO_ERROR 00 00No error occurred
You can look at all defined errorvalues.
Version 2 byte 00 02 At present only the version 2 is supported.
Type 2 byte variable Determines, which type the DEVICE is. The following types are possible:
P_FMEDIA_UNKNOWN 00 00Unknown medium
P_FMEDIA_FLOPPY 00 01Floppy disk
P_FMEDIA_HARDDISK00 02Harddisk
P_FMEDIA_FLASH 00 03Flash PROM
P_FMEDIA_RAM 00 04RAM
P_FMEDIA_ROM 00 05ROM
P_FMEDIA_WRITEPROTECTED 00 06Write protected medium
P_FMEDIA_FORMATTABLE08 00The medium can be formatted
P_FMEDIA_DUAL_DENSITY10 00the medium has double density
P_FMEDIA_INTERNAL 20 00It is an internal medium
P_FMEDIA_DYNAMIC 40 00The Size is suited dynamically
P_FMEDIA_COMPRESSIBLE80 00Deleted data can be compressed
changeable 2 byte variable If the medium can be changed, then this value 00 01 (TRUE) has otherwise 00 00 (FALSE). This value becomes e.g.: with a floppy disk drive set.
Device Size 4 byte variable The size of the complete DEVICE is indicated in bytes.
Free space 4 byte variable The number of the free storage space on DEVICES is indicated in bytes.
Volume name 16 byte 0-terminated string Here the volume name may be indicated. The name may be max. 15 byte long the last byte must be a 0-Byte
Battery status 2 byte variable Gives the status to the battery of the DEVICE on (e.g.: with a buffered RAM)
Reserve 16 byte 16 * ff For extensions kept free workstation
DEVICE name 16 byte 0-terminated string Here the DEVICE name is entered

Michael Piepers homepage
BeOS Programs
PalmBeach
PSION Link Protocol description
RFSV Protocol description

Last modification Jan 31 1999 by Michael Pieper