TOC PREV NEXT INDEX

Put your logo here!


10 REFERENCE

10.1 COMMAND DEFINITION TABLE (CDT)

//************************************************************************

// E.S.O. - VLT project

//

// "@(#) $Id: iracqServer.cdt,v 1.54+ 2000/12/20 16:43:00 vltsccm Exp $"

//

// iracqServer.cdt

//

// Command Definition Table for the IR Acquisition Server.

//

// who when what

// -------- -------- --------------------------------------------

// jstegmei 18/08/99 created

// jstegmei 14/10/99 added -default option to SETUP command

// jstegmei 03/11/99 added -board option to CLDC command

// jstegmei 15/12/99 updated according to inscStdCmds.cdt

// jstegmei 20/12/99 added -det parameter to FRAME command

// jstegmei 21/12/99 removed -checkChop parameter from MISC command

// jstegmei 18/01/00 removed -readVoltNoCheck parameter from CLDC command

// jstegmei 18/01/00 added -checkAll parameter to CLDC command

// jstegmei 05/06/00 added -win parameter to FRAME command

// jstegmei 26/07/00 added -pollStart/Stop parameters to MISC command

// jstegmei 03/01/01 added -add, -param to FRAME command

// jstegmei 18/01/01 added -addParam, -clearParam to MISC command

//------------------------------------------------------------------------

PUBLIC_COMMANDS

COMMAND= ABORT

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= expoId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Abort the exposure currently active.

@

COMMAND= CLDC

FORMAT= A

PARAMETERS=

PAR_NAME= setVolt

PAR_TYPE= REAL

PAR_OPTIONAL= YES

PAR_REPETITION_FACTOR= 2

PAR_NAME= enable

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= disable

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= readVolt

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

PAR_NAME= readAllVoltages

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= board

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

PAR_NAME= checkAll

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT= A

HELP_TEXT=

Interact with the IRACE CLDC.

@

COMMAND= COMMENT

FORMAT= A

PARAMETERS=

PAR_NAME= string

PAR_TYPE= STRING

PAR_MAX_REPETITION= 999

PAR_NAME= addToNextExposure

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= addToLastFile

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= addToNextFile

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= addToFile

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_NAME= clear

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT = A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT =

Add comment to a FITS-header.

@

COMMAND= END

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= expoId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Make DCS terminate the current exposure as quickly as possible.

@

COMMAND= EXIT

FORMAT= B

REPLY_FORMAT= A

HELP_TEXT=

Make the application exit/terminate.

@

COMMAND= FRAME

FORMAT= A

PARAMETERS=

// generate

PAR_NAME= gen

PAR_TYPE= STRING

PAR_OPTIONAL= YES

// store

PAR_NAME= store

PAR_TYPE= STRING

PAR_OPTIONAL= YES

// break condition

PAR_NAME= break

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// display

PAR_NAME= display

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// enable or disable window parameters

PAR_NAME= win

PAR_TYPE= STRING

PAR_OPTIONAL= YES

// frame name

PAR_NAME= name

PAR_TYPE= STRING

PAR_OPTIONAL= NO

// detector index

PAR_NAME= det

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// add new type

PAR_NAME= add

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// parameter to enable/disable frame generation

PAR_NAME= param

PAR_TYPE= STRING

PAR_OPTIONAL= YES

REPLY_FORMAT = A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT =

Various services.

@

COMMAND= IMGOP

FORMAT= A

PARAMETERS=

// enable

PAR_NAME= enable

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// disable

PAR_NAME= disable

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// rotate

PAR_NAME= rotate

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// flip-x

PAR_NAME= fx

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// flip-y

PAR_NAME= fy

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// clear

PAR_NAME= clear

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT = A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT =

Various services.

@

COMMAND= IRACE

FORMAT= B

REPLY_FORMAT= A

HELP_TEXT=

Handle an IRACE specific command. This is a

low-level interface to all IRACE-functions.

@

COMMAND= MISC

FORMAT= A

PARAMETERS=

// Add a FITS-keyword (this will automatically appear

// in all FITS-files when an exposure is started)

PAR_NAME= addFitsKey

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 3

// Clear all FITS-keywords added with `addFitsKey'

PAR_NAME= clearFits

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// Dump the FITS-information into a file

PAR_NAME= dumpFitsInfo

PAR_TYPE= STRING

PAR_OPTIONAL= YES

