Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MonitoredItem

a server side monitored item

  • Once created, the MonitoredItem will raised an "samplingEvent" event every "samplingInterval" millisecond until {{#crossLink "MonitoredItem/terminate:method"}}{{/crossLink}} is called.

  • It is up to the event receiver to call {{#crossLink "MonitoredItem/recordValue:method"}}{{/crossLink}}.

Hierarchy

  • EventEmitter
    • MonitoredItem

Index

Constructors

constructor

Properties

$subscription

$subscription: any

Optional _samplingId

_samplingId: TimerKey | string

Optional clientHandle

clientHandle: number

discardOldest

discardOldest: boolean = true

filter

filter: MonitoringFilter | null

itemToMonitor

itemToMonitor: any

monitoredItemId

monitoredItemId: number

monitoringMode

monitoringMode: MonitoringMode

Optional oldDataValue

oldDataValue: DataValue

overflow

overflow: boolean

queueSize

queueSize: number = 0

samplingFunc

samplingFunc: function | null = null

samplingInterval

samplingInterval: number = -1

timestampsToReturn

timestampsToReturn: TimestampsToReturn

Static defaultMaxListeners

defaultMaxListeners: number

Static defaultSamplingInterval

defaultSamplingInterval: number = 1500

Static maximumSamplingInterval

maximumSamplingInterval: number = 1000 * 60 * 60

Static minimumSamplingInterval

minimumSamplingInterval: number = 50

Static registry

registry: ObjectRegistry = new ObjectRegistry()

Accessors

hasMonitoredItemNotifications

  • get hasMonitoredItemNotifications(): boolean

isSampling

  • get isSampling(): boolean

node

  • get node(): BaseNode | null
  • set node(someNode: BaseNode | null): void

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

dispose

  • dispose(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

extractMonitoredItemNotifications

  • extractMonitoredItemNotifications(): (MonitoredItemNotification | EventFieldList)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

modify

  • modify(timestampsToReturn: TimestampsToReturn, monitoringParameters: MonitoringParameters): MonitoredItemModifyResult

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

Private recordValue

  • recordValue(dataValue: DataValue, skipChangeTest: boolean, indexRange?: NumericRange): void
  • Parameters

    • dataValue: DataValue

      the whole dataValue

    • skipChangeTest: boolean

      indicates whether recordValue should not check that dataValue is really different from previous one, ( by checking timestamps but also variant value)

    • Optional indexRange: NumericRange

    Returns void

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

resendInitialValues

  • resendInitialValues(): void

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setMonitoringMode

  • setMonitoringMode(monitoringMode: MonitoringMode): void

setNode

  • setNode(node: BaseNode): void

terminate

  • terminate(): void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc