Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Android/prebuilts/prebuilts/module_sdk/StatsD/7/     Datei vom 26.5.2026 mit Größe 6 kB image not shown  

SSL HumidSensor.vdmpp   Sprache: VDM

 

class HumidSensor is subclass of Sensor, BaseThread

instance variables

finished : bool := false;

operations

public HumidSensor: nat * NetworkTypes`nodeType * nat * Surroundings * nat1 * bool ==> HumidSensor
HumidSensor (id, type, val, envir, p, isP) ==
 (ID := id;
  Type := type;
  Value := val;
  Env := envir;
  period := p;
  isPeriodic := isP;
 );

public Finish: () ==> ()
Finish() ==
  finished := true;

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

protected Step: () ==> ()
Step() ==
  Value := Env.ReadHumid();

sync
 
  per IsFinished => finished;

--thread
-- (--World`timerRef.RegisterThread();
  
--  while true 
--  do 
--   (Value := Env.ReadHumid();
--    World`timerRef.WaitRelative(3);--World`timerRef.stepLength);
--   )
-- )

end HumidSensor

Messung
CHZG
999510097

¤ Dauer der Verarbeitung: 0.14 Sekunden  ¤

*Bot Zugriff