// start status polling

PAR_NAME= pollStart

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// stop status polling

PAR_NAME= pollStop

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// start perfomance polling

PAR_NAME= perfStart

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// stop perfomance polling

PAR_NAME= perfStop

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// detector index

PAR_NAME= det

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// add dynamic parameter

PAR_NAME= addParam

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 3

// clear dynamic parameters

PAR_NAME= clearParam

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// reset acquisition process loop

PAR_NAME= rstcnt

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT = A

HELP_TEXT =

Various services.

@

COMMAND= NC

FORMAT= A

PARAMETERS=

PAR_NAME= usrCmd

PAR_TYPE= STRING

PAR_OPTIONAL= YES

REPLY_FORMAT = A

HELP_TEXT =

Commands to interact with the IRACE Number Cruncher.

@

COMMAND= OFF

FORMAT= A

PARAMETERS=

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Shut-down the system - make all processes terminate.

@

COMMAND= ONLINE

FORMAT= A

PARAMETERS=

PAR_NAME= detConfig

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_NAME= dcsConfig

PAR_TYPE= STRING

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Initialize DCS with the given Detector Configuration File

@

COMMAND= PING

FORMAT= A

PARAMETERS=

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Make a check of the functioning of the application and send back an

overall status message.

@

COMMAND= RESET

FORMAT= A

PARAMETERS=

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Reset the IRACE front-end.

@

COMMAND= SEQ

FORMAT= A

PARAMETERS=

PAR_NAME= stop

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= start

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Interact with the IRACE Sequencer

@

COMMAND= SETUP

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= expoId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// not implemented

PAR_NAME= file

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 999

PAR_NAME= function

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 999

// not implemented

PAR_NAME= noMove

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

// not implemented

PAR_NAME= check

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= default

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT = A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT =

Setup the functions as listed. The default flag sets

paramter to their default values as specified in the

parameter default setup file.

@

COMMAND= SIMULAT

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= detId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// not implemented

PAR_NAME= function

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 999

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Change to operation in Simulation Mode.

@

COMMAND= STANDBY

FORMAT= A

PARAMETERS=

PAR_NAME= haltIrace

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Bring the system to Stand-By State. If the haltIrace flag is

set, the IRACE front-end is reset.

@

COMMAND= START

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= expoId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// not implemented

PAR_NAME= at

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_DEF_VAL= "now"

PAR_NAME= ignoreCldc

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

PAR_NAME= noNcReset

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Start new exposure

@

COMMAND= STATUS

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= expoId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

PAR_NAME= function

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 999

// not implemented

PAR_NAME= global

PAR_TYPE= LOGICAL

PAR_OPTIONAL= YES

REPLY_FORMAT = A

HELP_TEXT =

Get status for various functions.

@

COMMAND= STOPSIM

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= detId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

// not implemented

PAR_NAME= function

PAR_TYPE= STRING

PAR_OPTIONAL= YES

PAR_MAX_REPETITION= 999

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= done

PAR_TYPE= STRING

PAR_DEF_VAL= "OK"

HELP_TEXT=

Change to Normal Operation Mode.

@

COMMAND= VERSION

FORMAT= A

PARAMETERS=

REPLY_FORMAT= A

HELP_TEXT=

Return the present version of IR DCS.

@

COMMAND= WAIT

FORMAT= A

PARAMETERS=

// not implemented

PAR_NAME= expoId

PAR_TYPE= INTEGER

PAR_OPTIONAL= YES

REPLY_FORMAT= A

REPLY_PARAMETERS=

PAR_NAME= expStatus

PAR_TYPE= INTEGER

PAR_DEF_VAL= 0

HELP_TEXT=

Wait for current exposure to finish. The command immediately

returns an intermediate reply indicating the current exposure

status. The last reply is sent, when the exposure has finished.

@

MAINTENANCE_COMMANDS

TEST_COMMANDS

// --- oOo ---

10.2 iracqEVH CLASS

NAME
iracqEVH - basic class for infrared data acquisition applications
SYNOPSIS
#include <iracqEVH.h>

iracqEVH myServer;

PARENT CLASS
iracqEVH: public evhTASK, private iracqSRV

DESCRIPTION
Basic class for infrared data acquisition applications

PUBLIC METHODS
iracqEVH();
Constructor method

virtual ~iracqEVH();
Destructor method

int InitTest();
Returns 1, if server just does initialization test. Otherwise
zero is returned.

const char *Instance();
Returns the server instance.

void PrintUsage(const char *argv0);
Prints out all server command line options.

ccsCOMPL_STAT ParseInputPars(int argc, char *argv[]);
Parses the server command line.

ccsCOMPL_STAT Init();
Initializes the control server.
The method is intended to be overwritten by the application.
It is recommended to call iracqEVH::Init first and to add
then your intitialization.

ccsCOMPL_STAT AbortServer();
Aborts the server and cleans up file structures. After a
successfull Init() this function should be called before calling
the Init() method again.

void Verbose(const char *format, ...);
Verbose output handler. This function is called from
all methods, when the macro iracqVB(...) is used.
The method is intended to be overwritten by the application.
It is recommended to call iracqEVH::VbHandler first and to
add then your own handler.

void StateHandler(int state, int subState);
Asynchronous state handler. This functions is called
whenever the server state or sub-state change.
The method is intended to be overwritten by the application.
It is recommended to call iracqEVH::StateHandler first and to
add then your own handler.

void iracqDataHandler(iracqDATA_EVT *evt);
Method to handle asynchronous events issued by the data
transfer task. The iracqDATA_EVT structure contains the
following elements:

int errorFlag; - indicates an error event
char fileName[256]; - contains the name of the file
which has been stored by the
data transfer task. Only contains
valid data, if errorFlag is not set.
char erms[256]; - contains an error message when
the errorFlag is set

The method is intended to be overwritten by the application.
It is recommended to call iracqEVH::DataHandler first and to
add then your own handler.

void ExitHandler(int sig);
Method to handle exit signals.
The method is intended to be overwritten by the application.
It is recommended to add first your own cleanup functions and
then to call iracqEVH::ExitHandler.

virtual ccsCOMPL_STAT SeqHandler(const char *seqFile,
vltINT32 *loopCmd,
vltINT32 *loopCmdLen);
This method can be overloaded to use your own parser/compiler
for the sequencer program loop. The SeqHandler method is called
by the server only if the file-extension does not match any
supported format (.seq, .prg, tcl-shell).

vltLOGICAL ExpActive();
Returns TRUE, if the exposurse is in an actives states. Otherwise
FALSE is returned.

int ExpStatus();
Returns the current exposure status. This can be one of the
following:

iracqEXP_UNDEFINED
iracqEXP_INACTIVE
iracqEXP_PENDING
iracqEXP_INTEGRATING
iracqEXP_PAUSED
iracqEXP_READING_OUT
iracqEXP_PROCESSING
iracqEXP_TRANSFERRING
iracqEXP_COMPL_SUCCESS
iracqEXP_COMPL_FAILURE
iracqEXP_COMPL_ABORTED

ccsCOMPL_STAT Param2Db(const char *paramName,
const dbSYMADDRESS pointName,
const dbATTRIBUTE attrName);
Traces the value of dynamic parameter with name <paramName>
in the data base attribute <attrName>.

ccsCOMPL_STAT Alarm(const char *errString);
Issues a data-base alarm.

ccsCOMPL_STAT ReplaceEnv(char *string);
Replaces all environment variables in <string> by their
actual values.

void EnterCB(msgMESSAGE &msg,
vltINT32 updateSys = iracqNO_UPDATE);
Method to be called when entering a callback that uses
low-level irace commands.

void ExitCB();
Method to be called when leaving a callback that uses
low-level irace commands.

void ExitCB(msgMESSAGE &msg);
Method to be called when leaving a callback that uses
low-level irace commands. This will also send back a
reply message.

ccsCOMPL_STAT IraceCmd(const char *cmd, const char *orgName);
Method to call a low-level irace command

virtual ccsCOMPL_STAT SetParam(const char *pname,
const char *value,
vltLOGICAL *handled);
Parameter setup function to be overloaded by an
application specific method. If the parameter has been
handled, the <handled> flag has to be set to TRUE.

ccsCOMPL_STAT GetParam(const char *pname,
char *value,
vltLOGICAL *handled);
Parameter status function to be overloaded by an
application specific method. If the parameter has been
handled, the <handled> flag has to be set to TRUE.

ccsCOMPL_STAT GetParam(const char *pname,
char *value,
vltINT32 *type,
vltLOGICAL *handled);
Additionally returns the parameter type.
Type can be one of the following:

