Base of processes that join a DAQ collection: checks resource limits, connects a PUSH socket to tcp://manager:(zmq_base_port + platform) and a SUB socket (topic all) to port zmq_base_port + 10 + platform, binds inproc://drp, and dispatches incoming messages by key to the handle* methods.
More...
#include <Collection.hh>
Inherited by Drp::BldApp, Drp::EpicsArchApp, Drp::Gpu::PGPDetectorApp, Drp::PGPDetectorApp, Drp::PvApp, Drp::TprApp, and Drp::UdpApp.
|
| | CollectionApp (const std::string &managerHostname, int platform, const std::string &level, const std::string &alias, const std::string &device=std::string()) |
| | Check the resource limits (throwing a C string if they are inadequate), connect the PUSH and SUB sockets to managerHostname for platform, bind inproc://drp, and register handlers for rollcall, alloc, dealloc, connect, disconnect, reset and the phase-1 transitions (configure, unconfigure, beginrun, endrun, beginstep, endstep, enable, disable).
|
| |
| virtual | ~CollectionApp () |
| | Does nothing; empty body.
|
| |
| void | run () |
| | Message loop: dispatch collection messages from the SUB socket to their handlers by header key, and forward pulseId, fileReport, error and chunkRequest messages from inproc://drp to the manager.
|
| |
Base of processes that join a DAQ collection: checks resource limits, connects a PUSH socket to tcp://manager:(zmq_base_port + platform) and a SUB socket (topic all) to port zmq_base_port + 10 + platform, binds inproc://drp, and dispatches incoming messages by key to the handle* methods.
◆ anonymous enum
Base TCP port of the collection sockets.
| Enumerator |
|---|
| zmq_base_port | 29980; the PUSH port is this plus the platform, the SUB port this plus 10 plus the platform.
|
◆ CollectionApp()
| CollectionApp::CollectionApp |
( |
const std::string & |
managerHostname, |
|
|
int |
platform, |
|
|
const std::string & |
level, |
|
|
const std::string & |
alias, |
|
|
const std::string & |
device = std::string() |
|
) |
| |
Check the resource limits (throwing a C string if they are inadequate), connect the PUSH and SUB sockets to managerHostname for platform, bind inproc://drp, and register handlers for rollcall, alloc, dealloc, connect, disconnect, reset and the phase-1 transitions (configure, unconfigure, beginrun, endrun, beginstep, endstep, enable, disable).
◆ ~CollectionApp()
| virtual CollectionApp::~CollectionApp |
( |
| ) |
|
|
inlinevirtual |
Does nothing; empty body.
◆ connectionInfo()
| virtual nlohmann::json CollectionApp::connectionInfo |
( |
const nlohmann::json & |
msg | ) |
|
|
protectedpure virtual |
◆ connectionShutdown()
| virtual void CollectionApp::connectionShutdown |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ context()
◆ getAlias()
| const std::string & CollectionApp::getAlias |
( |
| ) |
const |
|
inlineprotected |
◆ getId()
| size_t CollectionApp::getId |
( |
| ) |
const |
|
inlineprotected |
◆ getLevel()
| const std::string & CollectionApp::getLevel |
( |
| ) |
const |
|
inlineprotected |
◆ handleAlloc()
| void CollectionApp::handleAlloc |
( |
const nlohmann::json & |
msg | ) |
|
|
protected |
◆ handleConnect()
| virtual void CollectionApp::handleConnect |
( |
const nlohmann::json & |
msg | ) |
|
|
protectedpure virtual |
◆ handleDealloc()
| virtual void CollectionApp::handleDealloc |
( |
const nlohmann::json & |
msg | ) |
|
|
protectedvirtual |
◆ handleDisconnect()
| virtual void CollectionApp::handleDisconnect |
( |
const nlohmann::json & |
msg | ) |
|
|
inlineprotectedvirtual |
◆ handlePhase1()
| virtual void CollectionApp::handlePhase1 |
( |
const nlohmann::json & |
msg | ) |
|
|
inlineprotectedvirtual |
◆ handleReset()
| virtual void CollectionApp::handleReset |
( |
const nlohmann::json & |
msg | ) |
|
|
protectedpure virtual |
◆ handleRollcall()
| void CollectionApp::handleRollcall |
( |
const nlohmann::json & |
msg | ) |
|
|
protected |
◆ reply()
| void CollectionApp::reply |
( |
const nlohmann::json & |
msg | ) |
|
|
protected |
◆ run()
| void CollectionApp::run |
( |
| ) |
|
Message loop: dispatch collection messages from the SUB socket to their handlers by header key, and forward pulseId, fileReport, error and chunkRequest messages from inproc://drp to the manager.
Returns when zmq_poll() is interrupted or a malformed (fewer than 2 frames) message arrives.
◆ subscribePartition()
| void CollectionApp::subscribePartition |
( |
| ) |
|
|
protected |
◆ unsubscribePartition()
| void CollectionApp::unsubscribePartition |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file: