GLAST/LAT > DAQ and FSW > FSW

File Load Telecommand Function Codes


File Load Telecommand Function Codes
APID Function Code Description Boot Mode M -> S S -> M
0x641 0 File Upload Start. Announces the beginning of a new upload; provides total size and packet count. Yes 0x711 N/A
1 File Upload Cancel. Cancels an outstanding upload set. Yes 0x711 N/A
2 File Upload Commit. Writes the upload data to the final storage destination. Yes 0x711 N/A
3 File Upload Data. Actual file upload data string packet. Yes 0x711 N/A
4 File Delete. Remove a file from on-board storage. No 0x711 N/A
5 File Copy. Copies the contents of one file into another. Local only. No 0x711 N/A
6 SIU to EPU File Load. Loads the contents of a file that is resident on the SIU to a file location on an EPU. No N/A N/A
7 File Object Link. Loads the contents of an ELF object file into memory. No 0x711 N/A

The LAT maintains multiple file system partitions on board. Each file system partition is able to hold one level of directories and many files in each directory. The telecommands detailed in this section fall into two broad groups: file-upload telecommands and file-maintenance telecommands. When in boot mode, only the file-upload subset of the file-management telecommands is available. All files visible to the boot code are stored as memory images, at known locations, rather than as entities within a file system.

Each file upload is announced with a File Upload Start command. This command first checks to see if no upload is outstanding, and if clear, resets the file-upload state machine. The expected number of packets and total bytes of file data are recorded. At this point, a File Upload Cancel command may be issued at any time to reset the upload process such that all currently received data is flushed; a new File Upload Start command is needed to restart the upload of a file. Once a complete set of of File Upload Data packets has been received and validated, a File Upload Commit command is needed to actually write the data to the final storage destination. Until this command is sent, the data will be held in a temporary buffer.

The contents of a file upload are always stored in a temporary buffer until an explicit File Upload Commit command has been received. The file data are never written directly into a storage location. In both boot and nominal commanding modes, only one temporary file-upload buffer exists. Thus, only one upload may be in progress at a given time. In boot commanding mode, the additional restriction exists that a file upload may not commence while a boot memory dump is in progress. The memory dump must be canceled or completed before the File Upload Start telecommand will be accepted.

Each of the on-board LAT files is designated by a 32-bit file ID. The ID is composed of three bit fields: File Device, File Directory, and File Number. The File Device field designates a particular storage device.

File Storage Devices
File Device Name Description EPU
0 N/A Boot device Yes
1 /ram RAM disk Yes
2 /ee0 SIB EEPROM partition 0 Yes
3 /ee1 SIB EEPROM partition 1 No

Each device may have up to 125 directories, with directory values '0' and '127' reserved. Each directory may hold numerous files, designated by the file-number field of the file ID. The file ID is translated on board into a file system path of the form /device/dxxx/fyyyyyyy, where xxx is the directory number and yyyyyyy is the file number. For example, file number 4 in directory 10 on EEPROM partition 0 would have the path name /ee0/d010/f0000004.

The boot device designates file storage areas in SDRAM or EEPROM, where the file is stored in absolute format at known addresses. No file-system code is necessary to access these file areas. This feature is to support the use of files by the primary and secondary boot codes. The boot device has no defined directories, and the files may be designated by a file number alone.