dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_stsw_init.cpp
1 #include "fsm/scd_stsw_init.h"
2
3 #include "scd_logging.h"
4 #include "scd_exception.h"
5 #include "scd_cont_slave_wrapper.h"
6
7
8 void scd_stsw_init::set_connected()
9 {
10     _sim.get_poller().register_handler(_fsm, SOCK_EV_READ | SOCK_EV_CLOSE);
11     _fsm.set_state(_st_busy);
12 }
13
14
15 void scd_stsw_init::set_failed()
16 {
17     _fsm.set_state(_st_failed);
18 }
19
20
21 void scd_stsw_init::set_idle(const sc_core::sc_time& time)
22 {
23     scd_error("init: illegal call to set_idle()");
24     throw scd_exception("illegal call");
25 }
26
27
28 void scd_stsw_init::set_busy()
29 {
30     scd_error("init: illegal call to set_idle()");
31     throw scd_exception("illegal call");
32 }
33
34
35 void scd_stsw_init::set_done()
36 {
37     scd_error("init: illegal call to set_done()");
38     throw scd_exception("illegal call");
39 }
40
41
42 void scd_stsw_init::set_fail()
43 {
44     _fsm.set_state(_st_failed);
45 }
46
47
48 void scd_stsw_init::process() {}
49
50
51 bool scd_stsw_init::active() const { return false; }
52
53
54 bool scd_stsw_init::advance_time() const
55 {
56     scd_error("illegal call to advance_time()");
57     throw scd_exception("illegal call");
58 }