FairMQ/fairmq/tools
Alexey Rybalchenko f1abb9ecdd Remove compile time transport interface switch
- Remove the compile time check of the transport implementation.
  The transport (zeromq/nanomsg) can be chosen at run time with:
  `device.SetTransport("zeromq"); // possible values are "zeromq" and "nanomsg"`.

  For devices that use FairMQProgOptions, the transport can be configured via cmd option:
  `--transport zeromq` or `--transport nanomsg`. Default values is "zeromq".
  The device receives the configured value with:
  `device.SetTransport(config.GetValue<std::string>("transport"));`

  Old method of setting transport still works. But the NANOMSG constant is not defined.

- Remove old `fairmq/prototest` directory. It was only used as a test for protobuf.
  The protobuf part of Tutorial3 does the same (with different values).

- Fix a bug in FairMQPollerNN, where the `revents` value was not initialized.
  This caused the `poller->CheckOutput()` to trigger when it should not.
2016-01-14 15:19:30 +01:00
..
FairMQTools.h enable/disable multipart functionnality for sending header if source policy has the proper signature 2015-11-09 14:08:27 +01:00
README.md add helper function to find IPs of the node 2015-01-28 19:57:59 +01:00
runSimpleMQStateMachine.h Remove compile time transport interface switch 2016-01-14 15:19:30 +01:00

FairMQ Tools

Contains common tools for use by FairMQ and/or users.

FairMQ::tools::getHostIPs

Fills a map with the network interfaces and their IP addresses available on the current host.

Example usage

#include <map>
#include <string>
#include <iostream>

#include "FairMQTools.h"

void main()
{
    std::map<string,string> IPs;

    FairMQ::tools::getHostIPs(IPs);

    for (std::map<string,string>::iterator it = IPs.begin(); it != IPs.end(); ++it)
    {
        std::cout << it->first << ": " << it->second << std::endl;
    }
}
Example Output
eth0: 123.123.1.123
ib0: 123.123.2.123
lo: 127.0.0.1