 |
helics
3.3.0
|
8 #include "../core/CoreFederateInfo.hpp"
9 #include "../core/CoreTypes.hpp"
10 #include "helics_cxx_export.h"
32 bool debugging{
false};
37 bool forceNewCore{
false};
39 bool useJsonSerialization{
false};
41 bool encrypted{
false};
53 std::string fileInUse;
81 std::vector<std::string> loadInfoFromArgs(
const std::string& args);
87 std::vector<std::string> loadInfoFromArgs(
int argc,
char* argv[]);
92 void loadInfoFromArgs(std::vector<std::string>& args);
96 void loadInfoFromArgsIgnoreOutput(
const std::string& args);
101 void loadInfoFromArgsIgnoreOutput(
int argc,
char* argv[]);
106 void loadInfoFromToml(
const std::string& toml,
bool runArgParser =
true);
111 void loadInfoFromJson(
const std::string& json,
bool runArgParser =
true);
114 Time checkTimeProperty(
int propId,
Time defVal)
const;
115 bool checkFlagProperty(
int propId,
bool defVal)
const;
116 int checkIntProperty(
int propId,
int defVal)
const;
119 void injectParser(CLI::App* app);
122 std::unique_ptr<helicsCLI11App> makeCLIApp();
std::string localport
Definition: FederateInfo.hpp:52
@ HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST
Definition: helics_enums.h:350
std::string encryptionConfig
encryption configuration string or file
Definition: FederateInfo.hpp:45
@ HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE
Definition: helics_enums.h:340
@ HELICS_FLAG_INTERRUPTIBLE
Definition: helics_enums.h:105
std::string profilerFileName
Definition: FederateInfo.hpp:44
@ HELICS_MULTI_INPUT_MIN_OPERATION
Definition: helics_enums.h:314
CoreType coreTypeFromString(std::string_view type) noexcept
Definition: typeOperations.cpp:17
FederateInfo loadFederateInfo(const std::string &configString)
Definition: FederateInfo.cpp:711
void loadInfoFromToml(const std::string &toml, bool runArgParser=true)
Definition: FederateInfo.cpp:809
@ HELICS_FLAG_DEBUGGING
Definition: helics_enums.h:167
@ HELICS_FLAG_FORWARD_COMPUTE
Definition: helics_enums.h:126
std::vector< std::string > loadInfoFromArgs(const std::string &args)
Definition: FederateInfo.cpp:643
CoreType
Definition: CoreTypes.hpp:36
@ HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE
Definition: helics_enums.h:342
Definition: core-exceptions.hpp:39
bool debugging
Definition: FederateInfo.hpp:32
@ HELICS_LOG_LEVEL_NO_PRINT
Definition: helics_enums.h:186
@ HELICS_HANDLE_OPTION_IGNORE_INTERRUPTS
Definition: helics_enums.h:344
@ HELICS_LOG_LEVEL_CONNECTIONS
Definition: helics_enums.h:197
void loadInfoFromArgsIgnoreOutput(const std::string &args)
Definition: FederateInfo.cpp:665
bool forceNewCore
indicator that the federate should not use an existing core
Definition: FederateInfo.hpp:37
@ HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING
Definition: helics_enums.h:335
@ HELICS_MULTI_INPUT_NO_OP
Definition: helics_enums.h:298
@ HELICS_MULTI_INPUT_VECTORIZE_OPERATION
Definition: helics_enums.h:300
@ HELICS_LOG_LEVEL_WARNING
Definition: helics_enums.h:192
@ HELICS_MULTI_INPUT_AVERAGE_OPERATION
Definition: helics_enums.h:316
@ HELICS_FLAG_STRICT_CONFIG_CHECKING
Definition: helics_enums.h:135
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27
@ HELICS_FLAG_LOCAL_PROFILING_CAPTURE
Definition: helics_enums.h:143
@ HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE
Definition: helics_enums.h:116
@ HELICS_FLAG_SOURCE_ONLY
Definition: helics_enums.h:107
@ HELICS_HANDLE_OPTION_INPUT_PRIORITY_LOCATION
Definition: helics_enums.h:348
@ HELICS_FLAG_PROFILING
Definition: helics_enums.h:175
@ HELICS_MULTI_INPUT_AND_OPERATION
Definition: helics_enums.h:302
@ HELICS_PROPERTY_INT_LOG_BUFFER
Definition: helics_enums.h:289
@ DEFAULT
ZMQ if available or UDP.
int brokerPort
broker port information
Definition: FederateInfo.hpp:35
@ HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL
Definition: helics_enums.h:326
Definition: helicsCLI11.hpp:42
@ HELICS_FLAG_REALTIME
Definition: helics_enums.h:128
@ HELICS_FLAG_DELAY_INIT_ENTRY
Definition: helics_enums.h:150
@ HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL
Definition: helics_enums.h:287
std::string key
key for the broker
Definition: FederateInfo.hpp:51
@ HELICS_FLAG_OBSERVER
Definition: helics_enums.h:101
@ HELICS_FLAG_ROLLBACK
Definition: helics_enums.h:123
int getOptionIndex(std::string val)
Definition: FederateInfo.cpp:408
@ HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS
Definition: helics_enums.h:132
CoreType coreType
the type of the core
Definition: FederateInfo.hpp:34
int getOptionValue(std::string val)
Definition: FederateInfo.cpp:427
@ HELICS_LOG_LEVEL_DEBUG
Definition: helics_enums.h:205
Definition: core-exceptions.hpp:48
bool autobroker
specify that the core should generate a broker if not found otherwise
Definition: FederateInfo.hpp:28
bool encrypted
Definition: FederateInfo.hpp:41
@ HELICS_PROPERTY_INT_LOG_LEVEL
Definition: helics_enums.h:281
std::string coreInitString
an initialization string for the core API object
Definition: FederateInfo.hpp:48
@ HELICS_MULTI_INPUT_DIFF_OPERATION
Definition: helics_enums.h:310
@ HELICS_PROPERTY_INT_MAX_ITERATIONS
Definition: helics_enums.h:278
Time checkTimeProperty(int propId, Time defVal) const
Definition: FederateInfo.cpp:733
Definition: FederateInfo.hpp:24
@ HELICS_HANDLE_OPTION_MULTI_INPUT_HANDLING_METHOD
Definition: helics_enums.h:346
@ HELICS_MULTI_INPUT_OR_OPERATION
Definition: helics_enums.h:305
void setProperty(int propId, double propVal)
Definition: CoreFederateInfo.hpp:24
@ HELICS_PROPERTY_TIME_PERIOD
Definition: helics_enums.h:258
std::string brokerInitString
an initialization string for the broker if auto generated
Definition: FederateInfo.hpp:49
bool useJsonSerialization
Definition: FederateInfo.hpp:39
int getFlagIndex(std::string val)
Definition: FederateInfo.cpp:389
std::vector< std::pair< int, int > > intProps
container for the integer properties
Definition: CoreFederateInfo.hpp:19
@ HELICS_PROPERTY_TIME_RT_TOLERANCE
Definition: helics_enums.h:269
FederateInfo()
Definition: FederateInfo.cpp:39
@ HELICS_HANDLE_OPTION_CONNECTION_REQUIRED
Definition: helics_enums.h:323
@ HELICS_PROPERTY_TIME_DELTA
Definition: helics_enums.h:256
@ HELICS_FLAG_FORCE_LOGGING_FLUSH
Definition: helics_enums.h:171
@ HELICS_FLAG_TERMINATE_ON_ERROR
Definition: helics_enums.h:169
@ HELICS_LOG_LEVEL_DATA
Definition: helics_enums.h:203
@ HELICS_MULTI_INPUT_MAX_OPERATION
Definition: helics_enums.h:312
@ HELICS_FLAG_ONLY_UPDATE_ON_CHANGE
Definition: helics_enums.h:113
std::string fileInUse
string containing a configuration file that was used
Definition: FederateInfo.hpp:54
std::vector< std::pair< int, Time > > timeProps
container for the timeProperties
Definition: CoreFederateInfo.hpp:18
@ HELICS_MULTI_INPUT_SUM_OPERATION
Definition: helics_enums.h:307
@ HELICS_FLAG_USE_JSON_SERIALIZATION
Definition: helics_enums.h:137
@ HELICS_FLAG_EVENT_TRIGGERED
Definition: helics_enums.h:140
@ HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED
Definition: helics_enums.h:330
void injectParser(CLI::App *app)
Definition: FederateInfo.cpp:449
std::string broker
connection information for the broker
Definition: FederateInfo.hpp:50
@ HELICS_HANDLE_OPTION_CONNECTIONS
Definition: helics_enums.h:353
std::string coreName
the name of the core
Definition: FederateInfo.hpp:47
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
int getPropertyIndex(std::string val)
Definition: FederateInfo.cpp:366
char separator
separator for global name of localFederates
Definition: FederateInfo.hpp:27
Definition: CoreFederateInfo.hpp:16
@ HELICS_LOG_LEVEL_SUMMARY
Definition: helics_enums.h:194
@ HELICS_PROPERTY_TIME_RT_LAG
Definition: helics_enums.h:263
@ HELICS_FLAG_SINGLE_THREAD_FEDERATE
Definition: helics_enums.h:130
@ HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH
Definition: helics_enums.h:337
@ HELICS_FLAG_ENABLE_INIT_ENTRY
Definition: helics_enums.h:152
@ HELICS_HANDLE_OPTION_BUFFER_DATA
Definition: helics_enums.h:333
void loadInfoFromJson(const std::string &json, bool runArgParser=true)
Definition: FederateInfo.cpp:763
@ HELICS_LOG_LEVEL_ERROR
Definition: helics_enums.h:188
std::string generateFullCoreInitString(const FederateInfo &fi)
Definition: FederateInfo.cpp:859
@ HELICS_FLAG_RESTRICTIVE_TIME_POLICY
Definition: helics_enums.h:121
void setFlagOption(int flagId, bool propVal=true)
Definition: CoreFederateInfo.hpp:28
@ HELICS_HANDLE_OPTION_SINGLE_CONNECTION_ONLY
Definition: helics_enums.h:328
@ HELICS_PROPERTY_TIME_RT_LEAD
Definition: helics_enums.h:266
@ HELICS_PROPERTY_TIME_OUTPUT_DELAY
Definition: helics_enums.h:273
@ HELICS_PROPERTY_TIME_INPUT_DELAY
Definition: helics_enums.h:271
@ HELICS_FLAG_UNINTERRUPTIBLE
Definition: helics_enums.h:103
std::vector< std::pair< int, bool > > flagProps
container for the binary flag options
Definition: CoreFederateInfo.hpp:20
@ HELICS_PROPERTY_INT_FILE_LOG_LEVEL
Definition: helics_enums.h:284
@ HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE
Definition: helics_enums.h:110
@ HELICS_LOG_LEVEL_TRACE
Definition: helics_enums.h:207
@ HELICS_LOG_LEVEL_TIMING
Definition: helics_enums.h:201
@ HELICS_FLAG_PROFILING_MARKER
Definition: helics_enums.h:177
@ HELICS_LOG_LEVEL_INTERFACES
Definition: helics_enums.h:199
HelicsConfigJSON * addJsonConfig(CLI::App *app)
Add the HELICS JSON configuration processor to the app.
Definition: helicsCLI11JsonConfig.cpp:96
std::string to_string(CoreType type)
Definition: typeOperations.cpp:12
@ HELICS_PROPERTY_TIME_GRANT_TIMEOUT
Definition: helics_enums.h:276
@ HELICS_PROPERTY_TIME_OFFSET
Definition: helics_enums.h:260
@ HELICS_FLAG_DUMPLOG
Definition: helics_enums.h:173
@ HELICS_HANDLE_OPTION_TIME_RESTRICTED
Definition: helics_enums.h:355
std::string defName
a default name to use for a federate
Definition: FederateInfo.hpp:46
@ HELICS_FLAG_SLOW_RESPONDING
Definition: helics_enums.h:163