services, backend and slowcontrol stuff - #61
Merged
Conversation
marc1uk
commented
Jul 9, 2026
Contributor
- fix order of teardown in Services class because SlowControlCollection could call ServicesBackend functions (alert callbacks), so we need to stop them SCC before SBE.
- In Services::Ready, wait for not just ServicesBackend::Ready but also SlowControlCollection::Ready. The former waits for all sockets to be ready, the latter just uses a monitoring socket to wait for the PUB socket, but this is probably sufficient.
- In Services::BufferThread, don't invoke SendMulticast if there's nothing to send.
- get verbosity from m_variables in Services::Init
- Fix missing mutex lock in ServicesBackend for pub monitoring socket check
- Put couts behind a verbosity check, so that it should not print anything (even errors) with verbosity 0. This is not ideal as we can't configure it to print errors only, but we need it to output absolutely nothing to stdout for use in a cgi, otherwise apache chokes.... :/
- move closing multicast sockets later in Finalise, and check in SendMulticast if they're open - if not, error
- add Ready check function to SlowControlCollection, uses socket monitor to wait for PUB socket (used for AlertSend) to be connected before returning - allows checking that AlertSend will do something.
…rvicesBackend to listen for connection event of alert send pub socket so we know when we're safe to use it.
…emoveService, and to remove new alerts and alertr ports. Something still not right with Stop function, as we still call it twice - from Services destructor and SlowControlDestructor. Latter makes more sense, but if only called there, the application throws an error about terminated context and then hangs...
…hese SendAlarm/Log calls
…lticasts in background thread, minor cleanup to servicesbackend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.