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

#include <ngcdcsB24.hpp>

Inheritance diagram for ngcdcsB24:
ngcdcsCLDC ngcdcsCLDC0 ngcbMOD ngcbOBJ

Public Member Functions

 ngcdcsB24 (const ngcb_route_t &r, int nb)
 Constructor with route and number of biases.
 
 ngcdcsB24 (ngcbIFC *ifc, const ngcb_route_t &r, int nb)
 Constructor with interface device, route and number of biases.
 
virtual ~ngcdcsB24 ()
 Destructor.
 
int Enable (int check=1)
 Call-back at transition to operational state.
 
int Disable ()
 Disable call back.
 
void ClkMap (ngcdcs_clk_t *cv)
 Clock channel mapping.
 
void DcMap (ngcdcs_dc_t *dv)
 Bias channel mapping.
 
void DefaultSetup (const char *keyWord=NULL)
 Default setup.
 
int VStatus (int *s)
 Get voltage HW-status.
 
int VoltageClk (int num, int l, double volt, int rangeCheck=1)
 Clock setup.
 
int VoltageDC (int num, double volt, int rangeCheck=1)
 Bias setup.
 
int VoltageRegDC (int num, int value, int rangeCheck=1)
 Direct bias register setup (not applicable)
 
int VoltageRegClk (int num, int l, int value, int rangeCheck=1)
 Direct clock register setup (not applicable)
 
int OutputEnable ()
 Enable output.
 
int OutputDisable ()
 Disable output.
 
char * VStatusString ()
 Get voltage status string.
 
int Monitor (int num, int clkChan)
 Clock-monitor dummy function.
 
int OffsetClk (double volt)
 Clock offset dummy function.
 
int OffsetDC (double volt)
 Bias offset dummy function.
 
int PreampOffset (double volt)
 Preamplifier offset/supply.
 
int VideoOffset (double *volt)
 Video offset dummy function.
 
int DiodeBias (double volt)
 Diode bias dummy function.
 
double OffsetClk ()
 Return offset for clocks.
 
double OffsetDC ()
 Return offset for DC-biases.
 
int TelIntern (int sel=-1)
 Update internal telemetry.
 
double TelCurrent (int chan)
 Return value of last current-telemetry.
 
int TelChan (int chan, double *volt)
 Telemetry for channel.
 
int TelDC (int num, double *volt)
 Telemetry for DC-bias.
 
int TelClk (int num, int l, double *volt)
 Telemetry for clock level (dummy)
 
int TelClk (int num, ngcdcs_clkv_t *cv)
 Telemetry for clock (dummy, all levels)
 
int Snapshot ()
 Telemetry snapshot.
 
int Protection (int flag)
 Enable/disable protection circuit.
 
int Zero ()
 Set all voltages to zero.
 
int Calibrate (int noSetup=0)
 Calibrate.
 
void ClearCalibration ()
 Clear calibration.
 
int Calibrated ()
 Check if calibration has been done.
 
int SetupKey (const char *key, const int *idx, const char *value, int *status=NULL)
 Setup.
 
int StatusKey (const char *key, const int *idx, char *value, int *status=NULL)
 Status.
 
- Public Member Functions inherited from ngcdcsCLDC
 ngcdcsCLDC (const ngcb_route_t &r, int nc, int nb)
 Constructor with route, number of clocks and number of biases.
 
 ngcdcsCLDC (ngcbIFC *ifc, const ngcb_route_t &r, int nc, int nb)
 
virtual ~ngcdcsCLDC ()
 Destructor.
 
void BoardType (int b)
 Enforce specific board type.
 
void Reset ()
 Align soft-states after reset.
 
int Enable (int check=1)
 Call-back at transition to operational state.
 
int Disable ()
 Call-back at transition to not operational state.
 
int Selftest ()
 Execute self-test.
 
void TimeStamp (int chan)
 Timstamp DAC channel (last setup)
 
int VSetup (int autoCtrl=0)
 Apply voltage setup.
 
int Check ()
 Check telemetry against current setup.
 
int Calibrate (int noSetup=0)
 Calibrate (offset compensation)
 
void ClearCalibration ()
 Clear calibration.
 
int Calibrated ()
 Check if calibration has been done.
 
virtual int Adjust (int chan)
 Voltage setup adjustement for channel.
 
int DacChan (int chan, double volt)
 Set voltage on DAC channel.
 
