artdaq  v3_05_00
artdaq::PortManager Class Reference

PortManager attempts to automatically detect interfaces and ports used for the various TCP and UDP sockets used by artdaq. More...

#include <artdaq/DAQdata/PortManager.hh>

Classes

struct  Config
 Configuration of PortManager. May be used for parameter validation More...
 

Public Types

using Parameters = fhicl::WrappedTable< Config >
 Used for ParameterSet validation (if desired)
 

Public Member Functions

 PortManager ()
 PortManager Construator.
 
void UpdateConfiguration (fhicl::ParameterSet const &ps)
 Override the default configuration. More...
 
int GetRoutingTokenPort (int subsystemID=0)
 Get the port that should be used for Routing Tokens. More...
 
int GetRoutingAckPort (int subsystemID=0)
 Get the port that should be used for Routing Acknowledgements. More...
 
int GetXMLRPCPort (int rank)
 Get the XMLRPC port for the given rank. More...
 
int GetTCPSocketTransferPort (int rank)
 Get the TCP Socket transfer port for the given rank. More...
 
int GetRequestMessagePort ()
 Get the port that should be used for multicast request messages. More...
 
std::string GetRequestMessageGroupAddress (int subsystemID=0)
 Get the multicast address for request messages. More...
 
int GetRoutingTablePort ()
 Get the port that should be used for multicast Routing Tables. More...
 
std::string GetRoutingTableGroupAddress (int subsystemID=0)
 Get the multicast address for Routing Tables. More...
 
int GetMulticastTransferPort (int rank)
 Get the multicast transfer port for the given rank. More...
 
std::string GetMulticastTransferGroupAddress ()
 Get the multicast address for multicast transfers. More...
 
in_addr GetMulticastOutputAddress (std::string interface_name="", std::string interface_address="")
 Determine the output interface address, using the hints provided. More...
 

Detailed Description

PortManager attempts to automatically detect interfaces and ports used for the various TCP and UDP sockets used by artdaq.

Definition at line 24 of file PortManager.hh.

Member Function Documentation

in_addr artdaq::PortManager::GetMulticastOutputAddress ( std::string  interface_name = "",
std::string  interface_address = "" 
)

Determine the output interface address, using the hints provided.

Parameters
interface_nameIf set, the name of the interface that should be used for multicast (e.g. "eth0"). Default: ""
interface_addressIf set, the address of the interface that should be used for multicast (e.g. 192.168.0.1). Default: ""
Returns
in_addr struct populated with selected interface's info

If neither interface_name or interface_address are set, then the interface will be auto-detected, giving preference to private network addresses.

Definition at line 375 of file PortManager.cc.

std::string artdaq::PortManager::GetMulticastTransferGroupAddress ( )

Get the multicast address for multicast transfers.

Returns
Multicast address for multicast transfers

Definition at line 364 of file PortManager.cc.

int artdaq::PortManager::GetMulticastTransferPort ( int  rank)

Get the multicast transfer port for the given rank.

Parameters
rankRank to get multicast transfer port for
Returns
multicast transfer port for the given rank

Definition at line 353 of file PortManager.cc.

std::string artdaq::PortManager::GetRequestMessageGroupAddress ( int  subsystemID = 0)

Get the multicast address for request messages.

Parameters
subsystemIDSubsystem that this artdaq process belongs to
Returns
Multicast address for request messages

Definition at line 320 of file PortManager.cc.

int artdaq::PortManager::GetRequestMessagePort ( )

Get the port that should be used for multicast request messages.

Returns
Port used for multicast request messages

Definition at line 309 of file PortManager.cc.

int artdaq::PortManager::GetRoutingAckPort ( int  subsystemID = 0)

Get the port that should be used for Routing Acknowledgements.

Parameters
subsystemIDSubsystem that this artdaq process belongs to
Returns
Port number for Routing Acknowledgements

Definition at line 279 of file PortManager.cc.

std::string artdaq::PortManager::GetRoutingTableGroupAddress ( int  subsystemID = 0)

Get the multicast address for Routing Tables.

Parameters
subsystemIDSubsystem that this artdaq process belongs to
Returns
Multicast address for Routing Tables

Definition at line 342 of file PortManager.cc.

int artdaq::PortManager::GetRoutingTablePort ( )

Get the port that should be used for multicast Routing Tables.

Returns
Port used for multicast Routing Tables

Definition at line 331 of file PortManager.cc.

int artdaq::PortManager::GetRoutingTokenPort ( int  subsystemID = 0)

Get the port that should be used for Routing Tokens.

Parameters
subsystemIDSubsystem that this artdaq process belongs to
Returns
Port number for Routing Tokens

Definition at line 268 of file PortManager.cc.

int artdaq::PortManager::GetTCPSocketTransferPort ( int  rank)

Get the TCP Socket transfer port for the given rank.

Parameters
rankRank to get TCP Socket transfer port for
Returns
TCP Socket transfer port for the given rank

Definition at line 299 of file PortManager.cc.

int artdaq::PortManager::GetXMLRPCPort ( int  rank)

Get the XMLRPC port for the given rank.

Parameters
rankRank to get XMLRPC port for
Returns
XMLRPC port for the given rank

Definition at line 289 of file PortManager.cc.

void artdaq::PortManager::UpdateConfiguration ( fhicl::ParameterSet const &  ps)

Override the default configuration.

Parameters
psParameterSet containing overridden parameters

Definition at line 37 of file PortManager.cc.


The documentation for this class was generated from the following files: