helics  2.8.1
ValueFederate.h
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 Energy, LLC. See the top-level NOTICE for
4 additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 
14 #ifndef HELICS_APISHARED_VALUE_FEDERATE_FUNCTIONS_H_
15 #define HELICS_APISHARED_VALUE_FEDERATE_FUNCTIONS_H_
16 
17 #include "helics.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
43 HELICS_EXPORT helics_input helicsFederateRegisterSubscription(helics_federate fed, const char* key, const char* units, helics_error* err);
44 
61 HELICS_EXPORT helics_publication
62  helicsFederateRegisterPublication(helics_federate fed, const char* key, helics_data_type type, const char* units, helics_error* err);
63 
80 HELICS_EXPORT helics_publication
81  helicsFederateRegisterTypePublication(helics_federate fed, const char* key, const char* type, const char* units, helics_error* err);
82 
100  const char* key,
101  helics_data_type type,
102  const char* units,
103  helics_error* err);
104 
122  const char* key,
123  const char* type,
124  const char* units,
125  helics_error* err);
126 
143 HELICS_EXPORT helics_input
144  helicsFederateRegisterInput(helics_federate fed, const char* key, helics_data_type type, const char* units, helics_error* err);
145 
162 HELICS_EXPORT helics_input
163  helicsFederateRegisterTypeInput(helics_federate fed, const char* key, const char* type, const char* units, helics_error* err);
164 
181 HELICS_EXPORT helics_publication
182  helicsFederateRegisterGlobalInput(helics_federate fed, const char* key, helics_data_type type, const char* units, helics_error* err);
183 
200 HELICS_EXPORT helics_publication
201  helicsFederateRegisterGlobalTypeInput(helics_federate fed, const char* key, const char* type, const char* units, helics_error* err);
202 
216 
229 
242 HELICS_EXPORT helics_input helicsFederateGetInput(helics_federate fed, const char* key, helics_error* err);
243 
256 
269 HELICS_EXPORT helics_input helicsFederateGetSubscription(helics_federate fed, const char* key, helics_error* err);
270 
277 
289 HELICS_EXPORT void helicsFederateRegisterFromPublicationJSON(helics_federate fed, const char* json, helics_error* err);
290 
300 HELICS_EXPORT void helicsFederatePublishJSON(helics_federate fed, const char* json, helics_error* err);
301 
318 
329 HELICS_EXPORT void helicsPublicationPublishRaw(helics_publication pub, const void* data, int inputDataLength, helics_error* err);
330 
340 HELICS_EXPORT void helicsPublicationPublishString(helics_publication pub, const char* str, helics_error* err);
341 
351 HELICS_EXPORT void helicsPublicationPublishInteger(helics_publication pub, int64_t val, helics_error* err);
352 
363 
373 HELICS_EXPORT void helicsPublicationPublishDouble(helics_publication pub, double val, helics_error* err);
374 
385 
395 HELICS_EXPORT void helicsPublicationPublishChar(helics_publication pub, char val, helics_error* err);
396 
407 HELICS_EXPORT void helicsPublicationPublishComplex(helics_publication pub, double real, double imag, helics_error* err);
408 
419 HELICS_EXPORT void helicsPublicationPublishVector(helics_publication pub, const double* vectorInput, int vectorLength, helics_error* err);
420 
431 HELICS_EXPORT void helicsPublicationPublishNamedPoint(helics_publication pub, const char* str, double val, helics_error* err);
432 
442 HELICS_EXPORT void helicsPublicationAddTarget(helics_publication pub, const char* target, helics_error* err);
443 
451 HELICS_EXPORT helics_bool helicsInputIsValid(helics_input ipt);
452 
462 HELICS_EXPORT void helicsInputAddTarget(helics_input ipt, const char* target, helics_error* err);
463 
478 HELICS_EXPORT int helicsInputGetRawValueSize(helics_input ipt);
479 
495 HELICS_EXPORT void helicsInputGetRawValue(helics_input ipt, void* data, int maxDataLength, int* actualSize, helics_error* err);
496 
502 HELICS_EXPORT int helicsInputGetStringSize(helics_input ipt);
503 
519 HELICS_EXPORT void helicsInputGetString(helics_input ipt, char* outputString, int maxStringLength, int* actualLength, helics_error* err);
520 
531 HELICS_EXPORT int64_t helicsInputGetInteger(helics_input ipt, helics_error* err);
532 
544 
555 HELICS_EXPORT double helicsInputGetDouble(helics_input ipt, helics_error* err);
556 
568 
582 HELICS_EXPORT char helicsInputGetChar(helics_input ipt, helics_error* err);
583 
596 
612 HELICS_EXPORT void helicsInputGetComplex(helics_input ipt, double* real, double* imag, helics_error* err);
613 
619 HELICS_EXPORT int helicsInputGetVectorSize(helics_input ipt);
620 
636 HELICS_EXPORT void helicsInputGetVector(helics_input ipt, double data[], int maxLength, int* actualSize, helics_error* err);
637 
654 HELICS_EXPORT void
655  helicsInputGetNamedPoint(helics_input ipt, char* outputString, int maxStringLength, int* actualLength, double* val, helics_error* err);
656 
675 HELICS_EXPORT void helicsInputSetDefaultRaw(helics_input ipt, const void* data, int inputDataLength, helics_error* err);
676 
686 HELICS_EXPORT void helicsInputSetDefaultString(helics_input ipt, const char* str, helics_error* err);
687 
697 HELICS_EXPORT void helicsInputSetDefaultInteger(helics_input ipt, int64_t val, helics_error* err);
698 
708 HELICS_EXPORT void helicsInputSetDefaultBoolean(helics_input ipt, helics_bool val, helics_error* err);
709 
719 HELICS_EXPORT void helicsInputSetDefaultTime(helics_input ipt, helics_time val, helics_error* err);
720 
730 HELICS_EXPORT void helicsInputSetDefaultChar(helics_input ipt, char val, helics_error* err);
731 
741 HELICS_EXPORT void helicsInputSetDefaultDouble(helics_input ipt, double val, helics_error* err);
742 
753 HELICS_EXPORT void helicsInputSetDefaultComplex(helics_input ipt, double real, double imag, helics_error* err);
754 
765 HELICS_EXPORT void helicsInputSetDefaultVector(helics_input ipt, const double* vectorInput, int vectorLength, helics_error* err);
766 
777 HELICS_EXPORT void helicsInputSetDefaultNamedPoint(helics_input ipt, const char* str, double val, helics_error* err);
778 
793 HELICS_EXPORT const char* helicsInputGetType(helics_input ipt);
794 
802 HELICS_EXPORT const char* helicsInputGetPublicationType(helics_input ipt);
803 
811 HELICS_EXPORT const char* helicsPublicationGetType(helics_publication pub);
812 
820 HELICS_EXPORT const char* helicsInputGetKey(helics_input ipt);
821 
827 HELICS_EXPORT const char* helicsSubscriptionGetKey(helics_input ipt);
828 
838 HELICS_EXPORT const char* helicsPublicationGetKey(helics_publication pub);
839 
847 HELICS_EXPORT const char* helicsInputGetUnits(helics_input ipt);
848 
856 HELICS_EXPORT const char* helicsInputGetInjectionUnits(helics_input ipt);
857 
867 HELICS_EXPORT const char* helicsInputGetExtractionUnits(helics_input ipt);
868 
876 HELICS_EXPORT const char* helicsPublicationGetUnits(helics_publication pub);
877 
885 HELICS_EXPORT const char* helicsInputGetInfo(helics_input inp);
886 
896 HELICS_EXPORT void helicsInputSetInfo(helics_input inp, const char* info, helics_error* err);
897 
905 HELICS_EXPORT const char* helicsPublicationGetInfo(helics_publication pub);
906 
916 HELICS_EXPORT void helicsPublicationSetInfo(helics_publication pub, const char* info, helics_error* err);
917 
926 HELICS_EXPORT int helicsInputGetOption(helics_input inp, int option);
927 
938 HELICS_EXPORT void helicsInputSetOption(helics_input inp, int option, int value, helics_error* err);
939 
948 HELICS_EXPORT int helicsPublicationGetOption(helics_publication pub, int option);
949 
960 HELICS_EXPORT void helicsPublicationSetOption(helics_publication pub, int option, int val, helics_error* err);
961 
971 HELICS_EXPORT void helicsPublicationSetMinimumChange(helics_publication pub, double tolerance, helics_error* err);
972 
982 HELICS_EXPORT void helicsInputSetMinimumChange(helics_input inp, double tolerance, helics_error* err);
983 
992 
997 
1001 HELICS_EXPORT void helicsInputClearUpdate(helics_input ipt);
1002 
1009 
1016 
1017 #ifdef __cplusplus
1018 } /* end of extern "C" { */
1019 #endif
1020 
1021 #endif /* HELICS_APISHARED_VALUE_FEDERATE_FUNCTIONS_H_*/
helics::ValueFederate::removeTarget
void removeTarget(const Publication &pub, const std::string &target)
Definition: ValueFederate.cpp:151
helics::ValueFederate::getLastUpdateTime
Time getLastUpdateTime(const Input &inp) const
Definition: ValueFederate.cpp:501
helics::Input
Definition: Inputs.hpp:37
data
@ data
print timing+data transmissions
Definition: loggingHelper.hpp:30
helics::Federate::currentMode
std::atomic< modes > currentMode
the current state of the simulation
Definition: application_api/Federate.hpp:65
helics_flag_use_json_serialization
@ helics_flag_use_json_serialization
Definition: helics_enums.h:121
helicsTypes.hpp
helics::ValueFederate::setFlagOption
virtual void setFlagOption(int flag, bool flagValue=true) override
Definition: ValueFederate.cpp:161
isMember
bool isMember(const toml::value &element, const std::string &key)
Definition: TomlProcessingFunctions.hpp:148
helics::ValueFederate::clearUpdate
void clearUpdate(const Input &inp)
Definition: ValueFederate.cpp:649
helicsInputGetRawValue
void helicsInputGetRawValue(helics_input ipt, void *data, int maxDataLength, int *actualSize, helics_error *err)
Definition: ValueFederateExport.cpp:690
helicsInputSetDefaultBoolean
void helicsInputSetDefaultBoolean(helics_input ipt, helics_bool val, helics_error *err)
Definition: ValueFederateExport.cpp:1021
helicsInputGetVector
void helicsInputGetVector(helics_input ipt, double data[], int maxLength, int *actualSize, helics_error *err)
Definition: ValueFederateExport.cpp:908
helics::Federate::getName
const std::string & getName() const
Definition: application_api/Federate.hpp:546
helics::ValueFederate::initializeToExecuteStateTransition
virtual void initializeToExecuteStateTransition(iteration_result result) override
Definition: ValueFederate.cpp:515
helics::ValueFederate
Definition: application_api/ValueFederate.hpp:25
helicsFederateRegisterSubscription
helics_input helicsFederateRegisterSubscription(helics_federate fed, const char *key, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:77
helics::loadFederateInfo
FederateInfo loadFederateInfo(const std::string &configString)
Definition: FederateInfo.cpp:639
helicsInputGetBoolean
helics_bool helicsInputGetBoolean(helics_input ipt, helics_error *err)
Definition: ValueFederateExport.cpp:765
helicsInputGetKey
const char * helicsInputGetKey(helics_input ipt)
Definition: ValueFederateExport.cpp:1156
helicsFederateGetPublication
helics_publication helicsFederateGetPublication(helics_federate fed, const char *key, helics_error *err)
Definition: ValueFederateExport.cpp:334
helicsPublicationSetInfo
void helicsPublicationSetInfo(helics_publication pub, const char *info, helics_error *err)
Definition: ValueFederateExport.cpp:1299
helicsPublicationPublishTime
void helicsPublicationPublishTime(helics_publication pub, helics_time val, helics_error *err)
Definition: ValueFederateExport.cpp:553
helicsInputGetString
void helicsInputGetString(helics_input ipt, char *outputString, int maxStringLength, int *actualLength, helics_error *err)
Definition: ValueFederateExport.cpp:724
helics::ValueFederate::addAlias
void addAlias(const Input &inp, const std::string &shortcutName)
Definition: ValueFederate.cpp:147
helics::iteration_result
iteration_result
Definition: core-types.hpp:81
helicsFederateRegisterGlobalTypeInput
helics_publication helicsFederateRegisterGlobalTypeInput(helics_federate fed, const char *key, const char *type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:248
helicsFederateGetInputCount
int helicsFederateGetInputCount(helics_federate fed)
Definition: ValueFederateExport.cpp:1450
helics::ValueFederate::ValueFederate
ValueFederate()
helicsInputGetRawValueSize
int helicsInputGetRawValueSize(helics_input ipt)
Definition: ValueFederateExport.cpp:671
helics_publication
void * helics_publication
Definition: api-data.h:31
helics::ValueFederate::queryUpdates
std::vector< int > queryUpdates()
Definition: ValueFederate.cpp:525
helicsPublicationSetMinimumChange
void helicsPublicationSetMinimumChange(helics_publication pub, double tolerance, helics_error *err)
Definition: ValueFederateExport.cpp:1379
helicsInputGetType
const char * helicsInputGetType(helics_input ipt)
Definition: ValueFederateExport.cpp:1105
helicsInputGetNamedPoint
void helicsInputGetNamedPoint(helics_input ipt, char *outputString, int maxStringLength, int *actualLength, double *val, helics_error *err)
Definition: ValueFederateExport.cpp:935
helics::Time
TimeRepresentation< count_time< 9 > > Time
Definition: helics-time.hpp:27
loadToml
toml::value loadToml(const std::string &tomlString)
Definition: TomlProcessingFunctions.cpp:22
helicsPublicationGetKey
const char * helicsPublicationGetKey(helics_publication pub)
Definition: ValueFederateExport.cpp:1190
helics_time
double helics_time
Definition: api-data.h:81
helicsInputGetOption
int helicsInputGetOption(helics_input inp, int option)
Definition: ValueFederateExport.cpp:1315
helics::Federate::registerInterfaces
virtual void registerInterfaces(const std::string &configString)
Definition: Federate.cpp:793
helicsInputSetDefaultTime
void helicsInputSetDefaultTime(helics_input ipt, helics_time val, helics_error *err)
Definition: ValueFederateExport.cpp:1039
helics::ValueFederate::setDefaultValue
void setDefaultValue(const Input &inp, data_view block)
Definition: ValueFederate.cpp:176
helicsFederateGetPublicationByIndex
helics_publication helicsFederateGetPublicationByIndex(helics_federate fed, int index, helics_error *err)
Definition: ValueFederateExport.cpp:359
helicsInputGetComplexObject
helics_complex helicsInputGetComplexObject(helics_input ipt, helics_error *err)
Definition: ValueFederateExport.cpp:855
helics.h
Common functions for the HELICS C api.
helics::ValueFederate::getDouble
static double getDouble(Input &inp)
Definition: ValueFederate.cpp:391
helics::ValueFederate::publishRaw
void publishRaw(const Publication &pub, data_view block)
Definition: ValueFederate.cpp:401
helicsPublicationPublishComplex
void helicsPublicationPublishComplex(helics_publication pub, double real, double imag, helics_error *err)
Definition: ValueFederateExport.cpp:582
helicsFederateGetSubscription
helics_input helicsFederateGetSubscription(helics_federate fed, const char *key, helics_error *err)
Definition: ValueFederateExport.cpp:441
helicsInputSetDefaultChar
void helicsInputSetDefaultChar(helics_input ipt, char val, helics_error *err)
Definition: ValueFederateExport.cpp:1050
helics::data_view
Definition: data_view.hpp:22
helics::Federate::nameSegmentSeparator
char nameSegmentSeparator
the separator between automatically prependend names
Definition: application_api/Federate.hpp:66
helicsInputSetInfo
void helicsInputSetInfo(helics_input inp, const char *info, helics_error *err)
Definition: ValueFederateExport.cpp:1268
getKey
std::string getKey(const Json::Value &element)
Definition: JsonProcessingFunctions.cpp:90
helicsFederateRegisterGlobalTypePublication
helics_publication helicsFederateRegisterGlobalTypePublication(helics_federate fed, const char *key, const char *type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:144
helicsPublicationPublishChar
void helicsPublicationPublishChar(helics_publication pub, char val, helics_error *err)
Definition: ValueFederateExport.cpp:568
helics::getOptionIndex
int getOptionIndex(std::string val)
Definition: FederateInfo.cpp:356
helics::Federate::setFlagOption
virtual void setFlagOption(int flag, bool flagValue=true)
Definition: Federate.cpp:466
helicsFederateRegisterGlobalPublication
helics_publication helicsFederateRegisterGlobalPublication(helics_federate fed, const char *key, helics_data_type type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:167
helicsInputLastUpdateTime
helics_time helicsInputLastUpdateTime(helics_input ipt)
Definition: ValueFederateExport.cpp:1408
helics::getOptionValue
int getOptionValue(std::string val)
Definition: FederateInfo.cpp:375
helicsInputAddTarget
void helicsInputAddTarget(helics_input ipt, const char *target, helics_error *err)
Definition: ValueFederateExport.cpp:661
helics::InvalidFunctionCall
Definition: core-exceptions.hpp:67
helicsPublicationSetOption
void helicsPublicationSetOption(helics_publication pub, int option, int val, helics_error *err)
Definition: ValueFederateExport.cpp:1363
helics::ValueFederate::getInputCount
int getInputCount() const
Definition: ValueFederate.cpp:639
helics::InvalidParameter
Definition: core-exceptions.hpp:48
helicsFederateRegisterInput
helics_input helicsFederateRegisterInput(helics_federate fed, const char *key, helics_data_type type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:218
helicsPublicationPublishVector
void helicsPublicationPublishVector(helics_publication pub, const double *vectorInput, int vectorLength, helics_error *err)
Definition: ValueFederateExport.cpp:596
helics::ValueFederate::registerFromPublicationJSON
void registerFromPublicationJSON(const std::string &jsonString)
Definition: ValueFederate.cpp:443
helicsInputGetExtractionUnits
const char * helicsInputGetExtractionUnits(helics_input ipt)
Definition: ValueFederateExport.cpp:1222
helicsPublicationGetInfo
const char * helicsPublicationGetInfo(helics_publication pub)
Definition: ValueFederateExport.cpp:1283
helics::RegistrationFailure
Definition: core-exceptions.hpp:85
helicsFederateRegisterTypePublication
helics_publication helicsFederateRegisterTypePublication(helics_federate fed, const char *key, const char *type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:98
helics::CoreApp
Definition: application_api/CoreApp.hpp:25
helicsInputGetTime
helics_time helicsInputGetTime(helics_input ipt, helics_error *err)
Definition: ValueFederateExport.cpp:798
helics_complex
Definition: api-data.h:137
helics::ValueFederate::setInputNotificationCallback
void setInputNotificationCallback(std::function< void(Input &, Time)> callback)
Definition: ValueFederate.cpp:623
helics::FederateInfo
Definition: FederateInfo.hpp:20
helicsPublicationGetUnits
const char * helicsPublicationGetUnits(helics_publication pub)
Definition: ValueFederateExport.cpp:1243
helicsPublicationPublishNamedPoint
void helicsPublicationPublishNamedPoint(helics_publication pub, const char *str, double val, helics_error *err)
Definition: ValueFederateExport.cpp:614
helicsPublicationPublishInteger
void helicsPublicationPublishInteger(helics_publication pub, int64_t val, helics_error *err)
Definition: ValueFederateExport.cpp:511
helicsSubscriptionGetKey
const char * helicsSubscriptionGetKey(helics_input ipt)
Definition: ValueFederateExport.cpp:1173
helics::ValueFederate::isUpdated
bool isUpdated(const Input &inp) const
Definition: ValueFederate.cpp:496
helicsPublicationPublishBoolean
void helicsPublicationPublishBoolean(helics_publication pub, helics_bool val, helics_error *err)
Definition: ValueFederateExport.cpp:525
helics::Federate::operator=
Federate & operator=(Federate &&fed) noexcept
Definition: Federate.cpp:183
helics::Federate::useJsonSerialization
bool useJsonSerialization
Definition: application_api/Federate.hpp:70
helics::ValueFederate::registerGlobalPublication
Publication & registerGlobalPublication(const std::string &key, const std::string &type, const std::string &units=std::string())
Definition: ValueFederate.cpp:107
loadJson
Json::Value loadJson(const std::string &jsonString)
Definition: JsonProcessingFunctions.cpp:24
helicsInputGetVectorSize
int helicsInputGetVectorSize(helics_input ipt)
Definition: ValueFederateExport.cpp:876
helics::ValueFederate::getPublication
Publication & getPublication(const std::string &key)
Definition: ValueFederate.cpp:583
helics::FederateInfo::useJsonSerialization
bool useJsonSerialization
Definition: FederateInfo.hpp:34
helics::Federate::getID
auto getID() const noexcept
Definition: application_api/Federate.hpp:539
helics::ValueFederate::updateTime
virtual void updateTime(Time newTime, Time oldTime) override
Definition: ValueFederate.cpp:506
helicsInputGetInjectionUnits
const char * helicsInputGetInjectionUnits(helics_input ipt)
Definition: ValueFederateExport.cpp:1206
helicsFederateRegisterPublication
helics_publication helicsFederateRegisterPublication(helics_federate fed, const char *key, helics_data_type type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:118
fed
@ fed
special logging command for message coming from a fed
Definition: loggingHelper.hpp:32
helicsPublicationPublishDouble
void helicsPublicationPublishDouble(helics_publication pub, double val, helics_error *err)
Definition: ValueFederateExport.cpp:539
helics::ValueFederate::publishJSON
void publishJSON(const std::string &jsonString)
Definition: ValueFederate.cpp:471
helics::ValueFederate::startupToInitializeStateTransition
virtual void startupToInitializeStateTransition() override
Definition: ValueFederate.cpp:511
helics::Input::getValue
int getValue(double *data, int maxsize)
Definition: Inputs.cpp:876
helics::ValueFederate::registerInterfaces
virtual void registerInterfaces(const std::string &configString) override
Definition: ValueFederate.cpp:181
helicsPublicationGetType
const char * helicsPublicationGetType(helics_publication pub)
Definition: ValueFederateExport.cpp:1139
helics::ValueFederate::getSubscription
const Input & getSubscription(const std::string &target) const
Definition: ValueFederate.cpp:573
helicsInputClearUpdate
void helicsInputClearUpdate(helics_input ipt)
Definition: ValueFederateExport.cpp:1425
helics_data_type
helics_data_type
Definition: helics_enums.h:51
helicsInputSetDefaultNamedPoint
void helicsInputSetDefaultNamedPoint(helics_input ipt, const char *str, double val, helics_error *err)
Definition: ValueFederateExport.cpp:1089
helicsInputSetDefaultRaw
void helicsInputSetDefaultRaw(helics_input ipt, const void *data, int inputDataLength, helics_error *err)
Definition: ValueFederateExport.cpp:976
helicsInputSetDefaultComplex
void helicsInputSetDefaultComplex(helics_input ipt, double real, double imag, helics_error *err)
Definition: ValueFederateExport.cpp:1059
helicsPublicationIsValid
helics_bool helicsPublicationIsValid(helics_publication pub)
Definition: ValueFederateExport.cpp:643
helics_error
Definition: api-data.h:166
helics::ValueFederate::registerSubscription
Input & registerSubscription(const std::string &target, const std::string &units=std::string())
Definition: ValueFederate.cpp:130
helics::Publication
Definition: Publications.hpp:23
helicsPublicationPublishString
void helicsPublicationPublishString(helics_publication pub, const char *str, helics_error *err)
Definition: ValueFederateExport.cpp:497
helicsInputGetInteger
int64_t helicsInputGetInteger(helics_input ipt, helics_error *err)
Definition: ValueFederateExport.cpp:750
helicsInputGetComplex
void helicsInputGetComplex(helics_input ipt, double *real, double *imag, helics_error *err)
Definition: ValueFederateExport.cpp:833
helicsFederateGetPublicationCount
int helicsFederateGetPublicationCount(helics_federate fed)
Definition: ValueFederateExport.cpp:1440
helicsInputSetDefaultString
void helicsInputSetDefaultString(helics_input ipt, const char *str, helics_error *err)
Definition: ValueFederateExport.cpp:996
helics::Publication::publish
void publish(double val)
Definition: Publications.cpp:70
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helicsFederateRegisterGlobalInput
helics_publication helicsFederateRegisterGlobalInput(helics_federate fed, const char *key, helics_data_type type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:268
helics::ValueFederate::publish
static void publish(Publication &pub, const std::string &str)
Definition: ValueFederate.cpp:411
helics::ValueFederate::registerInput
Input & registerInput(const std::string &key, const std::string &type, const std::string &units=std::string())
Definition: ValueFederate.cpp:114
helics::ValueFederate::operator=
ValueFederate & operator=(ValueFederate &&fed) noexcept
Definition: ValueFederate.cpp:89
helicsInputGetChar
char helicsInputGetChar(helics_input ipt, helics_error *err)
Definition: ValueFederateExport.cpp:816
helicsFederateClearUpdates
void helicsFederateClearUpdates(helics_federate fed)
Definition: ValueFederateExport.cpp:467
helics::ValueFederate::registerValueInterfaces
void registerValueInterfaces(const std::string &configString)
Definition: ValueFederate.cpp:187
helicsPublicationPublishRaw
void helicsPublicationPublishRaw(helics_publication pub, const void *data, int inputDataLength, helics_error *err)
Definition: ValueFederateExport.cpp:483
helics::ValueFederate::addTarget
void addTarget(const Publication &pub, const std::string &target)
Definition: ValueFederate.cpp:137
helicsInputSetMinimumChange
void helicsInputSetMinimumChange(helics_input inp, double tolerance, helics_error *err)
Definition: ValueFederateExport.cpp:1388
helicsPublicationAddTarget
void helicsPublicationAddTarget(helics_publication pub, const char *target, helics_error *err)
Definition: ValueFederateExport.cpp:632
helics::ValueFederate::clearUpdates
void clearUpdates()
Definition: ValueFederate.cpp:644
helics::ValueFederate::getPublicationCount
int getPublicationCount() const
Definition: ValueFederate.cpp:634
helics::Federate
Definition: application_api/Federate.hpp:44
helicsInputGetPublicationType
const char * helicsInputGetPublicationType(helics_input ipt)
Definition: ValueFederateExport.cpp:1122
helicsInputGetDouble
double helicsInputGetDouble(helics_input ipt, helics_error *err)
Definition: ValueFederateExport.cpp:783
helicsInputSetDefaultInteger
void helicsInputSetDefaultInteger(helics_input ipt, int64_t val, helics_error *err)
Definition: ValueFederateExport.cpp:1012
helicsInputGetInfo
const char * helicsInputGetInfo(helics_input inp)
Definition: ValueFederateExport.cpp:1252
helics::ValueFederate::getTarget
const std::string & getTarget(const Input &inp) const
Definition: ValueFederate.cpp:530
helicsPublicationGetOption
int helicsPublicationGetOption(helics_publication pub, int option)
Definition: ValueFederateExport.cpp:1347
helicsInputGetStringSize
int helicsInputGetStringSize(helics_input ipt)
Definition: ValueFederateExport.cpp:892
helicsFederateRegisterTypeInput
helics_input helicsFederateRegisterTypeInput(helics_federate fed, const char *key, const char *type, const char *units, helics_error *err)
Definition: ValueFederateExport.cpp:199
helicsFederatePublishJSON
void helicsFederatePublishJSON(helics_federate fed, const char *json, helics_error *err)
Definition: ValueFederateExport.cpp:314
helicsFederateRegisterFromPublicationJSON
void helicsFederateRegisterFromPublicationJSON(helics_federate fed, const char *json, helics_error *err)
Definition: ValueFederateExport.cpp:297
helics_input
void * helics_input
Definition: api-data.h:26
helics::ValueFederate::localQuery
virtual std::string localQuery(const std::string &queryStr) const override
Definition: ValueFederate.cpp:520
helics::ValueFederate::getString
static const std::string & getString(Input &inp)
Definition: ValueFederate.cpp:396
helicsInputIsUpdated
helics_bool helicsInputIsUpdated(helics_input ipt)
Definition: ValueFederateExport.cpp:1397
helicsInputSetOption
void helicsInputSetOption(helics_input inp, int option, int value, helics_error *err)
Definition: ValueFederateExport.cpp:1331
helics_bool
int helics_bool
Definition: api-data.h:92
helicsInputSetDefaultVector
void helicsInputSetDefaultVector(helics_input ipt, const double *vectorInput, int vectorLength, helics_error *err)
Definition: ValueFederateExport.cpp:1069
helics::ValueFederate::getInput
const Input & getInput(const std::string &key) const
Definition: ValueFederate.cpp:535
helics::ValueFederate::registerPublication
Publication & registerPublication(const std::string &key, const std::string &type, const std::string &units=std::string())
Definition: ValueFederate.cpp:99
helics::Federate::coreObject
std::shared_ptr< Core > coreObject
reference to the core simulation API
Definition: application_api/Federate.hpp:75
helicsInputIsValid
helics_bool helicsInputIsValid(helics_input ipt)
Definition: ValueFederateExport.cpp:652
helicsFederateGetInput
helics_input helicsFederateGetInput(helics_federate fed, const char *key, helics_error *err)
Definition: ValueFederateExport.cpp:388
helicsFederateGetInputByIndex
helics_input helicsFederateGetInputByIndex(helics_federate fed, int index, helics_error *err)
Definition: ValueFederateExport.cpp:414
helics::ValueFederate::registerGlobalInput
Input & registerGlobalInput(const std::string &key, const std::string &type, const std::string &units=std::string())
Definition: ValueFederate.cpp:123
helicsInputSetDefaultDouble
void helicsInputSetDefaultDouble(helics_input ipt, double val, helics_error *err)
Definition: ValueFederateExport.cpp:1030
helics::Federate::modes::initializing
@ initializing
entered after the enterInitializingMode call has returned
helicsInputGetUnits
const char * helicsInputGetUnits(helics_input ipt)
Definition: ValueFederateExport.cpp:1238
helics_federate
void * helics_federate
Definition: api-data.h:56
helics::Federate::modes::executing
@ executing
entered after the enterExectuationState call has returned
helics::ValueFederate::getValueRaw
data_view getValueRaw(const Input &inp)
Definition: ValueFederate.cpp:386
helics::Federate::disconnect
virtual void disconnect()
Definition: Federate.cpp:567