products/Sources/formale Sprachen/VDM/VDMRT/HomeAutomationRT image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: World.vdmrt   Sprache: VDM

Original von: VDM©

-----------------------------------------------
-- Author: Sune Wolff - 20022462
-- Created: 20/4 - 2008
-- Updated:
-- Description:  World class in the HomeAutomation project
-----------------------------------------------

--
-- class definition
--
class World

--
-- instance variables
--
instance variables

  public static env : [Environment] := nil;

--
-- Operations definition section
--
operations
 
public World: () ==> World
World() ==
 (env := new Environment("scenario.txt");
  HA`Host.AddNode(HA`TempNode.GetID(),HA`TempNode.GetType());
  HA`Host.AddNode(HA`HumidNode.GetID(),HA`HumidNode.GetType());
  HA`Host.AddNode(HA`ThermNode.GetID(),HA`ThermNode.GetType());
  HA`Host.AddNode(HA`WinNode.GetID(),HA`WinNode.GetType());

  start(HA`TempNode);
  start(HA`HumidNode);
  start(HA`ThermNode);
  start(HA`WinNode);
  start(HA`Host);
 );

public Run: () ==> ()
Run() ==
 (-- start environment creating input
  start(env);
  -- wait til environment has finished creating input
  env.IsFinished();
  -- kill HostController thread
  --HA`Host.Finish();
 );

end World

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

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.


Bot Zugriff