Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServerEngine

Hierarchy

  • EventEmitter
    • ServerEngine

Index

Constructors

constructor

Properties

_rejectedSessionCount

_rejectedSessionCount: number = 0

addressSpace

addressSpace: AddressSpace | null

Optional clientDescription

clientDescription: ApplicationDescription

historyServerCapabilities

historyServerCapabilities: HistoryServerCapabilities

isAuditing

isAuditing: boolean

serverCapabilities

serverCapabilities: ServerCapabilities

serverDiagnosticsEnabled

serverDiagnosticsEnabled: boolean

serverDiagnosticsSummary

serverDiagnosticsSummary: ServerDiagnosticsSummaryDataType

serverStatus

serverStatus: ServerStatusDataType

Static defaultMaxListeners

defaultMaxListeners: number

Static registry

registry: ObjectRegistry = new ObjectRegistry()

Accessors

buildInfo

  • get buildInfo(): BuildInfo

cumulatedSessionCount

  • get cumulatedSessionCount(): number

cumulatedSubscriptionCount

  • get cumulatedSubscriptionCount(): number

currentSessionCount

  • get currentSessionCount(): number

currentSubscriptionCount

  • get currentSubscriptionCount(): number

currentTime

  • get currentTime(): Date

publishingIntervalCount

  • get publishingIntervalCount(): number

rejectedRequestsCount

  • get rejectedRequestsCount(): number

rejectedSessionCount

  • get rejectedSessionCount(): number

serverName

  • get serverName(): string

serverNameUrn

  • get serverNameUrn(): string

serverNamespaceUrn

  • get serverNamespaceUrn(): string

sessionAbortCount

  • get sessionAbortCount(): number

sessionTimeoutCount

  • get sessionTimeoutCount(): number

startTime

  • get startTime(): Date

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

browse

  • browse(nodesToBrowse: BrowseDescription[], context?: SessionContext): BrowseResult[]

browsePath

  • browsePath(browsePath: BrowsePath): BrowsePathResult

browseSingleNode

  • browseSingleNode(nodeId: NodeIdLike, browseDescription: BrowseDescription, context?: SessionContext): BrowseResult

closeSession

  • closeSession(authenticationToken: NodeId, deleteSubscriptions: boolean, reason: string): void

createSession

deleteOrphanSubscription

  • deleteOrphanSubscription(subscription: Subscription): StatusCode

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>

findOrphanSubscription

  • findOrphanSubscription(subscriptionId: number): Subscription | null

findSubscription

  • findSubscription(subscriptionId: number): Subscription | null

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getOldestUnactivatedSession

getServerDiagnosticsEnabledFlag

  • getServerDiagnosticsEnabledFlag(): boolean

getSession

  • getSession(authenticationToken: NodeId, activeOnly?: boolean): ServerSession | null

historyRead

  • historyRead(context: SessionContext, historyReadRequest: HistoryReadRequest, callback: function): void
  • @method historyRead @param context {SessionContext} @param historyReadRequest {HistoryReadRequest} @param historyReadRequest.requestHeader {RequestHeader} @param historyReadRequest.historyReadDetails {HistoryReadDetails} @param historyReadRequest.timestampsToReturn {TimestampsToReturn} @param historyReadRequest.releaseContinuationPoints {Boolean} @param historyReadRequest.nodesToRead {HistoryReadValueId[]} @param callback @param callback.err @param callback.results {HistoryReadResult[]}

    Parameters

    • context: SessionContext
    • historyReadRequest: HistoryReadRequest
    • callback: function
        • (err: Error | null, results: HistoryReadResult[]): void
        • Parameters

          • err: Error | null
          • results: HistoryReadResult[]

          Returns void

    Returns void

historyReadSingleNode

  • historyReadSingleNode(context: SessionContext, nodeId: NodeId, attributeId: AttributeIds, historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, timestampsToReturn: TimestampsToReturn, callback: function): void
  • Parameters

    • context: SessionContext
    • nodeId: NodeId
    • attributeId: AttributeIds
    • historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails
    • timestampsToReturn: TimestampsToReturn
    • callback: function
        • (err: Error | null, results?: HistoryReadResult): void
        • Parameters

          • err: Error | null
          • Optional results: HistoryReadResult

          Returns void

    Returns void