iracqTYPE_INT - 32 bit signed integer
iracqTYPE_FLOAT - 32 bit floating point
iracqTYPE_DOUBLE - 64 bit floating point
iracqTYPE_STRING - string
iracqTYPE_LOGICAL - logical value ('T', 'F');

ccsCOMPL_STAT SetSysParam(char **param,
vltINT32 size)
Does a setup for all keywords in the parameter list pointed
to by param. Size is the number of string values in the list
and must be a multiple of 2. <param> should have the following
format:

<param1Name> <param1Value> <param2Name> <param2Value>...

ccsCOMPL_STAT SetSysParam(const char *keyWord,
const char *keyVal,
vltLOGICAL *handled);
Sets system parameter. If the keyWord was valid, the <handled> flag
is set to TRUE.

ccsCOMPL_STAT SetSysParam(char *paramList)
Applies a dynamic parameter list. <paramList> must have the
following format:

<param1Name> <param1Value> <param2Name> <param2Value>...

ccsCOMPL_STAT GetSysParam(const char *pname, char *value)
Gets the value of a system parameter.

ccsCOMPL_STAT GetSysParam(const char *pname,
char *value,
vltINT32 *type)
Additionally returns the parameter type.

ccsCOMPL_STAT ParamDefault();
Sets all parameters back to their default values defined
in the .dsup file.

ccsCOMPL_STAT ParamStore();
Stores the current parameter setup.

ccsCOMPL_STAT ParamRestore();
Restores the parameter setup stored with ParamStore().

ccsCOMPL_STAT AddFrame(vltINT32 type,
char *frameName,
vltLOGICAL gen,
vltLOGICAL store,
vltLOGICAL win,
char *paramName)
Adds a new frame type. <gen> and <store> are the initial values
to indicate whether the frame should be generated/stored. If win
is set to TRUE the (sw-)window parameters are applied to the frame.
<paramName> contains to the plug-in parameter associated with
the generation of the frame type. If this is an empty string (""),
it is assumed that the frame is always generated.

ccsCOMPL_STAT BreakCnt(char *frameName, vltINT32 cnt)
Apply an exposure break-condition for the frame <frameName>
after <cnt> frames of that type have been stored by the
data transfer task.

ccsCOMPL_STAT ClearClkp();
Clears all clock patterns. This should be called before downloading
a new set of clock-pattern loops.
Only relevant, if the application provides its own sequencer
program parser/compiler.

ccsCOMPL_STAT LoadClkp(vltINT32 id,
vltINT32 *loopCmd,
vltINT32 loopCmdLen);
Downloads a clock-pattern loop. Only relevant, if the
application provides its own sequencer program parser/compiler.

ccsCOMPL_STAT LoadSeqProg(vltINT32 *loopCmd,
vltINT32 loopCmdLen);
Downloads a sequencer program loop. Only relevant, if the
application provides its own sequencer program parser/compiler.

ccsCOMPL_STAT FrameTime(vltINT32 id,
vltFLOAT *frameTime);
Returns the readout time of the clock-pattern with id <id>. If
<id> is less than zero, <frameTime> is assumed to point to an
array of frame-times, which is then updated with the readout
times of all clock-patterns.

ccsCOMPL_STAT SeqMode(vltINT32 mode);
Set the sequencer operational mode. Valid modes are:

tcomISEQ_MOD_CLK - normal running mode
tcomISEQ_MOD_TRIG_EXT - external trigger mode
tcomISEQ_MOD_TRIG_COM - trigger via command link
(reserved for test purposes)

ccsCOMPL_STAT AddFits(const char *keyword,
int *var,
const char *commentStr);
ccsCOMPL_STAT AddFits(const char *keyword,
float *var,
const char *commentStr);
ccsCOMPL_STAT AddFits(const char *keyword,
double *var,
char *commentStr);
ccsCOMPL_STAT AddFits(const char *keyword,
char *var,
const char *commentStr);
Trace the value of a variable in the FITS-header <keyword>.

ccsCOMPL_STAT int AddFits(const char *commentStr);
Add a comment to the current FITS info structure.

ccsCOMPL_STAT AddFitsDynPar(const char *keyword,
const char *commentStr);
Trace the value of a dynamic parameter in the FITS-header.

ccsCOMPL_STAT DownloadData(vltINT32 devId,
vltINT32 dataId,
const char *fileName);
Download a FITS-file to the acquisition process running on
acquisition device specified by <devId>. dataId defines the
usage of the file and can be one of the following:

