fdhwlib  2.0.25
Subrack Class Reference

#include <Subrack.h>

Inheritance diagram for Subrack:
SubrackBase

List of all members.

Public Member Functions

Public Attributes

Private Attributes


Detailed Description

Collection for all components of the FD electronic in the hardware level.

The class defines the access to the SLT and the 20 FLT boards. There is also a management of empty and ocupied slots.

Changes:

  • The checkSlot() used specific information of the register contents, now replaced by the call of getSlotID(), 8.1.01 - ak
Todo:
Insert version number

Definition at line 65 of file Subrack.h.


Constructor & Destructor Documentation

Subrack::Subrack ( const char *  inifile = "FE.ini",
int  mode = 0 
)

Constructor.

Parameters:
inifileFile name of the ini file to read the required parameters for the Pbus connection
modeMode of the creation: 0 normal, 1 without initialization of the Pbus connection.

Member Function Documentation

int Subrack::closeHandler ( )

Kill the interupt handler.

int Subrack::closeIRHandler ( )

Close connection to IRQ dispatcher.

void Subrack::configure ( )

Re-configure Flt and Slt FPGA The system should return the same after power-on.

void Subrack::dumpRegisters ( FILE *  fout = stdout,
int  cols = 8 
)

Dump all register information.

The set of all registers defined the function + state of the electronic.

Parameters:
foutoutput stream
colsnumber of colums that should be displayed in a line
int Subrack::handleErrors ( )

Handle all error interrupts.

The errors are analysed and written to the error log. The error handler is started in separate process.

void Subrack::init ( FILE *  fout,
char *  inifile 
)

Init of the electronics.

The parameters of the registers can be used to specify the required value in the inifile.

Example:

[SltInit]
Control =                 00002c79
IRMask  =                 000001ff
TestpulsAmpl =            000005dc
SetSecCounter =           2daff6d5
T1 =                      00000578
IRInput =                 000000a3
SensorMask =              00000000
...
[FltInit]
...
Parameters:
foutOutput stream
inifileName of the inifile
Todo:

exention to initialize all connected telescopes

how to handle the different values for different pixel / telescopes?

are the names of the registers the best choise ???

print a generic inifile with all known registers.

Is it possible to check the system based on these register values? Where to define better entities?

int Subrack::initIRHandler ( const char *  inifile = "")

Establish a connection to the IRQ dispatcher.

void Subrack::reset ( )

Checks for available slots.

Returns a list of bits: 1 board available 0 empty slot Checks whether a board in the slot is present The slots are numbered from 0..20. Returns the (stored) configuration of the crate. (There is no access via PBUS!) The slots are numbered from 0..20. Reset subrack, clear all register

int Subrack::testFltConfig ( FILE *  fout,
int  level = 1,
bool  header = false 
)

Test the Flt configuration.

This test will

  • interrupt data taking
  • not delete any contents in a page
  • take a few miliseconds
Returns:
0 Ok, 1 Not all Flt boards are available, 2 Not all Flt boards are running
int Subrack::testFltHitrateController ( FILE *  fout,
int  level = 1,
bool  useStat = false,
bool  header = false 
)

Test the hitrate controller.

int Subrack::testFltStatistic ( FILE *  fout,
int  level = 1,
bool  header = false 
)

Test the Flt statistic to measure mean ADC value and background light level.

int Subrack::testSltConfiguration ( FILE *  fout,
int  level = 1,
bool  header = true 
)

Test the Slt configuration.

int Subrack::waitForInterrupt ( unsigned long *  irVector)

Wait for the next interrupt.


Member Data Documentation

float Subrack::meanADCVar [private]

Parameter for testing: Mean variance of the ADC values.

Definition at line 219 of file Subrack.h.

pid_t Subrack::pHandler [private]

Definition at line 213 of file Subrack.h.

Definition at line 210 of file Subrack.h.

Definition at line 166 of file Subrack.h.

Definition at line 164 of file Subrack.h.


The documentation for this class was generated from the following file: