lemAutoRun  1.0
lemAutoRun.h
Go to the documentation of this file.
1 /********************************************************************************************
2 
3  lemAutoRun.h
4 
5 *********************************************************************************************
6 
7  begin : Andreas Suter, 2006/03/14
8  modfied: :
9  copyright : (C) 2006 by
10  email : andreas.suter@psi.ch
11 
12 ********************************************************************************************/
13 
14 /***************************************************************************
15  * *
16  * This program is free software; you can redistribute it and/or modify *
17  * it under the terms of the GNU General Public License as published by *
18  * the Free Software Foundation; either version 2 of the License, or *
19  * (at your option) any later version. *
20  * *
21  ***************************************************************************/
22 
23 #ifndef _LEMAUTORUN_H_
24 #define _LEMAUTORUN_H_
25 
26 #include <QString>
27 #include <QVector>
28 
29 // defines ------------------------------------------
30 #define LAR_MAX_PARAM 64
31 
32 #define LAR_SUCCESS 0
33 #define LAR_MSG 1
34 #define LAR_MSG_NO_LINE_NO 2
35 #define LAR_FATAL 3
36 
37 #define LAR_STATE_STOPPED 0
38 #define LAR_STATE_PAUSED 1
39 #define LAR_STATE_STARTING 2
40 #define LAR_STATE_RUNNING 3
41 #define LAR_STATE_LOAD 4
42 #define LAR_STATE_LOADING 5
43 #define LAR_STATE_NEXT 6
44 
45 #define LAR_INPUT_FILE_NOT_EXISTING 100
46 #define LAR_INPUT_FILE_READ_ERROR 101
47 #define LAR_OUT_OF_MEMORY 102
48 #define LAR_LOST_NETWORK_CONNECTION 103
49 #define LAR_RECIEVED_SHUTDOWN_CMD 104
50 #define LAR_AUTO_RUN_DISABLED 105
51 
52 #define LAR_INVALID_CMD 200
53 
54 #define LAR_OUTPUT_FILE_WRITE_ERROR 300
55 
56 #define LAR_XML_INIT_ERROR 400
57 #define LAR_XML_OUT_OF_MEMORY 401
58 #define LAR_XML_EXCEPTION 402
59 #define LAR_XML_UNEXPECTED_EXCEPTION 403
60 #define LAR_XML_WARNING 404
61 #define LAR_XML_ERROR 405
62 #define LAR_XML_FATAL 406
63 
64 #define LAR_XML_FILE_MISSING 500
65 #define LAR_XML_MISSING_ENTRY 501
66 
67 #define LAR_MIDAS_CONNECTION_FAILED 600
68 #define LAR_MIDAS_KEY_FAILURE 601
69 #define LAR_MIDAS_ODB_FAILURE 602
70 #define LAR_MIDAS_FE_NOT_RUNNING 603
71 #define LAR_MIDAS_DEVICE_NOT_REMOTE 604
72 #define LAR_MIDAS_CANNOT_START_RUN 605
73 #define LAR_MIDAS_NO_RUN_TRANSITION 606
74 #define LAR_MIDAS_READBACK_FAILURE 607
75 
76 #define LAR_SAMPLE_HV_NOT_REACHED 700
77 #define LAR_FIELD_NOT_REACHED 701
78 #define LAR_BPVY_NO_RESPONSE 702
79 #define LAR_FUG_NO_RESPONSE 703
80 #define LAR_LS340_INPUT_NONSENSE 704
81 #define LAR_LS340_TEMP_NOT_STABLE 705
82 #define LAR_OMEGA_TEMP_NOT_STABLE 706
83 #define LAR_FOM_CURRENT_NOT_REACHED 707
84 #define LAR_BPV_CLOSED_AT_RUN_START 708
85 #define LAR_RA_HV_OFF_AT_RUN_START 709
86 #define LAR_FORCED_RA_OFF 710
87 #define LAR_STOP_STOP_NONSENSE 711
88 
89 // structures ---------------------------------------
90 
91 //---------------------------------------------------
220 typedef struct {
221  QString cmdString;
222  QString cmd;
223  int lineNo;
225  QString param[LAR_MAX_PARAM];
226  QString loopVal;
227 } AutoRunCmd;
228 
229 //---------------------------------------------------
233 typedef QVector<AutoRunCmd> PAutoRunCmdVector;
234 
235 //---------------------------------------------------
239 typedef struct {
240  QString tag;
241  QString odb_path;
242  int idx;
243 } OdbTag;
244 
245 //---------------------------------------------------
249 typedef QVector<OdbTag> POdbTagVector;
250 
251 #endif // _LEMAUTORUN_H_
int noElements
number of parameters used for this command
Definition: lemAutoRun.h:224
int idx
ODB variable index. -1 means variable is not an array.
Definition: lemAutoRun.h:242
QString loopVal
value of a loop command. For non-loop commands it will be an empty string
Definition: lemAutoRun.h:226
QVector< AutoRunCmd > PAutoRunCmdVector
Definition: lemAutoRun.h:233
int lineNo
line number from where in the user auto run sequence the command originates
Definition: lemAutoRun.h:223
QString odb_path
ODB path.
Definition: lemAutoRun.h:241
QString tag
ODB tag.
Definition: lemAutoRun.h:240
QVector< OdbTag > POdbTagVector
Definition: lemAutoRun.h:249
QString cmd
command name string
Definition: lemAutoRun.h:222
#define LAR_MAX_PARAM
maximum number of parameters for an auto run cmd
Definition: lemAutoRun.h:30
QString cmdString
untouched original lar-cmd string
Definition: lemAutoRun.h:221