In continuation of https://github.com/OPCFoundation/UA-Java-Legacy/issues/88, I understand that it is required to call the "Publish" service and the server will return a notification (if available) in the response otherwise no notifications are received.
I have created the subscription and added it to the client
Added items of type MonitoredDataItem to the subscription.
Enabled publishing on the subscription.
DataChangeFilter dataChange = new DataChangeFilter();
dataChange.setTrigger(DataChangeTrigger.StatusValue);
MonitoredDataItem dataItem =
new MonitoredDataItem(nodeId, Attributes.Value, MonitoringMode.Reporting, subscription.getPublishingInterval());
dataItem.setDataChangeListener(dataChangeListener);
dataItem.setDataChangeFilter(dataChange);
MonitoredItemCreateResult r = subscription.addItem(dataItem);
subscription.setPublishingEnabled(true);
Now, the question is how to publish? On the UaClient, I am able to find the getSession(), but I cannot find any publish or publish-like methods on the session?
It seems that you are using Prosys OPC UA SDK for Java, so I recommend you contact Prosys OPC via their forum. This Github project is only for the OPC Foundation's OPC UA Stack part.
In continuation of https://github.com/OPCFoundation/UA-Java-Legacy/issues/88, I understand that it is required to call the "Publish" service and the server will return a notification (if available) in the response otherwise no notifications are received.
I have created the subscription and added it to the client Added items of type
MonitoredDataItem
to the subscription. Enabled publishing on the subscription.Now, the question is how to publish? On the
UaClient
, I am able to find thegetSession()
, but I cannot find any publish or publish-like methods on the session?Hope anyone will be able to help me here?
TIA