ngc 1.4.0
 
Loading...
Searching...
No Matches
ngcdcsSVS Class Reference

#include <ngcdcsSVS.hpp>

Inheritance diagram for ngcdcsSVS:
ngcbMOD ngcbOBJ

Public Member Functions

 ngcdcsSVS (const ngcb_route_t &r)
 Constructor with route and external reference.
 
 ngcdcsSVS (ngcbIFC *ifc, const ngcb_route_t &r)
 Constructor with device, route and external reference.
 
virtual ~ngcdcsSVS ()
 Destructor.
 
void Reset ()
 Align software state 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 selftest.
 
int Action (const char *action, char *reply=NULL)
 Execute SVS action.
 
void Dump (char *s, int idx)
 Dump page to string.
 
void Dump (char *s)
 Dump all pages to string.
 
int Info (ngcdcs_svs_info *info)
 Get supervisor info.
 
int SoftReset ()
 Supervisor soft reset.
 
int Stop ()
 Supervisor emergency stop.
 
int Restart ()
 Supervisor restart.
 
int PageEnable (int flag, int page=255)
 Page enable.
 
int ClearFaults ()
 Clear supervisor faults.
 
int ClearFaultLog ()
 Clear supervisor fault-log.
 
int ForceFaultLog ()
 Force supervisor fault-log.
 
int FaultLogDepth (int n)
 Set supervisor fault-log depth.
 
int FaultLogOverwrite (int flag)
 Set supervisor fault-log overwrite flag.
 
int ResetHistory ()
 Reset supervisor history (min, peak, average)
 
int Status (int *status)
 Update supervisor status.
 
int Update (int sensor, int force=0)
 Run next sensor update cycle.
 
int ResetSensors (int errFlag=0)
 Reset all sensors.
 
int ResetRHum ()
 Reset humidity sensor.
 
int ResetTemp ()
 Reset temperature sensor.
 
int ResetPressure ()
 Reset pressure sensor.
 
int ResetPTemp ()
 Reset pressure/temperature sensor.
 
int SensorError (int sensor)
 Return sensor error state.
 
int SensHeat (int flag)
 Turn humidity and temperature sensor heater on/off.
 
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

ngcdcsSHT31_TEMP temp
 Temperature sensor (degC)
 
ngcdcsSHT31_RHUM rhum
 Relative humidity sensor (%)
 
ngcdcsMPL3115A2_PRESSURE pressure
 Pressure sensor (kPa)
 
ngcdcsMPL3115A2_TEMP ptemp
 Pressure sensor (kPa)
 
int sensEnabled
 Sensor interface disabled/enabled flag.
 
int sensPrefill
 Prefill sensor filter windows.
 
double sensSettleTime
 Sensor settling time.
 
int sensHeat
 Humidity and temperature sensor heater on/off flag.
 
ngcdcs_svs_i2c_t i2c [3]
 I2C-devices.
 
ngcdcsSVS_PAGEpage
 Supervisor pages.
 
- 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.)
 

Detailed Description

NGC SVS module class

Constructor & Destructor Documentation

◆ ngcdcsSVS() [1/2]

ngcdcsSVS::ngcdcsSVS ( const ngcb_route_t & r)
explicit

Constructor with route and external reference.

◆ ngcdcsSVS() [2/2]

ngcdcsSVS::ngcdcsSVS ( ngcbIFC * ifc,
const ngcb_route_t & r )

Constructor with device, route and external reference.

◆ ~ngcdcsSVS()

ngcdcsSVS::~ngcdcsSVS ( )
virtual

Destructor.

Member Function Documentation

◆ Action()

int ngcdcsSVS::Action ( const char * action,
char * reply = NULL )

Execute SVS action.

◆ ClearFaultLog()

int ngcdcsSVS::ClearFaultLog ( )

Clear supervisor fault-log.

◆ ClearFaults()

int ngcdcsSVS::ClearFaults ( )

Clear supervisor faults.

◆ Disable()

int ngcdcsSVS::Disable ( )
virtual

