ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcppShell.h
Go to the documentation of this file.
1
7#ifndef ngcppShell_h
8#define ngcppShell_h
9
10/*******************************************************************************
11* E.S.O. - European Southern Observatory
12*
13*
14* who when what
15* -------- ---------- ----------------------------------------------
16* jstegmei 2004-03-11 created
17* jstegmei 2008-01-03 added remote register access function
18* jstegmei 2011-04-12 added comments
19* jstegmei 2011-04-14 added function documentation
20* jstegmei 2014-05-12 const declarations
21*/
22
23/************************************************************************
24 *
25 * ngcppShell.h - NGC pre-processor command shell
26 *
27 *----------------------------------------------------------------------
28 */
29
30#include <ngc/core/ngcbShell.h>
31#include <ngc/core/ngcppInt.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37/*
38 * Pre-defined arguments
39 */
40#define ngcppARG_ON "on"
41#define ngcppARG_OFF "off"
42
43/*
44 * Command classification
45 */
46#define ngcppCMD_UNPROTECTED 0
47#define ngcppCMD_PROTECTED 1
48
52typedef struct {
54 char srvName[256];
55 char active;
56 char connected;
60
64typedef int (*ngcppCMD_HANDLER)(ngcpp_shell_t *, char *, FILE *, char *);
65
69typedef struct {
70 const char cmd[16];
71 const char syntax[32];
72 const char help[64];
76
77
81int ngcppHandleAbort(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
82 char *erms);
83
87int ngcppHandleQuit(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
88 char *erms);
89
93int ngcppHandleExit(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
94 char *erms);
95
99int ngcppHandleTerm(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
100 char *erms);
101
105int ngcppHandleHelp(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
106 char *erms);
107
111int ngcppHandleStatus(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
112 char *erms);
113
117int ngcppHandleStart(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
118 char *erms);
119
123int ngcppHandleStop(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
124 char *erms);
125
129int ngcppHandlePause(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
130 char *erms);
131
135int ngcppHandleContinue(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
136 char *erms);
137
141int ngcppHandlePset(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
142 char *erms);
143
147int ngcppHandlePget(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
148 char *erms);
149
153int ngcppHandlePstat(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
154 char *erms);
155
159int ngcppHandlePsync(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
160 char *erms);
161
165int ngcppHandleConf(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
166 char *erms);
167
171int ngcppHandleDynCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
172 char *erms);
173
177int ngcppHandleRmode(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
178 char *erms);
179
183int ngcppHandleDataPath(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
184 char *erms);
185
189int ngcppHandleKill(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
190 char *erms);
191
195int ngcppHandleConnect(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
196 char *erms);
197
201int ngcppHandleVerbose(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
202 char *erms);
203
207int ngcppHandleTime(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
208 char *erms);
209
213int ngcppHandleSimTime(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
214 char *erms);
215
219int ngcppHandleSimDelay(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
220 char *erms);
221
225int ngcppHandleMemSet(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
226 char *erms);
227
231int ngcppHandleMemClose(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
232 char *erms);
233
237int ngcppHandleMemSync(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
238 char *erms);
239
243int ngcppHandleFlush(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
244 char *erms);
245
249int ngcppHandleEnd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
250 char *erms);
251
255int ngcppHandleRstCnt(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
256 char *erms);
257
261int ngcppHandleForceCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
262 char *erms);
263
267int ngcppHandleProtectCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
268 char *erms);
269
273int ngcppHandleFileBase(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
274 char *erms);
275
279int ngcppHandleFilePath(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
280 char *erms);
281
285int ngcppHandleUsrCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
286 char *erms);
287
291int ngcppHandleChipOff(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
292 char *erms);
293
297int ngcppHandleChan(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
298 char *erms);
299
303int ngcppHandleTestF(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
304 char *erms);
305
309int ngcppHandleTimeout(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
310 char *erms);
311
315int ngcppHandleIoRead(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
316 char *erms);
317
321int ngcppHandleIoWrite(ngcpp_shell_t *stat, char *cmdLine, FILE *rs,
322 char *erms);
323
327int ngcppHelp(FILE *rs, char *cmd);
328
332int ngcppShell(void *argp);
333
334#ifdef __cplusplus
335}
336#endif
337
338#endif
int ngcpp_link_t
Definition ngcppInt.h:67
int ngcppHandlePset(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1483
int ngcppHandleEnd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1413
int(* ngcppCMD_HANDLER)(ngcpp_shell_t *, char *, FILE *, char *)
Definition ngcppShell.h:64
int ngcppHandleStart(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1320
int ngcppHandleFlush(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1460
int ngcppHandleRmode(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2249
int ngcppHandleSimTime(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1797
int ngcppHandleStop(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1343
int ngcppHandleProtectCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1088
int ngcppHandleKill(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2222
int ngcppHandleRstCnt(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1436
int ngcppHandleVerbose(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1761
int ngcppHandleSimDelay(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1823
int ngcppHandleDataPath(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2201
int ngcppHandlePstat(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1611
int ngcppHelp(FILE *rs, char *cmd)
Definition main.c:914
int ngcppHandleAbort(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1023
int ngcppHandleConnect(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2109
int ngcppHandleFilePath(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2176
int ngcppHandleStatus(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1126
int ngcppHandleTestF(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2068
int ngcppHandleContinue(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1389
int ngcppHandleIoWrite(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2349
int ngcppHandleChipOff(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1849
int ngcppHandleDynCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1694
int ngcppHandleForceCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1076
int ngcppHandleTime(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1722
int ngcppHandleIoRead(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2300
int ngcppHandleTerm(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1060
int ngcppHandleMemSet(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2028
int ngcppHandlePsync(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1674
int ngcppHandleMemSync(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1996
int ngcppShell(void *argp)
Definition main.c:595
int ngcppHandleExit(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:968
int ngcppHandlePget(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1556
int ngcppHandleConf(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1265
int ngcppHandleFileBase(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:2149
int ngcppHandlePause(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1366
int ngcppHandleMemClose(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1967
int ngcppHandleChan(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1914
int ngcppHandleTimeout(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1881
int ngcppHandleUsrCmd(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1941
int ngcppHandleQuit(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1011
int ngcppHandleHelp(ngcpp_shell_t *stat, char *cmdLine, FILE *rs, char *erms)
Definition main.c:1100
Definition ngcppShell.h:69
const char cmd[16]
Definition ngcppShell.h:70
ngcppCMD_HANDLER cmdHandler
Definition ngcppShell.h:74
const char syntax[32]
Definition ngcppShell.h:71
int protectedFlag
Definition ngcppShell.h:73
const char help[64]
Definition ngcppShell.h:72
Definition ngcppShell.h:52
ngcpp_link_t link
Definition ngcppShell.h:53
char srvName[256]
Definition ngcppShell.h:54
char forceCommand
Definition ngcppShell.h:58
char active
Definition ngcppShell.h:55
char protectedMode
Definition ngcppShell.h:57
char connected
Definition ngcppShell.h:56