Michael Piepers homepage | |||||
BeOS Programs | |||||
PalmBeach | |||||
PSION Link Protocol description | |||||
RFSV Protocol description |
The command FOPEN used over either a file to open a file or a whole DEVICE! In order to be able to operate later thereby, a File handle will be returned the delivery, to that with further internal messages must be used.
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!
The instruction FOPEN is consequently built into the PLP:
Header | PLP | RFSV FOPEN | Footer | CRC | |||
---|---|---|---|---|---|---|---|
16 10 02 | 32 03 02 01 | Command 00 00 |
Size 17 00 |
Mode 05 00 |
File name "REM::\M:\AGN\AGENDA.AGN" |
10 03 | 12 34 |
A valid response takes place with the command RESPONSE and returns the delivery an error code, or a valid file descriptor. In the following an example is represented, which returns the delivery the File handle 1.
Header | PLP | RFSV-RESPONSE | Footer | CRC | |||
---|---|---|---|---|---|---|---|
16 10 02 | 33 02 03 01 | Command 2a 00 |
Size 04 00 |
Result 00 00 |
File handle 01 00 |
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 instruction. |
The command FOPEN consists of 4 information units. These have the following meanings:
Length in byte | possible values | Meaning | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Command | 2 byte | 00 00 (fixed) | The command identifier has always the same value! | |||||||||||||||||||||||||||||||||||||||||||||
Size | 2 byte | variable | Since the file name with is transmitted, the value of the length of the file name, needed here, depends! The length, which is indicated here, covers the area mode + file name inclusive of the final 0-Bytes with the file name! | |||||||||||||||||||||||||||||||||||||||||||||
Mode | 2 byte | variable | The open mode assembles itself by addition of the following values!
|
|||||||||||||||||||||||||||||||||||||||||||||
File name | 1 byte or more | 0-terminated string | The file name is to be transmitted, which is to be opened. |
The command FOPEN is answered with RESPONSE. This returns the delivery as result an error code and in case of success a File description, to that with further accesses to the file to be used must;!
Length in byte | possible values | Meaning | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Command | 2 byte | 00 2a (fixed) | The command identifier has always the same value! | ||||||||||||||||||||
Size | 2 byte | 00 04 (fixed) | Always 4 additional byte are supplied! | ||||||||||||||||||||
Result | 2 Byte | variable | The following Values are possible:
|
||||||||||||||||||||
File handle | 2 byte | variable | You get the filehandle as the result. You have to use this handle for every further access to this file. |
Michael Piepers homepage | |||||
BeOS Programs | |||||
PalmBeach | |||||
PSION Link Protocol description | |||||
RFSV Protocol description |