StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mscript.h
1 #ifndef _MSCRIPT_H__
2 #define _MSCRIPT_H_
3 
4 /* Definitions of the miniscript */
5 
6 /* Tonko: includes all the command + ALTRO register defines */
7 #include <DAQ1000/rdo_cmds.h>
8 
9 
10 /* Registers for nios listprocessor */
11 #define MINI_RUN_NUMBER 1 /* run tag */
12 #define MINI_ID 2 /* id tag */
13 
14 
15 
16 #if defined(linux) || defined(__APPLE__)
17 /* prototypes for compiler, not seen by nios code */
18 
19 /* Returns length of opcode buffer */
20 /* list is the opcode buffer */
21 /* str is a NULL delimited single command */
22 
23 #define MAX_MSCRIPT_LEN 1000
24 
25 struct ParsedScript
26 {
27  char _fn[256]; // optional filename
28  char *fn; // null if no file, or points to _fn[]
29  int num; // numeric arg 0xffffffff by default
30 
31  u_int data[MAX_MSCRIPT_LEN]; // compiled script
32  u_int n; // compiled script length
33 };
34 
35 int parse(ParsedScript *script, char *str, int batch=0);
36 
37 #else
38 
39 /* Nios */
40 int runList(u_int *prog, char *outputbuff, u_int sz);
41 #endif
42 
43 
44 
45 #endif