-
Notifications
You must be signed in to change notification settings - Fork 8
/
cmd.cpp
97 lines (81 loc) · 2.45 KB
/
cmd.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* -------------------------------------------------------------
*
* file: command.cpp
*
* description: command line interpreter for Chip/Wafer tester
*
* author: Beat Meier
* modified: 31.8.2007
*
* rev:
*
* -------------------------------------------------------------
*/
#include "psi46test.h"
#include "command.h"
#include "cmd_dtb.h"
#include "cmd_wafertest.h"
#include "cmd_analyzer.h"
void cmdHelp()
{
if (settings.proberPort >= 0)
{
fputs("\n"
"+-- control commands ------------------------------------------+\n"
"| h display this text |\n"
"| exit exit commander |\n"
"+-- wafer test ------------------------------------------------+\n"
"| go start wafer test (press <cr> to stop) |\n"
"| test run chip test |\n"
"| pr <command> send command to prober |\n"
"| sep prober z-axis separation |\n"
"| contact prober z-axis contact |\n"
"| first go to first die and clear wafer map |\n"
"| next go to next die |\n"
"| goto <x> <y> go to specifed die |\n"
"| chippos <ABCD> move to chip A, B, C or D |\n"
"+--------------------------------------------------------------+\n",
stdout);
}
else
{
fputs("\n"
"+-- control commands ------------------------------------------+\n"
"| h display this text |\n"
"| exit exit commander |\n"
"+-- chip test -------------------------------------------------+\n"
"| test <chip id> run chip test |\n"
"+--------------------------------------------------------------+\n",
stdout);
}
}
CMD_PROC(h)
{
cmdHelp();
}
void cmd()
{
#undef CMD_REG
#define CMD_REG(name,parameter,helptext) cmd_intp.AddCommand(#name, cmd_##name, parameter, helptext);
#undef HELP_CAT
#define HELP_CAT(name) cmd_intp.AddHelpCategory(name);
#include "cmd_dtb.h"
#include "cmd_wafertest.h"
#include "cmd_analyzer.h"
CMD_REG(h, "", "simple help");
cmdHelp();
cmd_intp.SetScriptPath(settings.scriptPath.c_str());
// command loop
while (true)
{
try
{
CMD_RUN(stdin);
return;
}
catch (CRpcError e)
{
e.What();
}
}
}