2 cpscript TYP name count1 type name ... count2 type name
10 count1 = int(sys.argv[3])
16 reqType[j] = sys.argv[i];
18 count2 = int(sys.argv[i])
24 repType[j] = sys.argv[i];
27 sys.stdout.write(
"\tvoid CtlPkt::fmt" + cmdName +
"(")
28 for i
in range(count1) :
29 if i != 0 : sys.stdout.write(
", ")
30 sys.stdout.write(reqType[i])
31 sys.stdout.write(
", int64_t);\n")
33 sys.stdout.write(
"\tbool CtlPkt::xtr" + cmdName +
"(")
34 for i
in range(count1) :
35 if i != 0 : sys.stdout.write(
", ")
36 sys.stdout.write(reqType[i] +
"&")
37 sys.stdout.write(
");\n");
39 sys.stdout.write(
"\tvoid CtlPkt::fmt" + cmdName +
"Reply(")
40 for i
in range(count2) :
41 if i != 0 : sys.stdout.write(
", ")
42 sys.stdout.write(repType[i])
43 if count2 > 0 : sys.stdout.write(
", ")
44 sys.stdout.write(
"int64_t=0);\n")
46 sys.stdout.write(
"\tbool CtlPkt::xtr" + cmdName +
"Reply(")
47 for i
in range(count2) :
48 if i != 0 : sys.stdout.write(
", ")
49 sys.stdout.write(repType[i] +
"&")
50 sys.stdout.write(
");\n\n")