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

#include <ngcbMOD.hpp>

Inheritance diagram for ngcbMOD:
ngcbOBJ ngcdcsADC ngcdcsAO ngcdcsCLDC0 ngcdcsGEOSNAP ngcdcsLISA ngcdcsNGC2 ngcdcsNGSD ngcdcsPREAMP ngcdcsSHUTTER ngcdcsTEC

Public Member Functions

ngcbMODoperator= (const ngcbMOD &other)
 Operator =.
 
 ngcbMOD (const ngcbMOD &other)
 Copy constructor.
 
 ngcbMOD (const ngcb_route_t &modRoute)
 Constructor with route.
 
 ngcbMOD (ngcbIFC *modDev, const ngcb_route_t &modRoute)
 Constructor with interface device and route.
 
virtual ~ngcbMOD ()
 Destructor.
 
ngcbIFCDev ()
 Return current interface device.
 
void Dev (ngcbIFC *newDev)
 Set new interface device.
 
int Connected ()
 Return 1 if device is connected, zero otherwise.
 
int Sim ()
 
int Initialize ()
 Initialize module.
 
void ErrState (const char *msg, int errorId=0)
 Go to error state.
 
virtual int CkAddrCB (int addr, const int *buffer, int size)
 Check-address call-back for alignment.
 
virtual void WrAddrCB (int addr, const int *buffer, int size)
 Write-to-address call-back for alignment.
 
virtual int Load (const char *fileName)
 Load register instruction file.
 
int Board ()
 Return the board number of the module (starts with zero)
 
void RpcCopy (void *dest, const void *src, size_t size, size_t items=1)
 Copy RPC payload.
 
int RPC (int target, int req, void *payload, unsigned int size, unsigned int *status=NULL)
 Execute RPC.
 
int ReadAddr (int addr, int *buffer, int size)
 Read from address (32-bit)
 
int WriteAddr (int addr, const int *buffer, int size)
 Write to address (32-bit)
 
int ReadAddr64 (int addr, uint64_t *buffer, int size)
 Read from address (64-bit)
 
int WriteAddr64 (int addr, const uint64_t *buffer, int size)
 Write to address (64-bit)
 
int Temperature (double *t)
 Read board temperature (degree C)
 
int BackPlane ()
 Return back-plane ID.
 
virtual void CV (int chan, double volt)
 Voltage conversion call-back.
 
virtual void Reset ()
 Align soft-states after reset.
 
virtual int Disable ()
 Call-back at transition to not operational state.
 
virtual int Enable (int check=1)
 Call-back at transition to operational state.
 
- 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
 Interface device.
 
ngcb_route_t route
 Local route to module (header)
 
char moduleName [64]
 Module name.
 
int id
 ID-register content.
 
int productCode
 Product code.
 
int revision
 HW revision number.
 
int firmware
 Firmware revision.
 
int boardId
 Physical board id.
 
int fitsHdr
 Enable FITS-header for this module.
 
- 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

NGC front-end module class

Constructor & Destructor Documentation

◆ ngcbMOD() [1/3]

ngcbMOD::ngcbMOD ( const ngcbMOD & other)

Copy constructor.

◆ ngcbMOD() [2/3]

ngcbMOD::ngcbMOD ( const ngcb_route_t & modRoute)
explicit

Constructor with route.

◆ ngcbMOD() [3/3]

ngcbMOD::ngcbMOD ( ngcbIFC * modDev,
const ngcb_route_t & modRoute )

Constructor with interface device and route.

◆ ~ngcbMOD()

ngcbMOD::~ngcbMOD ( )
virtual

Destructor.

Member Function Documentation

◆ BackPlane()

int ngcbMOD::BackPlane ( )

Return back-plane ID.

◆ Board()

int ngcbMOD::Board ( )

Return the board number of the module (starts with zero)

◆ CkAddrCB()

int ngcbMOD::CkAddrCB ( int addr,
const int * buffer,
int size )
virtual

Check-address call-back for alignment.

Reimplemented in ngcdcsAO.

◆ Connected()

int ngcbMOD::Connected ( )

Return 1 if device is connected, zero otherwise.

◆ CV()

void ngcbMOD::CV ( int chan,
double volt )
virtual

Voltage conversion call-back.

◆ Dev() [1/2]

ngcbIFC * ngcbMOD::Dev ( )

Return current interface device.

◆ Dev() [2/2]

void ngcbMOD::Dev ( ngcbIFC * newDev)

Set new interface device.

◆ Disable()

int ngcbMOD::Disable ( )
virtual

◆ Enable()

int ngcbMOD::Enable ( int check = 1)
virtual

◆ ErrState()

void ngcbMOD::ErrState ( const char * msg,
int errorId = 0 )

Go to error state.

◆ Initialize()

int ngcbMOD::Initialize ( )

Initialize module.

◆ Load()

int ngcbMOD::Load ( const char * fileName)
virtual

Load register instruction file.

◆ operator=()

ngcbMOD & ngcbMOD::operator= ( const ngcbMOD & other)

Operator =.

◆ ReadAddr()

int ngcbMOD::ReadAddr ( int addr,
int * buffer,
int size )

Read from address (32-bit)

◆ ReadAddr64()

int ngcbMOD::ReadAddr64 ( int addr,
uint64_t * buffer,
int size )

Read from address (64-bit)

◆ Reset()

void ngcbMOD::Reset ( )
virtual

◆ RPC()

int ngcbMOD::RPC ( int target,
int req,
void * payload,
unsigned int size,
unsigned int * status = NULL )

Execute RPC.

◆ RpcCopy()

void ngcbMOD::RpcCopy ( void * dest,
const void * src,
size_t size,
size_t items = 1 )

Copy RPC payload.

◆ Sim()

int ngcbMOD::Sim ( )

Return 0 if device is operating in normal mode. Otherwise the simulation level is returned (1 = HW-SIM, 2 = LCU-SIM, ...).

◆ Temperature()

int ngcbMOD::Temperature ( double * t)

Read board temperature (degree C)

◆ WrAddrCB()

void ngcbMOD::WrAddrCB ( int addr,
const int * buffer,
int size )
virtual

Write-to-address call-back for alignment.

Reimplemented in ngcdcsAO, and ngcdcsLISA.

◆ WriteAddr()

int ngcbMOD::WriteAddr ( int addr,
const int * buffer,
int size )

Write to address (32-bit)

◆ WriteAddr64()

int ngcbMOD::WriteAddr64 ( int addr,
const uint64_t * buffer,
int size )

Write to address (64-bit)

Member Data Documentation

◆ boardId

int ngcbMOD::boardId

Physical board id.

◆ dev

ngcbIFC* ngcbMOD::dev

Interface device.

◆ firmware

int ngcbMOD::firmware

Firmware revision.

◆ fitsHdr

int ngcbMOD::fitsHdr

Enable FITS-header for this module.

◆ id

int ngcbMOD::id

ID-register content.

◆ moduleName

char ngcbMOD::moduleName[64]

Module name.

◆ productCode

int ngcbMOD::productCode

Product code.

◆ revision

int ngcbMOD::revision

HW revision number.

◆ route

ngcb_route_t ngcbMOD::route

Local route to module (header)


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