ads-client | Beckhoff TwinCAT ADS client library for Node.js
    Preparing search index...

    Interface ActiveSubscription<T>

    Object containing information for a single active subscription

    interface ActiveSubscription<T = any> {
        internal: boolean;
        latestData?: SubscriptionData<T>;
        notificationHandle: number;
        parseNotification: (
            data: Buffer,
            timestamp: Date,
        ) => Promise<SubscriptionData<T>>;
        remoteAddress: AmsAddress;
        settings: SubscriptionSettings<T>;
        symbol?: AdsSymbol;
        targetOpts?: Partial<AmsAddress>;
        unsubscribe: () => Promise<void>;
    }

    Type Parameters

    • T = any
    Index

    Properties

    internal: boolean

    True = This subscription is ads-client internal, not created by user

    latestData?: SubscriptionData<T>

    Latest data that has been received (if any)

    notificationHandle: number

    Notification handle (number) of this subscription's ADS device notification

    parseNotification: (
        data: Buffer,
        timestamp: Date,
    ) => Promise<SubscriptionData<T>>

    Function that parses received raw data to a variable

    remoteAddress: AmsAddress

    Remote AMS address and port

    Settings for this subscription

    symbol?: AdsSymbol

    Symbo of the target variable (if any)

    targetOpts?: Partial<AmsAddress>

    Optional target settings that override values in settings (NOTE: If used, no caching is available -> worse performance)

    unsubscribe: () => Promise<void>

    Function that can be called to unsubscribe (same as client.unsubscribe(...))