helics  2.8.1
HelicsPrimaryTypes.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2021,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #pragma once
8 
9 #include "ValueConverter.hpp"
10 #include "helics/external/variant.hpp"
11 #include "helics/helics-config.h"
12 #include "helicsTypes.hpp"
13 #include "helics_cxx_export.h"
14 
15 #include <cmath>
16 #include <complex>
17 #include <cstdint>
18 #include <string>
19 #include <utility>
20 #include <vector>
25 namespace helics {
28 using defV = mpark::variant<double,
29  int64_t,
30  std::string,
31  std::complex<double>,
32  std::vector<double>,
33  std::vector<std::complex<double>>,
35 
38  double_loc = 0,
39  int_loc = 1,
40  string_loc = 2,
41  complex_loc = 3,
42  vector_loc = 4,
43  complex_vector_loc = 5,
44  named_point_loc = 6
45 };
47 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, const std::string& val, double deltaV);
48 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, const char* val, double deltaV);
49 HELICS_CXX_EXPORT bool
50  changeDetected(const defV& prevValue, const std::vector<double>& val, double deltaV);
51 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue,
52  const std::vector<std::complex<double>>& val,
53  double deltaV);
54 HELICS_CXX_EXPORT bool
55  changeDetected(const defV& prevValue, const double* vals, size_t size, double deltaV);
56 HELICS_CXX_EXPORT bool
57  changeDetected(const defV& prevValue, const std::complex<double>& val, double deltaV);
58 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, double val, double deltaV);
59 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, int64_t val, double deltaV);
60 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, Time val, double deltaV);
61 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, const NamedPoint& val, double deltaV);
62 HELICS_CXX_EXPORT bool changeDetected(const defV& prevValue, bool val, double deltaV);
63 
65 inline int64_t make_valid(bool obj)
66 {
67  return (obj) ? 1LL : 0LL;
68 }
69 
71 inline int64_t make_valid(uint64_t val)
72 {
73  return static_cast<int64_t>(val);
74 }
75 inline int64_t make_valid(int16_t val)
76 {
77  return static_cast<int64_t>(val);
78 }
79 inline int64_t make_valid(uint16_t val)
80 {
81  return static_cast<int64_t>(val);
82 }
83 inline int64_t make_valid(char val)
84 {
85  return static_cast<int64_t>(val);
86 }
87 inline int64_t make_valid(unsigned char val)
88 {
89  return static_cast<int64_t>(val);
90 }
91 inline int64_t make_valid(int32_t val)
92 {
93  return static_cast<int64_t>(val);
94 }
95 inline int64_t make_valid(uint32_t val)
96 {
97  return static_cast<int64_t>(val);
98 }
99 inline int64_t make_valid(Time val)
100 {
101  return val.getBaseTimeCode();
102 }
103 
104 inline double make_valid(float val)
105 {
106  return static_cast<double>(val);
107 }
108 
109 inline std::complex<double> make_valid(const std::complex<float>& val)
110 {
111  return {val.real(), val.imag()};
112 }
113 
115 template<class X>
116 decltype(auto) make_valid(X&& obj)
117 {
118  return std::forward<X>(obj);
119 }
121 HELICS_CXX_EXPORT void valueExtract(const defV& dv, std::string& val);
122 
124 HELICS_CXX_EXPORT void valueExtract(const defV& dv, std::complex<double>& val);
125 
127 HELICS_CXX_EXPORT void valueExtract(const defV& dv, std::vector<double>& val);
128 
130 HELICS_CXX_EXPORT void valueExtract(const defV& dv, std::vector<std::complex<double>>& val);
131 
133 HELICS_CXX_EXPORT void valueExtract(const defV& dv, NamedPoint& val);
134 
136 HELICS_CXX_EXPORT void valueExtract(const defV& dv, Time& val);
137 
139 HELICS_CXX_EXPORT void valueExtract(const defV& dv, char& val);
140 
142 HELICS_CXX_EXPORT void valueExtract(const defV& dv, bool& val);
143 
144 HELICS_CXX_EXPORT defV readJsonValue(const data_view& dv);
145 
146 HELICS_CXX_EXPORT void valueExtract(const data_view& dv, data_type baseType, std::string& val);
147 
148 HELICS_CXX_EXPORT void
149  valueExtract(const data_view& dv, data_type baseType, std::vector<double>& val);
150 
151 HELICS_CXX_EXPORT void
152  valueExtract(const data_view& dv, data_type baseType, std::complex<double>& val);
153 
154 HELICS_CXX_EXPORT void
155  valueExtract(const data_view& dv, data_type baseType, std::vector<std::complex<double>>& val);
156 
157 HELICS_CXX_EXPORT void valueExtract(const data_view& dv, data_type baseType, NamedPoint& val);
158 
159 HELICS_CXX_EXPORT void valueExtract(const data_view& dv, data_type baseType, Time& val);
160 
161 HELICS_CXX_EXPORT void valueExtract(const data_view& dv, data_type baseType, bool& val);
162 
163 HELICS_CXX_EXPORT void valueExtract(const data_view& dv, data_type baseType, defV& val);
164 
165 HELICS_CXX_EXPORT void valueExtract3(const data_view& dv, data_type baseType, defV& val);
166 
168 template<class X>
169 std::enable_if_t<std::is_arithmetic<X>::value && (!std::is_same<X, char>::value)>
170  valueExtract(const defV& dv, X& val)
171 {
172  switch (dv.index()) {
173  case double_loc: // double
174  val = static_cast<X>(mpark::get<double>(dv));
175  break;
176  case int_loc: // int64_t
177  val = static_cast<X>(mpark::get<int64_t>(dv));
178  break;
179  case string_loc: // string
180  default:
181  val = static_cast<X>(getDoubleFromString(mpark::get<std::string>(dv)));
182  break;
183  case complex_loc: // complex
184  val = static_cast<X>(std::abs(mpark::get<std::complex<double>>(dv)));
185  break;
186  case vector_loc: // vector
187  {
188  const auto& vec = mpark::get<std::vector<double>>(dv);
189  val = static_cast<X>(vectorNorm(vec));
190  break;
191  }
192  case complex_vector_loc: // complex vector
193  {
194  const auto& vec = mpark::get<std::vector<std::complex<double>>>(dv);
195  val = static_cast<X>(vectorNorm(vec));
196  break;
197  }
198  case named_point_loc: {
199  const auto& np = mpark::get<NamedPoint>(dv);
200  if (std::isnan(np.value)) {
201  val = static_cast<X>(getDoubleFromString(np.name));
202  } else {
203  val = static_cast<X>(np.value);
204  }
205  break;
206  }
207  }
208 }
209 
211 template<class X>
212 std::enable_if_t<std::is_arithmetic<X>::value>
213  valueExtract(const data_view& dv, data_type baseType, X& val)
214 {
215  constexpr size_t byte_order_check_size = 1;
216  switch (baseType) {
217  case data_type::helics_any: {
218  if (dv.size() == sizeof(double) + byte_order_check_size) {
220  if (std::isnormal(V)) {
221  val = static_cast<X>(V);
222  } else {
223  auto Vint = ValueConverter<int64_t>::interpret(dv);
224  val = static_cast<X>(Vint);
225  }
226  } else if (dv.size() == 2 * sizeof(double) + byte_order_check_size) {
227  auto V = ValueConverter<std::complex<double>>::interpret(dv);
228  val = static_cast<X>(std::abs(V));
229  } else if (dv.size() == sizeof(int) + byte_order_check_size) {
231  if (std::isnormal(V)) {
232  val = static_cast<X>(V);
233  } else {
234  auto Vint = ValueConverter<int32_t>::interpret(dv);
235  val = static_cast<X>(Vint);
236  }
237  } else if (dv.size() == sizeof(char)) {
238  val = static_cast<X>((dv[0] == '0') ? 0 : 1);
239  } else {
240  try {
241  val = static_cast<X>(std::stod(dv.string()));
242  }
243  catch (const std::invalid_argument&) { // well lets try a vector conversion
244  auto V = ValueConverter<std::vector<double>>::interpret(dv);
245  val = static_cast<X>(vectorNorm(V));
246  }
247  }
248  break;
249  }
250  case data_type::helics_string:
251  default:
252  val = static_cast<X>(getDoubleFromString(dv.string()));
253  break;
254  case data_type::helics_bool:
255  val = static_cast<X>((dv.string() != "0"));
256  break;
257  case data_type::helics_named_point: {
258  auto npval = ValueConverter<NamedPoint>::interpret(dv);
259  if (std::isnan(npval.value)) {
260  try {
261  val = static_cast<X>(getDoubleFromString(npval.name));
262  }
263  catch (const std::invalid_argument&) {
264  val = static_cast<X>(
265  invalidValue<
266  std::conditional_t<std::is_integral<X>::value, int64_t, double>>());
267  }
268  } else {
269  val = static_cast<X>(npval.value);
270  }
271 
272  break;
273  }
274  case data_type::helics_double: {
276  val = static_cast<X>(V);
277  break;
278  }
279  case data_type::helics_int:
280  case data_type::helics_time: {
282  val = static_cast<X>(V);
283  break;
284  }
285 
286  case data_type::helics_vector: {
287  auto V = ValueConverter<std::vector<double>>::interpret(dv);
288  val = static_cast<X>(vectorNorm(V));
289  break;
290  }
291  case data_type::helics_complex: {
292  auto V = ValueConverter<std::complex<double>>::interpret(dv);
293  val = static_cast<X>(std::abs(V));
294  break;
295  }
296  case data_type::helics_complex_vector: {
297  auto V = ValueConverter<std::vector<std::complex<double>>>::interpret(dv);
298  val = static_cast<X>(vectorNorm(V));
299  break;
300  }
301  case data_type::helics_json:
302  valueExtract(readJsonValue(dv), val);
303  break;
304  case data_type::helics_custom:
305  throw(std::invalid_argument("unrecognized helics type"));
306  }
307 }
308 
309 HELICS_CXX_EXPORT void valueConvert(defV& val, data_type newType);
310 
311 } // namespace helics
helics::timeZero
constexpr Time timeZero
Definition: helics-time.hpp:31
helicsBrokerSetTimeBarrier
void helicsBrokerSetTimeBarrier(helics_broker broker, helics_time barrierTime, helics_error *err)
Definition: helicsExport.cpp:529
helics::BrokerFactory::cleanUpBrokers
size_t cleanUpBrokers()
Definition: BrokerFactory.cpp:266
helicsTypes.hpp
helicsCreateBrokerFromArgs
helics_broker helicsCreateBrokerFromArgs(const char *type, const char *name, int argc, const char *const *argv, helics_error *err)
Definition: helicsExport.cpp:412
helics::NamedPoint::name
std::string name
the text value for the named point
Definition: helicsTypes.hpp:113
helics::NamedPoint
Definition: helicsTypes.hpp:111
helics::core_type
core_type
Definition: core-types.hpp:37
helics::ValueConverter::interpret
static X interpret(const data_view &block)
Definition: ValueConverter_impl.hpp:317
helics::InvalidIdentifier
Definition: core-exceptions.hpp:39
helics_error_invalid_object
@ helics_error_invalid_object
Definition: helics_enums.h:206
helics::HelicsSystemFailure
Definition: core-exceptions.hpp:94
helicsCreateCoreFromArgs
helics_core helicsCreateCoreFromArgs(const char *type, const char *name, int argc, const char *const *argv, helics_error *err)
Definition: helicsExport.cpp:301
helicsCoreMakeConnections
void helicsCoreMakeConnections(helics_core core, const char *file, helics_error *err)
Definition: helicsExport.cpp:631
helics::make_valid
int64_t make_valid(bool obj)
Definition: HelicsPrimaryTypes.hpp:65
helics::helicsComplexVectorString
std::string helicsComplexVectorString(const std::vector< std::complex< double >> &val)
Definition: helicsTypes.cpp:282
helics::invalidValue
X invalidValue()
Definition: helicsTypes.hpp:485
helicsCoreConnect
helics_bool helicsCoreConnect(helics_core core, helics_error *err)
Definition: helicsExport.cpp:728
helics::ValueConverter
Definition: ValueConverter.hpp:26
helicsCoreSetLogFile
void helicsCoreSetLogFile(helics_core core, const char *logFileName, helics_error *err)
Definition: helicsExport.cpp:667
helicsIsCoreTypeAvailable
helics_bool helicsIsCoreTypeAvailable(const char *type)
Definition: helicsExport.cpp:107
helicsCloseLibrary
void helicsCloseLibrary(void)
Definition: helicsExport.cpp:866
helics::NamedPoint::value
double value
the data value for the named point
Definition: helicsTypes.hpp:114
helicsBrokerGlobalError
void helicsBrokerGlobalError(helics_broker broker, int errorCode, const char *errorString, helics_error *err)
Definition: helicsExport.cpp:547
helics::helicsGetVector
std::vector< double > helicsGetVector(const std::string &val)
Definition: helicsTypes.cpp:334
helics::Time
TimeRepresentation< count_time< 9 > > Time
Definition: helics-time.hpp:27
helics_time
double helics_time
Definition: api-data.h:81
helics_core
void * helics_core
Definition: api-data.h:46
helics::CoreFactory::FindOrCreate
std::shared_ptr< Core > FindOrCreate(core_type type, const std::string &coreName, std::vector< std::string > args)
Definition: CoreFactory.cpp:180
helics.h
Common functions for the HELICS C api.
helicsCreateCore
helics_core helicsCreateCore(const char *type, const char *name, const char *initString, helics_error *err)
Definition: helicsExport.cpp:266
helicsFederateClone
helics_federate helicsFederateClone(helics_federate fed, helics_error *err)
Definition: FederateExport.cpp:519
helicsCoreWaitForDisconnect
helics_bool helicsCoreWaitForDisconnect(helics_core core, int msToWait, helics_error *err)
Definition: helicsExport.cpp:773
helicsBrokerMakeConnections
void helicsBrokerMakeConnections(helics_broker broker, const char *file, helics_error *err)
Definition: helicsExport.cpp:591
helics_false
const helics_bool helics_false
Definition: api-data.h:95
helicsBrokerDisconnect
void helicsBrokerDisconnect(helics_broker broker, helics_error *err)
Definition: helicsExport.cpp:783
helics::data_view
Definition: data_view.hpp:22
helics_true
const helics_bool helics_true
Definition: api-data.h:94
helics::ValueConverter3::interpret
static X interpret(const data_view &block)
Definition: ValueConverter.hpp:101
helicsCoreIsValid
helics_bool helicsCoreIsValid(helics_core core)
Definition: helicsExport.cpp:351
helics::core_type::UNRECOGNIZED
@ UNRECOGNIZED
unknown
helics::versionString
constexpr auto versionString
Definition: helicsVersion.hpp:16
helicsBrokerIsValid
helics_bool helicsBrokerIsValid(helics_broker broker)
Definition: helicsExport.cpp:459
helics_error_system_failure
@ helics_error_system_failure
Definition: helics_enums.h:201
helics::helicsGetNamedPoint
NamedPoint helicsGetNamedPoint(const std::string &val)
Definition: helicsTypes.cpp:348
helics::ConnectionFailure
Definition: core-exceptions.hpp:76
helicsBrokerGetIdentifier
const char * helicsBrokerGetIdentifier(helics_broker broker)
Definition: helicsExport.cpp:676
helicsCoreDisconnect
void helicsCoreDisconnect(helics_core core, helics_error *err)
Definition: helicsExport.cpp:746
helics::vectorNorm
double vectorNorm(const std::vector< double > &vec)
Definition: helicsTypes.cpp:66
helicsCoreGetAddress
const char * helicsCoreGetAddress(helics_core core)
Definition: helicsExport.cpp:708
helicsBrokerAddSourceFilterToEndpoint
void helicsBrokerAddSourceFilterToEndpoint(helics_broker broker, const char *filter, const char *endpoint, helics_error *err)
Definition: helicsExport.cpp:565
helics_error_user_abort
@ helics_error_user_abort
Definition: helics_enums.h:192
helicsBrokerSetGlobal
void helicsBrokerSetGlobal(helics_broker broker, const char *valueName, const char *value, helics_error *err)
Definition: helicsExport.cpp:507
helics::InvalidFunctionCall
Definition: core-exceptions.hpp:67
helics_error_registration_failure
@ helics_error_registration_failure
Definition: helics_enums.h:208
helics::InvalidParameter
Definition: core-exceptions.hpp:48
helics::core_type::DEFAULT
@ DEFAULT
ZMQ if available or UDP.
helics::Core
Definition: core/Core.hpp:42
helicsErrorInitialize
helics_error helicsErrorInitialize(void)
Definition: helicsExport.cpp:47
helics::RegistrationFailure
Definition: core-exceptions.hpp:85
helics::changeDetected
bool changeDetected(const defV &prevValue, const std::string &val, double)
Definition: helicsPrimaryTypes.cpp:16
helics_error_invalid_argument
@ helics_error_invalid_argument
Definition: helics_enums.h:204
helicsCoreIsConnected
helics_bool helicsCoreIsConnected(helics_core core)
Definition: helicsExport.cpp:645
helics::helicsBoolValue
bool helicsBoolValue(const std::string &val)
Definition: helicsTypes.cpp:528
helicsCoreSetGlobal
void helicsCoreSetGlobal(helics_core core, const char *valueName, const char *value, helics_error *err)
Definition: helicsExport.cpp:654
helicsGetCompilerVersion
const char * helicsGetCompilerVersion(void)
Definition: helicsExport.cpp:38
helicsBrokerFree
void helicsBrokerFree(helics_broker broker)
Definition: helicsExport.cpp:827
helics::data_view::string
std::string string() const
Definition: data_view.hpp:113
helicsGetVersion
const char * helicsGetVersion(void)
Definition: helicsExport.cpp:28
helicsCoreGlobalError
void helicsCoreGlobalError(helics_core core, int errorCode, const char *errorString, helics_error *err)
Definition: helicsExport.cpp:556
helicsCoreGetIdentifier
const char * helicsCoreGetIdentifier(helics_core core)
Definition: helicsExport.cpp:686
helicsFederateDestroy
void helicsFederateDestroy(helics_federate fed)
Definition: helicsExport.cpp:799
helicsLoadSignalHandler
void helicsLoadSignalHandler()
Definition: helicsExport.cpp:74
helicsBrokerAddDestinationFilterToEndpoint
void helicsBrokerAddDestinationFilterToEndpoint(helics_broker broker, const char *filter, const char *endpoint, helics_error *err)
Definition: helicsExport.cpp:578
helics::helicsVectorString
std::string helicsVectorString(const std::vector< double > &val)
Definition: helicsTypes.cpp:244
loadJsonStr
Json::Value loadJsonStr(const std::string &jsonString)
Definition: JsonProcessingFunctions.cpp:50
helics::BrokerObject
Definition: api_objects.h:42
helics::compiler
constexpr auto compiler
Definition: helicsVersion.hpp:33
fed
@ fed
special logging command for message coming from a fed
Definition: loggingHelper.hpp:32
helicsGetBuildFlags
const char * helicsGetBuildFlags(void)
Definition: helicsExport.cpp:33
helicsFederateFree
void helicsFederateFree(helics_federate fed)
Definition: helicsExport.cpp:837
helicsCoreAddDestinationFilterToEndpoint
void helicsCoreAddDestinationFilterToEndpoint(helics_core core, const char *filter, const char *endpoint, helics_error *err)
Definition: helicsExport.cpp:618
helicsClearSignalHandler
void helicsClearSignalHandler()
Definition: helicsExport.cpp:79
helics_error_other
@ helics_error_other
Definition: helics_enums.h:190
helics::defV
mpark::variant< double, int64_t, std::string, std::complex< double >, std::vector< double >, std::vector< std::complex< double > >, NamedPoint > defV
Definition: HelicsPrimaryTypes.hpp:34
helicsBrokerSetLogFile
void helicsBrokerSetLogFile(helics_broker broker, const char *logFileName, helics_error *err)
Definition: helicsExport.cpp:520
helicsGetFederateByName
helics_federate helicsGetFederateByName(const char *fedName, helics_error *err)
Definition: helicsExport.cpp:360
helicsFederateFinalize
void helicsFederateFinalize(helics_federate fed, helics_error *err)
Definition: FederateExport.cpp:605
helicsBrokerIsConnected
helics_bool helicsBrokerIsConnected(helics_broker broker)
Definition: helicsExport.cpp:468
helics::CoreObject
Definition: api_objects.h:52
helics::helicsGetComplexVector
std::vector< std::complex< double > > helicsGetComplexVector(const std::string &val)
Definition: helicsTypes.cpp:341
helicsAbort
void helicsAbort(int errorCode, const char *errorString)
Definition: helicsExport.cpp:877
helics::helicsComplexString
std::string helicsComplexString(double real, double imag)
Definition: helicsTypes.cpp:79
helics_error
Definition: api-data.h:166
HelicsPrimaryTypes.hpp
naming a set of types that are interchangeable and recognizable inside the HELICS application API and...
helicsCoreDataLink
void helicsCoreDataLink(helics_core core, const char *source, const char *target, helics_error *err)
Definition: helicsExport.cpp:492
helics::type_location
type_location
Definition: HelicsPrimaryTypes.hpp:37
helics::BrokerFactory::create
std::shared_ptr< Broker > create(core_type type, const std::string &configureString)
Definition: BrokerFactory.cpp:100
helicsCoreDestroy
void helicsCoreDestroy(helics_core core)
Definition: helicsExport.cpp:811
helics::getFedObject
FedObject * getFedObject(helics_federate fed, helics_error *err) noexcept
Definition: FederateExport.cpp:27
helics_error_connection_failure
@ helics_error_connection_failure
Definition: helics_enums.h:207
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helics::getCoreObject
CoreObject * getCoreObject(helics_core core, helics_error *err) noexcept
Definition: helicsExport.cpp:204
helicsBrokerClearTimeBarrier
void helicsBrokerClearTimeBarrier(helics_broker broker)
Definition: helicsExport.cpp:538
helics::data_type
data_type
Definition: helicsTypes.hpp:275
helicsBrokerGetAddress
const char * helicsBrokerGetAddress(helics_broker broker)
Definition: helicsExport.cpp:697
helics::local_core_id
constexpr local_federate_id local_core_id(-259)
helics::data_view::size
size_t size() const noexcept
Definition: data_view.hpp:107
helics::buildFlags
constexpr auto buildFlags
Definition: helicsVersion.hpp:30
helics::getDoubleFromString
double getDoubleFromString(const std::string &val)
Definition: helicsTypes.cpp:416
helics::CoreFactory::cleanUpCores
size_t cleanUpCores()
Definition: CoreFactory.cpp:313
helicsErrorClear
void helicsErrorClear(helics_error *err)
Definition: helicsExport.cpp:56
helicsLoadSignalHandlerCallback
void helicsLoadSignalHandlerCallback(helics_bool(*handler)(int))
Definition: helicsExport.cpp:97
helics_error::error_code
int32_t error_code
Definition: api-data.h:167
helics::valueExtract
void valueExtract(const defV &dv, std::string &val)
Definition: helicsPrimaryTypes.cpp:174
helics::getComplexFromString
std::complex< double > getComplexFromString(const std::string &val)
Definition: helicsTypes.cpp:398
helics::getTypeFromString
data_type getTypeFromString(const std::string &typeName)
Definition: helicsTypes.cpp:187
helicsBrokerClone
helics_broker helicsBrokerClone(helics_broker broker, helics_error *err)
Definition: helicsExport.cpp:445
helicsCoreClone
helics_core helicsCoreClone(helics_core core, helics_error *err)
Definition: helicsExport.cpp:336
helicsCoreFree
void helicsCoreFree(helics_core core)
Definition: helicsExport.cpp:817
helics_broker
void * helics_broker
Definition: api-data.h:51
helicsBrokerDataLink
void helicsBrokerDataLink(helics_broker broker, const char *source, const char *target, helics_error *err)
Definition: helicsExport.cpp:479
helics_error::message
const char * message
Definition: api-data.h:168
helicsBrokerDestroy
void helicsBrokerDestroy(helics_broker broker)
Definition: helicsExport.cpp:805
helics::Broker
Definition: core/Broker.hpp:18
helics_error_external_type
@ helics_error_external_type
Definition: helics_enums.h:189
helicsCoreAddSourceFilterToEndpoint
void helicsCoreAddSourceFilterToEndpoint(helics_core core, const char *filter, const char *endpoint, helics_error *err)
Definition: helicsExport.cpp:605
helics::helicsNamedPointString
std::string helicsNamedPointString(const NamedPoint &point)
Definition: helicsTypes.cpp:300
helics::getBrokerObject
BrokerObject * getBrokerObject(helics_broker broker, helics_error *err) noexcept
Definition: helicsExport.cpp:221
helics_bool
int helics_bool
Definition: api-data.h:92
ValueConverter.hpp
helicsCreateBroker
helics_broker helicsCreateBroker(const char *type, const char *name, const char *initString, helics_error *err)
Definition: helicsExport.cpp:384
helics::interface_type::ip
@ ip
using both types of ports (tcp/or udp) for communication
helics::HelicsException
Definition: core-exceptions.hpp:18
helics::helicsGetComplex
std::complex< double > helicsGetComplex(const std::string &val)
Definition: helicsTypes.cpp:207
helicsBrokerWaitForDisconnect
helics_bool helicsBrokerWaitForDisconnect(helics_broker broker, int msToWait, helics_error *err)
Definition: helicsExport.cpp:763
helics_error_invalid_function_call
@ helics_error_invalid_function_call
Definition: helics_enums.h:196
helics_federate
void * helics_federate
Definition: api-data.h:56
helicsCoreSetReadyToInit
void helicsCoreSetReadyToInit(helics_core core, helics_error *err)
Definition: helicsExport.cpp:719