Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Milo » Alarm Acknowledgement method of OPCUA Protocol (While calling acknowledgement method, getting Bad Event ID unknown Status)
Alarm Acknowledgement method of OPCUA Protocol [message #1827542] Mon, 18 May 2020 05:16
Savan Tripathi is currently offline Savan TripathiFriend
Messages: 1
Registered: May 2020
Junior Member
Dear Sir,

Currently i am developing OPCUA client using Eclipse Milo. I am able to read data from OPC UA cpp server and able to write setpoint data to server.

I am not able to perform acknowledgement of OPCUA ALarm and events.

I tried with node-red opcua server and getting alarms,now i want to acknowledge the same , so i had tried code for calling acknowledgement method for opcua. Here it is:

byte[] b=new byte[] {-66, -115, -121, -6, -39, 40, 89, 114, 60, -66, -126, -79, -72, -128, -21, 23, 0, 0, 4, -4};
LocalizedText lt = new LocalizedText("bagiya");
ByteString bs=new ByteString(b);
Variant evntid1 = new Variant(bs);
System.out.println("jangli id :=>"+vs[1]);

Variant lt1 = new Variant(lt);
Variant[] v = new Variant[] { evntid1,lt1 = new Variant(lt)};
System.out.println(vs[1].getDataType());
CallMethodRequest rec = new CallMethodRequest(NodeId.parse("ns=1;i=1003"), NodeId.parse("ns=1;i=1022"), v);

System.out.println( rec.getTypeId()+"::=>"+client.call(rec).get());


this byte array string is given by node-red opcua server using eclipse milo code of Event Subscription Example.

EventFilter eventFilter = new EventFilter(new SimpleAttributeOperand[] {

new SimpleAttributeOperand(Identifiers.BaseEventType,
new QualifiedName[] { new QualifiedName(0, "EventId") }, AttributeId.Value.uid(), null),
new SimpleAttributeOperand(Identifiers.BaseEventType,
new QualifiedName[] { new QualifiedName(0, "EventType") }, AttributeId.Value.uid(), null),
new SimpleAttributeOperand(Identifiers.BaseEventType,
new QualifiedName[] { new QualifiedName(0, "Severity") }, AttributeId.Value.uid(), null),
new SimpleAttributeOperand(Identifiers.BaseEventType,
new QualifiedName[] { new QualifiedName(0, "Time") }, AttributeId.Value.uid(), null),
new SimpleAttributeOperand(Identifiers.BaseEventType,
new QualifiedName[] { new QualifiedName(0, "Time") }, AttributeId.Value.uid(), null),
new SimpleAttributeOperand(Identifiers.BaseEventType,
new QualifiedName[] { new QualifiedName(0, "Message") }, AttributeId.Value.uid(), null) },
new ContentFilter(null));


So we are getting this below given status:
CallMethodResult{StatusCode=StatusCode{name=Bad_EventIdUnknown, value=0x809A0000, quality=bad}, InputArgumentResults=[StatusCode{name=Good, value=0x00000000, quality=good}, StatusCode{name=Good, value=0x00000000, quality=good}], InputArgumentDiagnosticInfos=[], OutputArguments=[]}

Kindly give me some suggestions to troubleshoot this problem.
Previous Topic:Welcome to eclipse.milo
Goto Forum:
  


Current Time: Wed Oct 21 00:14:25 GMT 2020

Powered by FUDForum. Page generated in 0.02135 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top