Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.log(n.toString());
});
const itemsToMonitor = [
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_1.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_2.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_3.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_4.Temperature")
}
];
const optionsGroup = {
discardOldest: true,
queueSize: 1,
samplingInterval: 10
};
const monitoredItemGroup = ClientMonitoredItemGroup.create(subscription, itemsToMonitor, optionsGroup, TimestampsToReturn.Both);
// subscription.on("item_added",function(monitoredItem){
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_1.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_2.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_3.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_4.Temperature")
}
];
const optionsGroup = {
discardOldest: true,
queueSize: 1,
samplingInterval: 10
};
const monitoredItemGroup = ClientMonitoredItemGroup.create(subscription, itemsToMonitor, optionsGroup, TimestampsToReturn.Both);
// subscription.on("item_added",function(monitoredItem){
monitoredItemGroup.on("initialized", async () => {
console.log(" Initialized !");
});
const subscription = await session.createSubscription2({
maxNotificationsPerPublish: 1000,
publishingEnabled: true,
requestedLifetimeCount: 100,
requestedMaxKeepAliveCount: 10,
requestedPublishingInterval: 1000
});
subscription.on("raw_notification", (n: any) => {
console.log(n.toString());
});
const itemsToMonitor = [
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_1.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_2.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_3.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_4.Temperature")
}
];
requestedPublishingInterval: 1000
});
subscription.on("raw_notification", (n: any) => {
console.log(n.toString());
});
const itemsToMonitor = [
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_1.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_2.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_3.Temperature")
},
{
attributeId: AttributeIds.Value,
nodeId: resolveNodeId("ns=3;s=AirConditioner_4.Temperature")
}
];
const optionsGroup = {
discardOldest: true,
queueSize: 1,
samplingInterval: 10
};
private populateTree() {
this.tree.setData({
name: "RootFolder",
nodeId: resolveNodeId("RootFolder"),
children: this.expand_opcua_node.bind(this)
});
};
populateTree = function () {
tree.setData({
name: "RootFolder",
nodeId: opcua.resolveNodeId("RootFolder"),
children: expand_opcua_node
});
};