12#error This is a C++ include file and cannot be used from plain C
23#define ngcdcsDTT_NOP 0
24#define ngcdcsDTT_CONFIG 1
25#define ngcdcsDTT_BASENAME 2
26#define ngcdcsDTT_SETUP 3
27#define ngcdcsDTT_START 4
28#define ngcdcsDTT_EXPSTART 5
29#define ngcdcsDTT_EXPSTOP 6
30#define ngcdcsDTT_STOP 7
31#define ngcdcsDTT_CLOSE 8
162 int cmdPort, evtPort;
170 strcpy(
ErrMsg(),
"invalid acquisition process host");
175 strcpy(
ErrMsg(),
"invalid acquisition process data port");
195 else pid_ =
Exec(host, cmd, reply);
202 sscanf(reply,
"%10d %10d", &cmdPort, &evtPort);
203 sprintf(tmp,
"%s,%d", host, cmdPort);
208 Kill(host, pid_); pid_ = 0;
212 sprintf(tmp,
"%s,%d", host, evtPort);
217 TcpClose(fdCmd_); fdCmd_ = -1;
Kill(host, pid_); pid_ = 0;
241 res =
Kill(host_, pid_);
311 memcpy(fs1, fs, xsize);
338 return (RecvReply_());
360 int SendTag_(
int cmd) {
365 sprintf(
ErrMsg(),
"connection closed");
408 int SendCmd_(
int cmd,
const char *p,
int size) {
414 if ((p != NULL) && (size > 0))
423 return (RecvReply_());
427 int SendCmd_(
int cmd) {
return (SendCmd_(cmd, NULL, 0));}
Definition ngcbFITS.hpp:24
int HeaderSize()
Current header size.
Definition ngcbFITS.hpp:48
char * Header()
Current header.
Definition ngcbFITS.hpp:45
int ExecXt(const char *host, const char *cmd, char *reply, const char *geom=NULL)
Execute process on host (in new terminal)
Definition ngcbSIO.cpp:552
int Kill(const char *host, int pid)
Terminate process on host.
Definition ngcbSIO.cpp:576
ngcbSIO()
Constructor.
Definition ngcbSIO.cpp:30
int TcpConnect(const char *service)
Connect to a tcp/ip socket service.
Definition ngcbSIO.cpp:292
int Exec(const char *host, const char *cmd, char *reply, int port=0)
Execute process on host.
Definition ngcbSIO.cpp:529
int TcpWrite(int fd, const void *buffer, size_t size)
Write buffer to tcp/ip socket.
Definition ngcbSIO.cpp:370
int TcpRead(int fd, void *buffer, size_t size)
Read buffer from tcp/ip socket.
Definition ngcbSIO.cpp:355
char * ErrMsg()
Error message.
Definition ngcbSIO.hpp:103
int TcpClose(int fd)
Close tcp/ip socket.
Definition ngcbSIO.cpp:317
int logLevel
Loggin level.
Definition ngcbSIO.hpp:97
int verboseLevel
Verbose level.
Definition ngcbSIO.hpp:94
int Ping()
Ping DTT.
Definition ngcdcsDTT_COM.hpp:248
char acqHost[64]
Acquisition process host.
Definition ngcdcsDTT_COM.hpp:131
virtual ~ngcdcsDTT_COM()
Destructor.
Definition ngcdcsDTT_COM.hpp:153
int acqPort
Acquisition process data port.
Definition ngcdcsDTT_COM.hpp:134
int StopExp()
Abort exposure.
Definition ngcdcsDTT_COM.hpp:277
int Transfer(int flag)
Enable/disable transfer.
Definition ngcdcsDTT_COM.hpp:260
ngcdcsDTT_COM()
Constructor.
Definition ngcdcsDTT_COM.hpp:140
int xterm
Launch DTT in new terminal.
Definition ngcdcsDTT_COM.hpp:128
int StartExp()
Start exposure.
Definition ngcdcsDTT_COM.hpp:272
int Setup(ngcdcs_dtt_exp_t expSetup, ngcdcs_dtt_frame_t *frameSetup, ngcbFITS *fits)
Setup exposure.
Definition ngcdcsDTT_COM.hpp:282
int Shutdown()
Shutdown DTT.
Definition ngcdcsDTT_COM.hpp:227
int BaseName(const char *name)
Set exposure basename.
Definition ngcdcsDTT_COM.hpp:253
int Launch(const char *host)
Launch DTT.
Definition ngcdcsDTT_COM.hpp:158
int enabled
Enabled flag.
Definition ngcdcsDTT_COM.hpp:137
void ngcbSwap8(void *buffer, size_t length)
Definition ngcbMath.c:48
#define ngcbBIG_ENDIAN
Definition ngcb.h:403
void ngcbSwap4(void *buffer, size_t length)
Definition ngcbMath.c:37
#define ngcbSUCCESS
Definition ngcb.h:137
int ngcbEndian(void)
Definition ngcbMath.c:18
#define ngcbFAILURE
Definition ngcb.h:139
#define ngcdcsDTT_STOP
Definition ngcdcsDTT_COM.hpp:30
#define ngcdcsDTT_CLOSE
Definition ngcdcsDTT_COM.hpp:31
#define ngcdcsDTT_BASENAME
Definition ngcdcsDTT_COM.hpp:25
#define ngcdcsDTT_SETUP
Definition ngcdcsDTT_COM.hpp:26
#define ngcdcsDTT_EXPSTOP
Definition ngcdcsDTT_COM.hpp:29
#define ngcdcsDTT_START
Definition ngcdcsDTT_COM.hpp:27
#define ngcdcsDTT_EXPSTART
Definition ngcdcsDTT_COM.hpp:28
#define ngcdcsDTT_NOP
Definition ngcdcsDTT_COM.hpp:23
#define ngcdcsEXP_NAMING_REQUEST
Definition ngcdcsEXP.hpp:79
#define ngcdcsEXP_FORMAT_SINGLE
Definition ngcdcsEXP.hpp:68
#define ngcdcsMAX_FRAME_TYPES
Definition ngcdcsFINFO.hpp:23
Definition ngcdcsDTT_COM.hpp:37
int format
Data file format.
Definition ngcdcsDTT_COM.hpp:45
ngcdcs_dtt_exp_t()
Constructor.
Definition ngcdcsDTT_COM.hpp:63
int sequenceNumber
Sequence number.
Definition ngcdcsDTT_COM.hpp:42
int naming
Naming scheme.
Definition ngcdcsDTT_COM.hpp:48
int extFits
Flag for extended FITS header.
Definition ngcdcsDTT_COM.hpp:39
double integrationTime
Integration time (for FITS header EXPTIME)
Definition ngcdcsDTT_COM.hpp:60
int setupId
Setup-id.
Definition ngcdcsDTT_COM.hpp:54
int numFitsBlock
Number of FITS-blocks to reserve.
Definition ngcdcsDTT_COM.hpp:57
char expId[64]
Exposure-id.
Definition ngcdcsDTT_COM.hpp:51
Definition ngcdcsDTT_COM.hpp:79
int ny
Window for this frame (size in y direction)
Definition ngcdcsDTT_COM.hpp:102
int sx
Window for this frame (lower left x)
Definition ngcdcsDTT_COM.hpp:93
int type
Frame type.
Definition ngcdcsDTT_COM.hpp:81
char name[64]
Frame type name.
Definition ngcdcsDTT_COM.hpp:105
int sy
Window for this frame (lower left y)
Definition ngcdcsDTT_COM.hpp:96
int gen
Frame is generated.
Definition ngcdcsDTT_COM.hpp:87
int breakCond
Break condition for exposure.
Definition ngcdcsDTT_COM.hpp:90
int nx
Window for this frame (size in x-direction)
Definition ngcdcsDTT_COM.hpp:99
ngcdcs_dtt_frame_t()
Constructor.
Definition ngcdcsDTT_COM.hpp:108
int store
Frame is stored.
Definition ngcdcsDTT_COM.hpp:84