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_serial.c File Reference

Serial number facilities. More...

#include <stdlib.h>
#include <string.h>
#include "CPU_DB/CPU_DB_msgs.h"
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "CPU_DB_prvdefs.h"
#include "CPU_DB_serial.c.ux-xxx-xxx"

Include dependency graph for CPU_DB_serial.c:


Functions

unsigned int CPU_DB_getSerial ()
 Return the (compound) CPU serial number.
void CPU_DB_setSerial (unsigned char ser[4])
 Set the serial number based on the decoded elements.

Variables

static unsigned int CPU_DB_serial
 CPU (compound) serial number.
static CPU_DB_Bounds bounds [4]
 Boundary conditions on elements of the serial number.
static const char * s_cpu [4] = { "SIU", "EPU0", "EPU1", "EPU2" }
 String constants used in error messages.

Detailed Description

Serial number facilities.

CVS $Id: CPU_DB_serial.c,v 1.1 2007/04/13 02:25:33 apw Exp $

Function Documentation

unsigned int CPU_DB_getSerial void   ) 
 

Return the (compound) CPU serial number.

Return values:
-1 CPU serial number cannot be determined
0 CPU serial number has not been initialized
x CPU serial number
CPU_DB_setSerial() returns the CPU's serial number.

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).


Variable Documentation

static CPU_DB_Bounds bounds[4] [static]
 

Initial value:

{
    { CPU_DB_K_SERIAL    , CPU_DB_K_SERIAL     + CPU_DB_L_SERIAL     },
    { CPU_DB_K_EBM       , CPU_DB_K_EBM        + CPU_DB_L_EBM        },
    { CPU_DB_K_ITC       , CPU_DB_K_ITC        + CPU_DB_L_ITC        },
    { CPU_DB_K_INSTRUMENT, CPU_DB_K_INSTRUMENT + CPU_DB_L_INSTRUMENT }
}
Boundary conditions on elements of the serial number.


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