| helics 3.6.1

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

`#include <NetworkBrokerData.hpp>`

## Public Types
enum class | ServerModeOptions : char { UNSPECIFIED = 0 , SERVER_DEFAULT_ACTIVE = 1 , SERVER_DEFAULT_DEACTIVATED = 2 , SERVER_ACTIVE = 3 , SERVER_DEACTIVATED = 4 }

## Public Member Functions
| NetworkBrokerData (gmlc::networking::InterfaceTypes type)
std::shared_ptr< helicsCLI11App > | commandLineParser (std::string_view localAddress, bool enableConfig=true)
void | setInterfaceType (gmlc::networking::InterfaceTypes 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
gmlc::networking::InterfaceNetworks | interfaceNetwork
bool | reuse_address {false}
bool | use_os_port {false}
| specify that any automatic port allocation should use operating system allocation
bool | autobroker {false}
bool | appendNameToAddress {false}
| flag indicating that the name should be appended to the address
bool | noAckConnection {false}
bool | useJsonSerialization {false}
| for message serialization use JSON
bool | observer {false}
| specify that the network connection is used for observation only
ServerModeOptions | server_mode {ServerModeOptions::UNSPECIFIED}
| setup a server mode
bool | encrypted {false}
bool | forceConnection {false}
std::string | encryptionConfig

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ NetworkBrokerData()

helics::NetworkBrokerData::NetworkBrokerData | ( | gmlc::networking::InterfaceTypes | type | ) |
| inline explicit

constructor from the allowed type

## Member Function Documentation

## ◆ commandLineParser()

std::shared_ptr< helicsCLI11App > helics::NetworkBrokerData::commandLineParser | ( | std::string_view | localAddress,
|  | bool | enableConfig = `true`
| ) |  |

generate a command line argument parser for the network broker data

Parameters

  localAddress | a predefined string containing the desired local only address

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

## ◆ setInterfaceType()

void helics::NetworkBrokerData::setInterfaceType | ( | gmlc::networking::InterfaceTypes | type | ) |
| inline

set the desired interface type

## Member Data Documentation

## ◆ autobroker

bool helics::NetworkBrokerData::autobroker {false}

flag for specifying an automatic broker generation

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

## ◆ interfaceNetwork

gmlc::networking::InterfaceNetworks helics::NetworkBrokerData::interfaceNetwork

Initial value:
{
gmlc::networking::InterfaceNetworks::LOCAL}

## ◆ 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().

## ◆ reuse_address

bool helics::NetworkBrokerData::reuse_address {false}

allow reuse of binding address

Referenced by commandLineParser(), helics::tcp::TcpComms::loadNetworkInfo(), and helics::tcp::TcpCommsSS::loadNetworkInfo().

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

- NetworkBrokerData.hpp
- NetworkBrokerData.cpp