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

Quelle  HumidSensor.vdmrt

  Sprache: VDM
 

-----------------------------------------------
-- Author: Sune Wolff - 20022462
-- Created: 21/4 - 2008
-- Updated:
-- Description:  Humiditor sensor class for HomeAutomation project
-----------------------------------------------

--
-- class definition
--
class HumidSensor is subclass of Sensor

--
-- instance variables
--
instance variables

  finished : bool := false;

--
-- Operations definition section
--
operations

public HumidSensor: nat * NetworkTypes`nodeType * nat ==> HumidSensor
HumidSensor (id, type, val) ==
 (ID := id;
  Type := type;
  Value := val;
 );

public Step: () ==> ()
Step () ==
  --cycles(1E3)
  Value := World`env.ReadHumid();

public IsFinished: () ==> ()
IsFinished() ==
  skip;

sync
  --mutex(PeriodicOp); -- ADDED
  per IsFinished => finished;

--
-- Thread definition section
--
thread

-- period of thread (period, jitter, delay, offset)
periodic(1000E6,0,0,0) (Step)

end HumidSensor

Messung V0.5 in Prozent
C=61 H=90 G=76

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

*© 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.