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

#include <ngcdtt.hpp>

Inheritance diagram for ngcdtt:
ngc::gateway::base::App ngc::gateway::ddt::App

Public Member Functions

 ngcdtt ()
 Constructor.
 
 ngcdtt (ngcdttPUBLISH *display)
 Constructor with specific display interface.
 
virtual ~ngcdtt ()
 Destructor.
 
virtual void InstallSignalHandlers ()
 Install signal handlers.
 
int ParseArguments (int argc, char **argv)
 Parse arguments.
 
void PrintUsage (const char *argv0)
 Print usage.
 
int Configure (const char *arg, const char *value=NULL)
 Set configuration parameter.
 
void Service (const char *value)
 Set request/reply service name.
 
int ServicePort ()
 Get request/reply service port.
 
void URI (const char *value)
 Set broker URI.
 
void Datastream (const char *value)
 Set datastream name.
 
void DCS (const char *value)
 Assign DCS instance.
 
void DefaultFrame (const char *value)
 Assign default display frame type.
 
void ConnectionId (int id)
 Set connection id (override default)
 
void ExecReply (int stat, const char *msg)
 Send execution reply message and status (1 = success, 0 = failure)
 
int Initialize ()
 Initialize.
 
void Abort ()
 Abort.
 
void StopMainLoop ()
 Stop the gateway main-loop (asynchronous call)
 
int MainLoop ()
 Enter the gateway main-loop.
 
char * ErrMsg ()
 Return actual error message.
 
