63 lines
2.2 KiB
C
63 lines
2.2 KiB
C
#ifndef _TECS_CLI_H_
|
|
#define _TECS_CLI_H_
|
|
|
|
#include "coc_client.h"
|
|
/*
|
|
tecc.h: tecs client interface routines
|
|
|
|
M. Zolliker March 2000
|
|
*/
|
|
|
|
typedef CocConn *pTecsClient;
|
|
|
|
|
|
pTecsClient TeccInit(char *server, int port);
|
|
/* init tecs client (connect to server) */
|
|
|
|
int TeccGet(pTecsClient conn, float *temp);
|
|
/* get temperature */
|
|
|
|
int TeccSet(pTecsClient conn, float temp);
|
|
/* set temperature */
|
|
|
|
int TeccWait(pTecsClient conn);
|
|
/* wait until the controller is configured */
|
|
|
|
int TeccSend(pTecsClient conn, char *cmd, char *reply, int replyLen);
|
|
/* send a command transparently to the controller
|
|
replyLen is the maximal length of reply */
|
|
|
|
void TeccClose(pTecsClient conn);
|
|
/* close connection and free ressources */
|
|
|
|
int TeccQuitServer(pTecsClient conn);
|
|
/* quit the server process */
|
|
|
|
/* Fortran interface:
|
|
|
|
integer function TECS_INIT(STARTCMD, PORT) - open server connection
|
|
logical function TECS_IS_OPEN () - check if tecs is open
|
|
integer function TECS_GET3(SET_T, REG_T, SAM_T) - read 3 temperatures
|
|
integer function TECS_WAIT() - wait for end of configuration
|
|
integer function TECS_SET (TEMP) - set temperature target
|
|
integer function TECS_GET (TEMP) - get sample temperature
|
|
integer function TECS_QUIT_SERVER () - force server to quit
|
|
integer function TECS_GET_PAR (NAME, PAR) - get parameter
|
|
integer function TECS_SET_PAR (NAME, PAR) - set parameter
|
|
integer function TECS_SEND (CMND, REPLY) - send command to LakeShore
|
|
subroutine TECS_CLOSE - close connection to tecs
|
|
|
|
character*(*) STARTCMD - command to start server (no restart if empty)
|
|
integer PORT - port number
|
|
real SET_T,REG_T,SAM_T - set-temperature, regulation temperature, sample temperature
|
|
real TEMP - temperature
|
|
character*(*) NAME - parameter name
|
|
character*(*) PAR - parameter value
|
|
character*(*) CMND - raw command
|
|
character*(*) REPLY - reply to command
|
|
|
|
integer return values are error codes (negative means error, like in most C system routines)
|
|
*/
|
|
|
|
#endif /* _TECS_CLI_H_ */
|