Frontend from Andrea Raselli as of 15.09.2025

This commit is contained in:
2025-09-15 12:17:22 +02:00
parent 8bce629453
commit 9cf162e347
3 changed files with 8801 additions and 0 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+109
View File
@@ -0,0 +1,109 @@
/* ==================================================================== */
/*
* +--------------------------------------------------------------+
* | Paul Scherrer Institut |
* | Computing Division |
* | |
* | This software may be used freely by non-profit organizations.|
* | It may be copied provided that the name of P.S.I. and of the |
* | author is included. Neither P.S.I. nor the author assume any |
* | responsibility for the use of this software outside of P.S.I.|
* +--------------------------------------------------------------+
*
* Project . . . . . . . . . . : Musr support software
* Component/Facility . . . . . : Midas Front end for muSR DAQ/slow control
* File Name . . . . . . . . . : musr_midas.h
* Title . . . . . . . . . . . :
* Abstract . . . . . . . . . . : contains muSR specific extensions of Midas.
* Author . . . . . . . . . . . : RA95 (extracted from ptantmusr.c)
* Date of creation . . . . . . : 26-JUN-2000
*
*
* Date Name Modification
* -----------------------------------------------------------------
* 21-AUG-2000 RA95 current_frontendpath() modified, BOOL check_fename added
* 26-APR-2001 RA95 TRIM, COMPRESS & COLLAPSE added
* 14-SEP-2001 RA95 get_float, get_double, OMIT_ODB added
* 29-OCT-2001 RA95 strtime added
* 18-NOV-2004 RA35 free_inbuf()
* 02-MAY-2005 RA36 client_in_list() added
* 28-JUN-2005 RA36 client_in_list_reset() added
*
*/
/* --------------------------------------------------------------------- */
#ifndef _MUSR_MIDAS_H_
#define _MUSR_MIDAS_H_
/* --------------------------------------------------------------------- */
#include "midas.h"
#include "msystem.h"
/* --------------------------------------------------------------------- */
#define FAILURE 0
/* used by get_char and get_string */
#define NONE 0
#define FILLSTRING 1 /* fill string with spaces */
#define LOWERCASE 2 /* convert upper case to lower case characters */
#define UPPERCASE 4 /* convert lower case to upper case characters */
#define TRIM 8 /* remove trailing and leading blanks or tabs */
#define COMPRESS 16 /* replace multiple blanks or tabs by single space */
#define COLLAPSE 32 /* remove all spaces or tabs */
/* --------------------------------------------------------------------- */
#ifndef OMIT_ODB /* omit ODB specific part */
/* get value from ODB, write value to ODB */
extern INT db_get_int(INT, char *, INT *, char *);
extern INT db_set_int(INT, char *, INT, char *);
extern INT db_get_bool(INT, char *, BOOL *, char *);
extern INT db_set_bool(INT, char *, BOOL, char *);
extern INT db_get_string(INT, char *, char *, INT, char *);
extern INT db_set_string(INT, char *, char *, char *);
/* error logging */
extern void LogMessage(char *, INT, BOOL);
#define ErrorTerminate(message,status) LogMessage(message,status,TRUE)
#define ErrorLog(message,status) LogMessage(message,status,FALSE)
#define MessageLog(message,status) LogMessage(message,status,FALSE)
/* run and front end specific */
extern INT current_runnumber(HNDLE, INT *);
extern INT current_runstate(HNDLE, INT *);
extern INT current_frontendpath(HNDLE, char *, char *, char *, char *, char *, BOOL);
extern INT frontend_allowed(HNDLE, char *);
#ifdef OBSOLETE_CODE
extern INT client_in_list(HNDLE);
extern INT client_in_list_reset(void);
#endif
#endif /* OMIT_ODB */
extern INT elapsed_time(void);
/* date and time */
extern INT cur_date_time(char *, char *);
#define cur_date(date) cur_date_time(date,NULL)
#define cur_time(time) cur_date_time(NULL,time)
extern char *strtime(INT, char *);
/* get values from keyboard */
extern INT get_int(char *, int, int, int *);
extern INT get_uint(char *, unsigned int, unsigned int, unsigned int *);
extern INT get_char(char *, char *, int, char *);
extern INT get_string(char *, int, int, char *);
extern INT get_float(char *, float, float, float *);
extern INT get_double(char *, double, double, double *);
extern INT free_inbuf(void);
/* --------------------------------------------------------------------- */
#endif /* _MUSR_MIDAS_H_ */
/* EOF musr_midas.h ---------------------------------------------------- */