GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CPU_DB / V0-3-0

Constituent: cpu_db_server     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

CPU_DB_prvdefs.h File Reference

Private definitions for CPU_DB. More...

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


Data Structures

struct  _CPU_DB_Bounds
 Structure incorporating both CPU/SDI protocol and extra context. More...

Defines

#define CPU_DB_B_SERIAL   (0x00)
#define CPU_DB_K_SERIAL   (0x00)
#define CPU_DB_L_SERIAL   (0xff)
#define CPU_DB_B_EBM   (0x01)
#define CPU_DB_K_EBM   (0x21)
#define CPU_DB_L_EBM   (0x06)
#define CPU_DB_B_ITC   (0x02)
#define CPU_DB_K_ITC   (0x00)
#define CPU_DB_L_ITC   (0x05)
#define CPU_DB_B_INSTRUMENT   (0x03)
#define CPU_DB_K_INSTRUMENT   (0x00)
#define CPU_DB_L_INSTRUMENT   (0x10)

Typedefs

typedef _CPU_DB_Bounds CPU_DB_Bounds
 Typedef for struct _CPU_DB_Bounds.

Functions

CPU_DB_TaskID CPU_DB_getTaskID (const char *name)
 Return the (CPU_DB) task ID for the task with the given name.
const char * CPU_DB_getTaskName (CPU_DB_TaskID tid)
 Return a pointer to the task name for a given task ID.
int CPU_DB_getTaskPriority (CPU_DB_TaskID tid)
 Return the task priority for a given task ID.
CPU_DB_Type CPU_DB_getType (void)
 Return the CPU type (SIU, EPU, or SC) as recorded in the CPU database.
void CPU_DB_initialize (void)
 Initialize the CPU_DB system.
void CPU_DB_setSerial (unsigned char ser[4])
 Set the serial number based on the decoded elements.

Detailed Description

Private definitions for CPU_DB.

CVS $Id: CPU_DB_prvdefs.h,v 1.1 2007/04/13 02:25:33 apw Exp $
Author:
A.P.Waite

Function Documentation

CPU_DB_TaskID CPU_DB_getTaskID const char *  name  ) 
 

Return the (CPU_DB) task ID for the task with the given name.

Parameters:
name Task name (as it appears in the CPU_DB task table)
Return values:
x Task ID (from CPU_DB enumeration)
0 No task ID found
CPU_DB_getTaskID() returns a the task ID (from the CPU_DB enumeration) for the task with task name "name". If the name can't be found, the value zero (the "anonymous" task) is returned.

const char* CPU_DB_getTaskName CPU_DB_TaskID  tid  ) 
 

Return a pointer to the task name for a given task ID.

Parameters:
tid Task ID (from CPU_DB enumeration)
Return values:
x Pointer to task name
NULL No task name found
CPU_DB_getTaskName() returns a pointer to a task name for the given task ID NULL is returned if the task ID cannot be found.

int CPU_DB_getTaskPriority CPU_DB_TaskID  tid  ) 
 

Return the task priority for a given task ID.

Parameters:
tid Task ID (from CPU_DB enumeration)
Return values:
-1 Task priority not found
x Task priority
CPU_DB_getTaskPriority() returns the task priority for a given task ID. If a task priority cannot be found, -1 is returned.

CPU_DB_Type CPU_DB_getType  ) 
 

Return the CPU type (SIU, EPU, or SC) as recorded in the CPU database.

Return values:
CPU_DB_TYPE_NONE Could not identify CPU type (missing database?)
CPU_DB_TYPE_SIU SIU
CPU_DB_TYPE_EPU EPU
CPU_DB_TYPE_SC SC
CPU_DB_getType() returns the type of the calling CPU, as recorded in the CPU database. Intended as a cross-check to avoid the situation where the database specific to one type of CPU is accidentally loaded on another.

void CPU_DB_initialize  ) 
 

Initialize the CPU_DB system.

CPU_DB_initialize() initializes the CPU_DB system. This reduces to setting up the CPU serial number. This is the method for setting up the serial number on a COTS crate (mv2304 or mcp750).

void CPU_DB_setSerial unsigned char  ser[4]  ) 
 

Set the serial number based on the decoded elements.

Parameters:
ser (in) Serial number elements.
CPU_DB_setSerial() sets the CPU serial number based on the decoded elements given to it. In the case of an ambiguous assignment (classically EBM address 0x21) it will update the serial number according to the CPU_DB database type (SIU of EPU) that's been loaded. Otherwise, any conflicts will result in the CPU serial number being set to -1 (no information).


Generated on Fri Apr 13 01:41:23 2007 by  doxygen 1.4.4