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

#include <ngcdcsADC.hpp>

Inheritance diagram for ngcdcsADC:
ngcbMOD ngcbOBJ

Public Member Functions

 ngcdcsADC (const ngcb_route_t &r)
 Constructor with route.
 
 ngcdcsADC (ngcbIFC *dev, const ngcb_route_t &r)
 Constructor with interface device and route.
 
 ngcdcsADC (const ngcb_route_t &r, int n, int b)
 Constructor with route, number of ADCs and BITPIX.
 
 ngcdcsADC (ngcbIFC *dev, const ngcb_route_t &r, int n, int b)
 Constructor with interface device, route, number of channels and BITPIX.
 
virtual ~ngcdcsADC ()
 Destructor.
 
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 Preset (int size, int n)
 Configuration preset.
 
int Clear ()
 Clear all data FIFOs.
 
int ChanDisable ()
 Disable all ADC channels on module.
 
int ChanEnable (int n)
 Enable first n ADC channels on module.
 
int ChanEnable ()
 Enable all ADC channels on module.
 
int PacketSize (int size)
 Set packet size.
 
int PacketCnt (int len)
 Set packet routing length.
 
int First (int flag)
 Set first in chain bit.
 
int Convert (int cvt1, int cvt2)
 Enable/disable conversion strobes.
 
int OpMode (int newMode)
 Set operation mode.
 
int SimMode (int newMode)
 Set simulation mode.
 
int Delay (int ticks)
 Set conversion strobe delay in ticks.
 
int Offset (double newOffset)
 Set ADC offset.
 
void LED (int stat)
 Enable/disable LEDs.
 
int Monitor (int num, int chan)
 Set channel for video monitor.
 
int Clamp (int flag)
 Set clamp.
 
int Filter (int value)
 Set filter.
 
int DualLink (int flag)
 Enable/disable second link.
 
int Status (int *hwStatus, int *swStatus)
 Read current status.
 
int Update ()
 Update sensor values.
 
int PixPerWord ()
 Pixel per 32-bit word (1 or 2)
 
int PPEnable ()
 Enable pre-processor.
 
int PPDisable ()
 Disable pre-processor.
 
int PPDim (int nx, int ny)
 Set pre-processor frame dimension.
 
int PPNumInt (int n)
 Set pre-processor integration frame counter.
 
int PPNumSamp (int n)
 Set number of pre-processor sub-pixel samples.
 
int PPFowler (int flag)
 Enable/disable Fowler mode.
 
int PPInvert (int flag)
 Invert Fowler pairs.
 
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 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.
 

Public Attributes

int bitPix
 Bits per pixel.
 
int numAdc
 Number of ADC channels on module.
 
int enable
 Number of enabled ADC channels on module.
 
int delay
 Conversion strobe delay (in ticks)
 
int opMode
 Operation mode.
 
int simMode
 Simulation mode.
 
int convert1
 Enable conversion on convert strobe 1.
 
int convert2
 Enable conversion on convert strobe 2.
 
int packetSize
 Packet size.
 
int packetCnt
 Route length.
 
int firstInChain
 First in chain.
 
int link2
 2nd link
 
double offset
 Video offset.
 
int monitor1
 Channel on monitor 1.
 
int monitor2
 Channel on monitor 2.
 
int clamp
 Clamp (0/1)
 
int filter
 Filter (0/1)
 
double temp
 Board temperature.
 
ngcdcsCLDCcldc
 Assigned clock- and bias-generator.
 
ngcdcs_adcpp_t pp
 Pre-processor.
 
- 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.
 

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 ADC class

Constructor & Destructor Documentation

◆ ngcdcsADC() [1/4]

ngcdcsADC::ngcdcsADC ( const ngcb_route_t & r)
explicit

Constructor with route.

◆ ngcdcsADC() [2/4]

ngcdcsADC::ngcdcsADC ( ngcbIFC * dev,
const ngcb_route_t & r )

Constructor with interface device and route.

◆ ngcdcsADC() [3/4]

ngcdcsADC::ngcdcsADC ( const ngcb_route_t & r,
int n,
int b )

Constructor with route, number of ADCs and BITPIX.

◆ ngcdcsADC() [4/4]

ngcdcsADC::ngcdcsADC ( ngcbIFC * dev,
const ngcb_route_t & r,
int n,
int b )

Constructor with interface device, route, number of channels and BITPIX.

◆ ~ngcdcsADC()

ngcdcsADC::~ngcdcsADC ( )
virtual

Destructor.

Member Function Documentation

◆ ChanDisable()

int ngcdcsADC::ChanDisable ( )

Disable all ADC channels on module.

◆ ChanEnable() [1/2]

int ngcdcsADC::ChanEnable ( )

Enable all ADC channels on module.

◆ ChanEnable() [2/2]

int ngcdcsADC::ChanEnable ( int n)

Enable first n ADC channels on module.

◆ Clamp()

int ngcdcsADC::Clamp ( int flag)

Set clamp.

◆ Clear()

int ngcdcsADC::Clear ( )

Clear all data FIFOs.

◆ Convert()

int ngcdcsADC::Convert ( int cvt1,
int cvt2 )

Enable/disable conversion strobes.

◆ Delay()

int ngcdcsADC::Delay ( int ticks)

Set conversion strobe delay in ticks.

◆ Disable()

int ngcdcsADC::Disable ( )
virtual

Call-back at transition to not operational state.

Reimplemented from ngcbMOD.

◆ DualLink()

int ngcdcsADC::DualLink ( int flag)

Enable/disable second link.

◆ Enable()

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

Call-back at transition to operational state.

Reimplemented from ngcbMOD.

◆ Filter()

int ngcdcsADC::Filter ( int value)

Set filter.

◆ First()

int ngcdcsADC::First ( int flag)

Set first in chain bit.

◆ LED()

void ngcdcsADC::LED ( int stat)

Enable/disable LEDs.

◆ Monitor()

int ngcdcsADC::Monitor ( int num,
int chan )

Set channel for video monitor.

◆ Offset()

int ngcdcsADC::Offset ( double newOffset)

Set ADC offset.

◆ OpMode()

int ngcdcsADC::OpMode ( int newMode)

Set operation mode.

◆ PacketCnt()

int ngcdcsADC::PacketCnt ( int len)

Set packet routing length.

◆ PacketSize()

int ngcdcsADC::PacketSize ( int size)

Set packet size.

◆ PixPerWord()

int ngcdcsADC::PixPerWord ( )

Pixel per 32-bit word (1 or 2)

◆ PPDim()

int ngcdcsADC::PPDim ( int nx,
int ny )

Set pre-processor frame dimension.

◆ PPDisable()

int ngcdcsADC::PPDisable ( )

Disable pre-processor.

◆ PPEnable()

int ngcdcsADC::PPEnable ( )

Enable pre-processor.

◆ PPFowler()

int ngcdcsADC::PPFowler ( int flag)

Enable/disable Fowler mode.

◆ PPInvert()

int ngcdcsADC::PPInvert ( int flag)

Invert Fowler pairs.

◆ PPNumInt()

int ngcdcsADC::PPNumInt ( int n)

Set pre-processor integration frame counter.

◆ PPNumSamp()

int ngcdcsADC::PPNumSamp ( int n)

Set number of pre-processor sub-pixel samples.

◆ Preset()

void ngcdcsADC::Preset ( int size,
int n )

Configuration preset.

◆ Reset()

void ngcdcsADC::Reset ( )
virtual

Align soft-states after reset.

Reimplemented from ngcbMOD.

◆ Selftest()

int ngcdcsADC::Selftest ( )

Execute self-test.

◆ SetupKey()

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

Setup.

◆ SimMode()

int ngcdcsADC::SimMode ( int newMode)

Set simulation mode.

◆ Status()

int ngcdcsADC::Status ( int * hwStatus,
int * swStatus )

Read current status.

◆ StatusKey()

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

Status.

◆ Update()

int ngcdcsADC::Update ( )

Update sensor values.

Member Data Documentation

◆ bitPix

int ngcdcsADC::bitPix

Bits per pixel.

◆ clamp

int ngcdcsADC::clamp

Clamp (0/1)

◆ cldc

ngcdcsCLDC* ngcdcsADC::cldc

Assigned clock- and bias-generator.

◆ convert1

int ngcdcsADC::convert1

Enable conversion on convert strobe 1.

◆ convert2

int ngcdcsADC::convert2

Enable conversion on convert strobe 2.

◆ delay

int ngcdcsADC::delay

Conversion strobe delay (in ticks)

◆ enable

int ngcdcsADC::enable

Number of enabled ADC channels on module.

◆ filter

int ngcdcsADC::filter

Filter (0/1)

◆ firstInChain

int ngcdcsADC::firstInChain

First in chain.

◆ link2

int ngcdcsADC::link2

2nd link

◆ monitor1

int ngcdcsADC::monitor1

Channel on monitor 1.

◆ monitor2

int ngcdcsADC::monitor2

Channel on monitor 2.

◆ numAdc

int ngcdcsADC::numAdc

Number of ADC channels on module.

◆ offset

double ngcdcsADC::offset

Video offset.

◆ opMode

int ngcdcsADC::opMode

Operation mode.

◆ packetCnt

int ngcdcsADC::packetCnt

Route length.

◆ packetSize

int ngcdcsADC::packetSize

Packet size.

◆ pp

ngcdcs_adcpp_t ngcdcsADC::pp

Pre-processor.

◆ simMode

int ngcdcsADC::simMode

Simulation mode.

◆ temp

double ngcdcsADC::temp

Board temperature.


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