Skip to content

services, backend and slowcontrol stuff - #61

Merged
brichards64 merged 5 commits into
ToolDAQ:mainfrom
marc1uk:jul092026
Jul 10, 2026
Merged

services, backend and slowcontrol stuff#61
brichards64 merged 5 commits into
ToolDAQ:mainfrom
marc1uk:jul092026

Conversation

@marc1uk

@marc1uk marc1uk commented Jul 9, 2026

Copy link
Copy Markdown
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.

superkanalysis and others added 5 commits July 9, 2026 01:07
…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...
…lticasts in background thread, minor cleanup to servicesbackend
@brichards64
brichards64 merged commit e3bcc0d into ToolDAQ:main Jul 10, 2026
1 check failed
@marc1uk
marc1uk deleted the jul092026 branch July 12, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants