Giter Club home page Giter Club logo

Comments (4)

neilstephens avatar neilstephens commented on August 16, 2024

Another possible solution might be to disable and re-enable the stack on a link timeout.

from opendatacon.

neilstephens avatar neilstephens commented on August 16, 2024

After some investigation:

  • There's no way to close the connection directly. The opendnp3 API only exposes a Shutdown() interface on the channel which destroys everything. The only way to get it to close is to disable all the stations on the channel together, and that's not feasible with the current architecture.
  • Disabling and enabling the stack should solve the immediate issue of ensuring the startup integrity scan is triggered, and for the single drop case the connection will close, but it leaves the issue of broken connections remaining open for multidrop...

So I'll implement the disable/enable workaround and open a separate issue for the underlying broken connection issue.

from opendatacon.

neilstephens avatar neilstephens commented on August 16, 2024

Commits
c0dac2f
3b36018
07208b6
should solve this issue.
A summary of the changes:

  • Refactored the link state logic and channel handling in general
    • This exposed a regression that appeared in June 2018 on multidrop channel listening - fixed
    • It also exposed a logical error or false assumption about the link layer callbacks from opendnp3
      • There's not always a callback when a link recovers, because there isn't always a keepalive success or link status change
        • Fixed by setting the link up on IIN callback for master and time without a keepalive failure for outstation
  • Added a watchdog for each channel to coordinate a synchronised restart of protocol stacks if all links on a channel go down

This all means that multidrop station failures don't affect the other stations on a channel, but channels still get reset if all station are affected.

TODO: add test cases

  • For both Outstations and Masters, and both directions (and a mix) of TCP client/server
    • single drop link failure = channel closed and re-established
    • multidrop partial links failure = links fail and re-establish without channel close (comms point behaves)
    • multidrop all links failure = channel closed and re-established

from opendatacon.

neilstephens avatar neilstephens commented on August 16, 2024

Tests added

from opendatacon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.