How to use the node-opcua-types.HistoryReadResult function in node-opcua-types

To help you get started, we’ve selected a few node-opcua-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-address-space / src / ua_variable.ts View on Github external
public _historyRead(
        context: SessionContext,
        historyReadDetails:
            ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails,
        indexRange: NumericRange | null,
        dataEncoding: QualifiedNameLike | null,
        continuationPoint: ContinuationPoint | null,
        callback: Callback
    ): any {
        const result = new HistoryReadResult({
            statusCode: StatusCodes.BadHistoryOperationUnsupported
        });
        callback(null, result);
    }
github node-opcua / node-opcua / packages / node-opcua-address-space / src / ua_variable.ts View on Github external
context: SessionContext,
        historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails,
        indexRange: NumericRange | null,
        dataEncoding: QualifiedNameLike | null,
        continuationPoint?: ContinuationPoint | null,
        callback?: Callback
    ): any {

        if (!callback) {
            callback = continuationPoint as any as Callback;
            continuationPoint = undefined;
        }
        assert(context instanceof SessionContext);
        assert(callback instanceof Function);
        if (typeof this._historyRead !== "function") {
            return callback(null, new HistoryReadResult({ statusCode: StatusCodes.BadNotReadable }));
        }
        this._historyRead(context, historyReadDetails, indexRange, dataEncoding, continuationPoint || null, callback);
    }