dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / scd_cont_man.h
diff --git a/dol/src/dol/visitor/hdsd/scd/scd_cont_man.h b/dol/src/dol/visitor/hdsd/scd/scd_cont_man.h
new file mode 100644 (file)
index 0000000..5499984
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef SCD_CONT_MAN_H
+#define SCD_CONT_MAN_H
+
+#include <string>
+
+#include "fsm/scd_cont_fsm_if.h"
+
+
+const bool SCD_MASTER = true;
+const bool SCD_SLAVE = false;
+
+const int SCD_CONT_DELAY = 20;
+
+/**
+ * Control manager. Shall be set up before the simulation is initialized.
+ */
+class scd_cont_man : public scd_cont_fsm_if
+{
+public:
+    virtual ~scd_cont_man() {};
+
+    /**
+     * Sets the master simulator for a slave.
+     * \param host the FQDN or IP of the master simulator
+     * \param port the TCP port of the master simulator
+     * \exception scd_exception if the simulator is not a slave
+     */
+    virtual void set_master(const std::string& host, uint16_t port) = 0;
+    
+    /**
+     * Registers a slave simulator for the master.
+     * \param name the name of the slave
+     * \exception scd_exception if the simulator is not the master
+     */
+    virtual void register_slave(const std::string& name) = 0;
+};
+
+#endif