mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Adding multiple transports support & other fixes:
- Avoid polling when only one input channel is used. - Send only handles for shared memory transport. - Avoid waiting in the rate logger thread when nothing to log. - Hide warnings from generated files - Fix #483
This commit is contained in:
committed by
Mohammad Al-Turany
parent
e53ad151a7
commit
c66fd6fe91
47
fairmq/FairMQTransports.h
Normal file
47
fairmq/FairMQTransports.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
#ifndef FAIRMQTRANSPORTS_H_
|
||||
#define FAIRMQTRANSPORTS_H_
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace FairMQ
|
||||
{
|
||||
|
||||
enum class Transport
|
||||
{
|
||||
DEFAULT,
|
||||
ZMQ,
|
||||
NN,
|
||||
SHM
|
||||
};
|
||||
|
||||
static std::unordered_map<std::string, Transport> TransportTypes {
|
||||
{ "default", Transport::DEFAULT },
|
||||
{ "zeromq", Transport::ZMQ },
|
||||
{ "nanomsg", Transport::NN },
|
||||
{ "shmem", Transport::SHM }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <>
|
||||
struct hash<FairMQ::Transport>
|
||||
{
|
||||
size_t operator()(const FairMQ::Transport& v) const
|
||||
{
|
||||
return hash<int>()(static_cast<int>(v));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
#endif /* FAIRMQTRANSPORTS_H_ */
|
Reference in New Issue
Block a user