Download Model-Driven Development and Simulation of - Hu
Transcript
3 Related Work SDL Module SDL System SDL Environment Interface SDL Kernel named pipe ns-2 Simulator Figure 3.9: ns+SDL components [86]. • Dispatching SDL transitions: the SDL Kernel triggers the transition scheduler and dispatches scheduled transitions. • Handling of messages between different SDL systems: message exchange between different SDL systems is controlled by ns-2. The SDL Kernel provides encoding and decoding functions for the messages. • Handling of control messages: control messages are exchanged between ns-2 and the SDL kernel to query the system time or to return control to ns-2 after all pending transitions have been executed. • Time synchronization between ns-2 and the SDL system: to support a global time, the time of ns-2 is synchronized with the time of all SDL systems under simulation. Simulation runs can be made reproducible if concurrent behavior is avoided. This is achieved by two measures. First, the tight synchronization between ns-2 and the SDL kernel ensures that only one SDL system is executed at any point in time. Second, the ns-2 scheduler ensures that transitions that are fireable at the same simulation instant are executed sequentially. SDL Environment Interface To implement open SDL systems (systems interacting with their environment), an environment interface satisfying the semantics of the SDL signaling mechanism is needed. The SDL Environment Interface allows SDL signals to be exchanged between open SDL systems via a network configured from ns-2 components. It can be configured to interface either to ns-2 or to physical hardware. This has the advantage that code for simulation and production purposes can be automatically generated from the same SDL specification with the same code generator. 34