I am trying to define a Filter for a Subscription but I dont know how to create the ExtensionObject
that is needed. Its either a ByteString
or an XmlElement
that I am missing but I dont know how or from where to get either one. If I go with a ByteString
that is null
, it wont connect to the server.
DataChangeFilter filter = new DataChangeFilter(DataChangeTrigger.StatusValue,
UInteger.valueOf(DeadbandType.Absolute.getValue()), 10.0);
ExtensionObject eoFilter = new ExtensionObject(???, filter.getTypeId());
MonitoringParameters parameters = new MonitoringParameters(clientHandle, 500.0, eoFilter, uint(10), true);
What do I insert for "???" in my code?
Thank you!
Don't use the
ExtensionObject
constructor. Instead, use the staticExtensionObject.encode(...)
and pass it yourDataChangeFilter
.