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

RFSV command FWRITE


Description of command

The command FWRITE used around data into a file opened before to write. It must; the same File handle to be used, as with the instruction FOPEN one returned the delivery.

Since with FWRITE very gross;e quantities of data will transfer can, it is to be made certain that; a command of several Frames to consist can! In PLP protocol the counter is inserted for it which indicates descending the number of blocks still which can be expected (inclusive of the own).

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

The instruction FWRITE is as a consequence built into the PLP:

Header PLP RFSV FWRITE Footer CRC
16 10 02 32 03 02 01 Command
0a 00
Size
12 34
File handle
01 00
Data
01 02 03 04 05...
10 03 12 34

If the instruction FWRITE is divided on several Frames, then in the log by the counter one marks. This is directly before the RFSV log and counts down. The following example shows two blocks, which show an FWRITE instruction with 512 byte data. The counter is yellow marked.

Header PLP Counter RFSV FWRITE part 1 Footer CRC
16 10 02 32 03 02 02 Command
0a 00
Size
02 02
File handle
01 00
Data
01 02 03 04 05...
10 03 12 34

Header PLP Counter RFSV FWRITE part 2 Footer CRC
16 10 02 33 03 02 01 Data
06 07 08 09 0a...
10 03 12 34

With the implementation for that BeOS this counter is however already analyzed in the basic program, so that; the blocks always compiled and the ADD on to be supplied.


Receipt direction (result) in the interface format

A valid response takes place with the command RESPONSE and returns the delivery an error code.

Header PLP RFSV RESPONSE Footer CRC
16 10 02 33 02 03 01 Command
2a 00
Size
02 00
Result
00 00
10 03 12 34

Description of command

The command FWRITE consists of 4 information units. These have the following meanings:

Length in byte possible values Meaning
Command 2 byte 00 0a (fixed) The command identifier has always the same value!
Size 2 byte variable The length of the complete instruction is indicated. If this is divided into two frames, then the specification corresponds to the length of both frames.
File handle 2 byte variable It is too transferred to the File handle, in whose file is to be written.
Data variable variable Here follow the data, which are to be written. The number is indicated in the field Size.

Description of result

The command FWRITE 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 00 02 (fixed) Always 2 additional byte are supplied!
Result 2 byte variable The result can obtain the following values:
NO_ERROR 00 00No error occurred
You can look at all defined errorvalues.

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

Last modification Jan 31 1999 by Michael Pieper