Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
/**
* @module services.read
*/
//--------------------------------------------------------------------------------
// OPCUA Part 4 $5.10 : Attribute Service Set
// This Service Set provides Service sto access Attributes that are part of Nodes.
//--------------------------------------------------------------------------------
/**
* @class TimestampsToReturn
*/
exports.TimestampsToReturn = require("node-opcua-data-value").TimestampsToReturn;
/**
* @class AttributeIds
*/
exports.AttributeIds = require("node-opcua-data-model").AttributeIds;
/**
* @class AttributeNameById
*/
exports.AttributeNameById = require("node-opcua-data-model").AttributeNameById;
/**
* @class ReadValueId
*/
exports.ReadValueId = require("./_generated_/_auto_generated_ReadValueId").ReadValueId;
/**
* @class ReadRequest
*/
exports.ReadRequest = require("./_generated_/_auto_generated_ReadRequest").ReadRequest;
require("node-opcua-extension-object");
require("node-opcua-service-secure-channel");
const TimestampsToReturn = require("node-opcua-data-value").TimestampsToReturn;
const HistoryReadRequest_Schema = {
name: "HistoryReadRequest",
fields: [
{ name: "requestHeader", fieldType: "RequestHeader"},
{ name: "historyReadDetails", fieldType: "ExtensionObject" /* in fact a "HistoryReadDetails" */,
documentation: "Maximum age of the value to be read in milliseconds"
},
{ name: "timestampsToReturn", fieldType: "TimestampsToReturn",
documentation: "An enumeration that specifies the Timestamps to be returned for each requested Variable Value Attribute.",
defaultValue: TimestampsToReturn.Neither
},
{
name: "releaseContinuationPoints", fieldType: "Boolean"
* @class TimestampsToReturn
*/
MonitoringMode: require("./schemas/MonitoringMode_enum").MonitoringMode,
/**
* @class TimestampsToReturn
*/
DataChangeTrigger: require("./schemas/DataChangeTrigger_enum").DataChangeTrigger,
/**
* @class TimestampsToReturn
*/
DeadbandType: require("./schemas/DeadbandType_enum").DeadbandType,
/**
* @class TimestampsToReturn
*/
TimestampsToReturn: require("node-opcua-data-value").TimestampsToReturn,
/**
* @class CreateSubscriptionRequest
*/
CreateSubscriptionRequest: require("./_generated_/_auto_generated_CreateSubscriptionRequest").CreateSubscriptionRequest,
/**
* @class CreateSubscriptionResponse
*/
CreateSubscriptionResponse: require("./_generated_/_auto_generated_CreateSubscriptionResponse").CreateSubscriptionResponse,
/**
* @class ModifySubscriptionRequest
*/
ModifySubscriptionRequest: require("./_generated_/_auto_generated_ModifySubscriptionRequest").ModifySubscriptionRequest,
/**
* @class ModifySubscriptionResponse
*/
require("node-opcua-service-secure-channel");
const TimestampsToReturn = require("node-opcua-data-value").TimestampsToReturn;
/*
* 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.