Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/HomeautomationSeqPP/   (Vienna Development Method ©)  Datei vom 13.4.2020 mit Größe 878 B image not shown  

Quelle  Thermostat.vdmpp

  Sprache: VDM
 

--The Thermostat Class

-----------------------------------------------
-- Author: Sune Wolff - 20022462
-- Created: 21/4 - 2008
-- Updated:
-- Description:  Thermostat sub class
-----------------------------------------------

--
-- class definition
--
class Thermostat is subclass of Actuator

--
-- Operations definition section
--
operations

public Thermostat: nat * NetworkTypes`nodeType ==> Thermostat
 Thermostat (id, type) ==
  (ID := id;
  Type := type;
  Corr := <NONE>;
  );

public Step: () ==> ()
 Step() ==
  (if (Corr = <INC>)
  then World`env.IncTemp()
  elseif (Corr = <DEC>)
  then World`env.DecTemp();
  );

public SetCorrection: NetworkTypes`correction ==> ()
 SetCorrection(cor) ==
  Corr := cor
pre (cor = <INC>) or (cor = <DEC>) or (cor = <NONE>);

public GetCorrection: () ==> NetworkTypes`correction
 GetCorrection() ==
  return Corr;

end Thermostat

Messung V0.5 in Prozent
C=71 H=100 G=86

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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 und die Messung sind noch experimentell.