ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcdcsCTRL Class Reference

#include <ngcdcsCTRL.hpp>

Inheritance diagram for ngcdcsCTRL:
ngcbOBJ

Public Member Functions

 ngcdcsCTRL ()
 Constructor.
 
virtual ~ngcdcsCTRL ()
 Destructor.
 
int Sim (int level)
 Set simulation level.
 
int AttachMod (ngcbMOD *mod)
 Attach add-on module to global handling.
 
void UpdateLogging ()
 Update verbose level of all modules.
 
int Initialize ()
 Internal intialization after configuring.
 
int Abort ()
 Stop/disable all modules.
 
int Reset ()
 Overall reset.
 
int ResetDev ()
 Reset interface devices.
 
int Standby ()
 Disable all control moduels and put interface devices to standby state.
 
int Enable1 ()
 Switch to operational state (step 1, device network)
 
int Enable2 (int check=1)
 Switch to operational state (step 2, control modules)
 
int Enable (int check=1)
 Switch to operational state (step 1 and step 2)
 
int Off ()
 Switch off.
 
void Shutdown ()
 Shutdown all controller modules.
 
ngcbNETNetwork (int idx)
 Return pointer to network structure.
 
int NetworkEnable ()
 Enable all connected networks.
 
int Refresh (int id=0)
 Refresh internal telemetry.
 
int ReadAddr (ngcbIFC *dv, ngcb_route_t route, int addr, int *buffer, int size)
 Read from address.
 
int WriteAddr (ngcbIFC *dv, ngcb_route_t route, int addr, const int *buffer, int size)
 Write to address.
 
int RPC (ngcbIFC *dv, int module, int target, int req, void *payload, unsigned int size, unsigned int *status=NULL)
 Execute RPC.
 
int ReadBuffer (int idx, const char *s, int *buffer, int *size)
 Read buffer (string input, output to 128 word buffer)
 
int WriteBuffer (int idx, const char *s)
 Write buffer (string input)
 
int WriteBuffer (ngcbIFC *dv, const int *buffer, int size)
 Write formatted buffer.
 
int IOR (int idx, int addr, int *value)
 Read from device local address.
 
int IOW (int idx, int addr, int value)
 Write to device local address.
 
int PCR (int idx, int addr, int *value)
 Read from PCI configuration space address.
 
int PCW (int idx, int addr, int value)
 Write to PCI configuration space address.
 
- Public Member Functions inherited from ngcbOBJ
 ngcbOBJ ()
 Constructor.
 
virtual ~ngcbOBJ ()
 Destructor.
 
void Instance (int n)
 Set instance.
 
int Instance ()
 Get instance.
 
const char * Major ()
 Instance major number.
 
int BigEndian ()
 Big-endian architecture.
 
int LittleEndian ()
 Little-endian architecture.
 
virtual char * ErrMsg ()
 Error message.
 
virtual int Success ()
 Return success.
 
virtual int Failure ()
 Return failure.
 
void CfgPath (const char *path)
 Set external configuration path.
 

Public Attributes

ngcbIFCdev [ngcdcsCTRL_MAX_DEV]
 Interface deviceS.
 
int numDev
 Number of interface devices.
 
int ioError
 I/O-error flag.
 
ngcdcsCLDCcldc [ngcdcsCTRL_MAX_CLDC]
 CLDC modules.
 
int numCldcMod
 Number of CLDC modules.
 
ngcdcsSEQseq [ngcdcsCTRL_MAX_SEQ]
 Sequencer modules.
 
int numSeqMod
 Number of sequencer modules.
 
ngcdcsADCadc [ngcdcsCTRL_MAX_ADCMOD]
 ADC modules.
 
int numAdcMod
 Number of ADC modules.
 
int adcMap [ngcdcsCTRL_MAX_ADCMOD]
 ADC module mapping.
 
ngcdcsNGC2ngc2 [ngcdcsCTRL_MAX_NGC2]
 NGC2 basic modules.
 
