dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_stsw_term_ack.cpp
diff --git a/dol/src/dol/visitor/hdsd/scd/fsm/scd_stsw_term_ack.cpp b/dol/src/dol/visitor/hdsd/scd/fsm/scd_stsw_term_ack.cpp
new file mode 100644 (file)
index 0000000..5fc0a51
--- /dev/null
@@ -0,0 +1,36 @@
+#include "fsm/scd_stsw_term_ack.h"
+
+#include "scd_logging.h"
+#include "scd_exception.h"
+#include "scd_cont_slave_wrapper.h"
+
+
+void scd_stsw_term_ack::recv_term_nack()
+{
+    scd_warn("received term_nack message in wrong state");
+}
+
+
+void scd_stsw_term_ack::recv_term_ack()
+{
+    scd_warn("received term_nack message in wrong state");
+}
+
+
+void scd_stsw_term_ack::send_term_nack()
+{
+    scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_TERM_NACK);
+    _fsm.send_command(cmd);
+    _fsm.load_state();
+}
+
+
+void scd_stsw_term_ack::send_term()
+{
+    scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_TERM);
+    _fsm.send_command(cmd);
+    _fsm.set_state(_st_terminate);
+}
+
+
+bool scd_stsw_term_ack::term_ack() const { return true; }