helics  2.8.1
Public Types | Public Member Functions | Public Attributes | List of all members
helics::NetworkBrokerData Class Reference

#include <NetworkBrokerData.hpp>

Public Types

enum  server_mode_options : char {
  unspecified = 0, server_default_active = 1, server_default_deactivated = 2, server_active = 3,
  server_deactivated = 4
}
 

Public Member Functions

 NetworkBrokerData (interface_type type)
 
std::shared_ptr< helicsCLI11AppcommandLineParser (const std::string &localAddress, bool enableConfig=true)
 
void setInterfaceType (interface_type type)
 

Public Attributes

std::string brokerName
 the identifier for the broker
 
std::string brokerAddress
 the address or domain name of the broker
 
std::string localInterface
 the interface to use for the local connection
 
std::string brokerInitString
 a string containing arguments for the broker initialization
 
std::string connectionAddress
 the address for connecting
 
int portNumber {-1}
 the port number for the local interface
 
int brokerPort {-1}
 the port number to use for the main broker interface
 
int connectionPort {-1}
 the port number for connecting
 
int portStart {-1}
 the starting port for automatic port definitions
 
int maxMessageSize {16 * 256}
 maximum message size
 
int maxMessageCount {256}
 maximum message count
 
int maxRetries {5}
 the maximum number of retries to establish a network connection
 
interface_networks interfaceNetwork {interface_networks::local}
 
bool reuse_address {false}
 allow reuse of binding address
 
bool use_os_port {false}
 
bool autobroker {false}
 flag for specifying an automatic broker generation
 
bool appendNameToAddress
 flag indicating that the name should be appended to the address More...
 
bool noAckConnection {false}
 
bool useJsonSerialization {false}
 for message serialization use JSON
 
server_mode_options server_mode {server_mode_options::unspecified}
 setup a server mode
 

Detailed Description

helper class designed to contain the common elements between networking brokers and cores

Constructor & Destructor Documentation

◆ NetworkBrokerData()

helics::NetworkBrokerData::NetworkBrokerData ( interface_type  type)
inlineexplicit

constructor from the allowed type

Member Function Documentation

◆ commandLineParser()

std::shared_ptr< helicsCLI11App > helics::NetworkBrokerData::commandLineParser ( const std::string &  localAddress,
bool  enableConfig = true 
)

generate a command line argument parser for the network broker data

Parameters
localAddressa predefined string containing the desired local only address

References helics::addJsonConfig(), autobroker, brokerAddress, brokerInitString, brokerName, brokerPort, connectionAddress, connectionPort, helics::extractInterfaceandPort(), helics::BrokerFactory::findBroker(), localInterface, maxMessageCount, maxMessageSize, maxRetries, noAckConnection, portNumber, portStart, reuse_address, server_mode, and use_os_port.

◆ setInterfaceType()

void helics::NetworkBrokerData::setInterfaceType ( interface_type  type)
inline

set the desired interface type

Member Data Documentation

◆ appendNameToAddress

bool helics::NetworkBrokerData::appendNameToAddress
Initial value:
{
false}

flag indicating that the name should be appended to the address

Referenced by helics::NetworkCommsInterface::loadNetworkInfo(), and helics::zeromq::ZmqCoreSS::ZmqCoreSS().

◆ noAckConnection

bool helics::NetworkBrokerData::noAckConnection {false}

flag indicating that a connection ack message is not required for broker connections

Referenced by commandLineParser(), and helics::NetworkCommsInterface::loadNetworkInfo().

◆ use_os_port

bool helics::NetworkBrokerData::use_os_port {false}

specify that any automatic port allocation should use operating system allocation

Referenced by commandLineParser(), and helics::NetworkCommsInterface::loadNetworkInfo().


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