Bool
Classe représentant un booléen.
import {Bool } from "@adclz/plcdatabuilder/types" const MyBool = new Bool ({})
class Bool extends PlcBoolType {
override readonly Type = PrimitivePlcTypes.Bool
override readonly Offset: Offset = 0.1
declare DefaultValue: boolean;
constructor (Params: PlcBooleanTypeParameters) {
super(Params)
this.DefaultValue = Params.DefaultValue ?? false
}
}🏗️ Constructeur
Les paramètres du constructeur hérite de
Référez à la section
BaseTypeParameters et PrimitivePlcParams. Référez à la section
Base Commune.Bool.prototype.constructor = (Params: PlcBooleanTypeParameters) => BoolParams
interface PlcBooleanTypeParameters extends PrimitivePlcParams {
DefaultValue?: boolean
}Paramètres de construction d'un booléen.
DefaultValue
PlcBooleanTypeParameters.DefaultValue = boolean | undefinedValeur par défaut du booléen. true ou false.
Par défaut: false si non précisé.
Exemple
import {Bool } from "@adclz/plcdatabuilder/types" const MyBool = new Bool ({})const MyBool2 = new Bool ({ DefaultValue : true, ExternalAccessible : false, ExternalVisible : false, ExternalWritable : false})
Table of Contents