 |
helics
3.0.1
|
8 #include "../core/CoreFederateInfo.hpp"
9 #include "../core/CoreTypes.hpp"
10 #include "helics_cxx_export.h"
28 bool debugging{
false};
33 bool forceNewCore{
false};
35 bool useJsonSerialization{
false};
47 std::string fileInUse;
75 std::vector<std::string> loadInfoFromArgs(
const std::string& args);
81 std::vector<std::string> loadInfoFromArgs(
int argc,
char* argv[]);
86 void loadInfoFromArgs(std::vector<std::string>& args);
90 void loadInfoFromArgsIgnoreOutput(
const std::string& args);
95 void loadInfoFromArgsIgnoreOutput(
int argc,
char* argv[]);
100 void loadInfoFromToml(
const std::string& toml,
bool runArgParser =
true);
105 void loadInfoFromJson(
const std::string& json,
bool runArgParser =
true);
108 Time checkTimeProperty(
int propId,
Time defVal)
const;
109 bool checkFlagProperty(
int propId,
bool defVal)
const;
110 int checkIntProperty(
int propId,
int defVal)
const;
113 std::unique_ptr<helicsCLI11App> makeCLIApp();
std::string localport
Definition: FederateInfo.hpp:46
@ HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST
Definition: helics_enums.h:333
@ HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE
Definition: helics_enums.h:323
@ HELICS_FLAG_INTERRUPTIBLE
Definition: helics_enums.h:103
std::string profilerFileName
Definition: FederateInfo.hpp:38
@ HELICS_MULTI_INPUT_MIN_OPERATION
Definition: helics_enums.h:298
FederateInfo loadFederateInfo(const std::string &configString)
Definition: FederateInfo.cpp:675
void loadInfoFromToml(const std::string &toml, bool runArgParser=true)
Definition: FederateInfo.cpp:773
@ HELICS_FLAG_DEBUGGING
Definition: helics_enums.h:162
@ HELICS_FLAG_FORWARD_COMPUTE
Definition: helics_enums.h:123
std::vector< std::string > loadInfoFromArgs(const std::string &args)
Definition: FederateInfo.cpp:607
CoreType
Definition: CoreTypes.hpp:36
@ HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE
Definition: helics_enums.h:325
Definition: core-exceptions.hpp:38
bool debugging
Definition: FederateInfo.hpp:28
@ HELICS_LOG_LEVEL_NO_PRINT
Definition: helics_enums.h:179
@ HELICS_HANDLE_OPTION_IGNORE_INTERRUPTS
Definition: helics_enums.h:327
@ HELICS_LOG_LEVEL_CONNECTIONS
Definition: helics_enums.h:190
void loadInfoFromArgsIgnoreOutput(const std::string &args)
Definition: FederateInfo.cpp:629
bool forceNewCore
indicator that the federate should not use an existing core
Definition: FederateInfo.hpp:33
@ HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING
Definition: helics_enums.h:318
@ HELICS_MULTI_INPUT_NO_OP
Definition: helics_enums.h:283
@ HELICS_MULTI_INPUT_VECTORIZE_OPERATION
Definition: helics_enums.h:285
CoreType coreTypeFromString(std::string type) noexcept
Definition: typeOperations.cpp:17
@ HELICS_LOG_LEVEL_WARNING
Definition: helics_enums.h:185
@ HELICS_MULTI_INPUT_AVERAGE_OPERATION
Definition: helics_enums.h:300
@ HELICS_FLAG_STRICT_CONFIG_CHECKING
Definition: helics_enums.h:132
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27
@ HELICS_FLAG_LOCAL_PROFILING_CAPTURE
Definition: helics_enums.h:140
@ HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE
Definition: helics_enums.h:114
@ HELICS_FLAG_SOURCE_ONLY
Definition: helics_enums.h:105
@ HELICS_HANDLE_OPTION_INPUT_PRIORITY_LOCATION
Definition: helics_enums.h:331
@ HELICS_FLAG_PROFILING
Definition: helics_enums.h:170
@ HELICS_MULTI_INPUT_AND_OPERATION
Definition: helics_enums.h:287
@ DEFAULT
ZMQ if available or UDP.
int brokerPort
broker port information
Definition: FederateInfo.hpp:31
@ HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL
Definition: helics_enums.h:310
Definition: helicsCLI11.hpp:41
@ HELICS_FLAG_REALTIME
Definition: helics_enums.h:125
@ HELICS_FLAG_DELAY_INIT_ENTRY
Definition: helics_enums.h:146
@ HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL
Definition: helics_enums.h:274
std::string key
key for the broker
Definition: FederateInfo.hpp:45
@ HELICS_FLAG_OBSERVER
Definition: helics_enums.h:99
@ HELICS_FLAG_ROLLBACK
Definition: helics_enums.h:121
int getOptionIndex(std::string val)
Definition: FederateInfo.cpp:385
@ HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS
Definition: helics_enums.h:129
CoreType coreType
the type of the core
Definition: FederateInfo.hpp:30
int getOptionValue(std::string val)
Definition: FederateInfo.cpp:404
@ HELICS_LOG_LEVEL_DEBUG
Definition: helics_enums.h:198
Definition: core-exceptions.hpp:47
bool autobroker
specify that the core should generate a broker if not found otherwise
Definition: FederateInfo.hpp:24
@ HELICS_PROPERTY_INT_LOG_LEVEL
Definition: helics_enums.h:268
std::string coreInitString
an initialization string for the core API object
Definition: FederateInfo.hpp:42
@ HELICS_MULTI_INPUT_DIFF_OPERATION
Definition: helics_enums.h:294
@ HELICS_PROPERTY_INT_MAX_ITERATIONS
Definition: helics_enums.h:266
Time checkTimeProperty(int propId, Time defVal) const
Definition: FederateInfo.cpp:697
Definition: FederateInfo.hpp:20
@ HELICS_HANDLE_OPTION_MULTI_INPUT_HANDLING_METHOD
Definition: helics_enums.h:329
@ HELICS_MULTI_INPUT_OR_OPERATION
Definition: helics_enums.h:289
void setProperty(int propId, double propVal)
Definition: CoreFederateInfo.hpp:24
@ HELICS_PROPERTY_TIME_PERIOD
Definition: helics_enums.h:246
std::string brokerInitString
an initialization string for the broker if auto generated
Definition: FederateInfo.hpp:43
bool useJsonSerialization
Definition: FederateInfo.hpp:35
int getFlagIndex(std::string val)
Definition: FederateInfo.cpp:366
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:257
FederateInfo()
Definition: FederateInfo.cpp:26
@ HELICS_HANDLE_OPTION_CONNECTION_REQUIRED
Definition: helics_enums.h:307
@ HELICS_PROPERTY_TIME_DELTA
Definition: helics_enums.h:244
@ HELICS_FLAG_FORCE_LOGGING_FLUSH
Definition: helics_enums.h:166
@ HELICS_FLAG_TERMINATE_ON_ERROR
Definition: helics_enums.h:164
@ HELICS_LOG_LEVEL_DATA
Definition: helics_enums.h:196
@ HELICS_MULTI_INPUT_MAX_OPERATION
Definition: helics_enums.h:296
@ HELICS_FLAG_ONLY_UPDATE_ON_CHANGE
Definition: helics_enums.h:111
std::string fileInUse
string containing a configuration file that was used
Definition: FederateInfo.hpp:48
std::vector< std::pair< int, Time > > timeProps
container for the timeProperties
Definition: CoreFederateInfo.hpp:18
@ HELICS_MULTI_INPUT_SUM_OPERATION
Definition: helics_enums.h:291
@ HELICS_FLAG_USE_JSON_SERIALIZATION
Definition: helics_enums.h:134
@ HELICS_FLAG_EVENT_TRIGGERED
Definition: helics_enums.h:137
@ HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED
Definition: helics_enums.h:314
std::string broker
connection information for the broker
Definition: FederateInfo.hpp:44
@ HELICS_HANDLE_OPTION_CONNECTIONS
Definition: helics_enums.h:335
std::string coreName
the name of the core
Definition: FederateInfo.hpp:41
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:343
char separator
separator for global name of localFederates
Definition: FederateInfo.hpp:23
Definition: CoreFederateInfo.hpp:16
@ HELICS_LOG_LEVEL_SUMMARY
Definition: helics_enums.h:187
@ HELICS_PROPERTY_TIME_RT_LAG
Definition: helics_enums.h:251
@ HELICS_FLAG_SINGLE_THREAD_FEDERATE
Definition: helics_enums.h:127
@ HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH
Definition: helics_enums.h:320
@ HELICS_FLAG_ENABLE_INIT_ENTRY
Definition: helics_enums.h:148
@ HELICS_HANDLE_OPTION_BUFFER_DATA
Definition: helics_enums.h:316
void loadInfoFromJson(const std::string &json, bool runArgParser=true)
Definition: FederateInfo.cpp:727
@ HELICS_LOG_LEVEL_ERROR
Definition: helics_enums.h:181
std::string generateFullCoreInitString(const FederateInfo &fi)
Definition: FederateInfo.cpp:821
@ HELICS_FLAG_RESTRICTIVE_TIME_POLICY
Definition: helics_enums.h:119
void setFlagOption(int flagId, bool propVal=true)
Definition: CoreFederateInfo.hpp:28
@ HELICS_HANDLE_OPTION_SINGLE_CONNECTION_ONLY
Definition: helics_enums.h:312
@ HELICS_PROPERTY_TIME_RT_LEAD
Definition: helics_enums.h:254
@ HELICS_PROPERTY_TIME_OUTPUT_DELAY
Definition: helics_enums.h:261
@ HELICS_PROPERTY_TIME_INPUT_DELAY
Definition: helics_enums.h:259
@ HELICS_FLAG_UNINTERRUPTIBLE
Definition: helics_enums.h:101
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:271
@ HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE
Definition: helics_enums.h:108
@ HELICS_LOG_LEVEL_TRACE
Definition: helics_enums.h:200
@ HELICS_LOG_LEVEL_TIMING
Definition: helics_enums.h:194
@ HELICS_FLAG_PROFILING_MARKER
Definition: helics_enums.h:172
@ HELICS_LOG_LEVEL_INTERFACES
Definition: helics_enums.h:192
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:264
@ HELICS_PROPERTY_TIME_OFFSET
Definition: helics_enums.h:248
@ HELICS_FLAG_DUMPLOG
Definition: helics_enums.h:168
std::string defName
a default name to use for a federate
Definition: FederateInfo.hpp:40
@ HELICS_FLAG_SLOW_RESPONDING
Definition: helics_enums.h:158