GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FBS / V0-3-1 > fbs_rtos / rad750
#include <stdlib.h>
#include <string.h>
#include <MDB/MDB_pubdefs.h>
#include <FBS/FBS_pubrtos.h>
#include <FBS/FBS_msgs.h>
Defines | |
#define | FILE_ID_TO_PATH_USR(_str, _dev, _dir, _file) snprintf((_str), FILE_PATH_STR_SIZE_USR, "%s/d%03u/f%07u", (_dev), (_dir), (_file)); |
#define | FILE_DEV_NUM_MAX FILE_DEV_NUM_USR |
Functions | |
unsigned int | FILE_pathInit (const char *usrName, const char *deprecated) |
unsigned int | FILE_pathSizeof (void) |
Get the size of a file path string. | |
unsigned int | FILE_pathIdToNum (unsigned int id, unsigned int *dev, unsigned int *dir, unsigned int *file) |
Translates a file ID word into component numbers. | |
unsigned int | FILE_pathNumToId (unsigned int *id, unsigned int dev, unsigned int dir, unsigned int file) |
Translates file component numbers to an ID word. | |
unsigned int | FILE_pathIdToPath (unsigned int id, char *str) |
Translates file ID word to an ASCII path name. | |
unsigned int | FILE_pathPathToId (const char *nam) |
Convert a file name to a file ID (if possible). | |
Variables | |
static char | FILE_devUser [FILE_PATH_STR_SIZE_USR] |
static char * | FILE_devNames [8] |
#define FILE_DEV_NUM_MAX FILE_DEV_NUM_USR |
The largest valid device number allowed for mapping functions.
Referenced by FILE_pathIdToNum(), FILE_pathIdToPath(), FILE_pathNumToId(), and FILE_pathPathToId().
#define FILE_ID_TO_PATH_USR | ( | _str, | |||
_dev, | |||||
_dir, | |||||
_file | ) | snprintf((_str), FILE_PATH_STR_SIZE_USR, "%s/d%03u/f%07u", (_dev), (_dir), (_file)); |
Translates user-defined file component numbers to an ASCII path name.
_str | Storage for the path string. | |
_dev | The device name. | |
_dir | The directory number. | |
_file | The file number. |
Referenced by FILE_pathIdToPath().
unsigned int FILE_pathIdToNum | ( | unsigned int | id, | |
unsigned int * | dev, | |||
unsigned int * | dir, | |||
unsigned int * | file | |||
) |
Translates a file ID word into component numbers.
id | The file ID word. | |
dev | Storage for the device number. | |
dir | Storage for the directory number. | |
file | Storage for the file number. |
References FILE_DEV_NUM_MAX, and FILE_ID_TO_NUM.
unsigned int FILE_pathIdToPath | ( | unsigned int | id, | |
char * | str | |||
) |
Translates file ID word to an ASCII path name.
id | The file ID word. | |
str | Storage for the file path string. |
References dir, FILE_DEV_NUM_MAX, FILE_ID_TO_NUM, FILE_ID_TO_PATH, and FILE_ID_TO_PATH_USR.
Referenced by FILE_loadModuleByID(), and FILE_loadModuleSecondary().
unsigned int FILE_pathNumToId | ( | unsigned int * | id, | |
unsigned int | dev, | |||
unsigned int | dir, | |||
unsigned int | file | |||
) |
Translates file component numbers to an ID word.
id | Storage for the file ID word. | |
dev | The device number. | |
dir | The directory number. | |
file | The file number. |
References FILE_DEV_NUM_MAX, and FILE_NUM_TO_ID.
unsigned int FILE_pathPathToId | ( | const char * | nam | ) |
Convert a file name to a file ID (if possible).
nam | (in) File name |
0xffffffff | Could not translate file name | |
x | File ID |
References dir, and FILE_DEV_NUM_MAX.
Referenced by FILE_loadModuleByName().
unsigned int FILE_pathSizeof | ( | void | ) |
Get the size of a file path string.
References FILE_PATH_STR_SIZE_USR.
FILE_devNames [static] |
Initial value:
{ FILE_DEV_NAME_BOOT, FILE_DEV_NAME_RAM, FILE_DEV_NAME_EE0, FILE_DEV_NAME_EE1, FILE_DEV_NAME_MEM, FILE_DEV_NAME_MM0, FILE_DEV_NAME_MM1, NULL }
FILE_devUser [static] |
Name storage for a user device name