int VoltageDC (int num, double volt, int rangeCheck=1)
 Set DC voltage.
 
int VoltageClk (int num, int l, double volt, int rangeCheck=1)
 Set clock level.
 
int VoltageClk (int num, ngcdcs_clkv_t cv, int rangeCheck=1)
 Set all levels of clock.
 
int VoltageRegDC (int num, int value, int rangeCheck=1)
 Set DC hex-voltage.
 
int VoltageRegClk (int num, int l, int value, int rangeCheck=1)
 Set clock hex-level.
 
int VoltageErrDC (int num, double volt)
 Set DC voltage error.
 
int VoltageErrClk (int num, int l, double volt)
 Set clock level voltage error.
 
int TelChan (int chan)
 Set telemetry channel.
 
int TelChan ()
 Return actual telemetry channel.
 
int TelData (double *volt)
 Read telemetry data.
 
int TelDC (int num, double *volt)
 Telemetry for DC-bias.
 
int TelClk (int num, ngcdcs_clkv_t *cv)
 Telemetry for clock (all levels)
 
int TelClk (int num, int l, double *volt)
 Telemetry for clock level.
 
int Snapshot ()
 Telemetry snapshot.
 
char * VStatusString ()
 Get voltage status string.
 
int VStatus (int *hwStat)
 Get voltage HW-status.
 
int OutputEnable ()
 Enable output.
 
int OutputDisable ()
 Disable output.
 
int OutputEnabled ()
 Check if output is enabled.
 
int Protection (int flag)
 Enable/disable protection circuit.
 
int Zero ()
 Set all voltages to zero.
 
int LoadCfgFile (const char *fileName=NULL)
 Load voltage configuration.
 
int SaveCfgFile (const char *fileName)
 Save voltage configuration.
 
int SaveErrFile (const char *fileName)
 Save error calibration.
 
int Restore (const char *keyWord)
 Restore keyword from the last loaded file.
 
virtual double ConvertTel (int value)
 Convert telemetry register value.
 
virtual int Volt2Reg (double *volt, int chan, double corr=1.0)
 Convert voltage to register value.
 
virtual double Reg2Volt (int reg, int chan, double corr=1.0)
 Convert register value to voltage.
 
virtual int DacReg (int value, int chan)
 Map value on DAC register channel.
 
int SetupKey (const char *key, const int *idx, const char *value, int *status=NULL)
 Setup.
 
int StatusKey (const char *key, const int *idx, char *value, int *status=NULL)
 Status.
 
- Public Member Functions inherited from ngcdcsCLDC0
 ngcdcsCLDC0 (const ngcb_route_t &r, int nc, int nb)
 Constructor with route, number of clocks and number of biases.
 
 ngcdcsCLDC0 (ngcbIFC *ifc, const ngcb_route_t &r, int nc, int nb)
 
virtual ~ngcdcsCLDC0 ()
 Destructor.
 
virtual int AtOnline ()
 At online hook.
 
- Public Member Functions inherited from ngcbMOD
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.
 
- 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.
 

Additional Inherited Members

- Public Attributes inherited from ngcdcsCLDC
double offsetClk
 Offset for clock voltages.
 
double offsetDC
 Offset for bias voltages.
 
int clkMon1
 Clock on monitor 1.
 
int clkMon2
 Clock on monitor 2.
 
double preampOffset
 Preamplifier offset.
 
double diodeBias
 DiodeBias.
 
double lbnlGain
 LBNL high voltage gain.
 
double lbnlOffset
 LBNL high voltage offset.
 
double lbnlTelGain
 LBNL high voltage gain (telemetry)
 
double lbnlTelOffset
 LBNL high voltage offset (telemetry)
 
double dacDelay
 DAC delay (seconds)
 
ngcdcs_tel_t tel [ngcdcsCLDC_MAX_TEL]
 Internal telemetry.
 
ngcbMODvcm [ngcdcsCLDC_MAX_CHAN]
 Voltage Callbacks.
 
int clkSetupMap [ngcbCLDC_MAX_CLK]
 Map specifying the setup order of the clocks.
 
int dcSetupMap [ngcbCLDC_MAX_DC]
 Map specifying the setup order of the biases.
 
- Public Attributes inherited from ngcdcsCLDC0
int vstat
 Soft-status (enabled, disabled)
 
int autoEnable
 Enable at online.
 
