Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TcBooleanType

Class representing a BOOL Type in the Target PLC.

Hierarchy

Index

Constructors

Protected constructor

Accessors

adst

  • get adst(): number

context

defaultBuffer

  • get defaultBuffer(): Buffer | undefined
  • set defaultBuffer(val: Buffer | undefined): void

defaultValue

  • get defaultValue(): boolean

ignored

  • get ignored(): boolean
  • set ignored(val: boolean): void

name

  • get name(): string

offset

  • get offset(): number
  • set offset(val: number): void
  • The memory offset, relative to its parent, if the TcType is a child

    Returns number

  • The memory offset, relative to its parent, if the TcType is a child

    Parameters

    • val: number

    Returns void

onChange

  • get onChange(): string
  • set onChange(val: string): void
  • Alias to use, in place of the default 'changed' event, when a TcSymbol of this type is constructed

    Returns string

  • Alias to use, in place of the default 'changed' event, when a TcSymbol of this type is constructed

    Parameters

    • val: string

    Returns void

onClear

  • get onClear(): string
  • set onClear(val: string): void
  • Alias to use, in place of the default 'cleared' event, when a TcSymbol of this type is constructed

    Returns string

  • Alias to use, in place of the default 'cleared' event, when a TcSymbol of this type is constructed

    Parameters

    • val: string

    Returns void

onGet

  • get onGet(): string
  • set onGet(val: string): void
  • Alias to use, in place of the default 'get' event, when a TcSymbol of this type is constructed

    Returns string

  • Alias to use, in place of the default 'get' event, when a TcSymbol of this type is constructed

    Parameters

    • val: string

    Returns void

onSet

  • get onSet(): string
  • set onSet(val: string): void
  • Alias to use, in place of the default 'set' event, when a TcSymbol of this type is constructed

    Returns string

  • Alias to use, in place of the default 'set' event, when a TcSymbol of this type is constructed

    Parameters

    • val: string

    Returns void

readOnly

  • get readOnly(): boolean
  • set readOnly(val: boolean): void

size

  • get size(): number
  • set size(val: number): void

Methods

Protected __clone

  • Internal function for applying mutations to the created clone. Used for code reduction

    throws

    TcComIsInvalidException - Attempting to use an invalidated TcCom Object

    throws

    TcComToRawException - Error occurred when transforming value to raw data

    Parameters

    • type: TcType

      the TcType, which can be potentially mutated

    • Optional mutator: TcTypeBase

      The mutator which can be applied to the TcType

    Returns Promise<TcType | undefined>

    • Either the clone TcType or undefined if cloning failed

Protected __getParameter

  • __getParameter(name: string, value: string): void
  • Internal function, which analyses attribute data from the Type ADS Data and adjusts aspects of this TcType

    Mutations supported :

    • ReadOnly
    • Ignored
    • OnSet
    • OnGet
    • OnClear
    • OnChange
    • Default

    Parameters

    • name: string

      name of the Attribute

    • value: string

      value of the Attribute

    Returns void

clone

  • Creates a clone with an optional mutation of this TcType

    throws

    TcComIsInvalidException - Attempting to use an invalidated TcCom Object

    throws

    TcComToRawException - Error occurred when transforming value to raw data

    Parameters

    • Optional mutator: TcTypeBase

      Optional mutator, which can be applied to the clone

    Returns Promise<TcType | undefined>

    • Either the clone TcType or undefined if cloning failed

extend

  • Extends the current TcType with the provided TcTypeInfo. The default extension can either create a mutation of the current TcType or transform the TcType into an array

    Parameters

    • adsTypeData: TcTypeInfo

      Data with which to extends the TcType

    Returns Promise<TcType | undefined>

    • Either the extends TcType or undefined if extension failed

instance

  • Creates an instance of a Type BOOL PLC Symbol, based on this TcType

    Parameters

    • path: string

      Path of the created TcSymbol

    • parent: TcSymbol

      Parent of the created TcSymbol

    • pointer: TcSymbolPointer

      Memory location of created TcSymbol in the Target PLC

    • Default value debug: boolean = false

      If enabled, will produce debug information

    Returns TcSymbol

    • An TcSymbol instance of a Symbol of type BOOL

mutate

  • Clones this TcType and mutates it, with additional attributes from the mutator

    Parameters

    • mutator: TcTypeBase

      Will use the Attributes and Offset to create a mutation of this TcType

    Returns void

Static create

  • Creates an instance of TcBooleanType with default values transformed to raw data

    throws

    TcComIsInvalidException - Attempting to use an invalidated TcCom Object

    throws

    TcComToRawException - Error occurred when transforming value to raw data

    Parameters

    • context: TcContext

      The TcContext, to which this Type belongs

    • typeData: TcTypeInfo | TcBooleanType

      The information, from which the TcType is build

    • Default value debug: boolean = false

      If enabled, will produce debug information

    Returns Promise<TcBooleanType | undefined>

    • An initialized instance of TcBooleanType if it is not ignored

Generated using TypeDoc