SHIPHarbour:Files:Transmit

From Serious Documentation
Jump to: navigation, search

Source File

SHIPHarbour_Files.proto

Description

These messages are used to upload any arbitrary file to a Serious Integrated module. File transfers will result in multiple messages between SHIPHarbour Master and the client. The client must first send the parameters of the transfer to ensure that the transfer will be possible. Then the file data may be transmitted, during this time, SHIPHarbour Master will generate response messages of this same type to inform the client of the progress of the file being transmitted to the module.

Message Fields

Initial Message Fields

These fields are required in the first message to request the start of the routine execution.

filesystem

An FSType indicating what kind of file system should be accessed.

instance

A number indicating exactly which file system should be accessed.

filepath

The complete destination file path starting from the root directory.

NOTE: Any existing file at this location will be automatically truncated and replaced by the new file.

NOTE: As of the writing of this document, only 8.3 filenames in the root directory are supported by Serious Integrated modules.

interval

The minimum number of milliseconds between responses to the request describing the progress of the operation.

total

The total number of bytes in the new file.


Secondary Message Fields

File data can be streamed or sent in a single chunk, but must be sent after the initial parameters.

fileData

Byte buffer containing the file data for the new file to upload to a Serious Integrated module.


Response Message Fields

These fields will be used by SHIPHarbour Master to notify the client of the progress of the operation.

current

A number indicating the current progress as compared to the field total.

total

A number indicating the value that current must match before this operation is complete.