initialize

  • initialize(options: any, callback: any): void

listenerCount

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

    • type: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

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[]

read

  • read(context: SessionContext, readRequest: ReadRequest): DataValue[]
  • Maximum age of the value to be read in milliseconds. The age of the value is based on the difference between the ServerTimestamp and the time when the Server starts processing the request. For example if the Client specifies a maxAge of 500 milliseconds and it takes 100 milliseconds until the Server starts processing the request, the age of the returned value could be 600 milliseconds prior to the time it was requested. If the Server has one or more values of an Attribute that are within the maximum age, it can return any one of the values or it can read a new value from the data source. The number of values of an Attribute that a Server has depends on the number of MonitoredItems that are defined for the Attribute. In any case, the Client can make no assumption about which copy of the data will be returned. If the Server does not have a value that is within the maximum age, it shall attempt to read a new value from the data source. If the Server cannot meet the requested maxAge, it returns its 'best effort' value rather than rejecting the request. This may occur when the time it takes the Server to process and return the new data value after it has been accessed is greater than the specified maximum age. If maxAge is set to 0, the Server shall attempt to read a new value from the data source. If maxAge is set to the max Int32 value or greater, the Server shall attempt to geta cached value. Negative values are invalid for maxAge.

    @return an array of DataValue

    Parameters

    • context: SessionContext
    • readRequest: ReadRequest

    Returns DataValue[]

readSingleNode

  • readSingleNode(context: SessionContext, nodeId: NodeId, attributeId: AttributeIds, timestampsToReturn?: TimestampsToReturn): DataValue
  • method

    readSingleNode

    Parameters

    • context: SessionContext
    • nodeId: NodeId
    • attributeId: AttributeIds
    • Optional timestampsToReturn: TimestampsToReturn

    Returns DataValue

    DataValue

refreshValues

  • refreshValues(nodesToRefresh: any, callback: function): void
  • performs a call to asyncRefresh on all variable nodes that provide an async refresh func.

    method

    refreshValues

    async

    Parameters

    • nodesToRefresh: any

      an array containing the node to consider Each element of the array shall be of the form { nodeId: , attributeIds: }.

    • callback: function
        • (err: Error | null, dataValues?: DataValue[]): void
        • Parameters

          • err: Error | null
          • Optional dataValues: DataValue[]

          Returns void

    Returns void

registerShutdownTask

  • registerShutdownTask(task: any): 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

secondsTillShutdown

  • secondsTillShutdown(): number
  • method

    secondsTillShutdown

    Returns number

    the approximate number of seconds until the server will be shut down. The value is only relevant once the state changes into SHUTDOWN.

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setServerState

  • setServerState(serverState: ServerState): void

shutdown

  • shutdown(): void

transferSubscription

  • transferSubscription(session: ServerSession, subscriptionId: number, sendInitialValues: boolean): TransferResult
  • method

    transferSubscription

    Parameters

    • session: ServerSession

      the new session that will own the subscription

    • subscriptionId: number

      the subscription Id to transfer

    • sendInitialValues: boolean

      true if initial values will be resent.

    Returns TransferResult

write

  • write(context: SessionContext, nodesToWrite: WriteValue[], callback: function): void
  • write a collection of nodes

    method

    write

    async

    Parameters

    • context: SessionContext
    • nodesToWrite: WriteValue[]
    • callback: function
        • (err: Error | null, statusCodes?: StatusCode[]): void
        • Parameters

          • err: Error | null
          • Optional statusCodes: StatusCode[]

          Returns void

    Returns void

writeSingleNode

  • writeSingleNode(context: SessionContext, writeValue: WriteValue, callback: function): void
  • method

    writeSingleNode

    async

    Parameters

    • context: SessionContext
    • writeValue: WriteValue
    • callback: function
        • (err: Error | null, statusCode?: StatusCode): void
        • Parameters

          • err: Error | null
          • Optional statusCode: StatusCode

          Returns void

    Returns 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