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

#include <ngcdcsSRV.hpp>

Inheritance diagram for ngcdcsSRV:
ngcbSIO ngcbCMD_SRV ngcdcsACQ_SERVICE

Public Member Functions

 ngcdcsSRV ()
 Constructors.
 
 ngcdcsSRV (ngcdcsCTRL *controller)
 Constructors with controller object.
 
virtual ~ngcdcsSRV ()
 Destructor.
 
int EvtAddWait (int fd, int id)
 Add event waiting client.
 
int CfgPath (char *path, const char *cfgFile)
 Get cfg-file path.
 
int ConfigureSystem (ngcdcs_syscfg_t newCfg, int copy=1)
 Configure system.
 
int Check (const ngcdcs_syscfg_t &cfg)
 Check system configuration.
 
int SysCfg (const char *cfgFile)
 Apply system configuration.
 
void SysCfgDefault (const char *cfg)
 Apply default system configuration.
 
int InitSysCfg (const char *cfgFile)
 Initialize default system configuration from file.
 
int StoreCfg (const char *fileName)
 Store configuration.
 
void Release ()
 Release server.
 
void Shutdown ()
 Dhutdown all modules.
 
void Info (char *s)
 Formatted server info.
 
void SysInfo (char *s)
 Formatted system info.
 
void ModInfo (char *s)
 Formatted module info.
 
void BoardInfo (char *s)
 Formatted board info.
 
int AdcInfo (int id, char *s)
 Formatted ADC module info.
 
int AcqInfo (int id, char *s)
 Formatted acquisition process info.
 
void RpcTranslate (void *payload, size_t size, int request, int how, char *s)
 Translate RPC payload to string.
 
void CheckDev (int idx, char *s)
 Device check.
 
int GetPat (int id, int num, char *s)
 Formatted clock pattern.
 
int GetPrg (int id, int num, char *s)
 Formatted sequencer program.
 
int CheckTriggerPeriod (int id, double period)
 Check, if the trigger period matches the current read-out sequence.
 
int Check (const ngcdcs_detcfg_t &cfg)
 Check detector configuration.
 
int DetCfg (const char *cfgFile)
 Apply detector configuration.
 
int RouteComp (ngcbMOD *, ngcbMOD *)
 Compare module routes.
 
int FrameHandler (void *buffer, ngcdcs_finfo_t *finfo, char *erms)
 Frame handler (from ngcbACQ_SERVICE)
 
int FitsMerger (ngcbFITS *hdr, char *erms)
 FITS merger (from ngcbACQ_SERVICE)
 
int Statistics (int id, char *s)
 Formatted acquisition process statistics.
 
int AcqProc (int id, const char *procName)
 Set acquisition process on multiple instances.
 
int Rtd (int idx)
 Start RTD for acquistion module.
 
int FrameGen (int id, const char *name, int flag)
 Set frame attribute: generate.
 
int FrameStore (int id, const char *name, int flag)
 Set frame attribute: store.
 
int FrameLocal (int id, const char *name, int flag)
 Set frame attribute: store to local medi.
 
int FrameExport (int id, const char *name, int flag)
 Set frame attribute: export.
 
int FrameBreak (int id, const char *name, int n)
 Set exposure break condition for frame.
 
int FrameWin (int id, const char *name, int sx, int sy, int nx, int ny)
 Set frame window.
 
void GetFrames (int id, char *s)
 Get frame configuration (debugging function)
 
int ReadModeIdx (int id)
 Get read-mode index by id.
 
int ReadModeIdx (const char *name)
 Get read-mode index by name.
 
int ReadMode (int idx)
 Set new read-mode.
 
int FitsBlock ()
 Number of FITS blocks from system.
 
int PrepareFits (int refresh=1)
 Prepare FITS-header.
 
int DumpFits (const char *fileName=NULL)
 Dump FITS-header to file.
 
int CheckExp ()
 Return an error when an exposure is still active.
 
void ExpStatus (unsigned int newStat, const char *erms=NULL)
 Update exposure status.
 
void ExpStatus2String (char *s, int stat)
 Convert exposure status to string.
 
void ExpStatus2String (char *s)
 Convert current exposure status to string.
 
char * ExpStatusString ()
 Return current exposure status as string.
 
int RecStart (const char *id, double absTime=0.0)
 Start recording sequence (shortcut to series of function calls)
 
int ExpStart (int acqId=0, double absTime=0.0)
 Start exposure.
 
int ExpAbort (int acqId=0)
 Abort exposure.
 
int ExpEnd (int acqId=0)
 End exposure.
 
int ExpPause (int id=0)
 Pause exosure.
 
int ExpCont (int id=0)
 Continue paused exosure.
 
int ExpAddWait (int fd, int id)
 Add exposure waiting client (socket)
 
void ExpPoll ()
 Exposure polling.
 
int PostProcEnabled ()
 Returns 1 if post-processor is enabled.
 
void Publish (const ngcdcs_exp_topic &topic)
 Publish exposure event.
 
uint64_t FramesProcessed ()
 Number of processed frames during current exposure.
 
uint64_t SizeRecorded ()
 Recorded data size during current exposure (in bytes)
 
double TimeElapsed ()
 Time elapsed in current exposure.
 
double RemainingTime ()
 Time remaining in current exposure.
 
void ExpDrvStatus (unsigned int newStat)
 Exposure driver status update.
 
int ExpDrvLoad (const char *module, const char *name=NULL)
 Load exposure driver.
 
int ExpDrvUnload (const char *name, const char *symbol=NULL)
 Unload exposure driver.
 
int ExpDrvUnload ()
 Unload all dynamically loaded driver modules.
 
int ExpDrvLoaded (const char *module)
 Check if exposure driver module is loaded.
 
int ExpDrvCfg (const char *s)
 Configue exposure driver from either a file a parameter string.
 
void ExpDrvList (char *s)
 Print exposure driver list to string.
 
void ExpDrvModList (char *s)
 Print list of loaded exposure driver modules to string.
 
int ExpDrvSelect (const char *name)
 Install exposure driver.
 
int ExpDrvClose ()
 Uninstall exposure driver.
 
int ExpDrvStart ()
 Activate exposure driver.
 
int ExpDrvAbort ()
 Abort exposure driver.
 
int ExpDrvAddWait (int fd)
 Add exposure driver waiting client (socket)
 
virtual void MergeReset (int relaunch=0)
 Reset data merger interface.
 
virtual int MergeStart (const char *name, int display, int id, int cleanup=0)
 Start exposure data file merger with requested id.
 
virtual int MergeStop (int id)
 Stop exposure data file merger.
 
virtual int MergeStatus (int id, char *stat=NULL)
 Get status of exposure data file merger.
 
virtual int MergeMsg (int id, char *msg)
 Get status message of exposure data file merger.
 
virtual void MergeNext ()
 Merge next item in the data merger list.
 
int MergeAlign ()
 Align merger file-list with backup file.
 
void State (int newState, int update=1)
 Set new server state.
 
void SubState (int newState)
 set new sub-state
 
void ClearSubState ()
 Clear sub-state (error or active)
 
int ErrState ()
 Check if we are in error state.
 
int OpMode (int level)
 Set operational mode.
 
int OpMode (const char *mode)
 Set operational mode (by name)
 
int OpenDebugConnection ()
 Open error-state debug connection.
 
int CloseDebugConnection ()
 Close error-state debug connection.
 
void DevPoll ()
 Device events polling cycle.
 
int HaveLocalEvents ()
 Local events configured.
 
virtual void Query ()
 Query system status.
 
virtual void PollStatConfigure (int enable, int interval)
 Configure status polling (milliseconds)
 
virtual void HiResTimer (int enable)
 Enable/disable hi-res timer.
 
void FatalError (const char *erms)
 Go to fatal error state.
 
int FatalError ()
 Check for fatal error.
 
double LifeTime ()
 Server life time (seconds)
 
int Disable ()
 Go to not operational state.
 
int NeedEnableCycle ()
 Return a flag indicating whether an enabling cycle is needed.
 
int Enable (int check)
 Go to operational state with or without integrity check.
 
int Off ()
 Switch off.
 
int Recover ()
 Recover from error state.
 
int ResetDfe ()
 Reset detector front-end.
 
int ResetSensors ()
 Reset sensors.
 
void Profile (const char *name=NULL)
 Apply profile.
 
void ProcName (const char *name)
 Set process name.
 
const char * ProcName ()
 Return process name.
 
void PrintUsage ()
 Print command line options.
 
int ParseArguments (int argc, char **argv)
 Parse options.
 
const char * Version ()
 Current version.
 
void ExportVersion (const char *newVersion)
 Export version.
 
void Port (int port)
 Set core service port.
 
void Instance (const char *name)
 Set Instance.
 
char * Instance ()
 Get instance.
 
void ExecShell (const char *name)
 Set remote execution shell.
 
const char * DicList ()
 Get dictionary list.
 
char * ErrMsg ()
 Global error message.
 
void SaveErr (const char *erms)
 Save last error message.
 
const char * LastErr ()
 Last error message.
 
int ShutdownService (int port)
 Shutdown service port.
 
void Logger (int flag, const char *msg)
 Logger (from ngcbSERVICE)
 
int Xterm ()
 Flag to start in new window.
 
int VerboseLevel ()
 Get verbose level.
 
void VerboseLevel (int level)
 Set verbose level.
 
int LogLevel ()
 Get logging level.
 
void LogLevel (int level)
 Set logging level.
 
void Verbose (int level, const char *format,...) __attribute__((format(printf
 Verbose method depending on level.
 
void void Verbose (const char *fromat,...) __attribute__((format(printf
 Verbose method.
 
void void void Log (int level, const char *format,...) __attribute__((format(printf
 Logging method depending on level.
 
void void void void Log (const char *format,...) __attribute__((format(printf
 Logging method.
 
void void void void void ErrLog (int severity, const char *format,...) __attribute__((format(printf
 Error log, severity is one of ngcbWARNING, ngcbFAILURE and ngcbERR_SEVERE.
 
void void void void void void Print (const char *format,...) __attribute__((format(printf
 Print verbose message.
 
void void void void void void void AddLog (const char *format,...) __attribute__((format(printf
 Add message to the logging system.
 
void void void void void void void int ConfigureLogging (int vb, int log, int xt)
 Configure logging parameters.
 
int DebugStream (int flag)
 Enable/disable debug-stream.
 
void BroadcastAlarm (const char *msg)
 Broadcast alarm.
 
void ClrLog ()
 Clear built-in log.
 
void CatLog (char *s)
 Copy built-in log to string.
 
void DeviceEvent (void *origin, void *event)
 Device event (from ngcbSERVICE)
 
void DevError (const char *erms, int id, void *descriptor)
 Device error (from ngcbSERVICE)
 
void AcqError (const char *erms, int id, void *descriptor)
 Device error (from ngcbACQ_SERVICE)
 
void DisableDbMirror ()
 Disable internal databse mirror.
 
int DbAdd (ngcbATTR *attr)
 Add attribute to database.
 
void DbExport ()
 Export database.
 
int DbConfigure ()
 Configure database.
 
int Update ()
 Update database.
 
virtual void DbLock ()
 Lock database.
 
virtual void DbUnlock ()
 Unlock database.
 
int AddCmd (const char *cmd, ngcb_function_t function, int flags, const char *syntax, const char *help)
 Add command to server command list.
 
void DelCmd (const char *cmd)
 Delete command from server command list.
 
int Execute (const char *cmd, char *reply, int protect=0, int fd=-1)
 Command handler.
 
int Execute (const char *cmd, int protect=0, int fd=-1)
 Command handler without reply.
 
int Macro (const char *fileName, char *reply, int protection=0)
 Execute macro file.
 
int SimError (int error, int idx=0)
 Simulate various error test cases.
 
virtual void ExitSignal (int sig)
 Exit handler.
 
int Initialize ()
 Initialize system.
 
int Reset ()
 Reset system.
 
void Abort ()
 Abort server.
 
int InMainLoop ()
 Function called before entering main-loop.
 
int SrvPortOrig ()
 Get original server port number.
 
int CoreShell ()
 Core shell.
 
int MainLoop ()
 Run service-loop.
 
void LockService ()
 Lock service loop.
 
void UnlockService ()
 Unlock service loop.
 
int AcqStop (int id=0)
 Stop (acquisition process)
 
int AcqStart (int id=0)
 Start (acquisition process)
 
int SeqIdle (int id=0)
 Check sequencer idle states.
 
int SeqWaiting ()
 Check if all sequencers are in WAITING state.
 
int SeqStop (int id=0)
 Stop (sequencer + acquisition process)
 
int SeqStart (int id=0, struct timeval *ts=NULL, double absTime=0.0)
 Start (sequencer + acquisition process)
 
int SeqTrigger (int id)
 Sequencer sync trigger.
 
int SeqPause (int id=0)
 Sequencer pause.
 
int SeqContinue (int id=0)
 Sequencer continue.
 
int SeqBreak (int id=0)
 Break sequence.
 
int SeqWait (int id, int event, int timeout, int interval)
 Wait for status event.
 
void ClearState (int id=0)
 Clear stored sequencer states.
 
void StoreState ()
 Store sequencer states.
 
int RestoreState ()
 Restore sequencer states.
 
int ShutterAction (int id, const char *action, char *reply)
 Perform shutter action.
 
int TecAction (int id, const char *action, char *reply)
 Perform TEC action.
 
int GeosnapAction (int id, const char *action, char *reply)
 Perform GEOSNAP action.
 
ngcbPARAM_LISTParamList ()
 Global parameter list.
 
int ParamDefault ()
 Set default values.
 
int LoadSetup (const char *fileName, char **list, int *listLength, int max=-1)
 Load setup from file into string array.
 
int LoadSetup (const char *fileName)
 Load and apply setup from file.
 
ngcbPARAMParamDefine (const char *name, const char *value, int id, int *status=NULL)
 Define parameter.
 
int ParamDefine (const char *name, const char *value, const char *unit)
 Define free parameter (e.g. via command)
 
void ParamUndefine (const char *name, int id)
 Undefine (remove) parameter.
 
int SetupList (const char *paramBuf)
 Setup parameter list (string)
 
int SetupList (char **paramBuf, int size)
 Setup parameter list (string array)
 
int SetupList (ngcbPARAM_LIST *list)
 Setup parameter list.
 
int SetupParam (const char *name, const char *value)
 Set single parameter.
 
int StatusList (const char *list, char *reply)
 Get parameter status (parameter names string)
 
int StatusList (char **list, int size, char *reply)
 Get parameter status (parameter names array)
 
int StatusParam (const char *name, char *value)
 Get single parameter.
 
int ParamLookup (const char *name, char *value, int flag=0)
 Handler for parameter lookup (from ngcbSERVICE)
 
ngcdcsCLDCCldcMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route, int nc, int nb, double extRef)
 CLDC module factory.
 
ngcdcsSEQSeqMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route, ngcbPARAM_LIST *p)
 Sequencer module factory.
 
ngcdcsADCAdcMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route, int num, int bitPix)
 ADC module factory.
 
virtual ngcdcsSHUTTERShutterMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 Shutter module factory.
 
virtual ngcdcsPREAMPPreampMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 Preamplifier module factory.
 
ngcdcsNGC2NGC2Mod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 NGC2 basic module factory.
 
ngcdcsAOAOMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 AO camera module factory.
 
ngcdcsLISALISAMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 LISA camera module factory.
 
ngcdcsNGSDNGSDMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route, double extRef)
 NGSD module factory.
 
ngcdcsTECTECMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 TEC module factory.
 
ngcdcsGEOSNAPGeosnapMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route)
 GEOSNAP module factory.
 
ngcdcsSCAScaMod (const char *spec, ngcbIFC *dev, const ngcb_route_t &route, ngcbPARAM_LIST *p)
 Sidecar ASIC module factory.
 
ngcdcsACQAcqMod (const char *spec, const ngcdcs_acq_cfg_t &cfg, ngcbPARAM_LIST *p)
 Acquisition module factory.
 
ngcdcsSEQ0SeqFn (int idx)
 Get index of sequencer functional module.
 
ngcdcsCLDC0CldcFn (int idx)
 Get index of CLDC functional module.
 
int CldcEnable (int id)
 Enable CLDC outputs.
 
int CldcDisable (int id)
 Disable CLDC outputs.
 
int CldcDefault (int id)
 Restore default voltages.
 
int CldcCheck (int id)
 Telemetry check.
 
int CldcCalibrate (int id)
 Calibrate voltages.
 
int CldcClearCalibration (int id)
 Clear voltage calibration.
 
int CldcRestore (int id, const char *key=NULL)
 Restore voltage defined by voltage-keyword.
 
int Snapshot (int id, char *s)
 Formatted bias snapshot.
 
int Telemetry (int id, char *s)
 Formatted telemetry.
 
void Voltages (ngcdcsCLDC0 *mod, char *s)
 Formatted voltages.
 
int SelftestCldc (int id)
 Selftest function for CLDC module.
 
int SelftestSeq (int id)
 Selftest function for sequencer module.
 
int SelftestAdc (int id)
 Selftest function for ADC module.
 
int SelftestShutter (int id)
 Selftest function for shutter module.
 
int SelftestPreamp (int id)
 Selftest function for preamplifier module.
 
int SelftestSca (int id)
 Selftest function for Sidecar ASIC module.
 
int SelftestAcq (int id)
 Selftest function for acquisition module.
 
- Public Member Functions inherited from ngcbSIO
 ngcbSIO ()
 Constructor.
 
virtual ~ngcbSIO ()
 Destructor.
 
char * ErrMsg ()
 Error message.
 
int PortNum (int fd)
 Get port number.
 
int GetIpAddr (const char *name, char *ipAddr)
 Get IP-address.
 
int WaitSocket (int fd, int timeout)
 Wait with timeout until socket becomes readable.
 
int TcpService (const char *service=NULL)
 Open a tcp/ip server socket.
 
int TcpService (int port)
 Open a tcp/ip server socket.
 
int TcpAccept (int srvSocket)
 Accept a tcp/ip connection request from a client.
 
int TcpConnect (const char *service)
 Connect to a tcp/ip socket service.
 
int TcpConnect (int port, const char *host=NULL)
 Connect to a tcp/ip socket service defined by port and host.
 
int TcpClose (int fd)
 Close tcp/ip socket.
 
int TcpRead (int fd, void *buffer, size_t size)
 Read buffer from tcp/ip socket.
 
int TcpWrite (int fd, const void *buffer, size_t size)
 Write buffer to tcp/ip socket.
 
int TcpPuts (int fd, const char *string)
 Put string to tcp/ip socket.
 
int TcpGets (int fd, char *string, int maxLen)
 Get string from tcp/ip socket.
 
int TcpReadRequest (int fd, char *request, int maxSize)
 Read request from tcp/ip socket.
 
int TcpWriteReply (int fd, const char *reply, int success)
 Write reply to tcp/ip socket.
 
int ExecVersion (const char *host)
 Return version of exec daemon or -1 if version cannot be retrieved.
 
int Exec (const char *host, const char *cmd, char *reply, int port=0)
 Execute process on host.
 
int ExecXt (const char *host, const char *cmd, char *reply, const char *geom=NULL)
 Execute process on host (in new terminal)
 
int Kill (const char *host, int pid)
 Terminate process on host.
 
void ExecReply (int fd, char success, const char *reply)
 Send reply to calling process.
 
int Discover (const char *host, const char *name, const char *instance, int *port, int *protocol=NULL)
 Discover command/reply service on host.
 
int Discover (const char *name, const char *instance, int *port, int *protocol=NULL)
 Discover command/reply service on local host.
 
int Connect (const char *host, int port, int protocol, int *evtPort)
 Connect client to command/reply service.
 
int Connect (const char *host, int port, int protocol)
 Connect to command/reply service with specific protocol.
 
int Connect (const char *service, int protocol=ngcbSIO_PROTOCOL_ASCII)
 Connect to command/reply service with specific protocol.
 
void Disconnect ()
 Disconnect from command/reply service.
 
int Connected ()
 Return client connection status.
 
void ReplyBufferSize (size_t size)
 Set reply buffer size of the client interface.
 
int SendRequest (const char *request)
 Send request to server.
 
int GetReply (char *s=NULL)
 Copy reply from server to string.
 
int PrintReply (FILE *fd)
 Print server reply to stream.
 
int ReplyLine (char *line)
 Read next reply line.
 
char * Reply ()
 Reply buffer.
 
int RequestReply (const char *request, char *reply=NULL)
 Run request/reply protocol.
 
int OpenServer (int cmdPort, int evtPort=-1)
 Open socket server.
 
void CloseServer ()
 Close socket server.
 
void StopServer ()
 Terminate server main-loop.
 
int SrvOpened ()
 Returns 1 when server is open.
 
virtual void SetSrvAborted (int flag)
 Set server-aborted flag.
 
virtual int SrvAborted ()
 Returns 1 when server-aborted flag is set.
 
int SrvCmdPort ()
 Get actual server command port.
 
int SrvEvtPort ()
 Get actual server event port.
 
int SrvCmdSocket ()
 Get actual command server socket.
 
int SrvEvtSocket ()
 Get actual event server socket.
 
int OpenPort (int port, int protocol=0)
 Open service port.
 
int ClosePort (int port)
 Close service port.
 
int Port2Fd (int port)
 Return server socket associated to service port.
 
int Fd2Port (int fd)
 Return service port associated to server socket.
 
int ConnectCmd (int srvSocket, int protocol=0)
 Connect command client.
 
int NumCmdClient ()
 Return number of command client connections.
 
int HaveCmdClient ()
 Returns 1 in case any command client connection is established.
 
int ConnectEvt (int srvSocket)
 Connect event client.
 
int NumEvtClient ()
 Return number of event client connections.
 
int HaveEvtClient ()
 Returns 1 in case any event client connection is established.
 
void Broadcast (const void *buffer, size_t size)
 Broadcat buffer to all event clients.
 
void Broadcast (const char *s)
 Broadcast string to all event clients.
 
int Protocol (int fd)
 Run protocol when socket becomes readable.
 
int ProtocolType ()
 Get preferred protocol type.
 
void ProtocolType (int protocol)
 Set Protocol type.
 
int GetProtocol (int fd)
 Get protocol type assigned to a given socket.
 
void EnableStdIn ()
 Enable input via stdin.
 
void DisableStdIn ()
 Disable input via stdin.
 
int StdIn ()
 Get file-descriptor associated to the standard input.
 
int FdAttach (int fd)
 Attach file-descriptor to the file descriptor event call-back.
 
void FdDetach (int fd)
 Detach file-descriptor from the file descriptor event call-back.
 
void TimerSet (int ms)
 Set timer (in milliseconds)
 
void TimerOn ()
 Enable timer.
 
void TimerOff ()
 Stop timmer.
 
int MainLoop ()
 Enter socket server main-loop.
 
void Lock ()
 Lock service main-loop.
 
void Unlock ()
 Unlock service main-loop.
 
void CleanupCmd (char *cmdLine, int *cmdLen)
 Clean command string (remove extra spaces etc.)
 
virtual void virtual void virtual void virtual void virtual void LogMsg (const char *msg)
 Message logger.
 
- Public Member Functions inherited from ngcbCMD_SRV
 ngcbCMD_SRV ()
 Constructor.
 
virtual ~ngcbCMD_SRV ()
 Destructor.
 
void AssignPassword (const char *fileName)
 Assign password from file.
 
const char * PW ()
 Return password.
 
int LogIn (const char *s)
 Login to trusted mode with a key in the format "name:password".
 
void LogOut ()
 Log out.
 
int LoggedIn ()
 Return login status.
 
void Lock ()
 Lock command system.
 
void Unlock ()
 Unlock command system.
 
int Locked ()
 Return locked status.
 
void Encrypt (char *s, const char *key=NULL)
 Encrypt string with key.
 

Public Attributes

int forceStartup
 Enforce system startup even when instance check fails.
 
int detIndex
 Detector category index.
 
char thisHost [64]
 Our hostname.
 
int maxDfeMod
 Maximum number of DFE modules.
 
int deviceEvents
 Enable/disable device events.
 
ngcbLIST evtList
 Event list.
 
ngcdcs_syscfg_t sysCfg
 Current configuration structure.
 
char configDir [256]
 Configuration directory.
 
FILE * watchdog
 Watchdog.
 
ngcdcs_detcfg_t detCfg
 Current configuration structure.
 
ngcdcsCTRLctrl
 Controller object.
 
ngcbIFCctrlDev [ngcdcsCTRL_MAX_DEV]
 Mirror of controller devices.
 
ngcdcsTCCDtccd [ngcdcsTCCD_MAX_PROC]
 TCCD modules.
 
int numTccdMod
 Number of acquisition modules.
 
ngcdcsACQacq [ngcdcsACQ_MAX_PROC]
 Acquisition modules.
 
int numAcqMod
 Number of acquisition modules.
 
int readModeId
 Current read-mode id.
 
char readModeName [64]
 Current read-mode name.
 
int updateReadModeList
 Read-out mode list update flag.
 
ngcdcsEXP exposure
 Exposure handler.
 
ngcdcsEXPDRVexpDrv
 Exposure sequence driver.
 
char expDrvFeedBack [128]
 Feed-back channel selection.
 
int autoMerge
 Automatic merging.
 
int concurrentMerge
 Concurrent merging.
 
ngcdcsMRGLIST mergeList
 Merger file-list handler.
 
int mergeDisplay
 Flag to launch merger status display.
 
int mergeVerify
 Enable/disable verification run before merging.
 
int mergeInvalidate
 Flag to invalidate source-data after merging.
 
int mergeChunk
 Merger chunk size (bytes)
 
char mergeArg [128]
 Additional merger arguments.
 
char opMode [32]
 Operation mode string.
 
int integrityCheck
 Integrity check when going online.
 
int state
 Server state value.
 
char stateString [32]
 Server state string (STANDBY,ONLINE,...
 
int subState
 Server sub-state value.
 
char subStateString [32]
 Sub-state string (IDLE,BUSY,...)
 
int polling
 Enable/disable polling.
 
int pollInterval
 Polling interval in ms.
 
int HIRES_TIMER
 High resolution polling interval.
 
char gui [256]
 GUI to be started.
 
FILE * debugStream
 Debug stream.
 
ngcbALARM_SYSalarmSystem
 Alarm system.
 
int fitsLogLevel
 FITS logging level.
 
int fitsLogPeriod
 FITS logging period (seconds)
 
char dbPoint [256]
 Actual data base point.
 
int autoRestart
 Enable automatic restart mechanism.
 
ngcbDIC dictionary
 Global dictionary.
 
int updateParam
 Parameter update flag.
 
int numSeqFn
 Number of sequencer functions.
 
int numCldcFn
 Number of CLDC functions.
 
- Public Attributes inherited from ngcbSIO
int verboseLevel
 Verbose level.
 
int logLevel
 Loggin level.
 
int ignoreSignal
 Ignore signal in main-loop select call.
 

Protected Member Functions

virtual ngcbCMD_LISTCreateCmdList ()
 Command list factory.
 
virtual void InstallSignalHandlers ()
 Install signal handlers.
 
virtual int ResolvePath (char *resolved, const char *fileName)
 Resolve full path name by parsing search paths etc.
 
virtual void SysCfgOverride (ngcdcs_syscfg_t *newCfg)
 Overrride system configuration (call-back)
 
virtual int ConfigureSystemCB1 (ngcdcs_syscfg_t &newCfg)
 System configuration call-back 1 (before re-configuration)
 
virtual int ConfigureSystemCB2 (ngcdcs_syscfg_t &newCfg)
 System configuration call-back 2 (after re-configuration)
 
virtual int LoadSysCfg (ngcdcs_syscfg_t *newCfg, const char *fileName)
 System configuration file loader.
 
virtual int LoadDetCfg (ngcdcs_detcfg_t *newCfg, const char *fileName)
 Detector configuration file loader.
 
virtual void ShutdownSystemCB1 ()
 Shutdown callback 1.
 
virtual void ShutdownSystemCB2 ()
 Shutdown callback 2.
 
virtual void MergeInit ()
 Initialize file-merger interface.
 
virtual int LookupCB (const char *paramName, char *value)
 Call-back for parameter lookup.
 
virtual int FrameHandlerCB (void *buffer, ngcdcs_finfo_t *finfo, char *erms)
 Frame handler call-back.
 
virtual int FitsMergerCB (ngcbFITS *hdr, char *erms)
 FITS-merger call-back.
 
int HandleExpEvt ()
 Handle exposure event.
 
virtual int ExpStartCB ()
 Hook at exposure start.
 
virtual int ExpCountDownCB ()
 Exposure countdown start call-back.
 
ngcdcsEXPDRVExpDrv (const char *name, const ngcb_fb_t &feedBackChannel)
 Exposure driver installation hook.
 
virtual void AgEvent (int acqInst, ngcdcs_2ag_t ag, int errorId, const char *erms)
 Auto-guiding event.
 
virtual void ErrorEvent (int id, const char *erms)
 Error event handler.
 
virtual void ErrLogEvent (int id, const char *erms)
 Error logging event.
 
virtual void VerboseCB (const char *msg, int level=ngcdcsLOG_INFO)
 Verbose output callback.
 
virtual void LogCB (const char *msg, int level=ngcdcsLOG_INFO)
 Logging output callback.
 
virtual void DbLogCB (const char *msg)
 Database log callback.
 
void DbLog (const char *format,...) __attribute__((format(printf
 Action log in database.
 
void virtual int DbConfCB ()
 Configure database call-back.
 
virtual int DbUpdateCB ()
 Update database call-back.
 
virtual void PublishExpEvent (int errorId, unsigned int newStat, const char *fileName, int merge, const char *erms)
 Publish exposure event.
 
virtual void PublishLogPars ()
 Publish logging parameters.
 
virtual void PublishState ()
 Publish server state.
 
virtual void PublishSubState ()
 Publish server sub-state.
 
virtual void PublishExpDrvStatus ()
 Publish exposure driver status.
 
virtual int AddSockCB (int fd)
 Add file descriptor to socket event list.
 
virtual int DelSockCB (int fd)
 Remove file descriptor from socket event list.
 
virtual ngcdcsCLDCMakeCLDC (ngcbIFC *dev, const ngcb_route_t &route, int nc, int nb)
 Create standard CLDC module.
 
virtual ngcdcsC20B20MakeC20B20 (ngcbIFC *dev, const ngcb_route_t &route, int nc, int nb)
 Create NGC2 bias generator.
 
virtual ngcdcsB24MakeB24 (ngcbIFC *dev, const ngcb_route_t &route, int nb)
 Create NGC2 B24 bias generator.
 
virtual ngcdcsC24MakeC24 (ngcbIFC *dev, const ngcb_route_t &route)
 Create NGC2 C24 bias generator.
 
virtual ngcdcsAPDMakeAPD (ngcbIFC *dev, const ngcb_route_t &route, int nb)
 Create APD bias generator.
 
virtual ngcdcsAOBIASMakeAOBIAS (ngcbIFC *dev, const ngcb_route_t &route, int nb)
 Create AO bias generator.
 
virtual ngcdcsALBIASMakeALBIAS (ngcbIFC *dev, const ngcb_route_t &route, int nb)
 Create ALICE bias generator.
 
virtual ngcdcsLISABIASMakeLISABIAS (ngcbIFC *dev, const ngcb_route_t &route, int nb)
 Create LISA bias generator.
 
virtual ngcdcsNGSDBIASMakeNGSDBIAS (ngcbIFC *dev, const ngcb_route_t &route, int nb, double extRef)
 Create NGSD bias generator.
 
virtual ngcdcsSEQMakeSEQ (ngcbIFC *dev, const ngcb_route_t &route, ngcbPARAM_LIST *p)
 Create sequencer module.
 
virtual ngcdcsADCMakeADC (ngcbIFC *dev, const ngcb_route_t &route, int num, int bitPix)
 Create ADC module.
 
virtual ngcdcsSHUTTERMakeSHUTTER (ngcbIFC *dev, const ngcb_route_t &route)
 Create shutter module.
 
virtual ngcdcsPREAMPMakePREAMP (ngcbIFC *dev, const ngcb_route_t &route)
 Create preamplifier module.
 
virtual ngcdcsNGC2MakeNGC2 (ngcbIFC *dev, const ngcb_route_t &route)
 Create NGC2 basic module.
 
virtual ngcdcsAOMakeAO (ngcbIFC *dev, const ngcb_route_t &route)
 Create AO camera module.
 
virtual ngcdcsLISAMakeLISA (ngcbIFC *dev, const ngcb_route_t &route)
 Create LISA camera module.
 
virtual ngcdcsNGSDMakeNGSD (ngcbIFC *dev, const ngcb_route_t &route, double extRef)
 Create NGSD module.
 
virtual ngcdcsTECMakeTEC (ngcbIFC *dev, const ngcb_route_t &route)
 Create TEC module.
 
virtual ngcdcsGEOSNAPMakeGeosnap (ngcbIFC *dev, const ngcb_route_t &route)
 Create GEOSNAP module.
 
virtual ngcdcsSCAMakeSCA (ngcbIFC *dev, const ngcb_route_t &route, ngcbPARAM_LIST *p)
 Create Sidecar ASIC module.
 
virtual ngcdcsACQMakeACQ (const ngcdcs_acq_cfg_t &cfg, ngcbPARAM_LIST *p)
 Create acquisition module.
 
int ProtocolAscii (int fd)
 ASCII command protocol.
 
int ProtocolBin (int fd)
 Binary command protocol.
 
int FdCB (int fd)
 File descriptor event.
 
int NewEventConnection (int fd)
 New event connection.
 
int TimerCB ()
 Timer call-back.
 
- Protected Member Functions inherited from ngcbSIO
virtual int Service (int fd, int protocol)
 Application specific service protocol.
 
virtual int ServiceConnect (int fd, int protocol)
 Application specific service connection protocol.
 
virtual void ProtocolErr (const char *erms)
 Call-back to log protocol errors.
 
virtual int RegisterService (int fd)
 Register command service.
 
virtual int UnregisterService (int fd)
 Unregister command service.
 
virtual void MainLoopInit ()
 Indicate main-loop initialization.
 
- Protected Member Functions inherited from ngcbCMD_SRV
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.
 
int KeyIdx (char *key, const char *mask)
 Get the index after the first occurrence of mask in the keyword.
 
void DiscardDetIdx (char *key)
 Discard DETi index.
 
void StringReset (char *s, size_t size=256)
 Fill string with zeros.
 

Protected Attributes

size_t ppStackSize
 Post-processor stack size in bytes (0 = use system default)
 

Detailed Description

NGC server core class

Constructor & Destructor Documentation

◆ ngcdcsSRV() [1/2]

ngcdcsSRV::ngcdcsSRV ( )

Constructors.

◆ ngcdcsSRV() [2/2]

ngcdcsSRV::ngcdcsSRV ( ngcdcsCTRL * controller)
explicit

Constructors with controller object.

◆ ~ngcdcsSRV()

ngcdcsSRV::~ngcdcsSRV ( )
virtual

Destructor.

Member Function Documentation

◆ Abort()

void ngcdcsSRV::Abort ( )

Abort server.

◆ AcqError()

void ngcdcsSRV::AcqError ( const char * erms,
int id,
void * descriptor )
virtual

Device error (from ngcbACQ_SERVICE)

Reimplemented from ngcdcsACQ_SERVICE.

◆ AcqInfo()

int ngcdcsSRV::AcqInfo ( int id,
char * s )

Formatted acquisition process info.

◆ AcqMod()

ngcdcsACQ * ngcdcsSRV::AcqMod ( const char * spec,
const ngcdcs_acq_cfg_t & cfg,
ngcbPARAM_LIST * p )

Acquisition module factory.

◆ AcqProc()

int ngcdcsSRV::AcqProc ( int id,
const char * procName )

Set acquisition process on multiple instances.

◆ AcqStart()

int ngcdcsSRV::AcqStart ( int id = 0)

Start (acquisition process)

◆ AcqStop()

int ngcdcsSRV::AcqStop ( int id = 0)

Stop (acquisition process)

◆ AdcInfo()

int ngcdcsSRV::AdcInfo ( int id,
char * s )

Formatted ADC module info.

◆ AdcMod()

ngcdcsADC * ngcdcsSRV::AdcMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route,
int num,
int bitPix )

ADC module factory.

◆ AddCmd()

int ngcdcsSRV::AddCmd ( const char * cmd,
ngcb_function_t function,
int flags,
const char * syntax,
const char * help )

Add command to server command list.

◆ AddLog()

void ngcdcsSRV::AddLog ( const char * format,
... )

Add message to the logging system.

◆ AddSockCB()

int ngcdcsSRV::AddSockCB ( int fd)
protectedvirtual

Add file descriptor to socket event list.

◆ AgEvent()

void ngcdcsSRV::AgEvent ( int acqInst,
ngcdcs_2ag_t ag,
int errorId,
const char * erms )
protectedvirtual

Auto-guiding event.

◆ AOMod()

ngcdcsAO * ngcdcsSRV::AOMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )

AO camera module factory.

◆ BoardInfo()

void ngcdcsSRV::BoardInfo ( char * s)

Formatted board info.

◆ BroadcastAlarm()

void ngcdcsSRV::BroadcastAlarm ( const char * msg)

Broadcast alarm.

◆ CatLog()

void ngcdcsSRV::CatLog ( char * s)

Copy built-in log to string.

◆ CfgPath()

int ngcdcsSRV::CfgPath ( char * path,
const char * cfgFile )

Get cfg-file path.

◆ Check() [1/2]

int ngcdcsSRV::Check ( const ngcdcs_detcfg_t & cfg)

Check detector configuration.

◆ Check() [2/2]

int ngcdcsSRV::Check ( const ngcdcs_syscfg_t & cfg)

Check system configuration.

◆ CheckDev()

void ngcdcsSRV::CheckDev ( int idx,
char * s )

Device check.

◆ CheckExp()

int ngcdcsSRV::CheckExp ( )

Return an error when an exposure is still active.

◆ CheckTriggerPeriod()

int ngcdcsSRV::CheckTriggerPeriod ( int id,
double period )

Check, if the trigger period matches the current read-out sequence.

◆ CldcCalibrate()

int ngcdcsSRV::CldcCalibrate ( int id)

Calibrate voltages.

◆ CldcCheck()

int ngcdcsSRV::CldcCheck ( int id)

Telemetry check.

◆ CldcClearCalibration()

int ngcdcsSRV::CldcClearCalibration ( int id)

Clear voltage calibration.

◆ CldcDefault()

int ngcdcsSRV::CldcDefault ( int id)

Restore default voltages.

◆ CldcDisable()

int ngcdcsSRV::CldcDisable ( int id)

Disable CLDC outputs.

◆ CldcEnable()

int ngcdcsSRV::CldcEnable ( int id)

Enable CLDC outputs.

◆ CldcFn()

ngcdcsCLDC0 * ngcdcsSRV::CldcFn ( int idx)

Get index of CLDC functional module.

◆ CldcMod()

ngcdcsCLDC * ngcdcsSRV::CldcMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route,
int nc,
int nb,
double extRef )

CLDC module factory.

◆ CldcRestore()

int ngcdcsSRV::CldcRestore ( int id,
const char * key = NULL )

Restore voltage defined by voltage-keyword.

◆ ClearState()

void ngcdcsSRV::ClearState ( int id = 0)

Clear stored sequencer states.

◆ ClearSubState()

void ngcdcsSRV::ClearSubState ( )

Clear sub-state (error or active)

◆ CloseDebugConnection()

int ngcdcsSRV::CloseDebugConnection ( )

Close error-state debug connection.

◆ ClrLog()

void ngcdcsSRV::ClrLog ( )

Clear built-in log.

◆ ConfigureLogging()

int ngcdcsSRV::ConfigureLogging ( int vb,
int log,
int xt )

Configure logging parameters.

◆ ConfigureSystem()

int ngcdcsSRV::ConfigureSystem ( ngcdcs_syscfg_t newCfg,
int copy = 1 )

Configure system.

◆ ConfigureSystemCB1()

int ngcdcsSRV::ConfigureSystemCB1 ( ngcdcs_syscfg_t & newCfg)
protectedvirtual

System configuration call-back 1 (before re-configuration)

◆ ConfigureSystemCB2()

int ngcdcsSRV::ConfigureSystemCB2 ( ngcdcs_syscfg_t & newCfg)
protectedvirtual

System configuration call-back 2 (after re-configuration)

◆ CoreShell()

int ngcdcsSRV::CoreShell ( )

Core shell.

◆ CreateCmdList()

ngcbCMD_LIST * ngcdcsSRV::CreateCmdList ( )
protectedvirtual

Command list factory.

◆ DbAdd()

int ngcdcsSRV::DbAdd ( ngcbATTR * attr)

Add attribute to database.

◆ DbConfCB()

int ngcdcsSRV::DbConfCB ( )
protectedvirtual

Configure database call-back.

◆ DbConfigure()

int ngcdcsSRV::DbConfigure ( )

Configure database.

◆ DbExport()

void ngcdcsSRV::DbExport ( )

Export database.

◆ DbLock()

void ngcdcsSRV::DbLock ( )
virtual

Lock database.

◆ DbLog()

void ngcdcsSRV::DbLog ( const char * format,
... )
protected

Action log in database.

◆ DbLogCB()

void ngcdcsSRV::DbLogCB ( const char * msg)
protectedvirtual

Database log callback.

◆ DbUnlock()

void ngcdcsSRV::DbUnlock ( )
virtual

Unlock database.

◆ DbUpdateCB()

int ngcdcsSRV::DbUpdateCB ( )
protectedvirtual

Update database call-back.

◆ DebugStream()

int ngcdcsSRV::DebugStream ( int flag)

Enable/disable debug-stream.

◆ DelCmd()

void ngcdcsSRV::DelCmd ( const char * cmd)

Delete command from server command list.

◆ DelSockCB()

int ngcdcsSRV::DelSockCB ( int fd)
protectedvirtual

Remove file descriptor from socket event list.

◆ DetCfg()

int ngcdcsSRV::DetCfg ( const char * cfgFile)

Apply detector configuration.

◆ DevError()

void ngcdcsSRV::DevError ( const char * erms,
int id,
void * descriptor )
virtual

Device error (from ngcbSERVICE)

Reimplemented from ngcbSERVICE.

◆ DeviceEvent()

void ngcdcsSRV::DeviceEvent ( void * origin,
void * event )
virtual

Device event (from ngcbSERVICE)

Reimplemented from ngcbSERVICE.

◆ DevPoll()

void ngcdcsSRV::DevPoll ( )

Device events polling cycle.

◆ DicList()

const char * ngcdcsSRV::DicList ( )

Get dictionary list.

◆ Disable()

int ngcdcsSRV::Disable ( )

Go to not operational state.

◆ DisableDbMirror()

void ngcdcsSRV::DisableDbMirror ( )

Disable internal databse mirror.

◆ DumpFits()

int ngcdcsSRV::DumpFits ( const char * fileName = NULL)

Dump FITS-header to file.

◆ Enable()

int ngcdcsSRV::Enable ( int check)

Go to operational state with or without integrity check.

◆ ErrLog()

void ngcdcsSRV::ErrLog ( int severity,
const char * format,
... )

Error log, severity is one of ngcbWARNING, ngcbFAILURE and ngcbERR_SEVERE.

◆ ErrLogEvent()

void ngcdcsSRV::ErrLogEvent ( int id,
const char * erms )
protectedvirtual

Error logging event.

◆ ErrMsg()

char * ngcdcsSRV::ErrMsg ( )

Global error message.

◆ ErrorEvent()

void ngcdcsSRV::ErrorEvent ( int id,
const char * erms )
protectedvirtual

Error event handler.

◆ ErrState()

int ngcdcsSRV::ErrState ( )

Check if we are in error state.

◆ EvtAddWait()

int ngcdcsSRV::EvtAddWait ( int fd,
int id )

Add event waiting client.

◆ ExecShell()

void ngcdcsSRV::ExecShell ( const char * name)

Set remote execution shell.

◆ Execute() [1/2]

int ngcdcsSRV::Execute ( const char * cmd,
char * reply,
int protect = 0,
int fd = -1 )

Command handler.

◆ Execute() [2/2]

int ngcdcsSRV::Execute ( const char * cmd,
int protect = 0,
int fd = -1 )

Command handler without reply.

◆ ExitSignal()

void ngcdcsSRV::ExitSignal ( int sig)
virtual

Exit handler.

◆ ExpAbort()

int ngcdcsSRV::ExpAbort ( int acqId = 0)

Abort exposure.

◆ ExpAddWait()

int ngcdcsSRV::ExpAddWait ( int fd,
int id )

Add exposure waiting client (socket)

◆ ExpCont()

int ngcdcsSRV::ExpCont ( int id = 0)

Continue paused exosure.

◆ ExpCountDownCB()

int ngcdcsSRV::ExpCountDownCB ( )
protectedvirtual

Exposure countdown start call-back.

◆ ExpDrv()

ngcdcsEXPDRV * ngcdcsSRV::ExpDrv ( const char * name,
const ngcb_fb_t & feedBackChannel )
protected

Exposure driver installation hook.

◆ ExpDrvAbort()

int ngcdcsSRV::ExpDrvAbort ( )

Abort exposure driver.

◆ ExpDrvAddWait()

int ngcdcsSRV::ExpDrvAddWait ( int fd)

Add exposure driver waiting client (socket)

◆ ExpDrvCfg()

int ngcdcsSRV::ExpDrvCfg ( const char * s)

Configue exposure driver from either a file a parameter string.

◆ ExpDrvClose()

int ngcdcsSRV::ExpDrvClose ( )

Uninstall exposure driver.

◆ ExpDrvList()

void ngcdcsSRV::ExpDrvList ( char * s)

Print exposure driver list to string.

◆ ExpDrvLoad()

int ngcdcsSRV::ExpDrvLoad ( const char * module,
const char * name = NULL )

Load exposure driver.

◆ ExpDrvLoaded()

int ngcdcsSRV::ExpDrvLoaded ( const char * module)

Check if exposure driver module is loaded.

◆ ExpDrvModList()

void ngcdcsSRV::ExpDrvModList ( char * s)

Print list of loaded exposure driver modules to string.

◆ ExpDrvSelect()

int ngcdcsSRV::ExpDrvSelect ( const char * name)

Install exposure driver.

◆ ExpDrvStart()

int ngcdcsSRV::ExpDrvStart ( )

Activate exposure driver.

◆ ExpDrvStatus()

void ngcdcsSRV::ExpDrvStatus ( unsigned int newStat)

Exposure driver status update.

◆ ExpDrvUnload() [1/2]

int ngcdcsSRV::ExpDrvUnload ( )

Unload all dynamically loaded driver modules.

◆ ExpDrvUnload() [2/2]

int ngcdcsSRV::ExpDrvUnload ( const char * name,
const char * symbol = NULL )

Unload exposure driver.

◆ ExpEnd()

int ngcdcsSRV::ExpEnd ( int acqId = 0)

End exposure.

◆ ExportVersion()

void ngcdcsSRV::ExportVersion ( const char * newVersion)

Export version.

◆ ExpPause()

int ngcdcsSRV::ExpPause ( int id = 0)

Pause exosure.

◆ ExpPoll()

void ngcdcsSRV::ExpPoll ( )

Exposure polling.

◆ ExpStart()

int ngcdcsSRV::ExpStart ( int acqId = 0,
double absTime = 0.0 )

Start exposure.

◆ ExpStartCB()

int ngcdcsSRV::ExpStartCB ( )
protectedvirtual

Hook at exposure start.

◆ ExpStatus()

void ngcdcsSRV::ExpStatus ( unsigned int newStat,
const char * erms = NULL )

Update exposure status.

◆ ExpStatus2String() [1/2]

void ngcdcsSRV::ExpStatus2String ( char * s)

Convert current exposure status to string.

◆ ExpStatus2String() [2/2]

void ngcdcsSRV::ExpStatus2String ( char * s,
int stat )

Convert exposure status to string.

◆ ExpStatusString()

char * ngcdcsSRV::ExpStatusString ( )

Return current exposure status as string.

◆ FatalError() [1/2]

int ngcdcsSRV::FatalError ( )

Check for fatal error.

◆ FatalError() [2/2]

void ngcdcsSRV::FatalError ( const char * erms)

Go to fatal error state.

◆ FdCB()

int ngcdcsSRV::FdCB ( int fd)
protectedvirtual

File descriptor event.

Reimplemented from ngcbSIO.

◆ FitsBlock()

int ngcdcsSRV::FitsBlock ( )

Number of FITS blocks from system.

◆ FitsMerger()

int ngcdcsSRV::FitsMerger ( ngcbFITS * hdr,
char * erms )
virtual

FITS merger (from ngcbACQ_SERVICE)

Reimplemented from ngcdcsACQ_SERVICE.

◆ FitsMergerCB()

int ngcdcsSRV::FitsMergerCB ( ngcbFITS * hdr,
char * erms )
protectedvirtual

FITS-merger call-back.

◆ FrameBreak()

int ngcdcsSRV::FrameBreak ( int id,
const char * name,
int n )

Set exposure break condition for frame.

◆ FrameExport()

int ngcdcsSRV::FrameExport ( int id,
const char * name,
int flag )

Set frame attribute: export.

◆ FrameGen()

int ngcdcsSRV::FrameGen ( int id,
const char * name,
int flag )

Set frame attribute: generate.

◆ FrameHandler()

int ngcdcsSRV::FrameHandler ( void * buffer,
ngcdcs_finfo_t * finfo,
char * erms )
virtual

Frame handler (from ngcbACQ_SERVICE)

Reimplemented from ngcdcsACQ_SERVICE.

◆ FrameHandlerCB()

int ngcdcsSRV::FrameHandlerCB ( void * buffer,
ngcdcs_finfo_t * finfo,
char * erms )
protectedvirtual

Frame handler call-back.

◆ FrameLocal()

int ngcdcsSRV::FrameLocal ( int id,
const char * name,
int flag )

Set frame attribute: store to local medi.

◆ FramesProcessed()

uint64_t ngcdcsSRV::FramesProcessed ( )

Number of processed frames during current exposure.

◆ FrameStore()

int ngcdcsSRV::FrameStore ( int id,
const char * name,
int flag )

Set frame attribute: store.

◆ FrameWin()

int ngcdcsSRV::FrameWin ( int id,
const char * name,
int sx,
int sy,
int nx,
int ny )

Set frame window.

◆ GeosnapAction()

int ngcdcsSRV::GeosnapAction ( int id,
const char * action,
char * reply )

Perform GEOSNAP action.

◆ GeosnapMod()

ngcdcsGEOSNAP * ngcdcsSRV::GeosnapMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )

GEOSNAP module factory.

◆ GetFrames()

void ngcdcsSRV::GetFrames ( int id,
char * s )

Get frame configuration (debugging function)

◆ GetPat()

int ngcdcsSRV::GetPat ( int id,
int num,
char * s )

Formatted clock pattern.

◆ GetPrg()

int ngcdcsSRV::GetPrg ( int id,
int num,
char * s )

Formatted sequencer program.

◆ HandleExpEvt()

int ngcdcsSRV::HandleExpEvt ( )
protected

Handle exposure event.

◆ HaveLocalEvents()

int ngcdcsSRV::HaveLocalEvents ( )

Local events configured.

◆ HiResTimer()

void ngcdcsSRV::HiResTimer ( int enable)
virtual

Enable/disable hi-res timer.

◆ Info()

void ngcdcsSRV::Info ( char * s)

Formatted server info.

◆ Initialize()

int ngcdcsSRV::Initialize ( )

Initialize system.

◆ InitSysCfg()

int ngcdcsSRV::InitSysCfg ( const char * cfgFile)

Initialize default system configuration from file.

◆ InMainLoop()

int ngcdcsSRV::InMainLoop ( )

Function called before entering main-loop.

◆ InstallSignalHandlers()

void ngcdcsSRV::InstallSignalHandlers ( )
protectedvirtual

Install signal handlers.

◆ Instance() [1/2]

char * ngcdcsSRV::Instance ( )

Get instance.

◆ Instance() [2/2]

void ngcdcsSRV::Instance ( const char * name)

Set Instance.

◆ LastErr()

const char * ngcdcsSRV::LastErr ( )

Last error message.

◆ LifeTime()

double ngcdcsSRV::LifeTime ( )

Server life time (seconds)

◆ LISAMod()

ngcdcsLISA * ngcdcsSRV::LISAMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )

LISA camera module factory.

◆ LoadDetCfg()

int ngcdcsSRV::LoadDetCfg ( ngcdcs_detcfg_t * newCfg,
const char * fileName )
protectedvirtual

Detector configuration file loader.

◆ LoadSetup() [1/2]

int ngcdcsSRV::LoadSetup ( const char * fileName)

Load and apply setup from file.

◆ LoadSetup() [2/2]

int ngcdcsSRV::LoadSetup ( const char * fileName,
char ** list,
int * listLength,
int max = -1 )

Load setup from file into string array.

◆ LoadSysCfg()

int ngcdcsSRV::LoadSysCfg ( ngcdcs_syscfg_t * newCfg,
const char * fileName )
protectedvirtual

System configuration file loader.

◆ LockService()

void ngcdcsSRV::LockService ( )

Lock service loop.

◆ Log() [1/2]

void ngcdcsSRV::Log ( const char * format,
... )
virtual

Logging method.

Reimplemented from ngcbSIO.

◆ Log() [2/2]

void ngcdcsSRV::Log ( int level,
const char * format,
... )
virtual

Logging method depending on level.

Reimplemented from ngcbSIO.

◆ LogCB()

void ngcdcsSRV::LogCB ( const char * msg,
int level = ngcdcsLOG_INFO )
protectedvirtual

Logging output callback.

◆ Logger()

void ngcdcsSRV::Logger ( int flag,
const char * msg )
virtual

Logger (from ngcbSERVICE)

Reimplemented from ngcbSERVICE.

◆ LogLevel() [1/2]

int ngcdcsSRV::LogLevel ( )

Get logging level.

◆ LogLevel() [2/2]

void ngcdcsSRV::LogLevel ( int level)

Set logging level.

◆ LookupCB()

int ngcdcsSRV::LookupCB ( const char * paramName,
char * value )
protectedvirtual

Call-back for parameter lookup.

◆ Macro()

int ngcdcsSRV::Macro ( const char * fileName,
char * reply,
int protection = 0 )

Execute macro file.

◆ MainLoop()

int ngcdcsSRV::MainLoop ( )

Run service-loop.

◆ MakeACQ()

ngcdcsACQ * ngcdcsSRV::MakeACQ ( const ngcdcs_acq_cfg_t & cfg,
ngcbPARAM_LIST * p )
protectedvirtual

Create acquisition module.

◆ MakeADC()

ngcdcsADC * ngcdcsSRV::MakeADC ( ngcbIFC * dev,
const ngcb_route_t & route,
int num,
int bitPix )
protectedvirtual

Create ADC module.

◆ MakeALBIAS()

ngcdcsALBIAS * ngcdcsSRV::MakeALBIAS ( ngcbIFC * dev,
const ngcb_route_t & route,
int nb )
protectedvirtual

Create ALICE bias generator.

◆ MakeAO()

ngcdcsAO * ngcdcsSRV::MakeAO ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create AO camera module.

◆ MakeAOBIAS()

ngcdcsAOBIAS * ngcdcsSRV::MakeAOBIAS ( ngcbIFC * dev,
const ngcb_route_t & route,
int nb )
protectedvirtual

Create AO bias generator.

◆ MakeAPD()

ngcdcsAPD * ngcdcsSRV::MakeAPD ( ngcbIFC * dev,
const ngcb_route_t & route,
int nb )
protectedvirtual

Create APD bias generator.

◆ MakeB24()

ngcdcsB24 * ngcdcsSRV::MakeB24 ( ngcbIFC * dev,
const ngcb_route_t & route,
int nb )
protectedvirtual

Create NGC2 B24 bias generator.

◆ MakeC20B20()

ngcdcsC20B20 * ngcdcsSRV::MakeC20B20 ( ngcbIFC * dev,
const ngcb_route_t & route,
int nc,
int nb )
protectedvirtual

Create NGC2 bias generator.

◆ MakeC24()

ngcdcsC24 * ngcdcsSRV::MakeC24 ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create NGC2 C24 bias generator.

◆ MakeCLDC()

ngcdcsCLDC * ngcdcsSRV::MakeCLDC ( ngcbIFC * dev,
const ngcb_route_t & route,
int nc,
int nb )
protectedvirtual

Create standard CLDC module.

◆ MakeGeosnap()

ngcdcsGEOSNAP * ngcdcsSRV::MakeGeosnap ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create GEOSNAP module.

◆ MakeLISA()

ngcdcsLISA * ngcdcsSRV::MakeLISA ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create LISA camera module.

◆ MakeLISABIAS()

ngcdcsLISABIAS * ngcdcsSRV::MakeLISABIAS ( ngcbIFC * dev,
const ngcb_route_t & route,
int nb )
protectedvirtual

Create LISA bias generator.

◆ MakeNGC2()

ngcdcsNGC2 * ngcdcsSRV::MakeNGC2 ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create NGC2 basic module.

◆ MakeNGSD()

ngcdcsNGSD * ngcdcsSRV::MakeNGSD ( ngcbIFC * dev,
const ngcb_route_t & route,
double extRef )
protectedvirtual

Create NGSD module.

◆ MakeNGSDBIAS()

ngcdcsNGSDBIAS * ngcdcsSRV::MakeNGSDBIAS ( ngcbIFC * dev,
const ngcb_route_t & route,
int nb,
double extRef )
protectedvirtual

Create NGSD bias generator.

◆ MakePREAMP()

ngcdcsPREAMP * ngcdcsSRV::MakePREAMP ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create preamplifier module.

◆ MakeSCA()

ngcdcsSCA * ngcdcsSRV::MakeSCA ( ngcbIFC * dev,
const ngcb_route_t & route,
ngcbPARAM_LIST * p )
protectedvirtual

Create Sidecar ASIC module.

◆ MakeSEQ()

ngcdcsSEQ * ngcdcsSRV::MakeSEQ ( ngcbIFC * dev,
const ngcb_route_t & route,
ngcbPARAM_LIST * p )
protectedvirtual

Create sequencer module.

◆ MakeSHUTTER()

ngcdcsSHUTTER * ngcdcsSRV::MakeSHUTTER ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create shutter module.

◆ MakeTEC()

ngcdcsTEC * ngcdcsSRV::MakeTEC ( ngcbIFC * dev,
const ngcb_route_t & route )
protectedvirtual

Create TEC module.

◆ MergeAlign()

int ngcdcsSRV::MergeAlign ( )

Align merger file-list with backup file.

◆ MergeInit()

void ngcdcsSRV::MergeInit ( )
protectedvirtual

Initialize file-merger interface.

◆ MergeMsg()

int ngcdcsSRV::MergeMsg ( int id,
char * msg )
virtual

Get status message of exposure data file merger.

◆ MergeNext()

void ngcdcsSRV::MergeNext ( )
virtual

Merge next item in the data merger list.

◆ MergeReset()

void ngcdcsSRV::MergeReset ( int relaunch = 0)
virtual

Reset data merger interface.

◆ MergeStart()

int ngcdcsSRV::MergeStart ( const char * name,
int display,
int id,
int cleanup = 0 )
virtual

Start exposure data file merger with requested id.

◆ MergeStatus()

int ngcdcsSRV::MergeStatus ( int id,
char * stat = NULL )
virtual

Get status of exposure data file merger.

◆ MergeStop()

int ngcdcsSRV::MergeStop ( int id)
virtual

Stop exposure data file merger.

◆ ModInfo()

void ngcdcsSRV::ModInfo ( char * s)

Formatted module info.

◆ NeedEnableCycle()

int ngcdcsSRV::NeedEnableCycle ( )

Return a flag indicating whether an enabling cycle is needed.

◆ NewEventConnection()

int ngcdcsSRV::NewEventConnection ( int fd)
protectedvirtual

New event connection.

Reimplemented from ngcbSIO.

◆ NGC2Mod()

ngcdcsNGC2 * ngcdcsSRV::NGC2Mod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )

NGC2 basic module factory.

◆ NGSDMod()

ngcdcsNGSD * ngcdcsSRV::NGSDMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route,
double extRef )

NGSD module factory.

◆ Off()

int ngcdcsSRV::Off ( )

Switch off.

◆ OpenDebugConnection()

int ngcdcsSRV::OpenDebugConnection ( )

Open error-state debug connection.

◆ OpMode() [1/2]

int ngcdcsSRV::OpMode ( const char * mode)

Set operational mode (by name)

◆ OpMode() [2/2]

int ngcdcsSRV::OpMode ( int level)

Set operational mode.

◆ ParamDefault()

int ngcdcsSRV::ParamDefault ( )

Set default values.

◆ ParamDefine() [1/2]

int ngcdcsSRV::ParamDefine ( const char * name,
const char * value,
const char * unit )

Define free parameter (e.g. via command)

◆ ParamDefine() [2/2]

ngcbPARAM * ngcdcsSRV::ParamDefine ( const char * name,
const char * value,
int id,
int * status = NULL )

Define parameter.

◆ ParamList()

ngcbPARAM_LIST * ngcdcsSRV::ParamList ( )

Global parameter list.

◆ ParamLookup()

int ngcdcsSRV::ParamLookup ( const char * name,
char * value,
int flag = 0 )
virtual

Handler for parameter lookup (from ngcbSERVICE)

Reimplemented from ngcbSERVICE.

◆ ParamUndefine()

void ngcdcsSRV::ParamUndefine ( const char * name,
int id )

Undefine (remove) parameter.

◆ ParseArguments()

int ngcdcsSRV::ParseArguments ( int argc,
char ** argv )

Parse options.

◆ PollStatConfigure()

void ngcdcsSRV::PollStatConfigure ( int enable,
int interval )
virtual

Configure status polling (milliseconds)

◆ Port()

void ngcdcsSRV::Port ( int port)

Set core service port.

◆ PostProcEnabled()

int ngcdcsSRV::PostProcEnabled ( )

Returns 1 if post-processor is enabled.

◆ PreampMod()

ngcdcsPREAMP * ngcdcsSRV::PreampMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )
virtual

Preamplifier module factory.

◆ PrepareFits()

int ngcdcsSRV::PrepareFits ( int refresh = 1)

Prepare FITS-header.

◆ Print()

void ngcdcsSRV::Print ( const char * format,
... )

Print verbose message.

◆ PrintUsage()

void ngcdcsSRV::PrintUsage ( )

Print command line options.

◆ ProcName() [1/2]

const char * ngcdcsSRV::ProcName ( )

Return process name.

◆ ProcName() [2/2]

void ngcdcsSRV::ProcName ( const char * name)

Set process name.

◆ Profile()

void ngcdcsSRV::Profile ( const char * name = NULL)

Apply profile.

◆ ProtocolAscii()

int ngcdcsSRV::ProtocolAscii ( int fd)
protectedvirtual

ASCII command protocol.

Reimplemented from ngcbSIO.

◆ ProtocolBin()

int ngcdcsSRV::ProtocolBin ( int fd)
protectedvirtual

Binary command protocol.

Reimplemented from ngcbSIO.

◆ Publish()

void ngcdcsSRV::Publish ( const ngcdcs_exp_topic & topic)

Publish exposure event.

◆ PublishExpDrvStatus()

void ngcdcsSRV::PublishExpDrvStatus ( )
protectedvirtual

Publish exposure driver status.

◆ PublishExpEvent()

void ngcdcsSRV::PublishExpEvent ( int errorId,
unsigned int newStat,
const char * fileName,
int merge,
const char * erms )
protectedvirtual

Publish exposure event.

◆ PublishLogPars()

void ngcdcsSRV::PublishLogPars ( )
protectedvirtual

Publish logging parameters.

◆ PublishState()

void ngcdcsSRV::PublishState ( )
protectedvirtual

Publish server state.

◆ PublishSubState()

void ngcdcsSRV::PublishSubState ( )
protectedvirtual

Publish server sub-state.

◆ Query()

void ngcdcsSRV::Query ( )
virtual

Query system status.

◆ ReadMode()

int ngcdcsSRV::ReadMode ( int idx)

Set new read-mode.

◆ ReadModeIdx() [1/2]

int ngcdcsSRV::ReadModeIdx ( const char * name)

Get read-mode index by name.

◆ ReadModeIdx() [2/2]

int ngcdcsSRV::ReadModeIdx ( int id)

Get read-mode index by id.

◆ Recover()

int ngcdcsSRV::Recover ( )

Recover from error state.

◆ RecStart()

int ngcdcsSRV::RecStart ( const char * id,
double absTime = 0.0 )

Start recording sequence (shortcut to series of function calls)

◆ Release()

void ngcdcsSRV::Release ( )

Release server.

◆ RemainingTime()

double ngcdcsSRV::RemainingTime ( )

Time remaining in current exposure.

◆ Reset()

int ngcdcsSRV::Reset ( )

Reset system.

◆ ResetDfe()

int ngcdcsSRV::ResetDfe ( )

Reset detector front-end.

◆ ResetSensors()

int ngcdcsSRV::ResetSensors ( )

Reset sensors.

◆ ResolvePath()

int ngcdcsSRV::ResolvePath ( char * resolved,
const char * fileName )
protectedvirtual

Resolve full path name by parsing search paths etc.

◆ RestoreState()

int ngcdcsSRV::RestoreState ( )

Restore sequencer states.

◆ RouteComp()

int ngcdcsSRV::RouteComp ( ngcbMOD * mod1,
ngcbMOD * mod2 )

Compare module routes.

◆ RpcTranslate()

void ngcdcsSRV::RpcTranslate ( void * payload,
size_t size,
int request,
int how,
char * s )

Translate RPC payload to string.

◆ Rtd()

int ngcdcsSRV::Rtd ( int idx)

Start RTD for acquistion module.

◆ SaveErr()

void ngcdcsSRV::SaveErr ( const char * erms)

Save last error message.

◆ ScaMod()

ngcdcsSCA * ngcdcsSRV::ScaMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route,
ngcbPARAM_LIST * p )

Sidecar ASIC module factory.

◆ SelftestAcq()

int ngcdcsSRV::SelftestAcq ( int id)

Selftest function for acquisition module.

◆ SelftestAdc()

int ngcdcsSRV::SelftestAdc ( int id)

Selftest function for ADC module.

◆ SelftestCldc()

int ngcdcsSRV::SelftestCldc ( int id)

Selftest function for CLDC module.

◆ SelftestPreamp()

int ngcdcsSRV::SelftestPreamp ( int id)

Selftest function for preamplifier module.

◆ SelftestSca()

int ngcdcsSRV::SelftestSca ( int id)

Selftest function for Sidecar ASIC module.

◆ SelftestSeq()

int ngcdcsSRV::SelftestSeq ( int id)

Selftest function for sequencer module.

◆ SelftestShutter()

int ngcdcsSRV::SelftestShutter ( int id)

Selftest function for shutter module.

◆ SeqBreak()

int ngcdcsSRV::SeqBreak ( int id = 0)

Break sequence.

◆ SeqContinue()

int ngcdcsSRV::SeqContinue ( int id = 0)

Sequencer continue.

◆ SeqFn()

ngcdcsSEQ0 * ngcdcsSRV::SeqFn ( int idx)

Get index of sequencer functional module.

◆ SeqIdle()

int ngcdcsSRV::SeqIdle ( int id = 0)

Check sequencer idle states.

◆ SeqMod()

ngcdcsSEQ * ngcdcsSRV::SeqMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route,
ngcbPARAM_LIST * p )

Sequencer module factory.

◆ SeqPause()

int ngcdcsSRV::SeqPause ( int id = 0)

Sequencer pause.

◆ SeqStart()

int ngcdcsSRV::SeqStart ( int id = 0,
struct timeval * ts = NULL,
double absTime = 0.0 )

Start (sequencer + acquisition process)

◆ SeqStop()

int ngcdcsSRV::SeqStop ( int id = 0)

Stop (sequencer + acquisition process)

◆ SeqTrigger()

int ngcdcsSRV::SeqTrigger ( int id)

Sequencer sync trigger.

◆ SeqWait()

int ngcdcsSRV::SeqWait ( int id,
int event,
int timeout,
int interval )

Wait for status event.

◆ SeqWaiting()

int ngcdcsSRV::SeqWaiting ( )

Check if all sequencers are in WAITING state.

◆ SetupList() [1/3]

int ngcdcsSRV::SetupList ( char ** paramBuf,
int size )

Setup parameter list (string array)

◆ SetupList() [2/3]

int ngcdcsSRV::SetupList ( const char * paramBuf)

Setup parameter list (string)

◆ SetupList() [3/3]

int ngcdcsSRV::SetupList ( ngcbPARAM_LIST * list)

Setup parameter list.

◆ SetupParam()

int ngcdcsSRV::SetupParam ( const char * name,
const char * value )

Set single parameter.

◆ Shutdown()

void ngcdcsSRV::Shutdown ( )

Dhutdown all modules.

◆ ShutdownService()

int ngcdcsSRV::ShutdownService ( int port)

Shutdown service port.

◆ ShutdownSystemCB1()

void ngcdcsSRV::ShutdownSystemCB1 ( )
protectedvirtual

Shutdown callback 1.

◆ ShutdownSystemCB2()

void ngcdcsSRV::ShutdownSystemCB2 ( )
protectedvirtual

Shutdown callback 2.

◆ ShutterAction()

int ngcdcsSRV::ShutterAction ( int id,
const char * action,
char * reply )

Perform shutter action.

◆ ShutterMod()

ngcdcsSHUTTER * ngcdcsSRV::ShutterMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )
virtual

Shutter module factory.

◆ SimError()

int ngcdcsSRV::SimError ( int error,
int idx = 0 )

Simulate various error test cases.

◆ SizeRecorded()

uint64_t ngcdcsSRV::SizeRecorded ( )

Recorded data size during current exposure (in bytes)

◆ Snapshot()

int ngcdcsSRV::Snapshot ( int id,
char * s )

Formatted bias snapshot.

◆ SrvPortOrig()

int ngcdcsSRV::SrvPortOrig ( )

Get original server port number.

◆ State()

void ngcdcsSRV::State ( int newState,
int update = 1 )

Set new server state.

◆ Statistics()

int ngcdcsSRV::Statistics ( int id,
char * s )

Formatted acquisition process statistics.

◆ StatusList() [1/2]

int ngcdcsSRV::StatusList ( char ** list,
int size,
char * reply )

Get parameter status (parameter names array)

◆ StatusList() [2/2]

int ngcdcsSRV::StatusList ( const char * list,
char * reply )

Get parameter status (parameter names string)

◆ StatusParam()

int ngcdcsSRV::StatusParam ( const char * name,
char * value )

Get single parameter.

◆ StoreCfg()

int ngcdcsSRV::StoreCfg ( const char * fileName)

Store configuration.

◆ StoreState()

void ngcdcsSRV::StoreState ( )

Store sequencer states.

◆ SubState()

void ngcdcsSRV::SubState ( int newState)

set new sub-state

◆ SysCfg()

int ngcdcsSRV::SysCfg ( const char * cfgFile)

Apply system configuration.

◆ SysCfgDefault()

void ngcdcsSRV::SysCfgDefault ( const char * cfg)

Apply default system configuration.

◆ SysCfgOverride()

void ngcdcsSRV::SysCfgOverride ( ngcdcs_syscfg_t * newCfg)
protectedvirtual

Overrride system configuration (call-back)

◆ SysInfo()

void ngcdcsSRV::SysInfo ( char * s)

Formatted system info.

◆ TecAction()

int ngcdcsSRV::TecAction ( int id,
const char * action,
char * reply )

Perform TEC action.

◆ TECMod()

ngcdcsTEC * ngcdcsSRV::TECMod ( const char * spec,
ngcbIFC * dev,
const ngcb_route_t & route )

TEC module factory.

◆ Telemetry()

int ngcdcsSRV::Telemetry ( int id,
char * s )

Formatted telemetry.

◆ TimeElapsed()

double ngcdcsSRV::TimeElapsed ( )

Time elapsed in current exposure.

◆ TimerCB()

int ngcdcsSRV::TimerCB ( )
protectedvirtual

Timer call-back.

Reimplemented from ngcbSIO.

◆ UnlockService()

void ngcdcsSRV::UnlockService ( )

Unlock service loop.

◆ Update()

int ngcdcsSRV::Update ( )

Update database.

◆ Verbose() [1/2]

void ngcdcsSRV::Verbose ( const char * fromat,
... )
virtual

Verbose method.

Reimplemented from ngcbSIO.

◆ Verbose() [2/2]

void ngcdcsSRV::Verbose ( int level,
const char * format,
... )
virtual

Verbose method depending on level.

Reimplemented from ngcbSIO.

◆ VerboseCB()

void ngcdcsSRV::VerboseCB ( const char * msg,
int level = ngcdcsLOG_INFO )
protectedvirtual

Verbose output callback.

◆ VerboseLevel() [1/2]

int ngcdcsSRV::VerboseLevel ( )

Get verbose level.

◆ VerboseLevel() [2/2]

void ngcdcsSRV::VerboseLevel ( int level)

Set verbose level.

◆ Version()

const char * ngcdcsSRV::Version ( )

Current version.

◆ Voltages()

void ngcdcsSRV::Voltages ( ngcdcsCLDC0 * mod,
char * s )

Formatted voltages.

◆ Xterm()

int ngcdcsSRV::Xterm ( )

Flag to start in new window.

Member Data Documentation

◆ acq

ngcdcsACQ* ngcdcsSRV::acq[ngcdcsACQ_MAX_PROC]

Acquisition modules.

◆ alarmSystem

ngcbALARM_SYS* ngcdcsSRV::alarmSystem

Alarm system.

◆ autoMerge

int ngcdcsSRV::autoMerge

Automatic merging.

◆ autoRestart

int ngcdcsSRV::autoRestart

Enable automatic restart mechanism.

◆ concurrentMerge

int ngcdcsSRV::concurrentMerge

Concurrent merging.

◆ configDir

char ngcdcsSRV::configDir[256]

Configuration directory.

◆ ctrl

ngcdcsCTRL* ngcdcsSRV::ctrl

Controller object.

◆ ctrlDev

ngcbIFC* ngcdcsSRV::ctrlDev[ngcdcsCTRL_MAX_DEV]

Mirror of controller devices.

◆ dbPoint

char ngcdcsSRV::dbPoint[256]

Actual data base point.

◆ debugStream

FILE* ngcdcsSRV::debugStream

Debug stream.

◆ detCfg

ngcdcs_detcfg_t ngcdcsSRV::detCfg

Current configuration structure.

◆ detIndex

int ngcdcsSRV::detIndex

Detector category index.

◆ deviceEvents

int ngcdcsSRV::deviceEvents

Enable/disable device events.

◆ dictionary

ngcbDIC ngcdcsSRV::dictionary

Global dictionary.

◆ evtList

ngcbLIST ngcdcsSRV::evtList

Event list.

◆ expDrv

ngcdcsEXPDRV* ngcdcsSRV::expDrv

Exposure sequence driver.

◆ expDrvFeedBack

char ngcdcsSRV::expDrvFeedBack[128]

Feed-back channel selection.

◆ exposure

ngcdcsEXP ngcdcsSRV::exposure

Exposure handler.

◆ fitsLogLevel

int ngcdcsSRV::fitsLogLevel

FITS logging level.

◆ fitsLogPeriod

int ngcdcsSRV::fitsLogPeriod

FITS logging period (seconds)

◆ forceStartup

int ngcdcsSRV::forceStartup

Enforce system startup even when instance check fails.

◆ gui

char ngcdcsSRV::gui[256]

GUI to be started.

◆ HIRES_TIMER

int ngcdcsSRV::HIRES_TIMER

High resolution polling interval.

◆ integrityCheck

int ngcdcsSRV::integrityCheck

Integrity check when going online.

◆ maxDfeMod

int ngcdcsSRV::maxDfeMod

Maximum number of DFE modules.

◆ mergeArg

char ngcdcsSRV::mergeArg[128]

Additional merger arguments.

◆ mergeChunk

int ngcdcsSRV::mergeChunk

Merger chunk size (bytes)

◆ mergeDisplay

int ngcdcsSRV::mergeDisplay

Flag to launch merger status display.

◆ mergeInvalidate

int ngcdcsSRV::mergeInvalidate

Flag to invalidate source-data after merging.

◆ mergeList

ngcdcsMRGLIST ngcdcsSRV::mergeList

Merger file-list handler.

◆ mergeVerify

int ngcdcsSRV::mergeVerify

Enable/disable verification run before merging.

◆ numAcqMod

int ngcdcsSRV::numAcqMod

Number of acquisition modules.

◆ numCldcFn

int ngcdcsSRV::numCldcFn

Number of CLDC functions.

◆ numSeqFn

int ngcdcsSRV::numSeqFn

Number of sequencer functions.

◆ numTccdMod

int ngcdcsSRV::numTccdMod

Number of acquisition modules.

◆ opMode

char ngcdcsSRV::opMode[32]

Operation mode string.

◆ polling

int ngcdcsSRV::polling

Enable/disable polling.

◆ pollInterval

int ngcdcsSRV::pollInterval

Polling interval in ms.

◆ ppStackSize

size_t ngcdcsSRV::ppStackSize
protected

Post-processor stack size in bytes (0 = use system default)

◆ readModeId

int ngcdcsSRV::readModeId

Current read-mode id.

◆ readModeName

char ngcdcsSRV::readModeName[64]

Current read-mode name.

◆ state

int ngcdcsSRV::state

Server state value.

◆ stateString

char ngcdcsSRV::stateString[32]

Server state string (STANDBY,ONLINE,...

◆ subState

int ngcdcsSRV::subState

Server sub-state value.

◆ subStateString

char ngcdcsSRV::subStateString[32]

Sub-state string (IDLE,BUSY,...)

◆ sysCfg

ngcdcs_syscfg_t ngcdcsSRV::sysCfg

Current configuration structure.

◆ tccd

ngcdcsTCCD* ngcdcsSRV::tccd[ngcdcsTCCD_MAX_PROC]

TCCD modules.

◆ thisHost

char ngcdcsSRV::thisHost[64]

Our hostname.

◆ updateParam

int ngcdcsSRV::updateParam

Parameter update flag.

◆ updateReadModeList

int ngcdcsSRV::updateReadModeList

Read-out mode list update flag.

◆ watchdog

FILE* ngcdcsSRV::watchdog

Watchdog.


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