sdmaFLATFIELD (1)
sdmaBADPIXMAX (2)

The application may define other ones, as this is passed
unchecked to the acquisition process. In any case this has to
be a single bit value. fileName contains the full path name of
a FITS-file.

ccsCOMPL_STAT DownloadDataRaw(vltINT32 devId,,
vltINT32 dataId,
char *buffer,
vltINT32 size);
Download a binary buffer to the acquisition process running on
acquisition device specified by <devId>. dataId defines the
usage of the file and can be one of the following:

sdmaFLATFIELD (1)
sdmaBADPIXMAX (2)

The application may define other ones, as this is passed
unchecked to the acquisition process. In any case this has to
be a single bit value (2^n).

ccsCOMPL_STAT ImgOp(vltINT32 op);
Perform image post-operation on data transfer task
before storing. Valid values for op are:

iracqIMG_ROT90 - rotate 90 degrees clockwise
iracqIMG_ROT180 - rotate 180 degrees
iracqIMG_ROT270 - rotate 270 degrees clockwise
iracqIMG_FLIPX - mirror on y-axis
iracqIMG_FLIPY - mirror on x-axis

Multiple image operations can be done by subsequent calls
Additionally several flags can be or'ed with the above
values to influence the application of the operations:

iracqIMG_DISABLE - enable image operations
iracqIMG_ENABLE - disable image operations
iracqIMG_CLEAR - clear all image operations

ccsCOMPL_STAT AcqParam(const char *paramString);
Sets an additional command line parameter string, which is added
to the standard command line, when the IRACE acquisition process(es)
are called.

char *AcqParam();
Returns a pointer to the additional command line parameter
string, which is added to the standard command line, when
the IRACE acquisition process(es) are called.

RETURN VALUES
If the function prototype allows, methods return ccsCOMPL_STAT.

SEE ALSO
iracqSRV(4), iracqDTT(4), iracqDTT_EVH(4), evhTASK(4)

10.3 iracqDTT CLASS

NAME
iracqDTT - basic class for data transfer task
SYNOPSIS
#include <iracqDTT.h>

iracqDTT myServer;

DESCRIPTION
Basic class for data transfer task

PUBLIC METHODS
iracqDTT();
Constructor method.

virtual ~iracqDTT();
Destructor method.

void PrintUsage(const char *argv0);
Prints out all server command line options.

int ParseInputPars(int argc, char *argv[]);
Parses the server command line.

char *Instance();
Returns the server instance.

int Init();
Initializes the control server.
The method is intended to be overwritten by the application.
It is recommended to call iracqDTT::Init first and to add
then your own intitialization.

virtual void Verbose(const char *format, ...);
Verbose output handler. This function is called from
all methods, when the macro iracqVB(...) is used.

virtual void ExitHandler(int sig);
Method to handle exit signals.

char *DataPath();
Returns current path, where data files will be stored.

char *FileName();
Returns the proposed FITS-file name (without extension)
depending on the selected naming scheme and the current
exposure sequence index.

int FitsAppend(const char *keyWord,
int var,
const char *comment,
char *erms);
int FitsAppend(const char *keyWord,
float var,
const char *comment,
char *erms);
int FitsAppend(const char *keyWord,
double var,
const char *comment,
char *erms);
int FitsAppend(const char *keyWord,
const char *var,
const char *comment,
char *erms);
int FitsAppend(const char *keyWord,
const char *comment,
char *erms);
Append a FITS-keyword to the local FITS-header.

int AddFits(const char *keyword,
int type,
void *addr,
const char *comment,
char *erms)
int AddFits(const char *keyword,
int *var,
const char *comment,
char *erms);
int AddFits(const char *keyword,
float *var,
const char *comment,
char *erms);
int AddFits(const char *keyword,
double *var,
char *comment,
char *erms);
int AddFits(const char *keyword,
char *var,
const char *comment,
char *erms);
Trace the value of a variable in the FITS-header <keyword>.

int AddFits(const char *comment, char *erms);
Add a comment to the current FITS info structure.

char *GetFitsBuf();
Returns the global null terminated FITS-buffer
filled by the control server. The number of FITS-lines
in the buffer is the length of the returned string
divided by 80.

int ExpNo();
Returns the current exposure number.

