 |
helics
2.8.1
|
8 #include "../core/CoreFederateInfo.hpp"
9 #include "../core/core-types.hpp"
10 #include "helics_cxx_export.h"
28 bool debugging{
false};
32 bool forceNewCore{
false};
34 bool useJsonSerialization{
false};
46 std::string fileInUse;
74 std::vector<std::string> loadInfoFromArgs(
const std::string& args);
80 std::vector<std::string> loadInfoFromArgs(
int argc,
char* argv[]);
85 void loadInfoFromArgs(std::vector<std::string>& args);
89 void loadInfoFromArgsIgnoreOutput(
const std::string& args);
94 void loadInfoFromArgsIgnoreOutput(
int argc,
char* argv[]);
99 void loadInfoFromToml(
const std::string& toml,
bool runArgParser =
true);
104 void loadInfoFromJson(
const std::string& json,
bool runArgParser =
true);
107 Time checkTimeProperty(
int propId,
Time defVal)
const;
108 bool checkFlagProperty(
int propId,
bool defVal)
const;
109 int checkIntProperty(
int propId,
int defVal)
const;
112 std::unique_ptr<helicsCLI11App> makeCLIApp();
std::string localport
Definition: FederateInfo.hpp:45
@ helics_flag_use_json_serialization
Definition: helics_enums.h:121
bool hasJsonExtension(const std::string &jsonString)
Definition: JsonProcessingFunctions.cpp:18
@ helics_property_time_offset
Definition: helics_enums.h:219
std::string profilerFileName
Definition: FederateInfo.hpp:37
@ helics_property_int_max_iterations
Definition: helics_enums.h:234
core_type
Definition: core-types.hpp:37
@ helics_multi_input_max_operation
Definition: helics_enums.h:264
@ helics_flag_single_thread_federate
Definition: helics_enums.h:114
Definition: application_api/ValueFederate.hpp:25
@ helics_flag_event_triggered
Definition: helics_enums.h:124
@ helics_property_time_rt_lag
Definition: helics_enums.h:222
FederateInfo loadFederateInfo(const std::string &configString)
Definition: FederateInfo.cpp:639
@ helics_property_time_input_delay
Definition: helics_enums.h:230
void loadInfoFromToml(const std::string &toml, bool runArgParser=true)
Definition: FederateInfo.cpp:737
@ helics_handle_option_multiple_connections_allowed
Definition: helics_enums.h:283
std::vector< std::string > loadInfoFromArgs(const std::string &args)
Definition: FederateInfo.cpp:571
Definition: core-exceptions.hpp:39
bool debugging
Definition: FederateInfo.hpp:28
@ helics_error_invalid_object
Definition: helics_enums.h:206
void loadInfoFromArgsIgnoreOutput(const std::string &args)
Definition: FederateInfo.cpp:593
bool forceNewCore
indicator that the federate should not use an existing core
Definition: FederateInfo.hpp:32
@ helics_handle_option_connection_required
Definition: helics_enums.h:276
@ helics_log_level_summary
Definition: helics_enums.h:171
std::string to_string(core_type type)
Definition: typeOperations.cpp:12
@ helics_handle_option_clear_priority_list
Definition: helics_enums.h:302
@ helics_property_time_output_delay
Definition: helics_enums.h:232
@ helics_handle_option_strict_type_checking
Definition: helics_enums.h:287
TimeRepresentation< count_time< 9 > > Time
Definition: helics-time.hpp:27
toml::value loadToml(const std::string &tomlString)
Definition: TomlProcessingFunctions.cpp:22
Common functions for the HELICS C api.
@ helics_property_time_rt_lead
Definition: helics_enums.h:225
@ helics_flag_force_logging_flush
Definition: helics_enums.h:155
int brokerPort
broker port information
Definition: FederateInfo.hpp:30
Definition: application_api/MessageFederate.hpp:20
@ helics_log_level_warning
Definition: helics_enums.h:169
Definition: helicsCLI11.hpp:41
@ helics_flag_dumplog
Definition: helics_enums.h:157
std::string key
key for the broker
Definition: FederateInfo.hpp:44
@ helics_log_level_trace
Definition: helics_enums.h:182
int getOptionIndex(std::string val)
Definition: FederateInfo.cpp:356
@ helics_handle_option_buffer_data
Definition: helics_enums.h:285
@ helics_flag_debugging
Definition: helics_enums.h:151
@ helics_flag_ignore_time_mismatch_warnings
Definition: helics_enums.h:116
@ helics_property_int_console_log_level
Definition: helics_enums.h:242
int getOptionValue(std::string val)
Definition: FederateInfo.cpp:375
@ helics_handle_option_multi_input_handling_method
Definition: helics_enums.h:298
Definition: core-exceptions.hpp:48
bool autobroker
specify that the core should generate a broker if not found otherwise
Definition: FederateInfo.hpp:24
@ DEFAULT
ZMQ if available or UDP.
@ helics_log_level_connections
Definition: helics_enums.h:174
@ helics_log_level_error
Definition: helics_enums.h:167
@ helics_handle_option_single_connection_only
Definition: helics_enums.h:281
std::string coreInitString
an initialization string for the core API object
Definition: FederateInfo.hpp:41
@ helics_property_time_delta
Definition: helics_enums.h:215
@ helics_handle_option_connection_optional
Definition: helics_enums.h:279
@ helics_flag_enable_init_entry
Definition: helics_enums.h:137
Time checkTimeProperty(int propId, Time defVal) const
Definition: FederateInfo.cpp:661
@ helics_property_time_rt_tolerance
Definition: helics_enums.h:228
Definition: FederateInfo.hpp:20
@ helics_log_level_interfaces
Definition: helics_enums.h:176
@ helics_multi_input_diff_operation
Definition: helics_enums.h:262
@ helics_flag_profiling
Definition: helics_enums.h:159
core_type coreType
the type of the core
Definition: FederateInfo.hpp:29
@ helics_multi_input_or_operation
Definition: helics_enums.h:257
@ helics_flag_wait_for_current_time_update
Definition: helics_enums.h:101
void setProperty(int propId, double propVal)
Definition: CoreFederateInfo.hpp:24
Json::Value loadJson(const std::string &jsonString)
Definition: JsonProcessingFunctions.cpp:24
std::string brokerInitString
an initialization string for the broker if auto generated
Definition: FederateInfo.hpp:42
Definition: api_objects.h:82
@ helics_handle_option_only_transmit_on_change
Definition: helics_enums.h:292
@ helics_flag_source_only
Definition: helics_enums.h:92
bool useJsonSerialization
Definition: FederateInfo.hpp:34
int getFlagIndex(std::string val)
Definition: FederateInfo.cpp:337
@ helics_log_level_data
Definition: helics_enums.h:180
std::vector< std::pair< int, int > > intProps
container for the integer properties
Definition: CoreFederateInfo.hpp:19
@ helics_handle_option_only_update_on_change
Definition: helics_enums.h:294
@ helics_property_int_file_log_level
Definition: helics_enums.h:239
@ fed
special logging command for message coming from a fed
Definition: loggingHelper.hpp:32
FederateInfo()
Definition: FederateInfo.cpp:26
@ helics_flag_restrictive_time_policy
Definition: helics_enums.h:106
@ helics_property_int_log_level
Definition: helics_enums.h:236
@ helics_flag_forward_compute
Definition: helics_enums.h:110
@ helics_flag_strict_config_checking
Definition: helics_enums.h:119
@ helics_handle_option_ignore_unit_mismatch
Definition: helics_enums.h:289
std::string fileInUse
string containing a configuration file that was used
Definition: FederateInfo.hpp:47
std::vector< std::pair< int, Time > > timeProps
container for the timeProperties
Definition: CoreFederateInfo.hpp:18
@ helics_flag_interruptible
Definition: helics_enums.h:90
Definition: api-data.h:166
@ helics_log_level_no_print
Definition: helics_enums.h:165
@ helics_flag_uninterruptible
Definition: helics_enums.h:88
@ helics_flag_local_profiling_capture
Definition: helics_enums.h:129
@ helics_flag_slow_responding
Definition: helics_enums.h:147
std::string broker
connection information for the broker
Definition: FederateInfo.hpp:43
@ helics_log_level_timing
Definition: helics_enums.h:178
@ helics_flag_delay_init_entry
Definition: helics_enums.h:135
std::string coreName
the name of the core
Definition: FederateInfo.hpp:40
@ helics_multi_input_average_operation
Definition: helics_enums.h:268
FedObject * getFedObject(helics_federate fed, helics_error *err) noexcept
Definition: FederateExport.cpp:27
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
@ helics_flag_only_update_on_change
Definition: helics_enums.h:98
int getPropertyIndex(std::string val)
Definition: FederateInfo.cpp:314
@ helics_flag_only_transmit_on_change
Definition: helics_enums.h:95
char separator
separator for global name of localFederates
Definition: FederateInfo.hpp:23
Definition: CoreFederateInfo.hpp:16
@ helics_flag_realtime
Definition: helics_enums.h:112
@ helics_flag_terminate_on_error
Definition: helics_enums.h:153
core_type coreTypeFromString(std::string type) noexcept
Definition: typeOperations.cpp:17
void loadInfoFromJson(const std::string &json, bool runArgParser=true)
Definition: FederateInfo.cpp:691
@ helics_flag_observer
Definition: helics_enums.h:86
std::string generateFullCoreInitString(const FederateInfo &fi)
Definition: FederateInfo.cpp:785
@ helics_multi_input_min_operation
Definition: helics_enums.h:266
void setFlagOption(int flagId, bool propVal=true)
Definition: CoreFederateInfo.hpp:28
Definition: application_api/Federate.hpp:44
@ helics_handle_option_ignore_interrupts
Definition: helics_enums.h:296
std::vector< std::pair< int, bool > > flagProps
container for the binary flag options
Definition: CoreFederateInfo.hpp:20
@ helics_multi_input_vectorize_operation
Definition: helics_enums.h:253
@ helics_multi_input_no_op
Definition: helics_enums.h:251
@ helics_flag_rollback
Definition: helics_enums.h:108
@ helics_multi_input_sum_operation
Definition: helics_enums.h:259
@ helics_handle_option_input_priority_location
Definition: helics_enums.h:300
HelicsConfigJSON * addJsonConfig(CLI::App *app)
Add the HELICS JSON configuration processor to the app.
Definition: helicsCLI11JsonConfig.cpp:96
@ helics_multi_input_and_operation
Definition: helics_enums.h:255
@ helics_property_time_period
Definition: helics_enums.h:217
@ helics_handle_option_connections
Definition: helics_enums.h:304
std::string defName
a default name to use for a federate
Definition: FederateInfo.hpp:39
void * helics_federate
Definition: api-data.h:56
@ helics_flag_profiling_marker
Definition: helics_enums.h:126