int numNgc2Mod
 Number of NGC2 basic modules.
 
ngcdcsSHUTTERshutter [ngcdcsCTRL_MAX_SHUTTER]
 Shutter modules.
 
int numShutterMod
 Number of shutter modules.
 
ngcdcsPREAMPpreamp [ngcdcsCTRL_MAX_PREAMP]
 Preamplifier modules.
 
int numPreampMod
 Number of preamplifier modules.
 
ngcdcsAOao [ngcdcsCTRL_MAX_AO]
 AO cameras.
 
int numAoMod
 Number of AO cameras.
 
ngcdcsLISAlisa [ngcdcsCTRL_MAX_LISA]
 LISA cameras.
 
int numLisaMod
 Number of LISA cameras.
 
ngcdcsNGSDngsd [ngcdcsCTRL_MAX_NGSD]
 NGSD cameras.
 
int numNgsdMod
 Number of NGSD cameras.
 
ngcdcsTECtec [ngcdcsCTRL_MAX_TEC]
 TEC modules.
 
int numTecMod
 Number of TEC modules.
 
ngcdcsGEOSNAPgeosnap [ngcdcsCTRL_MAX_GEOSNAP]
 GEOSNAP modules.
 
int numGeosnapMod
 Number of GEOSNAP modules.
 
ngcdcsSCAsca [ngcdcsCTRL_MAX_SCA]
 Sidecar ASIC modules.
 
int numScaMod
 Number of ASIC moduled.
 
- Public Attributes inherited from ngcbOBJ
FILE * watchdog
 Watchdog stream.
 
ngcbALARM_SYSalarmSystem
 Alarm system.
 
ngcbSERVICEservices
 System services.
 
int verboseLevel
 Verbose level.
 
int logLevel
 Logging level.
 
int xterm
 Xterm flag.
 
int debugPort
 Debug port.
 
int ignoreErr
 Ignore next error (do not log)
 
int type
 Object type.
 

Additional Inherited Members

- Protected Member Functions inherited from ngcbOBJ
virtual int BailOut (const char *pos)
 Log code position of the error and bail-out with failure.
 
