GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > FILE / V3-8-1

Constituent: file_open_test     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

FILE_defs.h File Reference

Public File Definitions and Macros. More...

#include "stdio.h"

Include dependency graph for FILE_defs.h:

This graph shows which files directly or indirectly include this file:


File Device Definitions

#define FILE_DEV_NAME_BOOT   "/boot"
#define FILE_DEV_NAME_RAM   "/ram"
#define FILE_DEV_NAME_EE0   "/ee0"
#define FILE_DEV_NAME_EE1   "/ee1"
#define FILE_DEV_NAME_TMP   "/tmp"
#define FILE_DEV_NUM_BOOT   0
#define FILE_DEV_NUM_RAM   1
#define FILE_DEV_NUM_EE0   2
#define FILE_DEV_NUM_EE1   3
#define FILE_DEV_NUM_TMP   4
#define FILE_DEV_NUM_USR0   5
#define FILE_DEV_NUM_USR1   6

File ID Utility Macros

#define FILE_ID_M_DEV   0xe0000000
#define FILE_ID_M_DIR   0x1fc00000
#define FILE_ID_M_FILE   0x003fffff
#define FILE_ID_S_DEV   29
#define FILE_ID_S_DIR   22
#define FILE_ID_S_FILE   0
#define FILE_ID_TO_NUM(_id, _dev, _dir, _file)
#define FILE_NUM_TO_ID(_id, _dev, _dir, _file)

File Path Utility macros

#define FILE_PATH_STR_SIZE   24
#define FILE_PATH_STR_SIZE_USR   256
#define FILE_ID_TO_PATH(_str, _dev, _dir, _file)   snprintf((_str), FILE_PATH_STR_SIZE, "%s/d%03u/f%07u", (_dev), (_dir), (_file));

Detailed Description

Public File Definitions and Macros.

Author:
D.L. Wood
This header contains public file definitions for LAT FSW on-board files. Most of the definitions are utility macros.

Define Documentation

#define FILE_DEV_NAME_BOOT   "/boot"
 

The name of the boot file device.

#define FILE_DEV_NAME_EE0   "/ee0"
 

The name of the TFFS/EEPROM file device 0.

#define FILE_DEV_NAME_EE1   "/ee1"
 

The name of the TFFS/EEPROM file device 1.

#define FILE_DEV_NAME_RAM   "/ram"
 

The name of the RAM disk file device.

#define FILE_DEV_NAME_TMP   "/tmp"
 

The name of the temp file device.

#define FILE_DEV_NUM_BOOT   0
 

The device number of the boot file device.

#define FILE_DEV_NUM_EE0   2
 

The device number of the TFFS/EEPROM file device 0.

#define FILE_DEV_NUM_EE1   3
 

The device number of the TFFS/EEPROM file device 1.

#define FILE_DEV_NUM_RAM   1
 

The device number of the RAM disk file device.

#define FILE_DEV_NUM_TMP   4
 

The device number of the temp file device.

#define FILE_DEV_NUM_USR0   5
 

The devive number of the user file device 0.

#define FILE_DEV_NUM_USR1   6
 

The devive number of the user file device 1.

#define FILE_ID_M_DEV   0xe0000000
 

The file ID device number bitmask.

#define FILE_ID_M_DIR   0x1fc00000
 

The file ID directory number bitmask.

#define FILE_ID_M_FILE   0x003fffff
 

The file ID file number bitmask.

#define FILE_ID_S_DEV   29
 

The file ID device number shift count.

#define FILE_ID_S_DIR   22
 

The file ID directory number shift count.

#define FILE_ID_S_FILE   0
 

The file ID file number shift count.

#define FILE_ID_TO_NUM _id,
_dev,
_dir,
_file   ) 
 

Value:

{                                                                                                                               \
        *(_dev) = (((_id) & FILE_ID_M_DEV) >> FILE_ID_S_DEV);           \
        *(_dir) = (((_id) & FILE_ID_M_DIR) >> FILE_ID_S_DIR);           \
        *(_file) = (((_id) & FILE_ID_M_FILE) >> FILE_ID_S_FILE);        \
}
Translates a file ID word into component numbers.

Parameters:
_id The file ID word.
_dev Storage for the device number.
_dir Storage for the directory number.
_file Storage for the file number.

#define FILE_ID_TO_PATH _str,
_dev,
_dir,
_file   )     snprintf((_str), FILE_PATH_STR_SIZE, "%s/d%03u/f%07u", (_dev), (_dir), (_file));
 

Translates file component numbers to an ASCII path name.

Parameters:
_str Storage for the path string.
_dev The device name.
_dir The directory number.
_file The file number.

#define FILE_NUM_TO_ID _id,
_dev,
_dir,
_file   ) 
 

Value:

{                                                                                                                               \
        *(_id) = (((_dev) << FILE_ID_S_DEV) & FILE_ID_M_DEV);                   \
        *(_id) |= (((_dir) << FILE_ID_S_DIR) & FILE_ID_M_DIR);          \
        *(_id) |= (((_file) << FILE_ID_S_FILE) & FILE_ID_M_FILE);               \
}
Translates file component numbers to an ID word.

Parameters:
_id Storage for the file ID word.
_dev The device number.
_dir The directory number.
_file The file number.

#define FILE_PATH_STR_SIZE   24
 

The number of bytes needed to hold a system file path string.

#define FILE_PATH_STR_SIZE_USR   256
 

The number of bytes needed to hold a user-defined file path string.


Generated on Tue Oct 25 22:36:02 2005 by  doxygen 1.4.4