Alarm and Condition with 2.1.1
See original GitHub issueHey andrew I’m a bit lost 😦. I’m trying to program an Client which can read all alarms from an OPC-UA Server. The NodeId is the right one because with UAExpert and the .Net-Legacy-Sample Client I get what I want. the following code snippet is what i tryed but i’m a bit stuck. I’m not sure what to put in the brackets after the token call.
` Console.WriteLine(“Step 5 - Add items to the subscription.”); var alarmitemsToCreate = new MonitoredItemCreateRequest[] { new MonitoredItemCreateRequest { ItemToMonitor = new ReadValueId { NodeId = NodeId.Parse(“…”), AttributeId = AttributeIds.EventNotifier }, MonitoringMode = MonitoringMode.Reporting, RequestedParameters = new MonitoringParameters { ClientHandle = 00001, SamplingInterval = -1, QueueSize = 0, DiscardOldest = true } }, };
var itemsRequest = new CreateMonitoredItemsRequest
{
SubscriptionId = id,
ItemsToCreate = alarmitemsToCreate,
};
var itemsResponse = await Channel.CreateMonitoredItemsAsync(itemsRequest);
Console.WriteLine("Step 6 - Subscribe to PublishResponse stream.");
token = Channel.Where(pr => pr.SubscriptionId == id).Subscribe(pr =>
{???}
});
}
`
can you help me ? Is my attempt right or is it already wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (8 by maintainers)
Top GitHub Comments
@awcullen I really appreciate your work and I want to contribute back to the repository by adding basic samples for using siemens/sinumerik machines. This could help first timers save lot of bucks.
Hi HarishLinkEZ, @rebj1011 seems to say that there was an error in the EventHelper.Deserialize function below:
Instead you can try: