Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMRT/ChessWayRT/   (Wiener Entwicklungsmethode ©)  Datei vom 13.4.2020 mit Größe 633 B image not shown  

Quelle  OnOffSwitch.vdmrt   Sprache: VDM

 
% OnOffSwitch.vdmrt

\subsubsection{Turning the ChessWay ON or OFF -- the \texttt{OnOffSwitch} class}

The \texttt{OnOffSwitch} class obtains the main power switch status from the environment
and returns a Boolean value.

\begin{vdm_al}
class OnOffSwitch

instance variables
  -- link back to the controller managing this resource
  private mController : Controller;

operations
  public OnOffSwitch: Controller ==> OnOffSwitch
  OnOffSwitch (pController) == mController := pController;

  public getStatus: () ==> bool
  getStatus () == 
    duration (0)
      return mController.getValue("ONOFF") > 0;

end OnOffSwitch
\end{vdm_al}

94%


¤ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.