void GetFrameName(int ftype, char *fname);
Get the name associated with the specified frame
type. If fname returns an empty string no name has
been assigned to the type by the acquisition process.

char *ExpStartTime();
double *ExpStartTimeMJD();
Returns the exposure start time.

int ExpStatus();
Returns the current exposure status. Use the
iracqEXP_ISACTIVE(ExpStatus()) macro to see whether the
exposure is active or not.

char *StartTransferTime()
Returns the time when the header of a frame was received
from the acquisition process.

int SendFileEvent(const char *fileName, char *erms);
Send a file-event to the control server;

int DetNum();
Returns the current detector number/partition, which is
selected to be stored. If 0 is returned, all detectors
are selected.

int DetIdx();
Returns the number/partition of the detector, which is
actually received.

virtual int ProcessFrame(sdmaFRAME_T *frame, char *erms);
Callback function, which is called just after a data
frame has been received from the acquisition process.
A pointer to the received frame structure is passed
via <frame>. If the function returns iracqFAILURE,
the string <erms> is sent as data error event to
the control server and the exposure is discarded.

void FrameHandled();
Call this method within ProcessFrame to signal that
all handling with the frame is done. The frame data
will then not be object to image post-processing,
scaling, display or storage.

int ReplaceEnv(char *string, char *erms)
Replaces all environment variables in string.

RETURN VALUES
If the function prototype allows, methods return iracqSUCCESS in
case of success. In case of failure iracqFAILURE is returned
and erms contains an error message.

SEE ALSO
iracqSRV(4), iracqEVH(4), iracqDTT_EVH(4)

10.4 iracqDTT_EVH CLASS

NAME
iracqDTT_EVH - basic class for data transfer task
SYNOPSIS
#include <iracqDTT_EVH.h>

iracqDTT_EVH myServer;

PARENT CLASS
iracqDTT_EVH: public evhTASK, public iracqDTT

DESCRIPTION
Basic class for data transfer task

PUBLIC METHODS
iracqDTT_EVH();
Constructor method

virtual ~iracqDTT_EVH();
Destructor method

void PrintUsage(const char *argv0);
Prints out all server command line options.

ccsCOMPL_STAT ParseInputPars(int argc, char *argv[]);
Parses the server command line.

ccsCOMPL_STAT Init();
Initializes the control server.
The method is intended to be overwritten by the application.
It is recommended to call iracqDTT_EVH::Init first and to add
then your intitialization.

void Verbose(const char *format, ...);
Verbose output handler. This function is called from
all methods, when the macro iracqVB(...) is used.
The method is intended to be overwritten by the application.
It is recommended to call iracqEVH::VbHandler first and to
add then your own handler.

void ExitHandler(int sig);
Method to handle exit signals.
The method is intended to be overwritten by the application.
It is recommended to add first your own cleanup functions and
then to call iracqDTT_EVH::ExitHandler.

ccsCOMPL_STAT FitsAppend(const char *keyWord,
int var,
const char *comment);
ccsCOMPL_STAT FitsAppend(const char *keyWord,
float var,
const char *comment);
ccsCOMPL_STAT FitsAppend(const char *keyWord,
double var,
const char *comment);
ccsCOMPL_STAT FitsAppend(const char *keyWord,
const char *var,
const char *comment);
ccsCOMPL_STAT FitsAppend(const char *keyWord,
const char *comment);
Append a FITS-keyword to the local FITS-header.

ccsCOMPL_STAT AddFits(const char *keyword,
int *var,
const char *comment);
ccsCOMPL_STAT AddFits(const char *keyword,
float *var,
const char *comment);
ccsCOMPL_STAT AddFits(const char *keyword,
double *var,
char *comment);
ccsCOMPL_STAT AddFits(const char *keyword,
char *var,
const char *comment);
Trace the value of a variable in the FITS-header <keyword>.

ccsCOMPL_STAT int AddFits(const char *comment);
Add a comment to the current FITS info structure.

ccsCOMPL_STAT SendFileEvent(const char *fileName);
Send a file-event to the control server;

ccsCOMPL_STAT ReplaceEnv(char *string)
Replaces all environment variables in string.

RETURN VALUES
If the function prototype allows, methods return ccsCOMPL_STAT.

SEE ALSO
iracqSRV(4), iracqEVH(4), iracqDTT(4), evhTASK(4)

10.5 iracqDTT CLASS



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
TOC PREV NEXT INDEX