FairMQProxy Class Reference

`#include <FairMQProxy.h>`

Inheritance diagram for FairMQProxy:
[legend]
Collaboration diagram for FairMQProxy:
[legend]

## Protected Member Functions

virtual void | Run ()
virtual void | InitTask ()
Protected Member Functions inherited from FairMQDevice
virtual void | Init ()
virtual void | PreRun ()
virtual bool | ConditionalRun ()
virtual void | PostRun ()
virtual void | Pause ()
virtual void | ResetTask ()
virtual void | Reset ()

## Protected Attributes

int | fMultipart
std::string | fInChannelName
std::string | fOutChannelName
Protected Attributes inherited from FairMQDevice
std::shared_ptr< FairMQTransportFactory > | fTransportFactory
| Default transport factory.
std::unordered_map< fair::mq::Transport, std::shared_ptr< FairMQTransportFactory > > | fTransports
| Container for transports.
std::string | fId
| Device ID.
int | fNumIoThreads
| Number of ZeroMQ I/O threads.

## Additional Inherited Members

Public Types inherited from FairMQStateMachine
enum | Event { INIT_DEVICE, internal_DEVICE_READY, INIT_TASK, internal_READY, RUN, PAUSE, STOP, RESET_TASK, RESET_DEVICE, internal_IDLE, END, ERROR_FOUND }
enum | State { OK, Error, IDLE, INITIALIZING_DEVICE, DEVICE_READY, INITIALIZING_TASK, READY, RUNNING, PAUSED, RESETTING_TASK, RESETTING_DEVICE, EXITING }
Public Member Functions inherited from FairMQDevice
| FairMQDevice ()
| Default constructor.
| FairMQDevice (const fair::mq::tools::Version version)
| Constructor that sets the version.
| FairMQDevice (const FairMQDevice &)=delete
| Copy constructor (disabled)
FairMQDevice | operator= (const FairMQDevice &)=delete
| Assignment operator (disabled)
virtual | ~FairMQDevice ()
| Default destructor.
void | CatchSignals ()
| Catches interrupt signals (SIGINT, SIGTERM)
virtual void | LogSocketRates ()
| Outputs the socket transfer rates.
void | SortChannel (const std::string &name, const bool reindex=true)
void | PrintChannel (const std::string &name)
template<typename Serializer , typename DataType , typename... Args>
void | Serialize (FairMQMessage &msg, DataType &&data, Args &&... args) const
template<typename Deserializer , typename DataType , typename... Args>
void | Deserialize (FairMQMessage &msg, DataType &&data, Args &&... args) const
int | Send (FairMQMessagePtr &msg, const std::string &chan, const int i=0) const
int | Receive (FairMQMessagePtr &msg, const std::string &chan, const int i=0) const
int | Send (FairMQMessagePtr &msg, const std::string &chan, const int i, int sndTimeoutInMs) const
int | Receive (FairMQMessagePtr &msg, const std::string &chan, const int i, int rcvTimeoutInMs) const
int | SendAsync (FairMQMessagePtr &msg, const std::string &chan, const int i=0) const
int | ReceiveAsync (FairMQMessagePtr &msg, const std::string &chan, const int i=0) const
int64_t | Send (FairMQParts &parts, const std::string &chan, const int i=0) const
int64_t | Receive (FairMQParts &parts, const std::string &chan, const int i=0) const
int64_t | Send (FairMQParts &parts, const std::string &chan, const int i, int sndTimeoutInMs) const
int64_t | Receive (FairMQParts &parts, const std::string &chan, const int i, int rcvTimeoutInMs) const
int64_t | SendAsync (FairMQParts &parts, const std::string &chan, const int i=0) const
int64_t | ReceiveAsync (FairMQParts &parts, const std::string &chan, const int i=0) const
auto | Transport () const -> const FairMQTransportFactory *
| Getter for default transport factory.
template<typename... Args>
FairMQMessagePtr | NewMessage (Args &&... args) const
template<typename... Args>
FairMQMessagePtr | NewMessageFor (const std::string &channel, int index, Args &&... args) const
template<typename T >
FairMQMessagePtr | NewStaticMessage (const T &data) const
template<typename T >
FairMQMessagePtr | NewStaticMessageFor (const std::string &channel, int index, const T &data) const
template<typename T >
FairMQMessagePtr | NewSimpleMessage (const T &data) const
template<typename T >
FairMQMessagePtr | NewSimpleMessageFor (const std::string &channel, int index, const T &data) const
FairMQUnmanagedRegionPtr | NewUnmanagedRegion (const size_t size)
FairMQUnmanagedRegionPtr | NewUnmanagedRegionFor (const std::string &channel, int index, const size_t size, FairMQRegionCallback callback=nullptr)
template<typename ... Ts>
FairMQPollerPtr | NewPoller (const Ts &... inputs)
FairMQPollerPtr | NewPoller (const std::vector< const FairMQChannel *> &channels)
void | WaitForInitialValidation ()
| Waits for the first initialization run to finish.
std::shared_ptr< FairMQTransportFactory > | AddTransport (const fair::mq::Transport transport)
void | SetTransport (const std::string &transport="zeromq")
void | SetConfig (FairMQProgOptions &config)
const FairMQProgOptions * | GetConfig () const
template<typename T >
void | OnData (const std::string &channelName, bool(T::*memberFunction)(FairMQMessagePtr &msg, int index))
void | OnData (const std::string &channelName, InputMsgCallback callback)
template<typename T >
void | OnData (const std::string &channelName, bool(T::*memberFunction)(FairMQParts &parts, int index))
void | OnData (const std::string &channelName, InputMultipartCallback callback)
const FairMQChannel & | GetChannel (const std::string &channelName, const int index=0) const
virtual void | RegisterChannelEndpoints ()
bool | RegisterChannelEndpoint (const std::string &channelName, uint16_t minNumSubChannels=1, uint16_t maxNumSubChannels=1)
void | PrintRegisteredChannels ()
void | SetId (const std::string &id)
std::string | GetId ()
const fair::mq::tools::Version | GetVersion () const
void | SetNumIoThreads (int numIoThreads)
int | GetNumIoThreads () const
void | SetPortRangeMin (int portRangeMin)
int | GetPortRangeMin () const
void | SetPortRangeMax (int portRangeMax)
int | GetPortRangeMax () const
void | SetNetworkInterface (const std::string &networkInterface)
std::string | GetNetworkInterface () const
void | SetDefaultTransport (const std::string &name)
std::string | GetDefaultTransport () const
void | SetInitializationTimeoutInS (int initializationTimeoutInS)
int | GetInitializationTimeoutInS () const
Public Member Functions inherited from FairMQStateMachine
int | GetInterfaceVersion () const
bool | ChangeState (int event)
bool | ChangeState (const std::string &event)
void | WaitForEndOfState (int event)
void | WaitForEndOfState (const std::string &event)
bool | WaitForEndOfStateForMs (int event, int durationInMs)
bool | WaitForEndOfStateForMs (const std::string &event, int durationInMs)
void | SubscribeToStateChange (const std::string &key, std::function< void(const State)> callback)
void | UnsubscribeFromStateChange (const std::string &key)
void | CallStateChangeCallbacks (const State state) const
std::string | GetCurrentStateName () const
int | GetCurrentState () const
bool | CheckCurrentState (int state) const
bool | CheckCurrentState (std::string state) const
bool | Terminated ()
Static Public Member Functions inherited from FairMQDevice
static bool | SortSocketsByAddress (const FairMQChannel &lhs, const FairMQChannel &rhs)
Public Attributes inherited from FairMQDevice
std::unordered_map< std::string, std::vector< FairMQChannel > > | fChannels
| Device channels.
FairMQProgOptions * | fConfig
| Program options configuration.

## Detailed Description

FairMQProxy.h

Since
  2013-10-02

Author
  A. Rybalchenko

## Member Function Documentation

## InitTask()

void FairMQProxy::InitTask | ( |  | ) |

protectedvirtual

Task initialization (can be overloaded in child classes) Executed in a worker thread

Reimplemented from FairMQDevice.

## Run()

void FairMQProxy::Run | ( |  | ) |

protectedvirtual

Runs the device (to be overloaded in child classes) Executed in a worker thread

Reimplemented from FairMQDevice.

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

- fairmq/devices/FairMQProxy.h
- fairmq/devices/FairMQProxy.cxx