apache / plc4x

PLC4X The Industrial IoT adapter

Home Page:https://plc4x.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[REFACTOR]: Go over the EventPlcConnection interface in the API

chrisdutz opened this issue · comments

What would you like to happen?

The API contains a type EventPlcConnection which is an inteface that doesn't quite align with the rest of the API.

I think we should possibly have a more detailed look at this.

Programming Languages

  • plc4j
  • plc4go
  • plc4c
  • plc4net

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • CANopen
  • DeltaV
  • DF1
  • EtherNet/IP
  • Firmata
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • S7

The historic context of this connection is fairly basic:

  1. User application has no ways to determine state of connection, we internally process connected/disconnected events, but user never actually knows if connection was terminated by remote until it gets an error. Getting a ConnectionListener allows to track lifecycle of connection and act accordingly.
  2. There is no way to simplify track low level traffic other than tapping a wireshark, which can be troublesome under production environments. Possibility to attach MessageExchangeListener provides interception point for user application to get messages in raw form.

That's whole motivation of it. Given that our API didn't have above concepts they were built as a supplement with this extra interface. It would be ideal if they could travel to the SPI.