Re: Sequences to perform when software crashes / is closed


Anton Wöllert
 

Dear Davide,

right now, there is unfortunately no "teardown" of EVerest at all.  But if you write your own module, you could try to register your own signal handler for that module which in turn could do some clean-up/teardown for you (see https://en.wikipedia.org/wiki/C_signal_handling).
It is on our backlog to implement a proper shutdown for the modules, but this might take some time until done.

Best,
Anton

Am Mi., 1. Feb. 2023 um 14:28 Uhr schrieb Davide Marzona <davidemarzona@...>:

Hello,
recently I implemented my own protocol to comunicate with a DC power supply in C++. I tested it by simulating the other modules and connecting only the power supply. In certain cases, some  other module had exeprienced some errors and the whole software crashed. I noticed that in these cases, if the power suppply has been enabled, there's no funciotnality that is able to turn it off, I have to manually connetct to it and disable the output.
My question is if there is some way to define some sequencences in module/interface code that shall be performed when software crashes or simply is closed by the user. My idea is that as like ev-cli creates module init and ready functions, if there is some way to create a function like close where the methods needed to safelly close the module are collected.

Thank you,
D. Marzona

Join {everest@lists.lfenergy.org to automatically receive all group messages.