Files
sicspsi/tecs/tecs_lsc.h
cvs 064ec37e9a - Rearranged directory structure for forking out ANSTO
- Refactored site specific stuff into a site module
- PSI specific stuff is now in the PSI directory.
- The old version has been tagged with pre-ansto
2003-06-20 10:18:47 +00:00

57 lines
1.8 KiB
C

#ifndef _TECS_LSC_H_
#define _TECS_LSC_H_
#include "tecs_serial.h"
char *LscCmd(SerChannel *ser, const char *cmds);
/*
Send commands to LSC-340.
There may be several commands separated by semicolon.
A special syntax is used:
- Commands containing a colon are commands with query,
i.e. the sent parameters are checked. The sent parameters
are those after the query, the command before the colon
is used as query, after inserting a question mark.
- Variable names in square brackets are substitute by their value
- Return values may be assigned to variables, separated by
a right angle bracket. There may be several variables
separated by comma, corresponding to the returned parameters,
beeing separated by commas also. If the variable is not terminated
by a comma, the whole remaining result is assigned, even if it
contains commas. Return values may only be used when a command
with wuery was sent, or when the command was a query (containing
a question mark).
Example:
LscCmd(ser, "RANGE:5>range;SETP 1:[tempH];CRVHDR?[num]>name,head;MODE 2");
assume that tempH=295 and num=25 the command sent to LSC is:
RANGE 5;RANGE?;SETP 1,295;SETP?1;CRVHDR?25;MODE 2
and assume LSC sens back:
3;295.000E+00;CTI5 ,R10410 ,3,+330.000E+0,2
then the following variables will be assigned:
range=3
name="CTI5"
head="R10410 ,3,+330.000E+0,2"
All used variables have to be declared with CocDef... (see coc_server.h)
*/
int LscEqPar(char *par, char *res);
/*
compare if parameters are equal (numbers as numbers, spaces ignored)
if any parameter in par is omitted, it is not compared
*/
char *LscReadStat(int stat);
char *LscHtrStat(int stat);
#endif /* _TECS_LSC_H_ */