void Verbose (const char *format,...) __attribute__((format(printf
 Verbose output.
 
void void Log (const char *msg)
 Log message.
 
void Verbose (int flag)
 Switch verbose mode on/off.
 
void VerboseLevel (int level)
 Set verbose level.
 
void LogLevel (int level)
 Set logging level.
 
int VerboseLevel ()
 Return verbose level.
 
int LogLevel ()
 Return logging level.
 
void ExitSignal (int sig)
 Handle EXIT-signal.
 

Public Attributes

int ignoreSignal
 Ignore signal in main-loop select call.
 
int cv32
 Enforce conversion to 32 bit.
 
int autoEnable
 Auto enable.
 
int nxMax
 Maximum x-dimension.
 
int nyMax
 Maximum y-dimension.
 
double frequency
 Maximum display frequency (Hz)
 
int dcsMod
 DCS acquisition module index.
 
int interruptible
 Interruptible connection.
 

Protected Member Functions

const char * Process ()
 Return process name.
 
const char * Version ()
 Return version.
 
const char * Instance ()
 Return instance name.
 
void Shutdown ()
 Request shutdown.
 
void DataService (const char *host, int port)
 Assign data service (host and port)
 
int DataOpen ()
 Open data connection.
 
void DataClose ()
 Close data connection.
 
int CamOpen ()
 Open camera.
 
void CamClose ()
 Close camera.
 
int Connected ()
 Return connected status.
 
int Enabled ()
 Return enabled status.
 
void Status (int flag)
 Set transfer status (enable=1, disable=0)
 
void Start ()
 Start (enable transfer)
 
void Stop ()
 Stop (disable transfer)
 
void Invert ()
 Invert image.
 
void Invert (int flag)
 Image inversion on/off.
 
int InvertStatus ()
 Return image inversion flag.
 
int SelectFrame (const char *name)
 Select frame type by name and return 1, if setup has changed.
 
void CurrentFrame (char *name)
 Get current frame type (name)
 
int Window (int sx, int sy, int nx, int ny)
 Set new window and return 1, if setup has changed.
 
int SX ()
 Return lower left x-coordinate of requested window.
 
int SY ()
 Return lower left y-coordinate of requested window.
 
int NX ()
 Return dimension in x-direction of requested window.
 
int NY ()
 Return dimension in y-direction of requested window.
 
void Retransmit ()
 Request frame retransmission.
 
int Store ()
 Store bias frame.
 
void Clear ()
 Clear bias frame.
 
int Subtract (int flag)
 Enable/disable bias frame subtraction.
 
int DS9 (const char *cmd, char *reply, size_t max)
 Execute DS9 command.
 
virtual void Alarm (const char *msg)
 Issue alarm.
 
virtual int MsgInit (int *fd)
 Initialize Initialize message system interface.
 
virtual void MsgShutdown ()
 Shutdown message system interface.
 
virtual int MsgHandler (int fd)
 Message handler.
 
virtual void Logger (const char *msg)
 Application specific logger.
 
virtual int Select (fd_set *readMask, struct timeval *timeout)
 Select call.
 
virtual void DbAttrState (int state)
 Write system state to database.
 
virtual void DbAttrFrames (int types)
 Write frame list to database.
 
virtual void DbAttrConnected (int value)
 Write connected flag to database.
 
virtual void DbAttrEnabled (int value)
 Write enabled flag to database.
 
virtual void DbAttrInvert (int value)
 Write image inversion flag to database.
 
virtual void DbAttrSelFrame (const char *name)
 Write selected frame to database.
 
virtual void DbAttrWin (int sx, int sy, int nx, int ny)
 Write window parameters to database.
 
virtual int DbGetCfg (const char *p, ngcdcs_rtdacq_t *acq)
 Get acquisition process configuration from DCS database.
 

Protected Attributes

ngcdttPUBLISHpublisher
 Publisher object.
 
char acqHost [64]
 Acquisition process host.
 
int acqPort
 Acquisition process port.
 
char camera [128]
 Camera name.
 
char dcsInst [64]
 DCS instance.
 
char dcsHost [64]
 DCS host.
 
ngcdtt_dsup_t defaultSetup
 DTT default setup.
 

Detailed Description

Data transfer task class

Constructor & Destructor Documentation

◆ ngcdtt() [1/2]

ngcdtt::ngcdtt ( )

Constructor.

◆ ngcdtt() [2/2]

ngcdtt::ngcdtt ( ngcdttPUBLISH * display)
explicit

Constructor with specific display interface.

◆ ~ngcdtt()

ngcdtt::~ngcdtt ( )
virtual

Destructor.

Member Function Documentation

◆ Abort()

void ngcdtt::Abort ( )

Abort.

◆ Alarm()

void ngcdtt::Alarm ( const char * msg)
protectedvirtual

Issue alarm.

Reimplemented in ngc::gateway::base::App.

◆ CamClose()

void ngcdtt::CamClose ( )
protected

Close camera.

◆ CamOpen()

int ngcdtt::CamOpen ( )
protected

Open camera.

◆ Clear()

void ngcdtt::Clear ( )
protected

Clear bias frame.

◆ Configure()

int ngcdtt::Configure ( const char * arg,
const char * value = NULL )

Set configuration parameter.

◆ Connected()

int ngcdtt::Connected ( )
protected

Return connected status.

◆ ConnectionId()

void ngcdtt::ConnectionId ( int id)

Set connection id (override default)

◆ CurrentFrame()

void ngcdtt::CurrentFrame ( char * name)
protected

Get current frame type (name)

◆ DataClose()

void ngcdtt::DataClose ( )
protected

Close data connection.

◆ DataOpen()

int ngcdtt::DataOpen ( )
protected

Open data connection.

◆ DataService()

void ngcdtt::DataService ( const char * host,
int port )
protected

Assign data service (host and port)

◆ Datastream()

void ngcdtt::Datastream ( const char * value)

Set datastream name.

◆ DbAttrConnected()

void ngcdtt::DbAttrConnected ( int value)
protectedvirtual

Write connected flag to database.

Reimplemented in ngc::gateway::base::App.

◆ DbAttrEnabled()

void ngcdtt::DbAttrEnabled ( int value)
protectedvirtual

Write enabled flag to database.

Reimplemented in ngc::gateway::base::App.

◆ DbAttrFrames()

void ngcdtt::DbAttrFrames ( int types)
protectedvirtual

Write frame list to database.

Reimplemented in ngc::gateway::base::App.

◆ DbAttrInvert()

void ngcdtt::DbAttrInvert ( int value)
protectedvirtual

Write image inversion flag to database.

◆ DbAttrSelFrame()

void ngcdtt::DbAttrSelFrame ( const char * name)
protectedvirtual

Write selected frame to database.

Reimplemented in ngc::gateway::base::App.

◆ DbAttrState()

void ngcdtt::DbAttrState ( int state)
protectedvirtual

Write system state to database.

Reimplemented in ngc::gateway::base::App.

◆ DbAttrWin()

void ngcdtt::DbAttrWin ( int sx,
int sy,
int nx,
int ny )
protectedvirtual

Write window parameters to database.

Reimplemented in ngc::gateway::base::App.

◆ DbGetCfg()

int ngcdtt::DbGetCfg ( const char * p,
ngcdcs_rtdacq_t * acq )
protectedvirtual

Get acquisition process configuration from DCS database.

◆ DCS()

void ngcdtt::DCS ( const char * value)

Assign DCS instance.

◆ DefaultFrame()

void ngcdtt::DefaultFrame ( const char * value)

Assign default display frame type.

◆ DS9()

int ngcdtt::DS9 ( const char * cmd,
char * reply,
size_t max )
protected

Execute DS9 command.

◆ Enabled()

int ngcdtt::Enabled ( )
protected

Return enabled status.

◆ ErrMsg()

char * ngcdtt::ErrMsg ( )

Return actual error message.

◆ ExecReply()

void ngcdtt::ExecReply ( int stat,
const char * msg )

Send execution reply message and status (1 = success, 0 = failure)

◆ ExitSignal()

void ngcdtt::ExitSignal ( int sig)

Handle EXIT-signal.

◆ Initialize()

int ngcdtt::Initialize ( )

Initialize.

◆ InstallSignalHandlers()

void ngcdtt::InstallSignalHandlers ( )
virtual

Install signal handlers.

◆ Instance()

const char * ngcdtt::Instance ( )
protected

Return instance name.

◆ Invert() [1/2]

void ngcdtt::Invert ( )
protected

Invert image.

◆ Invert() [2/2]

void ngcdtt::Invert ( int flag)
protected

Image inversion on/off.

◆ InvertStatus()

int ngcdtt::InvertStatus ( )
protected

Return image inversion flag.

◆ Log()

void ngcdtt::Log ( const char * msg)

Log message.

◆ Logger()

void ngcdtt::Logger ( const char * msg)
protectedvirtual

Application specific logger.

Reimplemented in ngc::gateway::base::App.

◆ LogLevel() [1/2]

int ngcdtt::LogLevel ( )

Return logging level.

◆ LogLevel() [2/2]

void ngcdtt::LogLevel ( int level)

Set logging level.

◆ MainLoop()

int ngcdtt::MainLoop ( )

Enter the gateway main-loop.

◆ MsgHandler()

int ngcdtt::MsgHandler ( int fd)
protectedvirtual

Message handler.

◆ MsgInit()

int ngcdtt::MsgInit ( int * fd)
protectedvirtual

Initialize Initialize message system interface.

◆ MsgShutdown()

void ngcdtt::MsgShutdown ( )
protectedvirtual

Shutdown message system interface.

◆ NX()

int ngcdtt::NX ( )
protected

Return dimension in x-direction of requested window.

◆ NY()

int ngcdtt::NY ( )
protected

Return dimension in y-direction of requested window.

◆ ParseArguments()

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

Parse arguments.

◆ PrintUsage()

void ngcdtt::PrintUsage ( const char * argv0)

Print usage.

◆ Process()

const char * ngcdtt::Process ( )
protected

Return process name.

◆ Retransmit()

void ngcdtt::Retransmit ( )
protected

Request frame retransmission.

◆ Select()

int ngcdtt::Select ( fd_set * readMask,
struct timeval * timeout )
protectedvirtual

Select call.

◆ SelectFrame()

int ngcdtt::SelectFrame ( const char * name)
protected

Select frame type by name and return 1, if setup has changed.

◆ Service()

void ngcdtt::Service ( const char * value)

Set request/reply service name.

◆ ServicePort()

int ngcdtt::ServicePort ( )

Get request/reply service port.

◆ Shutdown()

void ngcdtt::Shutdown ( )
protected

Request shutdown.

◆ Start()

void ngcdtt::Start ( )
protected

Start (enable transfer)

◆ Status()

void ngcdtt::Status ( int flag)
protected

Set transfer status (enable=1, disable=0)

◆ Stop()

void ngcdtt::Stop ( )
protected

Stop (disable transfer)

◆ StopMainLoop()

void ngcdtt::StopMainLoop ( )

Stop the gateway main-loop (asynchronous call)

◆ Store()

int ngcdtt::Store ( )
protected

Store bias frame.

◆ Subtract()

int ngcdtt::Subtract ( int flag)
protected

Enable/disable bias frame subtraction.

◆ SX()

int ngcdtt::SX ( )
protected

Return lower left x-coordinate of requested window.

◆ SY()

int ngcdtt::SY ( )
protected

Return lower left y-coordinate of requested window.

◆ URI()

void ngcdtt::URI ( const char * value)

Set broker URI.

◆ Verbose() [1/2]

void ngcdtt::Verbose ( const char * format,
... )

Verbose output.

◆ Verbose() [2/2]

void ngcdtt::Verbose ( int flag)

Switch verbose mode on/off.

◆ VerboseLevel() [1/2]

int ngcdtt::VerboseLevel ( )

Return verbose level.

◆ VerboseLevel() [2/2]

void ngcdtt::VerboseLevel ( int level)

Set verbose level.

◆ Version()

const char * ngcdtt::Version ( )
protected

Return version.

◆ Window()

int ngcdtt::Window ( int sx,
int sy,
int nx,
int ny )
protected

Set new window and return 1, if setup has changed.

Member Data Documentation

◆ acqHost

char ngcdtt::acqHost[64]
protected

Acquisition process host.

◆ acqPort

int ngcdtt::acqPort
protected

Acquisition process port.

◆ autoEnable

int ngcdtt::autoEnable

Auto enable.

◆ camera

char ngcdtt::camera[128]
protected

Camera name.

◆ cv32

int ngcdtt::cv32

Enforce conversion to 32 bit.

◆ dcsHost

char ngcdtt::dcsHost[64]
protected

DCS host.

◆ dcsInst

char ngcdtt::dcsInst[64]
protected

DCS instance.

◆ dcsMod

int ngcdtt::dcsMod

DCS acquisition module index.

◆ defaultSetup

ngcdtt_dsup_t ngcdtt::defaultSetup
protected

DTT default setup.

◆ frequency

double ngcdtt::frequency

Maximum display frequency (Hz)

◆ ignoreSignal

int ngcdtt::ignoreSignal

Ignore signal in main-loop select call.

◆ interruptible

int ngcdtt::interruptible

Interruptible connection.

◆ nxMax

int ngcdtt::nxMax

Maximum x-dimension.

◆ nyMax

int ngcdtt::nyMax

Maximum y-dimension.

◆ publisher

ngcdttPUBLISH* ngcdtt::publisher
protected

Publisher object.


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