You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2026/01/11 15:50:14 UTC
Changing the ConnectionStateListener interface?
Hi all and particularly @Łukasz Dywicki<https://the-asf.slack.com/team/UCG0T0YBA> …
I just stumbled over the problem, that I'm using an ADS connection in a tool and the driver correctly picks up that I updated the tags, but there is no way for the driver to tell the client about this ... so I wanted to add a ConnectionStateListener and saw you already added one ... however one that's fixed to connect and disconnect .... I would like to update this to this:
// org.apache.plc4x.java.api.listener.PlcConnectionStateListener
public interface PlcConnectionStateListener {
void onConnectionStateChanged(PlcConnectionStateChangedEvent event);
}
// org.apache.plc4x.java.api.listener.event.PlcConnectionStateChangedEvent
public class PlcConnectionStateChangedEvent {
public enum ChangeType {
TAGS_CHANGED,
MODE_RUN,
MODE_STOP,
MODE_CONFIG
}
private final ChangeType changeType;
private final String details;
// constructor, getters
}
Any objections?
Chris
AW: Changing the ConnectionStateListener interface?
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Lukasz,
Thanks … I think I should have started building things with PLC4X a lot sooner.
The people doing it don’t seem to be providing feedback, so we can’t improve.
I really feel like it’s becoming a lot more usable thanks to my recent work 😉
Chris
Von: Łukasz Dywicki <lu...@code-house.org>
Datum: Sonntag, 11. Januar 2026 um 18:38
An: dev@plc4x.apache.org <de...@plc4x.apache.org>
Betreff: Re: Changing the ConnectionStateListener interface?
Go for it, we have this API with very sparse use, so making more use
cases with it will let people benefit from core architecture.
Cheers,
Łukasz
On 1/11/26 19:50, Christofer Dutz wrote:
> Hi all and particularly @Łukasz Dywicki<https://the-asf.slack.com/team/UCG0T0YBA> …
>
> I just stumbled over the problem, that I'm using an ADS connection in a tool and the driver correctly picks up that I updated the tags, but there is no way for the driver to tell the client about this ... so I wanted to add a ConnectionStateListener and saw you already added one ... however one that's fixed to connect and disconnect .... I would like to update this to this:
>
> // org.apache.plc4x.java.api.listener.PlcConnectionStateListener
> public interface PlcConnectionStateListener {
> void onConnectionStateChanged(PlcConnectionStateChangedEvent event);
> }
>
> // org.apache.plc4x.java.api.listener.event.PlcConnectionStateChangedEvent
> public class PlcConnectionStateChangedEvent {
> public enum ChangeType {
> TAGS_CHANGED,
> MODE_RUN,
> MODE_STOP,
> MODE_CONFIG
> }
> private final ChangeType changeType;
> private final String details;
> // constructor, getters
> }
>
> Any objections?
>
> Chris
>
Re: Changing the ConnectionStateListener interface?
Posted by Łukasz Dywicki <lu...@code-house.org>.
Go for it, we have this API with very sparse use, so making more use
cases with it will let people benefit from core architecture.
Cheers,
Łukasz
On 1/11/26 19:50, Christofer Dutz wrote:
> Hi all and particularly @Łukasz Dywicki<https://the-asf.slack.com/team/UCG0T0YBA> …
>
> I just stumbled over the problem, that I'm using an ADS connection in a tool and the driver correctly picks up that I updated the tags, but there is no way for the driver to tell the client about this ... so I wanted to add a ConnectionStateListener and saw you already added one ... however one that's fixed to connect and disconnect .... I would like to update this to this:
>
> // org.apache.plc4x.java.api.listener.PlcConnectionStateListener
> public interface PlcConnectionStateListener {
> void onConnectionStateChanged(PlcConnectionStateChangedEvent event);
> }
>
> // org.apache.plc4x.java.api.listener.event.PlcConnectionStateChangedEvent
> public class PlcConnectionStateChangedEvent {
> public enum ChangeType {
> TAGS_CHANGED,
> MODE_RUN,
> MODE_STOP,
> MODE_CONFIG
> }
> private final ChangeType changeType;
> private final String details;
> // constructor, getters
> }
>
> Any objections?
>
> Chris
>