• R/O
  • SSH

dialog-studio-java: Commit

Galatea Dialog Studio: Eclipse-based Java project. Migrated from CVS repository (scripts are omitted).


Commit MetaInfo

Revisão9256fc0671238aab9d76ef959e8bef1accd9270b (tree)
Hora2010-10-18 15:14:30
AutorTakuya Nishimoto <nishimoto@m.ie...>
CommiterTakuya Nishimoto

Mensagem de Log

hgignore

Mudança Sumário

Diff

diff -r 29df4c74ce4f -r 9256fc067123 .hgignore
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Mon Oct 18 15:14:30 2010 +0900
@@ -0,0 +1,4 @@
1+syntax: regexp
2+.+\.class$
3+.+~$
4+^bin\/
diff -r 29df4c74ce4f -r 9256fc067123 src/galatea/agent/Par.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/galatea/agent/Par.java Mon Oct 18 15:14:30 2010 +0900
@@ -0,0 +1,96 @@
1+package galatea.agent;
2+
3+import galatea.util.Getopt;
4+import java.util.ArrayList;
5+import java.util.regex.Matcher;
6+import java.util.regex.Pattern;
7+
8+public class Par extends GalateaBase {
9+ private int id;
10+ private ArrayList<String> queue1;
11+ private Pattern pattern5_;
12+
13+ public Par()
14+ {
15+ super();
16+ id = 0;
17+ queue1 = new ArrayList<String>();
18+ pattern5_ = Pattern.compile("^(\\S+)\\s+(\\S+)$");
19+ // debug_ = true;
20+ }
21+
22+ public void handleRep(String module, String slot, String arg)
23+ {
24+ if (module.equals("SSM")) {
25+ if (slot.equals("Speak.stat")) {
26+ execQueue();
27+ }
28+ } else if (module.equals("FSM")) {
29+ if (slot.equals("Speak.stat")) {
30+ execQueue();
31+ }
32+ }
33+ }
34+
35+ public void handleTell(String module, String slot, String arg)
36+ {
37+ if (module.equals("SND")) {
38+ if (slot.equals("start")) {
39+ execQueue();
40+ }
41+ }
42+ }
43+
44+ public void handleSet(String module, String slot, String arg)
45+ {
46+ if (slot.equals("Init")) {
47+ debugPrint("par: " + module + " " + slot + " " + arg);
48+ try {
49+ id = Integer.parseInt(arg);
50+ } catch (NumberFormatException e) {
51+ id = 0;
52+ }
53+ queue1 = new ArrayList<String>();
54+ } else if (slot.equals("Cmd")) {
55+ queue1.add(arg);
56+ } else if (slot.equals("Run")) {
57+ if (arg.equals("NOW")) {
58+ execQueue();
59+ }
60+ }
61+ }
62+
63+ private void execQueue() {
64+ while (queue1.size() > 0) {
65+ String cmd = queue1.remove(0);
66+ Matcher matcher5 = pattern5_.matcher(cmd);
67+ if (matcher5.matches()) {
68+ String left = matcher5.group(1);
69+ String right = matcher5.group(2);
70+ if (left.equals("sleep")) {
71+ sleep((int)(Float.parseFloat(right) * 1000.0f));
72+ }
73+ } else {
74+ send(cmd);
75+ }
76+ }
77+ }
78+
79+ public static void main(String argv[])
80+ {
81+ String conf = "gdm.conf";
82+ Getopt g = new Getopt("", argv, "c:");
83+ g.setOpterr(false);
84+ int c;
85+ while ((c = g.getopt()) != -1){
86+ switch (c) {
87+ case 'c':
88+ conf = g.getOptarg();
89+ break;
90+ }
91+ }
92+ AgentUtil.loadConfigFile(conf);
93+ Par m = new Par();
94+ m.run();
95+ }
96+}
diff -r 29df4c74ce4f -r 9256fc067123 src/galatea/dialog/DialogStudioVersion.java
--- a/src/galatea/dialog/DialogStudioVersion.java Mon Oct 18 13:10:16 2010 +0900
+++ b/src/galatea/dialog/DialogStudioVersion.java Mon Oct 18 15:14:30 2010 +0900
@@ -2,7 +2,7 @@
22 public class DialogStudioVersion
33 {
44 public static final String TSTAMP =
5- "Galatea Dialog Studio 2.3.1 (101014)";
5+ "Galatea Dialog Studio 2.3.1 (101018)";
66
77 public static final String COPYRIGHT =
88 "(c)2003-2010 Takuya NISHIMOTO (nishimoto [atmark] m.ieice.org)";
@@ -51,7 +51,8 @@
5151 * Ver 2.2.4b3 (090307) : Julius is controlled at Pause / Resume
5252 * Ver 2.2.4b4 (090309) : DM.Window.FixFont (default is false)
5353 *
54- * Ver 2.3.0 (09xxxx) : encoding=UTF-8
54+ * Ver 2.3.0 (100529) : encoding=UTF-8
55+ * Ver 2.3.1 (101018) : Java version of AM-MCL and PAR (galatea.agent.*)
5556 */
5657 }
5758
diff -r 29df4c74ce4f -r 9256fc067123 src/galatea/dialog/window/DialogManagerWindow.java
--- a/src/galatea/dialog/window/DialogManagerWindow.java Mon Oct 18 13:10:16 2010 +0900
+++ b/src/galatea/dialog/window/DialogManagerWindow.java Mon Oct 18 15:14:30 2010 +0900
@@ -428,38 +428,38 @@
428428 }
429429 });
430430 //
431- JMenuItem itemAutoGazeOn = new JMenuItem("AutoGaze ON");
432- menuAuto.add(itemAutoGazeOn);
433- itemAutoGazeOn.addActionListener( new ActionListener() {
434- public void actionPerformed(ActionEvent e) {
435- _send("to @AM-MCL set AutoGaze = 1");
436- }
437- });
438- //
439- JMenuItem itemAutoGazeOff = new JMenuItem("AutoGaze OFF");
440- menuAuto.add(itemAutoGazeOff);
441- itemAutoGazeOff.addActionListener( new ActionListener() {
442- public void actionPerformed(ActionEvent e) {
443- _send("to @AM-MCL set AutoGaze = 0");
444- }
445- });
446- //
447- JMenuItem itemEmotionSpeakOn = new JMenuItem("EmotionSpeak ON");
448- menuAuto.add(itemEmotionSpeakOn);
449- itemEmotionSpeakOn.addActionListener( new ActionListener() {
450- public void actionPerformed(ActionEvent e) {
451- _send("to @AM-MCL set AutoEmotionSpeak = 1");
452- }
453- });
454- //
455- JMenuItem itemEmotionSpeakOff = new JMenuItem("EmotionSpeak OFF");
456- menuAuto.add(itemEmotionSpeakOff);
457- itemEmotionSpeakOff.addActionListener( new ActionListener() {
458- public void actionPerformed(ActionEvent e) {
459- _send("to @AM-MCL set AutoEmotionSpeak = 0");
460- }
461- });
462- //
431+// JMenuItem itemAutoGazeOn = new JMenuItem("AutoGaze ON");
432+// menuAuto.add(itemAutoGazeOn);
433+// itemAutoGazeOn.addActionListener( new ActionListener() {
434+// public void actionPerformed(ActionEvent e) {
435+// _send("to @AM-MCL set AutoGaze = 1");
436+// }
437+// });
438+// //
439+// JMenuItem itemAutoGazeOff = new JMenuItem("AutoGaze OFF");
440+// menuAuto.add(itemAutoGazeOff);
441+// itemAutoGazeOff.addActionListener( new ActionListener() {
442+// public void actionPerformed(ActionEvent e) {
443+// _send("to @AM-MCL set AutoGaze = 0");
444+// }
445+// });
446+// //
447+// JMenuItem itemEmotionSpeakOn = new JMenuItem("EmotionSpeak ON");
448+// menuAuto.add(itemEmotionSpeakOn);
449+// itemEmotionSpeakOn.addActionListener( new ActionListener() {
450+// public void actionPerformed(ActionEvent e) {
451+// _send("to @AM-MCL set AutoEmotionSpeak = 1");
452+// }
453+// });
454+// //
455+// JMenuItem itemEmotionSpeakOff = new JMenuItem("EmotionSpeak OFF");
456+// menuAuto.add(itemEmotionSpeakOff);
457+// itemEmotionSpeakOff.addActionListener( new ActionListener() {
458+// public void actionPerformed(ActionEvent e) {
459+// _send("to @AM-MCL set AutoEmotionSpeak = 0");
460+// }
461+// });
462+// //
463463
464464 // Expression
465465 JMenu menuExp = new JMenu("Expression");
Show on old repository browser