Bool

Classe représentant un booléen.

      

import {Bool} from "@adclz/plcdatabuilder/types"
 
const MyBool = new Bool({})
const MyBool: 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 BaseTypeParameters et PrimitivePlcParams.
Référez à la section Base Commune.
Bool.prototype.constructor = (Params: PlcBooleanTypeParameters) => Bool

Params

interface PlcBooleanTypeParameters extends PrimitivePlcParams {
    DefaultValue?: boolean
}

Paramètres de construction d'un booléen.

DefaultValue

PlcBooleanTypeParameters.DefaultValue = boolean | undefined

Valeur 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 MyBool: Bool
const MyBool2 = new Bool({
const MyBool2: Bool
DefaultValue: true,
ExternalAccessible: false,
ExternalVisible: false,
ExternalWritable: false
})