![]() |
helics
2.8.1
|
#include <ValueFederate.hpp>
Inheritance diagram for helicscpp::ValueFederate:Public Member Functions | |
| ValueFederate (const std::string &fedName, FederateInfo &fi) | |
| ValueFederate (const std::string &configString) | |
| ValueFederate (const ValueFederate &vfed) | |
| ValueFederate & | operator= (const ValueFederate &fedObj) |
| ValueFederate () HELICS_NOTHROW | |
| Publication | registerPublication (const std::string &name, const std::string &type, const std::string &units="") |
| Publication | registerPublication (const std::string &name, helics_data_type type, const std::string &units="") |
| Publication | registerGlobalPublication (const std::string &name, const std::string &type, const std::string &units="") |
| Publication | registerGlobalPublication (const std::string &key, helics_data_type type, const std::string &units="") |
| Publication | registerIndexedPublication (const std::string &key, int index1, helics_data_type type, const std::string &units="") |
| Publication | registerIndexedPublication (const std::string &key, int index1, int index2, helics_data_type type, const std::string &units=std::string()) |
| Publication | registerPublicationIndexed (const std::string &key, int index1, helics_data_type type, const std::string &units="") |
| Publication | registerPublicationIndexed (const std::string &key, int index1, int index2, helics_data_type type, const std::string &units=std::string()) |
| void | registerFromPublicationJSON (const std::string &json) |
| Publication | getPublication (const std::string &name) |
| Publication | getPublication (int index) |
| Input | registerSubscription (const std::string &name, const std::string &units=std::string()) |
| Input | registerIndexedSubscription (const std::string &name, int index1, const std::string &units="") |
| Input | registerIndexedSubscription (const std::string &name, int index1, int index2, const std::string &units="") |
| Input | registerSubscriptionIndexed (const std::string &name, int index1, const std::string &units="") |
| Input | registerSubscriptionIndexed (const std::string &name, int index1, int index2, const std::string &units="") |
| Input | registerInput (const std::string &name, const std::string &type, const std::string &units="") |
| Input | registerInput (const std::string &name, helics_data_type type, const std::string &units="") |
| Input | registerGlobalInput (const std::string &name, const std::string &type, const std::string &units="") |
| Input | registerGlobalInput (const std::string &key, helics_data_type type, const std::string &units="") |
| Input | registerIndexedInput (const std::string &key, int index1, helics_data_type type, const std::string &units="") |
| Input | registerIndexedInput (const std::string &key, int index1, int index2, helics_data_type type, const std::string &units=std::string()) |
| Input | getInput (const std::string &name) |
| Input | getSubscription (int index) |
| int | getInputCount () const |
| int | getPublicationCount () const |
| std::vector< helics_input > | queryUpdates () |
| void | clearUpdates () |
| void | publishJSON (const std::string &json) |
Public Member Functions inherited from helicscpp::Federate | |
| Federate () HELICS_NOTHROW | |
| Default constructor. | |
| Federate (const Federate &fedObj) | |
| Copy constructor. | |
| Federate & | operator= (const Federate &fedObj) |
| Copy assignment operator. | |
| virtual | ~Federate () |
| operator helics_federate () const | |
| helics_federate | baseObject () const |
| void | setFlagOption (int flag, bool flagValue=true) |
| void | setProperty (int tProperty, helics_time timeValue) |
| void | setProperty (int intProperty, int value) |
| bool | getFlagOption (int flag) const |
| helics_time | getTimeProperty (int tProperty) const |
| int | getIntegerProperty (int intProperty) const |
| void | setSeparator (char sep) |
| void | registerInterfaces (const std::string &configString) |
| helics_federate_state | getCurrentMode () const |
| void | enterInitializingMode () |
| void | enterInitializingModeAsync () |
| bool | isAsyncOperationCompleted () const |
| void | enterInitializingModeComplete () |
| helics_iteration_result | enterExecutingMode (helics_iteration_request iterate=helics_iteration_request_no_iteration) |
| void | enterExecutingModeAsync (helics_iteration_request iterate=helics_iteration_request_no_iteration) |
| helics_iteration_result | enterExecutingModeComplete () |
| void | finalize () |
| void | finalizeAsync () |
| void | finalizeComplete () |
| helics_time | getCurrentTime () |
| helics_time | requestTime (helics_time time) |
| helics_time | requestNextStep () |
| helics_time | requestTimeAdvance (helics_time timeDelta) |
| helics_iteration_time | requestTimeIterative (helics_time time, helics_iteration_request iterate) |
| void | requestTimeAsync (helics_time time) |
| void | requestTimeIterativeAsync (helics_time time, helics_iteration_request iterate) |
| helics_time | requestTimeComplete () |
| helics_iteration_time | requestTimeIterativeComplete () |
| const char * | getName () const |
| std::string | query (const std::string &target, const std::string &queryStr, helics_sequencing_mode mode=helics_sequencing_mode_fast) const |
| std::string | query (const std::string &queryStr, helics_sequencing_mode mode=helics_sequencing_mode_fast) const |
| void | setQueryCallback (void(*queryAnswer)(const char *query, int querySize, helics_query_buffer, void *userdata), void *userdata) |
| Filter | registerFilter (helics_filter_type type, const std::string &filterName=std::string()) |
| CloningFilter | registerCloningFilter (const std::string &deliveryEndpoint) |
| Filter | registerGlobalFilter (helics_filter_type type, const std::string &filterName=std::string()) |
| CloningFilter | registerGlobalCloningFilter (const std::string &deliveryEndpoint) |
| Filter | getFilter (const std::string &filterName) |
| Filter | getFilter (int index) |
| void | setGlobal (const std::string &valueName, const std::string &value) |
| void | addDependency (const std::string &fedName) |
| void | localError (int errorCode, const std::string &errorString) |
| void | globalError (int errorCode, const std::string &errorString) |
| void | logErrorMessage (const std::string &message) |
| void | logWarningMessage (const std::string &message) |
| void | logInfoMessage (const std::string &message) |
| void | logDebugMessage (const std::string &message) |
| void | logMessage (int level, const std::string &message) |
| helics_core | getCore () |
| helics_federate | getObject () const |
Friends | |
| class | helicscpp::FederateInfo |
Additional Inherited Members | |
Protected Attributes inherited from helicscpp::Federate | |
| helics_federate | fed |
| underlying helics_federate object | |
| bool | exec_async_iterate |
| indicator that the federate is in an async operation | |
Class defining a ValueFederate object which interacts with publication and Inputs
|
inlineexplicit |
constructor taking a federate information structure and using the default core
| fedName | the name of the federate, can be empty to use the name from fi or an auto generated one |
| fi | a federate information structure |
References helicscpp::Federate::fed, helicscpp::FederateInfo::getInfo(), helics_error_registration_failure, and helicsCreateValueFederate().
|
inlineexplicit |
constructor taking a string with the required information
| configString | can be either a JSON file, a TOML file (with extension TOML), or a string containing JSON code |
References helicscpp::Federate::fed, helics_error_registration_failure, and helicsCreateValueFederateFromConfig().
|
inline |
copy constructor
|
inline |
Default constructor, not meant to be used
|
inline |
clear all the update flags from all federate inputs
References helicscpp::Federate::fed, and helicsFederateClearUpdates().
|
inline |
get an input by index
References helicscpp::Federate::fed, and helicsFederateGetInput().
|
inline |
get the number of inputs in this federate
References helicscpp::Federate::fed, and helicsFederateGetInputCount().
|
inline |
get publication by name
References helicscpp::Federate::fed, and helicsFederateGetPublication().
|
inline |
get a publication by index
| index | a 0 based index of the publication to retrieve |
References helicscpp::Federate::fed, and helicsFederateGetPublicationByIndex().
|
inline |
get the number of publications in this federate
References helicscpp::Federate::fed, and helicsFederateGetPublicationCount().
|
inline |
get a subscription by index
References helicscpp::Federate::fed, and helicsFederateGetInputByIndex().
|
inline |
copy assignment operator
References helicscpp::Federate::fed, helics_error_registration_failure, and helicscpp::Federate::operator=().
|
inline |
publish data contained in a JSON file
References helicscpp::Federate::fed, and helicsFederatePublishJSON().
|
inline |
Get a list of all subscriptions with updates since the last call
|
inline |
register publications from a JSON output file or string
generates interface based on the data contained in a JSON file or string
References helicscpp::Federate::fed, and helicsFederateRegisterFromPublicationJSON().
|
inline |
register an input
call is only valid in startup mode
| key | the name of the input |
| type | an enumeration value describing the type of the input |
| units | a string defining the units of the input [optional] |
References helicscpp::Federate::fed, and helicsFederateRegisterGlobalInput().
|
inline |
register an input
call is only valid in startup mode
| name | the name of the input |
| type | a string defining the type of the input |
| units | a string defining the units of the input [optional] |
References helicscpp::Federate::fed, and helicsFederateRegisterGlobalTypeInput().
Referenced by registerIndexedInput().
|
inline |
register a publication
call is only valid in startup mode
| key | the name of the publication |
| type | an enumeration value describing the type of the publication |
| units | a string defining the units of the publication [optional] |
References helicscpp::Federate::fed, and helicsFederateRegisterGlobalPublication().
|
inline |
register a publication
call is only valid in startup mode
| name | the name of the publication |
| type | a string defining the type of the publication |
| units | a string defining the units of the publication [optional] |
References helicscpp::Federate::fed, and helicsFederateRegisterGlobalTypePublication().
Referenced by registerIndexedPublication().
|
inline |
register an input as part of an indexed structure
call is only valid in startup mode by default prepends the name with the federate name the name is registered as a global structure with the index appended
| key | the name of the input to register |
| index1 | an index associated with the input |
| type | an enumeration value describing the type of the input |
| units | the optional units of the input |
References registerGlobalInput().
|
inline |
register an input as part of a 2 dimensional indexed structure
call is only valid in startup mode by default prepends the name with the federate name the name is registered as a global structure with the indices appended
| key | the base name of the input |
| index1 | an index associated with the input |
| index2 | a second index |
| type | an enumeration value describing the type of the input |
| units | the optional units of the input |
References registerGlobalInput().
|
inline |
register a publication as part of an indexed structure
call is only valid in startup mode by default prepends the name with the federate name the name is registered as a global structure with the index appended
| key | the name of the publication to register |
| index1 | an index associated with the publication |
| type | an enumeration value describing the type of the publication |
| units | the optional units of the publication |
References registerGlobalPublication().
Referenced by registerPublicationIndexed().
|
inline |
register a publication as part of a 2 dimensional indexed structure
call is only valid in startup mode by default prepends the name with the federate name the name is registered as a global structure with the indices appended
| key | the base name of the publication |
| index1 | an index associated with the publication |
| index2 | a second index |
| type | an enumeration value describing the type of the publication |
| units | the optional units of the publication |
References registerGlobalPublication().
|
inline |
register a !D indexed subscription
| name | the base name of the publication to subscribe to |
| index1 | the first index of the value to subscribe to |
| units | a string containing the requested units of the subscription output |
References registerSubscription().
Referenced by registerSubscriptionIndexed().
|
inline |
register a 2D indexed subscription
| name | the base name of the publication to subscribe to |
| index1 | the first index of the value to subscribe to |
| index2 | the second index of the value to subscribe to |
| units | a string containing the requested units of the subscription output |
References registerSubscription().
|
inline |
register an input
call is only valid in startup mode
| name | the name of the input |
| type | a string defining the type of the input |
| units | a string defining the units of the input [optional] |
References helicscpp::Federate::fed, and helicsFederateRegisterTypeInput().
|
inline |
register an input
call is only valid in startup mode by default prepends the name with the federate name
| name | the name of the input |
| type | the type of input to register |
| units | the optional units of the input |
References helicscpp::Federate::fed, and helicsFederateRegisterPublication().
|
inline |
Methods to register publications register a publication
call is only valid in startup mode
| name | the name of the publication |
| type | a string defining the type of the publication |
| units | a string defining the units of the publication [optional] |
References helicscpp::Federate::fed, and helicsFederateRegisterTypePublication().
|
inline |
register a publication
call is only valid in startup mode by default prepends the name with the federate name
| name | the name of the publication |
| type | the type of publication to register |
| units | the optional units of the publication |
References helicscpp::Federate::fed, and helicsFederateRegisterPublication().
|
inline |
register a publication as part of an indexed structure
call is only valid in startup mode by default prepends the name with the federate name the name is registered as a global structure with the index appended
| key | the name of the publication to register |
| index1 | an index associated with the publication |
| type | an enumeration value describing the type of the publication |
| units | the optional units of the publication |
References registerIndexedPublication().
|
inline |
register a publication as part of a 2 dimensional indexed structure
call is only valid in startup mode by default prepends the name with the federate name the name is registered as a global structure with the indices appended
| key | the base name of the publication |
| index1 | an index associated with the publication |
| index2 | a second index |
| type | an enumeration value describing the type of the publication |
| units | the optional units of the publication |
References registerIndexedPublication().
|
inline |
Methods to register subscriptions
References helicscpp::Federate::fed, and helicsFederateRegisterSubscription().
Referenced by registerIndexedSubscription().
|
inline |
register a !D indexed subscription
| name | the base name of the publication to subscribe to |
| index1 | the first index of the value to subscribe to |
| units | a string containing the requested units of the subscription output |
References registerIndexedSubscription().
|
inline |
register a 2D indexed subscription
| name | the base name of the publication to subscribe to |
| index1 | the first index of the value to subscribe to |
| index2 | the second index of the value to subscribe to |
| units | a string containing the requested units of the subscription output |
References registerIndexedSubscription().
1.8.17