SctTest::DummyHardware Class Reference

For the moment this class maintains mid=>ABCDModule mappings for 3 banks and the original config. More...

#include <DummyHardware.h>


Public Member Functions

const ABCDModule & getConfig (UINT32 mid, SctApi::BankType type)
 Get the configuration for module mid in bank type.
void setConfig (UINT32 mid, SctApi::BankType type, const ABCDModule &config)
 Set the configuration for module mid and bank type.
const ABCDModule & getOriginalConfig (UINT32 mid)
 Get the original configuration, creating it if it doesn't exist (probably wrong!).
const ABCDModule & getCurrentConfig (UINT32 mid)
 Get the configuration the module is currently configured with.
void sendConfig (UINT32 mid, SctApi::BankType bank)
 Configure a module from a bank.

Static Public Member Functions

static DummyHardwareinstance ()
 Get the intance of the DummyHardware.

Private Member Functions

 DummyHardware ()

Private Attributes

vector< map< UINT32, ABCDModule > > configs
 Holds the banks of configuration.
map< UINT32, ABCDModule > originalConfig
 Holds the original config.
map< UINT32, ABCDModule > currentConfig
 Holds the current config.


Detailed Description

For the moment this class maintains mid=>ABCDModule mappings for 3 banks and the original config.

Currently, the original config is just the first config that is set.

Author:
Matthew Palmer

Definition at line 19 of file DummyHardware.h.


Member Function Documentation

const ABCDModule & SctTest::DummyHardware::getConfig UINT32  mid,
SctApi::BankType  type
 

Get the configuration for module mid in bank type.

If there is no such configuration, create it

Definition at line 24 of file DummyHardware.cpp.

References configs.

const ABCDModule & SctTest::DummyHardware::getCurrentConfig UINT32  mid  ) 
 

Get the configuration the module is currently configured with.

Create if none.

Definition at line 47 of file DummyHardware.cpp.

References currentConfig.

const ABCDModule & SctTest::DummyHardware::getOriginalConfig UINT32  mid  ) 
 

Get the original configuration, creating it if it doesn't exist (probably wrong!).

Definition at line 43 of file DummyHardware.cpp.

References originalConfig.

DummyHardware & SctTest::DummyHardware::instance  )  [static]
 

Get the intance of the DummyHardware.

Definition at line 12 of file DummyHardware.cpp.

void SctTest::DummyHardware::sendConfig UINT32  mid,
SctApi::BankType  bank
 

Configure a module from a bank.

Definition at line 52 of file DummyHardware.cpp.

References configs, and currentConfig.

void SctTest::DummyHardware::setConfig UINT32  mid,
SctApi::BankType  type,
const ABCDModule &  config
 

Set the configuration for module mid and bank type.

If the module has no previous configuration, store it also in the original configuration.

Definition at line 29 of file DummyHardware.cpp.

References originalConfig.


Field Documentation

vector< map<UINT32, ABCDModule> > SctTest::DummyHardware::configs [private]
 

Holds the banks of configuration.

Definition at line 54 of file DummyHardware.h.

Referenced by getConfig(), and sendConfig().

map<UINT32, ABCDModule> SctTest::DummyHardware::currentConfig [private]
 

Holds the current config.

Definition at line 56 of file DummyHardware.h.

Referenced by getCurrentConfig(), and sendConfig().

map<UINT32, ABCDModule> SctTest::DummyHardware::originalConfig [private]
 

Holds the original config.

Definition at line 55 of file DummyHardware.h.

Referenced by getOriginalConfig(), and setConfig().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:09:58 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6