apache/plc4x

[Bug]: S7 connection always returns "false" on "isConnected()"

chrisdutz opened this issue · 2 comments

What happened?

In S7ProtocolLogic the implementation of "isConnected" is as follows:

    private boolean isConnected() {
        return context.getChannel().attr(S7HMuxImpl.IS_CONNECTED).get();
        //return true;
    }

However the IS_CONNECTED constant never seems to be set, therefore the connection never appears to be connected.

Version

0.13.0-SNAPSHOT

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

Actually this is not true ... it's actually not returning false all the time ...

glcj commented

This access must return the status of the active connection (of the two available).

Anyway, I'm going to check the execution sequence this weekend when I have access to the equipment.