13#error This is a C++ include file and cannot be used from plain C
24#define ngcdcsDTT_NOP 0
25#define ngcdcsDTT_CONFIG 1
26#define ngcdcsDTT_BASENAME 2
27#define ngcdcsDTT_SETUP 3
28#define ngcdcsDTT_START 4
29#define ngcdcsDTT_EXPSTART 5
30#define ngcdcsDTT_EXPSTOP 6
31#define ngcdcsDTT_STOP 7
32#define ngcdcsDTT_CLOSE 8
163 int cmdPort, evtPort;
171 strcpy(
ErrMsg(),
"invalid acquisition process host");
176 strcpy(
ErrMsg(),
"invalid acquisition process data port");
196 else pid_ =
Exec(host, cmd, reply);
203 sscanf(reply,
"%10d %10d", &cmdPort, &evtPort);
204 sprintf(tmp,
"%s,%d", host, cmdPort);
209 Kill(host, pid_); pid_ = 0;
213 sprintf(tmp,
"%s,%d", host, evtPort);
218 TcpClose(fdCmd_); fdCmd_ = -1;
Kill(host, pid_); pid_ = 0;
242 res =
Kill(host_, pid_);
312 memcpy(fs1, fs, xsize);
339 return (RecvReply_());
361 int SendTag_(
int cmd) {
366 sprintf(
ErrMsg(),
"connection closed");
409 int SendCmd_(
int cmd,
const char *p,
int size) {
415 if ((p != NULL) && (size > 0))
424 return (RecvReply_());
428 int SendCmd_(
int cmd) {
return (SendCmd_(cmd, NULL, 0));}
Definition ngcbFITS.hpp:25
int HeaderSize()
Current header size.
Definition ngcbFITS.hpp:49
char * Header()
Current header.
Definition ngcbFITS.hpp:46
int ExecXt(const char *host, const char *cmd, char *reply, const char *geom=NULL)
Execute process on host (in new terminal)
Definition ngcbSIO.cpp:553
int Kill(const char *host, int pid)
Terminate process on host.
Definition ngcbSIO.cpp:577
ngcbSIO()
Constructor.
Definition ngcbSIO.cpp:31
int TcpConnect(const char *service)
Connect to a tcp/ip socket service.
Definition ngcbSIO.cpp:293
int Exec(const char *host, const char *cmd, char *reply, int port=0)
Execute process on host.
Definition ngcbSIO.cpp:530
int TcpWrite(int fd, const void *buffer, size_t size)
Write buffer to tcp/ip socket.
Definition ngcbSIO.cpp:371
int TcpRead(int fd, void *buffer, size_t size)
Read buffer from tcp/ip socket.
Definition ngcbSIO.cpp:356
char * ErrMsg()
Error message.
Definition ngcbSIO.hpp:104
int TcpClose(int fd)
Close tcp/ip socket.
Definition ngcbSIO.cpp:318
int logLevel
Loggin level.
Definition ngcbSIO.hpp:98
int verboseLevel
Verbose level.
Definition ngcbSIO.hpp:95
int Ping()
Ping DTT.
Definition ngcdcsDTT_COM.hpp:249
char acqHost[64]
Acquisition process host.
Definition ngcdcsDTT_COM.hpp:132
virtual ~ngcdcsDTT_COM()
Destructor.
Definition ngcdcsDTT_COM.hpp:154
int acqPort
Acquisition process data port.
Definition ngcdcsDTT_COM.hpp:135
int StopExp()
Abort exposure.
Definition ngcdcsDTT_COM.hpp:278
int Transfer(int flag)
Enable/disable transfer.
Definition ngcdcsDTT_COM.hpp:261
ngcdcsDTT_COM()
Constructor.
Definition ngcdcsDTT_COM.hpp:141
int xterm
Launch DTT in new terminal.
Definition ngcdcsDTT_COM.hpp:129
int StartExp()
Start exposure.
Definition ngcdcsDTT_COM.hpp:273
int Setup(ngcdcs_dtt_exp_t expSetup, ngcdcs_dtt_frame_t *frameSetup, ngcbFITS *fits)
Setup exposure.
Definition ngcdcsDTT_COM.hpp:283
int Shutdown()
Shutdown DTT.
Definition ngcdcsDTT_COM.hpp:228
int BaseName(const char *name)
Set exposure basename.
Definition ngcdcsDTT_COM.hpp:254
int Launch(const char *host)
Launch DTT.
Definition ngcdcsDTT_COM.hpp:159
int enabled
Enabled flag.
Definition ngcdcsDTT_COM.hpp:138
void ngcbSwap8(void *buffer, size_t length)
Definition ngcbMath.c:49
#define ngcbBIG_ENDIAN
Definition ngcb.h:404
void ngcbSwap4(void *buffer, size_t length)
Definition ngcbMath.c:38
#define ngcbSUCCESS
Definition ngcb.h:138
int ngcbEndian(void)
Definition ngcbMath.c:19
#define ngcbFAILURE
Definition ngcb.h:140
#define ngcdcsDTT_STOP
Definition ngcdcsDTT_COM.hpp:31
#define ngcdcsDTT_CLOSE
Definition ngcdcsDTT_COM.hpp:32
#define ngcdcsDTT_BASENAME
Definition ngcdcsDTT_COM.hpp:26
#define ngcdcsDTT_SETUP
Definition ngcdcsDTT_COM.hpp:27
#define ngcdcsDTT_EXPSTOP
Definition ngcdcsDTT_COM.hpp:30
#define ngcdcsDTT_START
Definition ngcdcsDTT_COM.hpp:28
#define ngcdcsDTT_EXPSTART
Definition ngcdcsDTT_COM.hpp:29
#define ngcdcsDTT_NOP
Definition ngcdcsDTT_COM.hpp:24
#define ngcdcsEXP_NAMING_REQUEST
Definition ngcdcsEXP.hpp:80
#define ngcdcsEXP_FORMAT_SINGLE
Definition ngcdcsEXP.hpp:69
#define ngcdcsMAX_FRAME_TYPES
Definition ngcdcsFINFO.hpp:25
Definition ngcdcsDTT_COM.hpp:38
int format
Data file format.
Definition ngcdcsDTT_COM.hpp:46
ngcdcs_dtt_exp_t()
Constructor.
Definition ngcdcsDTT_COM.hpp:64
int sequenceNumber
Sequence number.
Definition ngcdcsDTT_COM.hpp:43
int naming
Naming scheme.
Definition ngcdcsDTT_COM.hpp:49
int extFits
Flag for extended FITS header.
Definition ngcdcsDTT_COM.hpp:40
double integrationTime
Integration time (for FITS header EXPTIME)
Definition ngcdcsDTT_COM.hpp:61
int setupId
Setup-id.
Definition ngcdcsDTT_COM.hpp:55
int numFitsBlock
Number of FITS-blocks to reserve.
Definition ngcdcsDTT_COM.hpp:58
char expId[64]
Exposure-id.
Definition ngcdcsDTT_COM.hpp:52
Definition ngcdcsDTT_COM.hpp:80
int ny
Window for this frame (size in y direction)
Definition ngcdcsDTT_COM.hpp:103
int sx
Window for this frame (lower left x)
Definition ngcdcsDTT_COM.hpp:94
int type
Frame type.
Definition ngcdcsDTT_COM.hpp:82
char name[64]
Frame type name.
Definition ngcdcsDTT_COM.hpp:106
int sy
Window for this frame (lower left y)
Definition ngcdcsDTT_COM.hpp:97
int gen
Frame is generated.
Definition ngcdcsDTT_COM.hpp:88
int breakCond
Break condition for exposure.
Definition ngcdcsDTT_COM.hpp:91
int nx
Window for this frame (size in x-direction)
Definition ngcdcsDTT_COM.hpp:100
ngcdcs_dtt_frame_t()
Constructor.
Definition ngcdcsDTT_COM.hpp:109
int store
Frame is stored.
Definition ngcdcsDTT_COM.hpp:85