int autoDisable
 Disable when (re-)configuring.
 
int ilck
 Flag to enable/disable the external interlock.
 
int ilckOn
 Flag indicating whether interlock is enabled.
 
int protection
 Flag indicating whether protection has triggered.
 
int protectionOn
 Flag indicating whether protection is enabled.
 
int autoCal
 Calibrate at online.
 
double calMax
 Voltage calibration limit (in Volts)
 
ngcdcs_clk_tclk
 Clock voltages.
 
int numClk
 Number of clock voltages.
 
ngcdcs_dc_tdc
 Bias voltages.
 
int numDc
 Number of bias voltages.
 
ngcdcs_clkv_tclkTel
 Saved clock voltages telemetry values.
 
double * dcTel
 Saved bias voltages telemetry values.
 
int haveCurrentTel
 Flag, indicating whether current-telemetry is available.
 
double margin
 Margin for voltage check (in Volts)
 
double dacTime
 DAC settling time (in seconds)
 
char voltageInitFile [256]
 Voltage initialization file.
 
char cfgFile [256]
 Voltage configuration file.
 
int toggle
 Toggle new configuration.
 
int telFlag
 Flag to update telemetry.
 
double cvg1
 Voltage conversion formula gain-1.
 
double cvg2
 Voltage conversion formula gain-2.
 
double cvOffset
 Voltage conversion formula offset.
 
char serNoBoard [32]
 Serial number.
 
char serNoTrans [32]
 Transition board serial number.
 
- Public Attributes inherited from ngcbMOD
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.
 
- Protected Member Functions inherited from ngcdcsCLDC
int GetTelCfg (size_t start)
 Get internal telemetry configurarion (NGCII only)
 
- 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

NGC2 B24 bias generator class

Constructor & Destructor Documentation

◆ ngcdcsB24() [1/2]

ngcdcsB24::ngcdcsB24 ( const ngcb_route_t & r,
int nb )

Constructor with route and number of biases.

◆ ngcdcsB24() [2/2]

ngcdcsB24::ngcdcsB24 ( ngcbIFC * ifc,
const ngcb_route_t & r,
int nb )

Constructor with interface device, route and number of biases.

◆ ~ngcdcsB24()

ngcdcsB24::~ngcdcsB24 ( )
virtual

Destructor.

Member Function Documentation

◆ Calibrate()

int ngcdcsB24::Calibrate ( int noSetup = 0)
inlinevirtual

Calibrate.

Reimplemented from ngcdcsCLDC0.

◆ Calibrated()

int ngcdcsB24::Calibrated ( )
inlinevirtual

Check if calibration has been done.

Reimplemented from ngcdcsCLDC0.

◆ ClearCalibration()

void ngcdcsB24::ClearCalibration ( )
inlinevirtual

Clear calibration.

Reimplemented from ngcdcsCLDC0.

◆ ClkMap()

void ngcdcsB24::ClkMap ( ngcdcs_clk_t * cv)
virtual

Clock channel mapping.

Reimplemented from ngcdcsCLDC.

◆ DcMap()

void ngcdcsB24::DcMap ( ngcdcs_dc_t * dv)
virtual

Bias channel mapping.

Reimplemented from ngcdcsCLDC.

◆ DefaultSetup()

void ngcdcsB24::DefaultSetup ( const char * keyWord = NULL)
virtual

Default setup.

Reimplemented from ngcdcsCLDC.

◆ DiodeBias()

int ngcdcsB24::DiodeBias ( double volt)
inlinevirtual

Diode bias dummy function.

Reimplemented from ngcdcsCLDC.

◆ Disable()

int ngcdcsB24::Disable ( )
virtual

Disable call back.

Reimplemented from ngcbMOD.

◆ Enable()

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

Call-back at transition to operational state.

Reimplemented from ngcbMOD.

◆ Monitor()

int ngcdcsB24::Monitor ( int num,
int clkChan )
virtual

Clock-monitor dummy function.

Reimplemented from ngcdcsCLDC.

◆ OffsetClk() [1/2]

double ngcdcsB24::OffsetClk ( )
inlinevirtual

Return offset for clocks.

Reimplemented from ngcdcsCLDC.

◆ OffsetClk() [2/2]

int ngcdcsB24::OffsetClk ( double volt)
inlinevirtual

Clock offset dummy function.

Reimplemented from ngcdcsCLDC.

