package galatea.io.plugins;

import galatea.dialog.InterpretedEvent;
import galatea.submodule.AbstractSubModule;

public class MotionSubModule extends AbstractSubModule 
{
//	public MotionSubModule() {
//	}

	public boolean receiveFromDevice(String ev) {
		if (ev.equals("accept-yes")) {
			String text = "はい";
			String slot = "form1.takeout";
			String val = "y";
			receiver_.receiveInterpreted(InterpretedEvent.newInstance(
					"MOTION", text, slot, val));
			logger_.inputEventReceived(text + "(" + slot + "=" + val + ")");
		} else if (ev.equals("accept-doubtful")) {
			String text = "いいえ";
			String slot = "form1.takeout";
			String val = "n";
			receiver_.receiveInterpreted(InterpretedEvent.newInstance(
					"MOTION", text, slot, val));
			logger_.inputEventReceived(text + "(" + slot + "=" + val + ")");
		}
		return true;
	}
}
