GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CFG / V0-1-0

Constituent: cfg     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

CFG.h File Reference

CFG structs and defines. More...

#include "PBI/Endianness.h"

Include dependency graph for CFG.h:

Include dependency graph

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

Included by dependency graph

Data Structures

struct  _CFG_array
 Holds an array of objects of a given type. More...

union  _CFG_arrayTypes
 Union of pointer to different types. More...

struct  _CFG_baf
 Defines the Block Address Field of the two representations of a type/id pair or an address. More...

struct  _CFG_bod
 Beginning of Database block. More...

struct  _CFG_collection
 Defines a collection of values. More...

struct  _CFG_eod
 End of Database block. More...

struct  _CFG_hdr
 Standard CFG header. More...

struct  _CFG_parameter
 Simple parameter block. More...

struct  _CFG_relsym
 Holds one NULL-terminated string that is the name of a relocatable symbol. More...

struct  _CFG_routine
 Describes the parameters of a routine. More...

struct  _CFG_runRoutine
 Block to run the given routine. More...

struct  _CFG_startTask
 Block to start the given task. More...

struct  _CFG_startTaskByRoutine
 Block to run the given routine. More...

struct  _CFG_string
 Holds one NULL-terminated string. More...

struct  _CFG_task
 Describes the parameters of a task. More...

union  _CFG_typeId_u
 Defines the type and id fields as a union of the field representation and the 32-bit representation. More...

struct  _CFG_typeId_us
 Defines a type and id of a configuration block as two separate fields. More...


Defines

#define CFG_TYPE_ID(_type, _id)   ((_type << 16) | (_id))
 Macro to compose a single 32-bit type/id value from the separate fields.


Typedefs

typedef enum _CFG_types CFG_types
 Typedef for enum _CFG_type, use in CFG_type.

typedef enum _CFG_dtype CFG_dtype
 Typedef for enum _CFG_dtype.

typedef unsigned short int CFG_type
 Defines datasize of item type, use enums from CFG_types.

typedef unsigned short int CFG_id
 Defines datasize of item id.

typedef unsigned int CFG_typeId
 Defines datasize of item typeId.

typedef _CFG_typeId_us CFG_typeId_us
 Typedef for struct _CFG_typeId_us.

typedef _CFG_typeId_u CFG_typeId_u
 Typedef for struct _CFG_typeId_u.

typedef _CFG_baf CFG_baf
 Typedef for struct _CFG_baf.

typedef _CFG_hdr CFG_hdr
 Typedef for struct _CFG_hdr.

typedef CFG_hdr CFG_db
 Points to start of db.

typedef _CFG_bod CFG_bod
 Typedef for struct _CFG_bod.

typedef _CFG_eod CFG_eod
 Typedef for struct _CFG_eod.

typedef _CFG_parameter CFG_parameter
 Typedef for struct _CFG_parameter.

typedef _CFG_arrayTypes CFG_arrayTypes
 Typedef for union _CFG_arrayTypes.

typedef _CFG_array CFG_array
 Typedef for struct _CFG_array.

typedef _CFG_collection CFG_collection
 Typedef for CFG_collection.

typedef _CFG_string CFG_string
 Typedef for CFG_string.

typedef _CFG_relsym CFG_relsym
 Typedef for CFG_relsym.

typedef _CFG_task CFG_task
 Typedef for struct _CFG_task.

typedef _CFG_startTask CFG_startTask
 Typedef for struct _CFG_startTask.

typedef _CFG_startTaskByRoutine CFG_startTaskByRoutine
 Typedef for struct _CFG_startTaskByRoutine.

typedef _CFG_routine CFG_routine
 Typedef for struct _CFG_routine.

typedef _CFG_runRoutine CFG_runRoutine
 Typedef for struct _CFG_runRoutine.


Enumerations

enum  _CFG_types {
  CFG_TYPE_K_BOD = 0xbbb0,
  CFG_TYPE_K_EOD = 0xeee0,
  CFG_TYPE_K_STRING = 1,
  CFG_TYPE_K_PARAMETER = 2,
  CFG_TYPE_K_ARRAY = 3,
  CFG_TYPE_K_COLLECTION = 4,
  CFG_TYPE_K_RELSYM = 5,
  CFG_TYPE_K_DESC_TASK = 6,
  CFG_TYPE_K_DESC_ROUTINE = 7,
  CFG_TYPE_K_START_TASK = 0x10,
  CFG_TYPE_K_RUN_ROUTINE = 0x11,
  CFG_TYPE_K_START_TASK_RTN = 0x12
}
 Enumerate the supported configuration block types. More...

enum  _CFG_dtype {
  CFG_K_DTYPE_UNDEF = -1,
  CFG_K_DTYPE_BU = 0,
  CFG_K_DTYPE_BS = 1,
  CFG_K_DTYPE_SU = 2,
  CFG_K_DTYPE_SS = 3,
  CFG_K_DTYPE_IU = 4,
  CFG_K_DTYPE_IS = 5,
  CFG_K_DTYPE_LLU = 6,
  CFG_K_DTYPE_LLS = 7,
  CFG_K_DTYPE_F = 8,
  CFG_K_DTYPE_D = 9
}
 Enumerates the support data types. More...


Detailed Description

CFG structs and defines.

Author:
Ed Bacho -- ebacho@slac.stanford.edu
These are the structs and defines needed by both the write and read sides of the CFG system.

Define Documentation

#define CFG_TYPE_ID _type,
_id   )     ((_type << 16) | (_id))
 

Macro to compose a single 32-bit type/id value from the separate fields.

((_type << 16) | (_id))

Returns:
A single 32-bit value representing the type and id
Parameters:
_type The block type
_id The block id


Typedef Documentation

CFG_baf
 

Typedef for struct _CFG_baf.

All known CFG blocks with type/ids used to reference other blocks have their type/ids replaced with the block address. This would apply to relocable symbols, but not collections where one does not know a priori which are which....

CFG_bod
 

Typedef for struct _CFG_bod.

Every CFG data base object must start with this mandatory block

CFG_collection
 

Typedef for CFG_collection.

A collection block consists of a counted array of 32-bit objects. These objects may be simple 32-bit values or they may be 32-bit type + id pairs that reference another block. The fixup stage resolves the type/id pairs to addresses. In order to do this, the fixup stage must know which are values, i.e. hands off and which are type/ids. It does this by consulting a bit array contained in the 32-bit words immediately following the data. Each bit indicates
  • 0, corresponding entry is a value
  • 1, corresponding entry is a type/id pair

The bits are packed big-endian style so that the entry corresponds with bit 0, the most significant bit, of the first word following the data words.
Example
Suppose one has a collection given by
Define_ParameterId(Z, 10, 20); Define_CollectionId(A, 11, Val(1), Val(2), TypeId(Z), Val(3));

The block would look like
             length in bytes:                            32
                                 CFG_TYPE_K_COLLECTION | 11
             number of dat's                              4
                      dat[0]                              1
                      dat[1]                              2
                      dat[2]      CFG_TYPE_K_PARAMETER | 10
                      dat[3]                              3
                      dat[4]                     0x20000000

The number of data objects is 4, accounting for dat[0-3]. One needs 1 more word to hold the bit mask of object types. Since only object #2 (using zero based counting) is a type/id pair, only bit 3 is set.

CFG_db
 

Points to start of db.

Every CFG data object must start with this identifying header

CFG_dtype
 

Typedef for enum _CFG_dtype.

This mainly used in connection with array types, but eventually could find uses elsewhere.

CFG_eod
 

Typedef for struct _CFG_eod.

Every CFG data base object must end with this mandatory block

CFG_parameter
 

Typedef for struct _CFG_parameter.

A parameter block carries the standard identifying header and one 32 value. It is the simplest block in the system

CFG_routine
 

Typedef for struct _CFG_routine.

This block describes the parameters associated with a routine. It does not start a task, that is the job of Run_Routine macro

CFG_runRoutine
 

Typedef for struct _CFG_runRoutine.

This block runs the routine described in CFG_routine

CFG_startTask
 

Typedef for struct _CFG_startTask.

This block starts the task described in CFG_task

CFG_startTaskByRoutine
 

Typedef for struct _CFG_startTaskByRoutine.

This block runs the start routine described in CFG_task

CFG_task
 

Typedef for struct _CFG_task.

This block describes the parameters associated with a task. It does not start a task, that is the job of Start_Task macro


Enumeration Type Documentation

enum _CFG_dtype
 

Enumerates the support data types.

Enumeration values:
CFG_K_DTYPE_UNDEF  unspecified
CFG_K_DTYPE_BU  byte (unsigned)
CFG_K_DTYPE_BS  byte ( signed)
CFG_K_DTYPE_SU  short (unsigned)
CFG_K_DTYPE_SS  short ( signed)
CFG_K_DTYPE_IU  integer (unsigned)
CFG_K_DTYPE_IS  integer ( signed)
CFG_K_DTYPE_LLU  long long (unsigned)
CFG_K_DTYPE_LLS  long long ( signed)
CFG_K_DTYPE_F  Single precision float
CFG_K_DTYPE_D  Double precision float

enum _CFG_types
 

Enumerate the supported configuration block types.

Enumeration values:
CFG_TYPE_K_BOD  Beginning of Data Base
CFG_TYPE_K_EOD  End of Data Base
CFG_TYPE_K_STRING  Holds one string block
CFG_TYPE_K_PARAMETER  Holds one parameter, of type dtype
CFG_TYPE_K_ARRAY  Holds an array of type dtype
CFG_TYPE_K_COLLECTION  Holds a collection of N integers or type | id pairs
CFG_TYPE_K_RELSYM  Holds the name of one relocatably symbol
CFG_TYPE_K_DESC_TASK  Holds the description of a task
CFG_TYPE_K_DESC_ROUTINE  Holds the description of a routine
CFG_TYPE_K_START_TASK  Holds a Start/Task order
CFG_TYPE_K_RUN_ROUTINE  Holds a Run/Routine order
CFG_TYPE_K_START_TASK_RTN  Holds a Start Task by StartRoutine order


Generated on Sun Jul 17 06:07:00 2005 by doxygen 1.3.3