Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TcBooleanSymbol

Class representing an instance of a PLC Symbol of Type BOOL.

Hierarchy

Indexable

[key: string]: TcSymbol | TcSymbolMethod

TcSymbols are indexable, in case they are structured types, and can nest children TcSymbols. Alternatively, if a TcSymbol has Rpc Methods enabled, this methods can be also invoked over the index.

Index

Constructors

constructor

  • Constructs a TcSymbol, which is designed to interface with a BOOL Symbol on the Target PLC.

    Parameters

    • path: string

      The Path of this Symbol, relative to its origin point

    • parent: TcSymbol

      Potential parent of this TcSymbol and to whom events will propagate to

    • pointer: TcSymbolPointer

      The memory location of the Target PLC Symbol

    • params: TcBooleanType

      The Type parameters of this BOOL Symbol

    • Default value debug: boolean = false

      If enabled, will produce debug information

    Returns TcBooleanSymbol

Events

$on

Accessors

$binding

$get

  • get $get(): Promise<boolean>

$parent

$path

  • get $path(): string

$readOnly

  • get $readOnly(): boolean

Methods

$clear

  • $clear(): Promise<void>

$off

  • $off(eventName: string, listener: (e: any) => void): TcSymbol
  • Removes a listener from the specified event

    Parameters

    • eventName: string

      The event name, from which the listener is to be removed

    • listener: (e: any) => void

      The listener, which is to be removed from the specified event

        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns TcSymbol

$onInvalidated

  • $onInvalidated(callback: (symbol: TcSymbol) => void): void
  • Attached the provided callback, which will be called when the `TcSymbol becomes invalidated

    Parameters

    • callback: (symbol: TcSymbol) => void

      The function, which is to be called upon invalidation

    Returns void

$once

  • $once(eventName: string, listener: (e: any) => void): TcSymbol
  • Attached a listener to an event, which is only invoked once. For the full list of events, see TcSymbol.$on()

    Parameters

    • eventName: string

      The event name, which the listener will listen for

    • listener: (e: any) => void

      The listener, which is called when the event is emitted

        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns TcSymbol

$set

  • $set(value: boolean): Promise<boolean>

$subscribe

  • $subscribe(sampling?: number): Promise<void>
  • Activates value change detection of the Target PLC Symbol. The sampling rate can be explicitly set, in case the value changes uneseceraly too fast.

    throws

    TcBindingIsInvalidException - Attempting operation on an invalidated TcBinding

    throws

    TcComIsInvalidException - Attempting operation on an invalidated TcCom Object

    throws

    TcComSubscribeException - An error occurred when subscribing to the Symbol

    Parameters

    • Default value sampling: number = 10

      The speed at which change in the Target PLC Symbol value is detected

    Returns Promise<void>

$unsubscribe

  • $unsubscribe(): Promise<void>

Protected __invalidate

  • __invalidate(): void
  • Invalidates the TcBindingof this symbol, as well as, if a callback as provided in case of invalidation - will invoke it

    Returns void

Generated using TypeDoc