Skip to content

refactor: control: Decouple control atomics from online settings

Giovanna Lazzari Miotto requested to merge chore/rationalize-configs into main

Remove unused field from ctrl

  • n_orbits_per_packet was added with the TCP filter, but we systematically used the same variable in the Config class instead. so it has been removed from ctrl.

Make atomic member private in ctrl

  • the running variable is now private with accompanying getter and setters according to the required memory order (for multithreaded contexts).

Introduce OnlineSettings

  • Comprises variables that used to belong to ctrl and were never changed during execution.
  • Currently, OnlineSettings instances are const to reflect the current use case.
  • This will change when necessary, and the class may acquire a public interface with setters and getters in the future.
  • OnlineSettings is intended for settings that may change during operation, but for which race conditions are not a particular concern, hence when atomic protection is not required.

Todo / Doing:

  • The "number of packets per report" concerns only InputFilter statistics and needs to be moved to its scope.
  • OnlineSettings are currently copied upon initialization because the fields are const anyway, but should be a shared_ptr or static ranging all pipelines

Merge request reports