The World constructor its the responsible for connect systemand environment, and its invoked with a scenario and a mode to test.
\begin{vdm_al} operations
public World: seqofchar * Mode ==> World
World(filename,mode) ==
( -- create an environment
env := new Environment(filename);
-- bind leads to the environment
env.addLeadSensor(Pacemaker`atriaLead);
env.addLeadSensor(Pacemaker`ventricleLead);
-- bind accelerometer to the environment
env.addAccelerometer(Pacemaker`accelerometer);
-- bind leads to the controler
Pacemaker`heartController.addLeadPacer(Pacemaker`atriaLead);
Pacemaker`heartController.addLeadPacer(Pacemaker`ventricleLead);
-- set up mode
Pacemaker`heartController.setMode(mode);
);
\end{vdm_al}
And Run is the operation that starts a test sequence.
\begin{vdm_al} public Run: () ==> ()
Run () == (env.Run(); env.showResult());
end World
\end{vdm_al}
\subsection*{Test coverage}
\begin{rtinfo}
{tc.info}[World]
\end{rtinfo}
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.