◆ OffsetDC() [1/2]

double ngcdcsB24::OffsetDC ( )
inlinevirtual

Return offset for DC-biases.

Reimplemented from ngcdcsCLDC.

◆ OffsetDC() [2/2]

int ngcdcsB24::OffsetDC ( double volt)
inlinevirtual

Bias offset dummy function.

Reimplemented from ngcdcsCLDC.

◆ OutputDisable()

int ngcdcsB24::OutputDisable ( )
virtual

Disable output.

Reimplemented from ngcdcsCLDC0.

◆ OutputEnable()

int ngcdcsB24::OutputEnable ( )
virtual

Enable output.

Reimplemented from ngcdcsCLDC0.

◆ PreampOffset()

int ngcdcsB24::PreampOffset ( double volt)
virtual

Preamplifier offset/supply.

Reimplemented from ngcdcsCLDC.

◆ Protection()

int ngcdcsB24::Protection ( int flag)
inlinevirtual

Enable/disable protection circuit.

Reimplemented from ngcdcsCLDC0.

◆ SetupKey()

int ngcdcsB24::SetupKey ( const char * key,
const int * idx,
const char * value,
int * status = NULL )
virtual

Setup.

Reimplemented from ngcdcsCLDC0.

◆ Snapshot()

int ngcdcsB24::Snapshot ( )
virtual

Telemetry snapshot.

Reimplemented from ngcdcsCLDC0.

◆ StatusKey()

int ngcdcsB24::StatusKey ( const char * key,
const int * idx,
char * value,
int * status = NULL )
virtual

Status.

Reimplemented from ngcdcsCLDC0.

◆ TelChan()

int ngcdcsB24::TelChan ( int chan,
double * volt )
virtual

Telemetry for channel.

Reimplemented from ngcdcsCLDC.

◆ TelClk() [1/2]

int ngcdcsB24::TelClk ( int num,
int l,
double * volt )
virtual

Telemetry for clock level (dummy)

Reimplemented from ngcdcsCLDC0.

◆ TelClk() [2/2]

int ngcdcsB24::TelClk ( int num,
ngcdcs_clkv_t * cv )
inlinevirtual

Telemetry for clock (dummy, all levels)

Reimplemented from ngcdcsCLDC0.

◆ TelCurrent()

double ngcdcsB24::TelCurrent ( int chan)
virtual

Return value of last current-telemetry.

Reimplemented from ngcdcsCLDC0.

◆ TelDC()

int ngcdcsB24::TelDC ( int num,
double * volt )
virtual

Telemetry for DC-bias.

Reimplemented from ngcdcsCLDC0.

◆ TelIntern()

int ngcdcsB24::TelIntern ( int sel = -1)
virtual

Update internal telemetry.

Reimplemented from ngcdcsCLDC.

◆ VideoOffset()

int ngcdcsB24::VideoOffset ( double * volt)
inlinevirtual

Video offset dummy function.

Reimplemented from ngcdcsCLDC.

◆ VoltageClk()

int ngcdcsB24::VoltageClk ( int num,
int l,
double volt,
int rangeCheck = 1 )
virtual

Clock setup.

Reimplemented from ngcdcsCLDC0.

◆ VoltageDC()

int ngcdcsB24::VoltageDC ( int num,
double volt,
int rangeCheck = 1 )
virtual

Bias setup.

Reimplemented from ngcdcsCLDC0.

◆ VoltageRegClk()

int ngcdcsB24::VoltageRegClk ( int num,
int l,
int value,
int rangeCheck = 1 )
inlinevirtual

Direct clock register setup (not applicable)

Reimplemented from ngcdcsCLDC0.

◆ VoltageRegDC()

int ngcdcsB24::VoltageRegDC ( int num,
int value,
int rangeCheck = 1 )
inlinevirtual

Direct bias register setup (not applicable)

Reimplemented from ngcdcsCLDC0.

◆ VStatus()

int ngcdcsB24::VStatus ( int * s)
virtual

Get voltage HW-status.

Reimplemented from ngcdcsCLDC0.

◆ VStatusString()

char * ngcdcsB24::VStatusString ( )
inlinevirtual

Get voltage status string.

Reimplemented from ngcdcsCLDC0.

◆ Zero()

int ngcdcsB24::Zero ( )
virtual

Set all voltages to zero.

Reimplemented from ngcdcsCLDC0.


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