hmbdc
simplify-high-performance-messaging-programming
DefaultUserConfig.hpp
1 #include "hmbdc/Copyright.hpp"
2 #pragma once
3 
4 namespace hmbdc { namespace tips { namespace udpcast {
5 /**
6  * the send and recv engine config parameters and its default values used in this module
7  */
8 constexpr char const* const DefaultUserConfig = R"|(
9 {
10  "ifaceAddr" : "127.0.0.1", "__ifaceAddr" :"ip address for the NIC interface for IO, 0.0.0.0/0 pointing to the first intereface that is not a loopback (127.0.0.1)",
11  "mtu" : 1500, "__mtu" :"mtu, check ifconfig output for this value for each NIC in use",
12  "schedPolicy" : "SCHED_OTHER", "__schedPolicy" :"engine thread schedule policy - check man page for allowed values",
13  "schedPriority" : 0, "__schedPriority" :"engine thread schedule priority - check man page for allowed values",
14  "tx" :
15  {
16  "hmbdcName" : "udpcast-tx", "__hmbdcName" :"engine thread name",
17  "loopback" : false, "__loopback" :"should the message be visible in local machine. not effective when using loopback interface.",
18  "maxSendBatch" : 60, "__maxSendBatch" :"up to how many messages to send in a batch (within one udp packet)",
19  "udpcastDests" : "232.43.212.234:4321", "__udpcastDests" :"list UDP address port pairs all udpcast traffic go to (each of them), for example \"127.0.0.1:3241 192.168.0.1:3241\" - can be a mix of multicast addresses and unicast addresses",
20  "outBufferSizePower2" : 0, "__outBufferSizePower2" :"2^outBufferSizePower2 is the number of message that can be buffered in the engine, default 0 means automatically calculated based on 8KB as the low bound",
21  "sendBytesBurst" : 0, "__sendBytesBurst" :"rate control for how many bytes can be sent in a burst, us the OS buffer size (131071) as reference, 0 means no rate control",
22  "sendBytesPerSec" : 100000000, "__sendBytesPerSec" :"rate control for how many bytes per second - it is turned off by sendBytesBurst==0",
23  "ttl" : 1, "__ttl" :"the switch hop number",
24  "udpSendBufferBytes" : 0, "__udpSendBufferBytes" :"OS buffer byte size for outgoing udp, 0 means OS default value"
25  },
26  "rx" :
27  {
28  "hmbdcName" : "udpcast-rx", "__hmbdcName" :"engine thread name",
29  "udpcastListenAddr" : "232.43.212.234", "__udpcastListenAdd" :"the receive engine listen to this address for messages - it can be set to ifaceAddr to listen to unicast UDP messages instead of a multicast address",
30  "udpcastListenPort" : 4321, "__udpcastListenPort" :"the receive engine listen to this UDP port for messages",
31  "udpRecvBufferBytes" : 0, "__udpRecvBufferBytes" :"OS buffer byte size for incoming udp, 0 means OS default value"
32  }
33 }
34 )|";
35 }}}
Definition: Base.hpp:12