54999849c9097153a0de395e5c23d195b1c189d2
[jump.git] / dol / src / dol / visitor / hdsd / scd / scd_cont_man.h
1 #ifndef SCD_CONT_MAN_H
2 #define SCD_CONT_MAN_H
3
4 #include <string>
5
6 #include "fsm/scd_cont_fsm_if.h"
7
8
9 const bool SCD_MASTER = true;
10 const bool SCD_SLAVE = false;
11
12 const int SCD_CONT_DELAY = 20;
13
14 /**
15  * Control manager. Shall be set up before the simulation is initialized.
16  */
17 class scd_cont_man : public scd_cont_fsm_if
18 {
19 public:
20     virtual ~scd_cont_man() {};
21
22     /**
23      * Sets the master simulator for a slave.
24      * \param host the FQDN or IP of the master simulator
25      * \param port the TCP port of the master simulator
26      * \exception scd_exception if the simulator is not a slave
27      */
28     virtual void set_master(const std::string& host, uint16_t port) = 0;
29     
30     /**
31      * Registers a slave simulator for the master.
32      * \param name the name of the slave
33      * \exception scd_exception if the simulator is not the master
34      */
35     virtual void register_slave(const std::string& name) = 0;
36 };
37
38 #endif