virtual void Verbose (int level, const char *format,...) __attribute__((format(printf
 Verbose message if verbose level exceeds level.
 
virtual void virtual void Verbose (const char *format,...) __attribute__((format(printf
 Verbose message.
 
virtual void virtual void virtual void Log (int level, const char *format,...) __attribute__((format(printf
 Log message if logging level exceeds level.
 
virtual void virtual void virtual void virtual void Log (const char *format,...) __attribute__((format(printf
 Log message.
 
virtual void virtual void virtual void virtual void virtual void ErrLog (int severity, const char *format,...) __attribute__((format(printf
 Error log, severity is one of ngcbWARNING, ngcbFAILURE and ngcbERR_SEVERE.
 
virtual void virtual void virtual void virtual void virtual void void FeedBack (const char *format,...) __attribute__((format(printf
 Feed-back function.
 
virtual void virtual void virtual void virtual void virtual void void virtual void SendFeedBack (const char *msg)
 Feed-back sender implementation.
 
const char * CfgPath ()
 Get external configuration path.
 
int CfgPath (char *path, const char *cfgFile)
 Compose path for configuratuion file.
 
int KeyVal (const char *key, float *value)
 Get single precision floating point value from keyword string.
 
int KeyVal (const char *key, double *value)
 Get double precision floating point value from keyword string.
 
int KeyVal (const char *key, int *value)
 Get 32-bit signed integer value from decimal keyword string.
 
int KeyVal (const char *key, unsigned int *value)
 Get 32-bit unsigned integer value from decimal keyword string.
 
int KeyValHex (const char *key, int *value)
 Get 32-bit signed integer value from hexadecimal keyword string.
 
int KeyValHex (const char *key, unsigned int *value)
 Get 32-bit unsigned integer value from hexadecimal keyword string.
 
int KeyValFmt (const char *key, int *value)
 Get 32-bit signed integer value from string.
 
int KeyValFmt (const char *key, unsigned int *value)
 Get 32-bit unsigned integer value from string.
 
int KeyValFrac (const char *key, unsigned int n, uint64_t *v1, uint64_t *v2)
 Fraction after n digits.
 
void CleanupCmd (char *cmdLine, int *cmdLen)
 Clean command string (remove extra spaces etc.)
 
int ReplaceParam (char *string)
 Replace parameter in string.
 

Detailed Description

Controller class

Constructor & Destructor Documentation

◆ ngcdcsCTRL()

ngcdcsCTRL::ngcdcsCTRL ( )

Constructor.

◆ ~ngcdcsCTRL()

ngcdcsCTRL::~ngcdcsCTRL ( )
virtual

Destructor.

Member Function Documentation

◆ Abort()

int ngcdcsCTRL::Abort ( )

Stop/disable all modules.

◆ AttachMod()

int ngcdcsCTRL::AttachMod ( ngcbMOD * mod)

Attach add-on module to global handling.

◆ Enable()

int ngcdcsCTRL::Enable ( int check = 1)

Switch to operational state (step 1 and step 2)

◆ Enable1()

int ngcdcsCTRL::Enable1 ( )

Switch to operational state (step 1, device network)

◆ Enable2()

int ngcdcsCTRL::Enable2 ( int check = 1)

Switch to operational state (step 2, control modules)

◆ Initialize()

int ngcdcsCTRL::Initialize ( )

Internal intialization after configuring.

◆ IOR()

int ngcdcsCTRL::IOR ( int idx,
int addr,
int * value )

Read from device local address.

◆ IOW()

int ngcdcsCTRL::IOW ( int idx,
int addr,
int value )

Write to device local address.

◆ Network()

ngcbNET * ngcdcsCTRL::Network ( int idx)

Return pointer to network structure.

◆ NetworkEnable()

int ngcdcsCTRL::NetworkEnable ( )

Enable all connected networks.

◆ Off()

int ngcdcsCTRL::Off ( )

Switch off.

◆ PCR()

int ngcdcsCTRL::PCR ( int idx,
int addr,
int * value )

Read from PCI configuration space address.

◆ PCW()

int ngcdcsCTRL::PCW ( int idx,
int addr,
int value )

Write to PCI configuration space address.

◆ ReadAddr()

int ngcdcsCTRL::ReadAddr ( ngcbIFC * dv,
ngcb_route_t route,
int addr,
int * buffer,
int size )

Read from address.

◆ ReadBuffer()

int ngcdcsCTRL::ReadBuffer ( int idx,
const char * s,
int * buffer,
int * size )

Read buffer (string input, output to 128 word buffer)

◆ Refresh()

int ngcdcsCTRL::Refresh ( int id = 0)

Refresh internal telemetry.

◆ Reset()

int ngcdcsCTRL::Reset ( )

Overall reset.

◆ ResetDev()

int ngcdcsCTRL::ResetDev ( )

Reset interface devices.

◆ RPC()

int ngcdcsCTRL::RPC ( ngcbIFC * dv,
int module,
int target,
int req,
void * payload,
unsigned int size,
unsigned int * status = NULL )

Execute RPC.

◆ Shutdown()

void ngcdcsCTRL::Shutdown ( )

Shutdown all controller modules.

◆ Sim()

int ngcdcsCTRL::Sim ( int level)

Set simulation level.

◆ Standby()

int ngcdcsCTRL::Standby ( )

Disable all control moduels and put interface devices to standby state.

◆ UpdateLogging()

void ngcdcsCTRL::UpdateLogging ( )

Update verbose level of all modules.

◆ WriteAddr()

int ngcdcsCTRL::WriteAddr ( ngcbIFC * dv,
ngcb_route_t route,
int addr,
const int * buffer,
int size )

Write to address.

◆ WriteBuffer() [1/2]

int ngcdcsCTRL::WriteBuffer ( int idx,
const char * s )

Write buffer (string input)

◆ WriteBuffer() [2/2]

int ngcdcsCTRL::WriteBuffer ( ngcbIFC * dv,
const int * buffer,
int size )

Write formatted buffer.

Member Data Documentation

◆ adc

ngcdcsADC* ngcdcsCTRL::adc[ngcdcsCTRL_MAX_ADCMOD]

ADC modules.

◆ adcMap

int ngcdcsCTRL::adcMap[ngcdcsCTRL_MAX_ADCMOD]

ADC module mapping.

◆ ao

ngcdcsAO* ngcdcsCTRL::ao[ngcdcsCTRL_MAX_AO]

AO cameras.

◆ cldc

ngcdcsCLDC* ngcdcsCTRL::cldc[ngcdcsCTRL_MAX_CLDC]

CLDC modules.

◆ dev

ngcbIFC* ngcdcsCTRL::dev[ngcdcsCTRL_MAX_DEV]

Interface deviceS.

◆ geosnap

ngcdcsGEOSNAP* ngcdcsCTRL::geosnap[ngcdcsCTRL_MAX_GEOSNAP]

GEOSNAP modules.

◆ ioError

int ngcdcsCTRL::ioError

I/O-error flag.

◆ lisa

ngcdcsLISA* ngcdcsCTRL::lisa[ngcdcsCTRL_MAX_LISA]

LISA cameras.

◆ ngc2

ngcdcsNGC2* ngcdcsCTRL::ngc2[ngcdcsCTRL_MAX_NGC2]

NGC2 basic modules.

◆ ngsd

ngcdcsNGSD* ngcdcsCTRL::ngsd[ngcdcsCTRL_MAX_NGSD]

NGSD cameras.

◆ numAdcMod

int ngcdcsCTRL::numAdcMod

Number of ADC modules.

◆ numAoMod

int ngcdcsCTRL::numAoMod

Number of AO cameras.

◆ numCldcMod

int ngcdcsCTRL::numCldcMod

Number of CLDC modules.

◆ numDev

int ngcdcsCTRL::numDev

Number of interface devices.

◆ numGeosnapMod

int ngcdcsCTRL::numGeosnapMod

Number of GEOSNAP modules.

◆ numLisaMod

int ngcdcsCTRL::numLisaMod

Number of LISA cameras.

◆ numNgc2Mod

int ngcdcsCTRL::numNgc2Mod

Number of NGC2 basic modules.

◆ numNgsdMod

int ngcdcsCTRL::numNgsdMod

Number of NGSD cameras.

◆ numPreampMod

int ngcdcsCTRL::numPreampMod

Number of preamplifier modules.

◆ numScaMod

int ngcdcsCTRL::numScaMod

Number of ASIC moduled.

◆ numSeqMod

int ngcdcsCTRL::numSeqMod

Number of sequencer modules.

◆ numShutterMod

int ngcdcsCTRL::numShutterMod

Number of shutter modules.

◆ numTecMod

int ngcdcsCTRL::numTecMod

Number of TEC modules.

◆ preamp

ngcdcsPREAMP* ngcdcsCTRL::preamp[ngcdcsCTRL_MAX_PREAMP]

Preamplifier modules.

◆ sca

ngcdcsSCA* ngcdcsCTRL::sca[ngcdcsCTRL_MAX_SCA]

Sidecar ASIC modules.

◆ seq

ngcdcsSEQ* ngcdcsCTRL::seq[ngcdcsCTRL_MAX_SEQ]

Sequencer modules.

◆ shutter

ngcdcsSHUTTER* ngcdcsCTRL::shutter[ngcdcsCTRL_MAX_SHUTTER]

Shutter modules.

◆ tec

ngcdcsTEC* ngcdcsCTRL::tec[ngcdcsCTRL_MAX_TEC]

TEC modules.


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