kostinkirill commented on PR #2336:
URL: https://github.com/apache/plc4x/pull/2336#issuecomment-3515822211
> I assume the next step would be to extend the ADS and possibly the OPC-UA
driver to support this, right? Are you planning on continuing to work on this?
I's prefer to mentor you through this as it's a bit like the "give a man a fish
and he's fed for a day, teach him to fish and he's fed for life" sort of thing
;-)
I believe ADS drive already supports it, I've already checked the behavior
and `minInterval` is applied for CHANGE_ON_EVENT subscriptions and works as
epxected.
This the code where the `minInterval` is set up as `cycleTimeInMs` in
`AdsAddDeviceNotificationRequest`
`AdsProtocolLogic#executeSubscribe:
```
return new AmsTCPPacket(new
AdsAddDeviceNotificationRequest(configuration.getTargetAmsNetId(),
configuration.getTargetAmsPort(),
configuration.getSourceAmsNetId(),
configuration.getSourceAmsPort(),
0, getInvokeId(),
directAdsTag.getIndexGroup(),
directAdsTag.getIndexOffset(),
adsDataTypeTableEntry.getSize() * numberOfElements,
tag.getPlcSubscriptionType() ==
PlcSubscriptionType.CYCLIC ? AdsTransMode.CYCLIC : AdsTransMode.ON_CHANGE, //
if it's not cyclic, it's on change or event
0, // there is no api for that yet
tag.getDuration().orElse(Duration.ZERO).toMillis()));
```
(the last argument)
As for OPCUA, I haven't checked it, but based on the code it should work as
well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]