#include <ngcdcsCTRL.hpp>
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. | |
| ngcbNET * | Network (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 | |
| ngcbIFC * | dev [ngcdcsCTRL_MAX_DEV] |
| Interface deviceS. | |
| int | numDev |
| Number of interface devices. | |
| int | ioError |
| I/O-error flag. | |
| ngcdcsCLDC * | cldc [ngcdcsCTRL_MAX_CLDC] |
| CLDC modules. | |
| int | numCldcMod |
| Number of CLDC modules. | |
| ngcdcsSEQ * | seq [ngcdcsCTRL_MAX_SEQ] |
| Sequencer modules. | |
| int | numSeqMod |
| Number of sequencer modules. | |
| ngcdcsADC * | adc [ngcdcsCTRL_MAX_ADCMOD] |
| ADC modules. | |
| int | numAdcMod |
| Number of ADC modules. | |
| int | adcMap [ngcdcsCTRL_MAX_ADCMOD] |
| ADC module mapping. | |
| ngcdcsNGC2 * | ngc2 [ngcdcsCTRL_MAX_NGC2] |
| NGC2 basic modules. | |
| int | numNgc2Mod |
| Number of NGC2 basic modules. | |
| ngcdcsSHUTTER * | shutter [ngcdcsCTRL_MAX_SHUTTER] |
| Shutter modules. | |
| int | numShutterMod |
| Number of shutter modules. | |
| ngcdcsPREAMP * | preamp [ngcdcsCTRL_MAX_PREAMP] |
| Preamplifier modules. | |
| int | numPreampMod |
| Number of preamplifier modules. | |
| ngcdcsAO * | ao [ngcdcsCTRL_MAX_AO] |
| AO cameras. | |
| int | numAoMod |
| Number of AO cameras. | |
| ngcdcsLISA * | lisa [ngcdcsCTRL_MAX_LISA] |
| LISA cameras. | |
| int | numLisaMod |
| Number of LISA cameras. | |
| ngcdcsNGSD * | ngsd [ngcdcsCTRL_MAX_NGSD] |
| NGSD cameras. | |
| int | numNgsdMod |
| Number of NGSD cameras. | |
| ngcdcsTEC * | tec [ngcdcsCTRL_MAX_TEC] |
| TEC modules. | |
| int | numTecMod |
| Number of TEC modules. | |
| ngcdcsGEOSNAP * | geosnap [ngcdcsCTRL_MAX_GEOSNAP] |
| GEOSNAP modules. | |
| int | numGeosnapMod |
| Number of GEOSNAP modules. | |
| ngcdcsSCA * | sca [ngcdcsCTRL_MAX_SCA] |
| Sidecar ASIC modules. | |
| int | numScaMod |
| Number of ASIC moduled. | |
Public Attributes inherited from ngcbOBJ | |
| FILE * | watchdog |
| Watchdog stream. | |
| ngcbALARM_SYS * | alarmSystem |
| Alarm system. | |
| ngcbSERVICE * | services |
| 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. | |
Controller class
| ngcdcsCTRL::ngcdcsCTRL | ( | ) |
Constructor.
|
virtual |
Destructor.
| int ngcdcsCTRL::Abort | ( | ) |
Stop/disable all modules.
| int ngcdcsCTRL::AttachMod | ( | ngcbMOD * | mod | ) |
Attach add-on module to global handling.
| int ngcdcsCTRL::Enable | ( | int | check = 1 | ) |
Switch to operational state (step 1 and step 2)
| int ngcdcsCTRL::Enable1 | ( | ) |
Switch to operational state (step 1, device network)
| int ngcdcsCTRL::Enable2 | ( | int | check = 1 | ) |
Switch to operational state (step 2, control modules)
| int ngcdcsCTRL::Initialize | ( | ) |
Internal intialization after configuring.
| int ngcdcsCTRL::IOR | ( | int | idx, |
| int | addr, | ||
| int * | value ) |
Read from device local address.
| int ngcdcsCTRL::IOW | ( | int | idx, |
| int | addr, | ||
| int | value ) |
Write to device local address.
| ngcbNET * ngcdcsCTRL::Network | ( | int | idx | ) |
Return pointer to network structure.
| int ngcdcsCTRL::NetworkEnable | ( | ) |
Enable all connected networks.
| int ngcdcsCTRL::Off | ( | ) |
Switch off.
| int ngcdcsCTRL::PCR | ( | int | idx, |
| int | addr, | ||
| int * | value ) |
Read from PCI configuration space address.
| int ngcdcsCTRL::PCW | ( | int | idx, |
| int | addr, | ||
| int | value ) |
Write to PCI configuration space address.
| int ngcdcsCTRL::ReadAddr | ( | ngcbIFC * | dv, |
| ngcb_route_t | route, | ||
| int | addr, | ||
| int * | buffer, | ||
| int | size ) |
Read from address.
| int ngcdcsCTRL::ReadBuffer | ( | int | idx, |
| const char * | s, | ||
| int * | buffer, | ||
| int * | size ) |
Read buffer (string input, output to 128 word buffer)
| int ngcdcsCTRL::Refresh | ( | int | id = 0 | ) |
Refresh internal telemetry.
| int ngcdcsCTRL::Reset | ( | ) |
Overall reset.
| int ngcdcsCTRL::ResetDev | ( | ) |
Reset interface devices.
| int ngcdcsCTRL::RPC | ( | ngcbIFC * | dv, |
| int | module, | ||
| int | target, | ||
| int | req, | ||
| void * | payload, | ||
| unsigned int | size, | ||
| unsigned int * | status = NULL ) |
Execute RPC.
| void ngcdcsCTRL::Shutdown | ( | ) |
Shutdown all controller modules.
| int ngcdcsCTRL::Sim | ( | int | level | ) |
Set simulation level.
| int ngcdcsCTRL::Standby | ( | ) |
Disable all control moduels and put interface devices to standby state.
| void ngcdcsCTRL::UpdateLogging | ( | ) |
Update verbose level of all modules.
| int ngcdcsCTRL::WriteAddr | ( | ngcbIFC * | dv, |
| ngcb_route_t | route, | ||
| int | addr, | ||
| const int * | buffer, | ||
| int | size ) |
Write to address.
| int ngcdcsCTRL::WriteBuffer | ( | int | idx, |
| const char * | s ) |
Write buffer (string input)
| int ngcdcsCTRL::WriteBuffer | ( | ngcbIFC * | dv, |
| const int * | buffer, | ||
| int | size ) |
Write formatted buffer.
| ngcdcsADC* ngcdcsCTRL::adc[ngcdcsCTRL_MAX_ADCMOD] |
ADC modules.
| int ngcdcsCTRL::adcMap[ngcdcsCTRL_MAX_ADCMOD] |
ADC module mapping.
| ngcdcsAO* ngcdcsCTRL::ao[ngcdcsCTRL_MAX_AO] |
AO cameras.
| ngcdcsCLDC* ngcdcsCTRL::cldc[ngcdcsCTRL_MAX_CLDC] |
CLDC modules.
| ngcbIFC* ngcdcsCTRL::dev[ngcdcsCTRL_MAX_DEV] |
Interface deviceS.
| ngcdcsGEOSNAP* ngcdcsCTRL::geosnap[ngcdcsCTRL_MAX_GEOSNAP] |
GEOSNAP modules.
| int ngcdcsCTRL::ioError |
I/O-error flag.
| ngcdcsLISA* ngcdcsCTRL::lisa[ngcdcsCTRL_MAX_LISA] |
LISA cameras.
| ngcdcsNGC2* ngcdcsCTRL::ngc2[ngcdcsCTRL_MAX_NGC2] |
NGC2 basic modules.
| ngcdcsNGSD* ngcdcsCTRL::ngsd[ngcdcsCTRL_MAX_NGSD] |
NGSD cameras.
| int ngcdcsCTRL::numAdcMod |
Number of ADC modules.
| int ngcdcsCTRL::numAoMod |
Number of AO cameras.
| int ngcdcsCTRL::numCldcMod |
Number of CLDC modules.
| int ngcdcsCTRL::numDev |
Number of interface devices.
| int ngcdcsCTRL::numGeosnapMod |
Number of GEOSNAP modules.
| int ngcdcsCTRL::numLisaMod |
Number of LISA cameras.
| int ngcdcsCTRL::numNgc2Mod |
Number of NGC2 basic modules.
| int ngcdcsCTRL::numNgsdMod |
Number of NGSD cameras.
| int ngcdcsCTRL::numPreampMod |
Number of preamplifier modules.
| int ngcdcsCTRL::numScaMod |
Number of ASIC moduled.
| int ngcdcsCTRL::numSeqMod |
Number of sequencer modules.
| int ngcdcsCTRL::numShutterMod |
Number of shutter modules.
| int ngcdcsCTRL::numTecMod |
Number of TEC modules.
| ngcdcsPREAMP* ngcdcsCTRL::preamp[ngcdcsCTRL_MAX_PREAMP] |
Preamplifier modules.
| ngcdcsSCA* ngcdcsCTRL::sca[ngcdcsCTRL_MAX_SCA] |
Sidecar ASIC modules.
| ngcdcsSEQ* ngcdcsCTRL::seq[ngcdcsCTRL_MAX_SEQ] |
Sequencer modules.
| ngcdcsSHUTTER* ngcdcsCTRL::shutter[ngcdcsCTRL_MAX_SHUTTER] |
Shutter modules.
| ngcdcsTEC* ngcdcsCTRL::tec[ngcdcsCTRL_MAX_TEC] |
TEC modules.