Call-back at transition to not operational state.

Reimplemented from ngcbMOD.

◆ Dump() [1/2]

void ngcdcsSVS::Dump ( char * s)

Dump all pages to string.

◆ Dump() [2/2]

void ngcdcsSVS::Dump ( char * s,
int idx )

Dump page to string.

◆ Enable()

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

Call-back at transition to operational state.

Reimplemented from ngcbMOD.

◆ FaultLogDepth()

int ngcdcsSVS::FaultLogDepth ( int n)

Set supervisor fault-log depth.

◆ FaultLogOverwrite()

int ngcdcsSVS::FaultLogOverwrite ( int flag)

Set supervisor fault-log overwrite flag.

◆ ForceFaultLog()

int ngcdcsSVS::ForceFaultLog ( )

Force supervisor fault-log.

◆ Info()

int ngcdcsSVS::Info ( ngcdcs_svs_info * info)

Get supervisor info.

◆ PageEnable()

int ngcdcsSVS::PageEnable ( int flag,
int page = 255 )

Page enable.

◆ Reset()

void ngcdcsSVS::Reset ( )
virtual

Align software state after reset.

Reimplemented from ngcbMOD.

◆ ResetHistory()

int ngcdcsSVS::ResetHistory ( )

Reset supervisor history (min, peak, average)

◆ ResetPressure()

int ngcdcsSVS::ResetPressure ( )

Reset pressure sensor.

◆ ResetPTemp()

int ngcdcsSVS::ResetPTemp ( )

Reset pressure/temperature sensor.

◆ ResetRHum()

int ngcdcsSVS::ResetRHum ( )

Reset humidity sensor.

◆ ResetSensors()

int ngcdcsSVS::ResetSensors ( int errFlag = 0)

Reset all sensors.

◆ ResetTemp()

int ngcdcsSVS::ResetTemp ( )

Reset temperature sensor.

◆ Restart()

int ngcdcsSVS::Restart ( )

Supervisor restart.

◆ Selftest()

int ngcdcsSVS::Selftest ( )

Execute selftest.

◆ SensHeat()

int ngcdcsSVS::SensHeat ( int flag)

Turn humidity and temperature sensor heater on/off.

◆ SensorError()

int ngcdcsSVS::SensorError ( int sensor)

Return sensor error state.

◆ SetupKey()

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

Setup.

◆ SoftReset()

int ngcdcsSVS::SoftReset ( )

Supervisor soft reset.

◆ Status()

int ngcdcsSVS::Status ( int * status)

Update supervisor status.

◆ StatusKey()

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

Status.

◆ Stop()

int ngcdcsSVS::Stop ( )

Supervisor emergency stop.

◆ Update()

int ngcdcsSVS::Update ( int sensor,
int force = 0 )

Run next sensor update cycle.

Member Data Documentation

◆ i2c

ngcdcs_svs_i2c_t ngcdcsSVS::i2c[3]

I2C-devices.

◆ page

ngcdcsSVS_PAGE* ngcdcsSVS::page

Supervisor pages.

◆ pressure

ngcdcsMPL3115A2_PRESSURE ngcdcsSVS::pressure

Pressure sensor (kPa)

◆ ptemp

ngcdcsMPL3115A2_TEMP ngcdcsSVS::ptemp

Pressure sensor (kPa)

◆ rhum

ngcdcsSHT31_RHUM ngcdcsSVS::rhum

Relative humidity sensor (%)

◆ sensEnabled

int ngcdcsSVS::sensEnabled

Sensor interface disabled/enabled flag.

◆ sensHeat

int ngcdcsSVS::sensHeat

Humidity and temperature sensor heater on/off flag.

◆ sensPrefill

int ngcdcsSVS::sensPrefill

Prefill sensor filter windows.

◆ sensSettleTime

double ngcdcsSVS::sensSettleTime

Sensor settling time.

◆ temp

ngcdcsSHT31_TEMP ngcdcsSVS::temp

Temperature sensor (degC)


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