#include <ngcdtt.hpp>
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 | |
| ngcdttPUBLISH * | publisher |
| 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. | |
Data transfer task class
| ngcdtt::ngcdtt | ( | ) |
Constructor.
|
explicit |
Constructor with specific display interface.
|
virtual |
Destructor.
| void ngcdtt::Abort | ( | ) |
Abort.
|
protectedvirtual |
Issue alarm.
Reimplemented in ngc::gateway::base::App.
|
protected |
Close camera.
|
protected |
Open camera.
|
protected |
Clear bias frame.
| int ngcdtt::Configure | ( | const char * | arg, |
| const char * | value = NULL ) |
Set configuration parameter.
|
protected |
Return connected status.
| void ngcdtt::ConnectionId | ( | int | id | ) |
Set connection id (override default)
|
protected |
Get current frame type (name)
|
protected |
Close data connection.
|
protected |
Open data connection.
|
protected |
Assign data service (host and port)
| void ngcdtt::Datastream | ( | const char * | value | ) |
Set datastream name.
|
protectedvirtual |
Write connected flag to database.
Reimplemented in ngc::gateway::base::App.
|
protectedvirtual |
Write enabled flag to database.
Reimplemented in ngc::gateway::base::App.
|
protectedvirtual |
Write frame list to database.
Reimplemented in ngc::gateway::base::App.
|
protectedvirtual |
Write image inversion flag to database.
|
protectedvirtual |
Write selected frame to database.
Reimplemented in ngc::gateway::base::App.
|
protectedvirtual |
Write system state to database.
Reimplemented in ngc::gateway::base::App.
|
protectedvirtual |
Write window parameters to database.
Reimplemented in ngc::gateway::base::App.
|
protectedvirtual |
Get acquisition process configuration from DCS database.
| void ngcdtt::DCS | ( | const char * | value | ) |
Assign DCS instance.
| void ngcdtt::DefaultFrame | ( | const char * | value | ) |
Assign default display frame type.
|
protected |
Execute DS9 command.
|
protected |
Return enabled status.
| char * ngcdtt::ErrMsg | ( | ) |
Return actual error message.
| void ngcdtt::ExecReply | ( | int | stat, |
| const char * | msg ) |
Send execution reply message and status (1 = success, 0 = failure)
| void ngcdtt::ExitSignal | ( | int | sig | ) |
Handle EXIT-signal.
| int ngcdtt::Initialize | ( | ) |
Initialize.
|
virtual |
Install signal handlers.
|
protected |
Return instance name.
|
protected |
Invert image.
|
protected |
Image inversion on/off.
|
protected |
Return image inversion flag.
| void ngcdtt::Log | ( | const char * | msg | ) |
Log message.
|
protectedvirtual |
Application specific logger.
Reimplemented in ngc::gateway::base::App.
| int ngcdtt::LogLevel | ( | ) |
Return logging level.
| void ngcdtt::LogLevel | ( | int | level | ) |
Set logging level.
| int ngcdtt::MainLoop | ( | ) |
Enter the gateway main-loop.
|
protectedvirtual |
Message handler.
|
protectedvirtual |
Initialize Initialize message system interface.
|
protectedvirtual |
Shutdown message system interface.
|
protected |
Return dimension in x-direction of requested window.
|
protected |
Return dimension in y-direction of requested window.
| int ngcdtt::ParseArguments | ( | int | argc, |
| char ** | argv ) |
Parse arguments.
| void ngcdtt::PrintUsage | ( | const char * | argv0 | ) |
Print usage.
|
protected |
Return process name.
|
protected |
Request frame retransmission.
|
protectedvirtual |
Select call.
|
protected |
Select frame type by name and return 1, if setup has changed.
| void ngcdtt::Service | ( | const char * | value | ) |
Set request/reply service name.
| int ngcdtt::ServicePort | ( | ) |
Get request/reply service port.
|
protected |
Request shutdown.
|
protected |
Start (enable transfer)
|
protected |
Set transfer status (enable=1, disable=0)
|
protected |
Stop (disable transfer)
| void ngcdtt::StopMainLoop | ( | ) |
Stop the gateway main-loop (asynchronous call)
|
protected |
Store bias frame.
|
protected |
Enable/disable bias frame subtraction.
|
protected |
Return lower left x-coordinate of requested window.
|
protected |
Return lower left y-coordinate of requested window.
| void ngcdtt::URI | ( | const char * | value | ) |
Set broker URI.
| void ngcdtt::Verbose | ( | const char * | format, |
| ... ) |
Verbose output.
| void ngcdtt::Verbose | ( | int | flag | ) |
Switch verbose mode on/off.
| int ngcdtt::VerboseLevel | ( | ) |
Return verbose level.
| void ngcdtt::VerboseLevel | ( | int | level | ) |
Set verbose level.
|
protected |
Return version.
|
protected |
Set new window and return 1, if setup has changed.
|
protected |
Acquisition process host.
|
protected |
Acquisition process port.
| int ngcdtt::autoEnable |
Auto enable.
|
protected |
Camera name.
| int ngcdtt::cv32 |
Enforce conversion to 32 bit.
|
protected |
DCS host.
|
protected |
DCS instance.
| int ngcdtt::dcsMod |
DCS acquisition module index.
|
protected |
DTT default setup.
| double ngcdtt::frequency |
Maximum display frequency (Hz)
| int ngcdtt::ignoreSignal |
Ignore signal in main-loop select call.
| int ngcdtt::interruptible |
Interruptible connection.
| int ngcdtt::nxMax |
Maximum x-dimension.
| int ngcdtt::nyMax |
Maximum y-dimension.
|
protected |
Publisher object.