helics  2.8.1
Functions
helics.h File Reference

Common functions for the HELICS C api. More...

#include "api-data.h"
#include "helics_export.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

const char * helicsGetVersion (void)
 
const char * helicsGetBuildFlags (void)
 
const char * helicsGetCompilerVersion (void)
 
helics_error helicsErrorInitialize (void)
 
void helicsErrorClear (helics_error *err)
 
void helicsLoadSignalHandler ()
 
void helicsClearSignalHandler ()
 
void helicsLoadSignalHandlerCallback (helics_bool(*handler)(int))
 
void helicsAbort (int errorCode, const char *errorString)
 
helics_bool helicsIsCoreTypeAvailable (const char *type)
 
helics_core helicsCreateCore (const char *type, const char *name, const char *initString, helics_error *err)
 
helics_core helicsCreateCoreFromArgs (const char *type, const char *name, int argc, const char *const *argv, helics_error *err)
 
helics_core helicsCoreClone (helics_core core, helics_error *err)
 
helics_bool helicsCoreIsValid (helics_core core)
 
helics_broker helicsCreateBroker (const char *type, const char *name, const char *initString, helics_error *err)
 
helics_broker helicsCreateBrokerFromArgs (const char *type, const char *name, int argc, const char *const *argv, helics_error *err)
 
helics_broker helicsBrokerClone (helics_broker broker, helics_error *err)
 
helics_bool helicsBrokerIsValid (helics_broker broker)
 
helics_bool helicsBrokerIsConnected (helics_broker broker)
 
void helicsBrokerDataLink (helics_broker broker, const char *source, const char *target, helics_error *err)
 
void helicsBrokerAddSourceFilterToEndpoint (helics_broker broker, const char *filter, const char *endpoint, helics_error *err)
 
void helicsBrokerAddDestinationFilterToEndpoint (helics_broker broker, const char *filter, const char *endpoint, helics_error *err)
 
void helicsBrokerMakeConnections (helics_broker broker, const char *file, helics_error *err)
 
helics_bool helicsCoreWaitForDisconnect (helics_core core, int msToWait, helics_error *err)
 
helics_bool helicsBrokerWaitForDisconnect (helics_broker broker, int msToWait, helics_error *err)
 
helics_bool helicsCoreIsConnected (helics_core core)
 
void helicsCoreDataLink (helics_core core, const char *source, const char *target, helics_error *err)
 
void helicsCoreAddSourceFilterToEndpoint (helics_core core, const char *filter, const char *endpoint, helics_error *err)
 
void helicsCoreAddDestinationFilterToEndpoint (helics_core core, const char *filter, const char *endpoint, helics_error *err)
 
void helicsCoreMakeConnections (helics_core core, const char *file, helics_error *err)
 
const char * helicsBrokerGetIdentifier (helics_broker broker)
 
const char * helicsCoreGetIdentifier (helics_core core)
 
const char * helicsBrokerGetAddress (helics_broker broker)
 
const char * helicsCoreGetAddress (helics_core core)
 
void helicsCoreSetReadyToInit (helics_core core, helics_error *err)
 
helics_bool helicsCoreConnect (helics_core core, helics_error *err)
 
void helicsCoreDisconnect (helics_core core, helics_error *err)
 
helics_federate helicsGetFederateByName (const char *fedName, helics_error *err)
 
void helicsBrokerDisconnect (helics_broker broker, helics_error *err)
 
void helicsFederateDestroy (helics_federate fed)
 
void helicsBrokerDestroy (helics_broker broker)
 
void helicsCoreDestroy (helics_core core)
 
void helicsCoreFree (helics_core core)
 
void helicsBrokerFree (helics_broker broker)
 
helics_federate helicsCreateValueFederate (const char *fedName, helics_federate_info fi, helics_error *err)
 
helics_federate helicsCreateValueFederateFromConfig (const char *configFile, helics_error *err)
 
helics_federate helicsCreateMessageFederate (const char *fedName, helics_federate_info fi, helics_error *err)
 
helics_federate helicsCreateMessageFederateFromConfig (const char *configFile, helics_error *err)
 
helics_federate helicsCreateCombinationFederate (const char *fedName, helics_federate_info fi, helics_error *err)
 
helics_federate helicsCreateCombinationFederateFromConfig (const char *configFile, helics_error *err)
 
helics_federate helicsFederateClone (helics_federate fed, helics_error *err)
 
helics_federate_info helicsCreateFederateInfo (void)
 
helics_federate_info helicsFederateInfoClone (helics_federate_info fi, helics_error *err)
 
void helicsFederateInfoLoadFromArgs (helics_federate_info fi, int argc, const char *const *argv, helics_error *err)
 
void helicsFederateInfoFree (helics_federate_info fi)
 
helics_bool helicsFederateIsValid (helics_federate fed)
 
void helicsFederateInfoSetCoreName (helics_federate_info fi, const char *corename, helics_error *err)
 
void helicsFederateInfoSetCoreInitString (helics_federate_info fi, const char *coreInit, helics_error *err)
 
void helicsFederateInfoSetBrokerInitString (helics_federate_info fi, const char *brokerInit, helics_error *err)
 
void helicsFederateInfoSetCoreType (helics_federate_info fi, int coretype, helics_error *err)
 
void helicsFederateInfoSetCoreTypeFromString (helics_federate_info fi, const char *coretype, helics_error *err)
 
void helicsFederateInfoSetBroker (helics_federate_info fi, const char *broker, helics_error *err)
 
void helicsFederateInfoSetBrokerKey (helics_federate_info fi, const char *brokerkey, helics_error *err)
 
void helicsFederateInfoSetBrokerPort (helics_federate_info fi, int brokerPort, helics_error *err)
 
void helicsFederateInfoSetLocalPort (helics_federate_info fi, const char *localPort, helics_error *err)
 
int helicsGetPropertyIndex (const char *val)
 
int helicsGetFlagIndex (const char *val)
 
int helicsGetOptionIndex (const char *val)
 
int helicsGetOptionValue (const char *val)
 
void helicsFederateInfoSetFlagOption (helics_federate_info fi, int flag, helics_bool value, helics_error *err)
 
void helicsFederateInfoSetSeparator (helics_federate_info fi, char separator, helics_error *err)
 
void helicsFederateInfoSetTimeProperty (helics_federate_info fi, int timeProperty, helics_time propertyValue, helics_error *err)
 
void helicsFederateInfoSetIntegerProperty (helics_federate_info fi, int intProperty, int propertyValue, helics_error *err)
 
void helicsFederateRegisterInterfaces (helics_federate fed, const char *file, helics_error *err)
 
void helicsFederateGlobalError (helics_federate fed, int errorCode, const char *errorString)
 
void helicsFederateLocalError (helics_federate fed, int errorCode, const char *errorString)
 
void helicsFederateFinalize (helics_federate fed, helics_error *err)
 
void helicsFederateFinalizeAsync (helics_federate fed, helics_error *err)
 
void helicsFederateFinalizeComplete (helics_federate fed, helics_error *err)
 
void helicsFederateDisconnect (helics_federate fed, helics_error *err)
 
void helicsFederateDisconnectAsync (helics_federate fed, helics_error *err)
 
void helicsFederateDisconnectComplete (helics_federate fed, helics_error *err)
 
void helicsFederateFree (helics_federate fed)
 
void helicsCloseLibrary (void)
 
void helicsFederateEnterInitializingMode (helics_federate fed, helics_error *err)
 
void helicsFederateEnterInitializingModeAsync (helics_federate fed, helics_error *err)
 
helics_bool helicsFederateIsAsyncOperationCompleted (helics_federate fed, helics_error *err)
 
void helicsFederateEnterInitializingModeComplete (helics_federate fed, helics_error *err)
 
void helicsFederateEnterExecutingMode (helics_federate fed, helics_error *err)
 
void helicsFederateEnterExecutingModeAsync (helics_federate fed, helics_error *err)
 
void helicsFederateEnterExecutingModeComplete (helics_federate fed, helics_error *err)
 
helics_iteration_result helicsFederateEnterExecutingModeIterative (helics_federate fed, helics_iteration_request iterate, helics_error *err)
 
void helicsFederateEnterExecutingModeIterativeAsync (helics_federate fed, helics_iteration_request iterate, helics_error *err)
 
helics_iteration_result helicsFederateEnterExecutingModeIterativeComplete (helics_federate fed, helics_error *err)
 
helics_federate_state helicsFederateGetState (helics_federate fed, helics_error *err)
 
helics_core helicsFederateGetCoreObject (helics_federate fed, helics_error *err)
 
helics_time helicsFederateRequestTime (helics_federate fed, helics_time requestTime, helics_error *err)
 
helics_time helicsFederateRequestTimeAdvance (helics_federate fed, helics_time timeDelta, helics_error *err)
 
helics_time helicsFederateRequestNextStep (helics_federate fed, helics_error *err)
 
helics_time helicsFederateRequestTimeIterative (helics_federate fed, helics_time requestTime, helics_iteration_request iterate, helics_iteration_result *outIteration, helics_error *err)
 
void helicsFederateRequestTimeAsync (helics_federate fed, helics_time requestTime, helics_error *err)
 
helics_time helicsFederateRequestTimeComplete (helics_federate fed, helics_error *err)
 
void helicsFederateRequestTimeIterativeAsync (helics_federate fed, helics_time requestTime, helics_iteration_request iterate, helics_error *err)
 
helics_time helicsFederateRequestTimeIterativeComplete (helics_federate fed, helics_iteration_result *outIterate, helics_error *err)
 
const char * helicsFederateGetName (helics_federate fed)
 
void helicsFederateSetTimeProperty (helics_federate fed, int timeProperty, helics_time time, helics_error *err)
 
void helicsFederateSetFlagOption (helics_federate fed, int flag, helics_bool flagValue, helics_error *err)
 
void helicsFederateSetSeparator (helics_federate fed, char separator, helics_error *err)
 
void helicsFederateSetIntegerProperty (helics_federate fed, int intProperty, int propertyVal, helics_error *err)
 
helics_time helicsFederateGetTimeProperty (helics_federate fed, int timeProperty, helics_error *err)
 
helics_bool helicsFederateGetFlagOption (helics_federate fed, int flag, helics_error *err)
 
int helicsFederateGetIntegerProperty (helics_federate fed, int intProperty, helics_error *err)
 
helics_time helicsFederateGetCurrentTime (helics_federate fed, helics_error *err)
 
void helicsFederateSetGlobal (helics_federate fed, const char *valueName, const char *value, helics_error *err)
 
void helicsFederateAddDependency (helics_federate fed, const char *fedName, helics_error *err)
 
void helicsFederateSetLogFile (helics_federate fed, const char *logFile, helics_error *err)
 
void helicsFederateLogErrorMessage (helics_federate fed, const char *logmessage, helics_error *err)
 
void helicsFederateLogWarningMessage (helics_federate fed, const char *logmessage, helics_error *err)
 
void helicsFederateLogInfoMessage (helics_federate fed, const char *logmessage, helics_error *err)
 
void helicsFederateLogDebugMessage (helics_federate fed, const char *logmessage, helics_error *err)
 
void helicsFederateLogLevelMessage (helics_federate fed, int loglevel, const char *logmessage, helics_error *err)
 
void helicsCoreSetGlobal (helics_core core, const char *valueName, const char *value, helics_error *err)
 
void helicsBrokerSetGlobal (helics_broker broker, const char *valueName, const char *value, helics_error *err)
 
void helicsCoreSetLogFile (helics_core core, const char *logFileName, helics_error *err)
 
void helicsBrokerSetLogFile (helics_broker broker, const char *logFileName, helics_error *err)
 
void helicsBrokerSetTimeBarrier (helics_broker broker, helics_time barrierTime, helics_error *err)
 
void helicsBrokerClearTimeBarrier (helics_broker broker)
 
void helicsBrokerGlobalError (helics_broker broker, int errorCode, const char *errorString, helics_error *err)
 
void helicsCoreGlobalError (helics_core core, int errorCode, const char *errorString, helics_error *err)
 
helics_query helicsCreateQuery (const char *target, const char *query)
 
const char * helicsQueryExecute (helics_query query, helics_federate fed, helics_error *err)
 
const char * helicsQueryCoreExecute (helics_query query, helics_core core, helics_error *err)
 
const char * helicsQueryBrokerExecute (helics_query query, helics_broker broker, helics_error *err)
 
void helicsQueryExecuteAsync (helics_query query, helics_federate fed, helics_error *err)
 
const char * helicsQueryExecuteComplete (helics_query query, helics_error *err)
 
helics_bool helicsQueryIsCompleted (helics_query query)
 
void helicsQuerySetTarget (helics_query query, const char *target, helics_error *err)
 
void helicsQuerySetQueryString (helics_query query, const char *queryString, helics_error *err)
 
void helicsQuerySetOrdering (helics_query query, int32_t mode, helics_error *err)
 
void helicsQueryFree (helics_query query)
 
void helicsCleanupLibrary (void)
 

Detailed Description

Common functions for the HELICS C api.

Function Documentation

◆ helicsAbort()

void helicsAbort ( int  errorCode,
const char *  errorString 
)

Execute a global abort by sending an error code to all cores, brokers, and federates that were created through the current library instance.

◆ helicsBrokerAddDestinationFilterToEndpoint()

void helicsBrokerAddDestinationFilterToEndpoint ( helics_broker  broker,
const char *  filter,
const char *  endpoint,
helics_error err 
)

Link a named filter to a destination endpoint.

Parameters
brokerThe broker to generate the connection from.
filterThe name of the filter (cannot be NULL).
endpointThe name of the endpoint to filter the data going to (cannot be NULL). @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

References helics_error_invalid_argument.

Referenced by helicscpp::Broker::addDestinationFilterToEndpoint().

◆ helicsBrokerAddSourceFilterToEndpoint()

void helicsBrokerAddSourceFilterToEndpoint ( helics_broker  broker,
const char *  filter,
const char *  endpoint,
helics_error err 
)

Link a named filter to a source endpoint.

Parameters
brokerThe broker to generate the connection from.
filterThe name of the filter (cannot be NULL).
endpointThe name of the endpoint to filter the data from (cannot be NULL). @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

References helics_error_invalid_argument.

Referenced by helicscpp::Broker::addSourceFilterToEndpoint().

◆ helicsBrokerClearTimeBarrier()

void helicsBrokerClearTimeBarrier ( helics_broker  broker)

Clear any time barrier on a broker.

Parameters
brokerThe broker to clear the barriers on.

◆ helicsBrokerClone()

helics_broker helicsBrokerClone ( helics_broker  broker,
helics_error err 
)

Create a new reference to an existing broker.

This will create a new broker object that references the existing broker it must be freed as well.

Parameters
brokerAn existing helics_broker. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A new reference to the same broker.

References helics::getBrokerObject().

Referenced by helicscpp::Broker::Broker(), and helicscpp::Broker::operator=().

◆ helicsBrokerDataLink()

void helicsBrokerDataLink ( helics_broker  broker,
const char *  source,
const char *  target,
helics_error err 
)

Link a named publication and named input using a broker.

Parameters
brokerThe broker to generate the connection from.
sourceThe name of the publication (cannot be NULL).
targetThe name of the target to send the publication data (cannot be NULL). @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

References helics_error_invalid_argument.

Referenced by helicscpp::Broker::dataLink().

◆ helicsBrokerDestroy()

void helicsBrokerDestroy ( helics_broker  broker)

Disconnect and free a broker.

References helicsBrokerDisconnect(), and helicsBrokerFree().

◆ helicsBrokerDisconnect()

void helicsBrokerDisconnect ( helics_broker  broker,
helics_error err 
)

Disconnect a broker.

Parameters
brokerThe broker to disconnect. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Broker::disconnect(), and helicsBrokerDestroy().

◆ helicsBrokerFree()

void helicsBrokerFree ( helics_broker  broker)

Release the memory associated with a broker.

References helics::BrokerFactory::cleanUpBrokers(), and helics::getBrokerObject().

Referenced by helicsBrokerDestroy(), and helicscpp::Broker::~Broker().

◆ helicsBrokerGetAddress()

const char* helicsBrokerGetAddress ( helics_broker  broker)

Get the network address associated with a broker.

Parameters
brokerThe broker to query.
Returns
A string with the network address of the broker.

Referenced by helicscpp::Broker::getAddress().

◆ helicsBrokerGetIdentifier()

const char* helicsBrokerGetIdentifier ( helics_broker  broker)

Get an identifier for the broker.

Parameters
brokerThe broker to query.
Returns
A string containing the identifier for the broker.

Referenced by helicscpp::Broker::getIdentifier().

◆ helicsBrokerGlobalError()

void helicsBrokerGlobalError ( helics_broker  broker,
int  errorCode,
const char *  errorString,
helics_error err 
)

Generate a global error through a broker. This will terminate the federation.

Parameters
brokerThe broker to generate the global error on.
errorCodeThe error code to associate with the global error.
errorStringAn error message to associate with the global error. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsBrokerIsConnected()

helics_bool helicsBrokerIsConnected ( helics_broker  broker)

Check if a broker is connected.

A connected broker implies it is attached to cores or cores could reach out to communicate.

Returns
helics_false if not connected.

References helics_false, and helics_true.

Referenced by helicscpp::Broker::Broker(), and helicscpp::Broker::isConnected().

◆ helicsBrokerIsValid()

helics_bool helicsBrokerIsValid ( helics_broker  broker)

Check if a broker object is a valid object.

Parameters
brokerThe helics_broker object to test.

References helics::getBrokerObject(), helics_false, and helics_true.

◆ helicsBrokerMakeConnections()

void helicsBrokerMakeConnections ( helics_broker  broker,
const char *  file,
helics_error err 
)

Load a file containing connection information.

Parameters
brokerThe broker to generate the connections from.
fileA JSON or TOML file containing connection information. @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

◆ helicsBrokerSetGlobal()

void helicsBrokerSetGlobal ( helics_broker  broker,
const char *  valueName,
const char *  value,
helics_error err 
)

Set a federation global value.

This overwrites any previous value for this name.

Parameters
brokerThe broker to set the global through.
valueNameThe name of the global to set.
valueThe value of the global. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

References helics_error_invalid_argument.

Referenced by helicscpp::Broker::setGlobal().

◆ helicsBrokerSetLogFile()

void helicsBrokerSetLogFile ( helics_broker  broker,
const char *  logFileName,
helics_error err 
)

Set the log file on a broker.

Parameters
brokerThe broker to set the log file for.
logFileNameThe name of the file to log to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsBrokerSetTimeBarrier()

void helicsBrokerSetTimeBarrier ( helics_broker  broker,
helics_time  barrierTime,
helics_error err 
)

Set a broker time barrier.

Parameters
brokerThe broker to set the time barrier for.
barrierTimeThe time to set the barrier at. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsBrokerWaitForDisconnect()

helics_bool helicsBrokerWaitForDisconnect ( helics_broker  broker,
int  msToWait,
helics_error err 
)

Wait for the broker to disconnect.

Parameters
brokerThe broker to wait for.
msToWaitThe time out in millisecond (<0 for infinite timeout). @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
helics_true if the disconnect was successful, helics_false if there was a timeout.

References helics_false, and helics_true.

Referenced by helicscpp::Broker::waitForDisconnect().

◆ helicsCleanupLibrary()

void helicsCleanupLibrary ( void  )

Function to do some housekeeping work.

This runs some cleanup routines and tries to close out any residual thread that haven't been shutdown yet.

Referenced by helicscpp::cleanupHelicsLibrary().

◆ helicsClearSignalHandler()

void helicsClearSignalHandler ( )

Clear HELICS based signal handlers.

◆ helicsCloseLibrary()

void helicsCloseLibrary ( void  )

Call when done using the helics library. This function will ensure the threads are closed properly. If possible this should be the last call before exiting.

References helics::BrokerFactory::cleanUpBrokers(), and helics::CoreFactory::cleanUpCores().

Referenced by helicscpp::closeLibrary().

◆ helicsCoreAddDestinationFilterToEndpoint()

void helicsCoreAddDestinationFilterToEndpoint ( helics_core  core,
const char *  filter,
const char *  endpoint,
helics_error err 
)

Link a named filter to a destination endpoint.

Parameters
coreThe core to generate the connection from.
filterThe name of the filter (cannot be NULL).
endpointThe name of the endpoint to filter the data going to (cannot be NULL). @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

References helics_error_invalid_argument.

◆ helicsCoreAddSourceFilterToEndpoint()

void helicsCoreAddSourceFilterToEndpoint ( helics_core  core,
const char *  filter,
const char *  endpoint,
helics_error err 
)

Link a named filter to a source endpoint.

Parameters
coreThe core to generate the connection from.
filterThe name of the filter (cannot be NULL).
endpointThe name of the endpoint to filter the data from (cannot be NULL). @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

References helics_error_invalid_argument.

◆ helicsCoreClone()

helics_core helicsCoreClone ( helics_core  core,
helics_error err 
)

Create a new reference to an existing core.

This will create a new broker object that references the existing broker. The new broker object must be freed as well.

Parameters
coreAn existing helics_core. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A new reference to the same broker.

References helics::getCoreObject().

Referenced by helicscpp::Core::Core(), and helicscpp::Core::operator=().

◆ helicsCoreConnect()

helics_bool helicsCoreConnect ( helics_core  core,
helics_error err 
)

Connect a core to the federate based on current configuration.

Parameters
coreThe core to connect. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
helics_false if not connected, helics_true if it is connected.

References helics_false, and helics_true.

◆ helicsCoreDataLink()

void helicsCoreDataLink ( helics_core  core,
const char *  source,
const char *  target,
helics_error err 
)

Link a named publication and named input using a core.

Parameters
coreThe core to generate the connection from.
sourceThe name of the publication (cannot be NULL).
targetThe name of the target to send the publication data (cannot be NULL). @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

References helics_error_invalid_argument.

◆ helicsCoreDestroy()

void helicsCoreDestroy ( helics_core  core)

Disconnect and free a core.

References helicsCoreDisconnect(), and helicsCoreFree().

◆ helicsCoreDisconnect()

void helicsCoreDisconnect ( helics_core  core,
helics_error err 
)

Disconnect a core from the federation.

Parameters
coreThe core to query. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Core::disconnect(), and helicsCoreDestroy().

◆ helicsCoreFree()

void helicsCoreFree ( helics_core  core)

Release the memory associated with a core.

References helics::CoreFactory::cleanUpCores(), and helics::getCoreObject().

Referenced by helicsCoreDestroy(), and helicscpp::Core::~Core().

◆ helicsCoreGetAddress()

const char* helicsCoreGetAddress ( helics_core  core)

Get the network address associated with a core.

Parameters
coreThe core to query.
Returns
A string with the network address of the broker.

Referenced by helicscpp::Core::getAddress().

◆ helicsCoreGetIdentifier()

const char* helicsCoreGetIdentifier ( helics_core  core)

Get an identifier for the core.

Parameters
coreThe core to query.
Returns
A string with the identifier of the core.

Referenced by helicscpp::Core::getIdentifier().

◆ helicsCoreGlobalError()

void helicsCoreGlobalError ( helics_core  core,
int  errorCode,
const char *  errorString,
helics_error err 
)

Generate a global error through a broker. This will terminate the federation.

Parameters
coreThe core to generate the global error.
errorCodeThe error code to associate with the global error.
errorStringAn error message to associate with the global error. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

References helics::local_core_id().

◆ helicsCoreIsConnected()

helics_bool helicsCoreIsConnected ( helics_core  core)

Check if a core is connected.

A connected core implies it is attached to federates or federates could be attached to it

Returns
helics_false if not connected, helics_true if it is connected.

References helics_false, and helics_true.

Referenced by helicscpp::Core::isConnected().

◆ helicsCoreIsValid()

helics_bool helicsCoreIsValid ( helics_core  core)

Check if a core object is a valid object.

Parameters
coreThe helics_core object to test.

References helics::getCoreObject(), helics_false, and helics_true.

◆ helicsCoreMakeConnections()

void helicsCoreMakeConnections ( helics_core  core,
const char *  file,
helics_error err 
)

Load a file containing connection information.

Parameters
coreThe core to generate the connections from.
fileA JSON or TOML file containing connection information. @forcpponly
[in,out]errA helics_error object, can be NULL if the errors are to be ignored. @endforcpponly

◆ helicsCoreSetGlobal()

void helicsCoreSetGlobal ( helics_core  core,
const char *  valueName,
const char *  value,
helics_error err 
)

Set a global value in a core.

This overwrites any previous value for this name.

Parameters
coreThe core to set the global through.
valueNameThe name of the global to set.
valueThe value of the global. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

References helics_error_invalid_argument.

Referenced by helicscpp::Core::setGlobal().

◆ helicsCoreSetLogFile()

void helicsCoreSetLogFile ( helics_core  core,
const char *  logFileName,
helics_error err 
)

Set the log file on a core.

Parameters
coreThe core to set the log file for.
logFileNameThe name of the file to log to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsCoreSetReadyToInit()

void helicsCoreSetReadyToInit ( helics_core  core,
helics_error err 
)

Set the core to ready for init.

This function is used for cores that have filters but no federates so there needs to be a direct signal to the core to trigger the federation initialization.

Parameters
coreThe core object to enable init values for. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Core::setReadyToInit().

◆ helicsCoreWaitForDisconnect()

helics_bool helicsCoreWaitForDisconnect ( helics_core  core,
int  msToWait,
helics_error err 
)

Wait for the core to disconnect.

Parameters
coreThe core to wait for.
msToWaitThe time out in millisecond (<0 for infinite timeout). @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
helics_true if the disconnect was successful, helics_false if there was a timeout.

References helics_false, and helics_true.

Referenced by helicscpp::Core::waitForDisconnect().

◆ helicsCreateBroker()

helics_broker helicsCreateBroker ( const char *  type,
const char *  name,
const char *  initString,
helics_error err 
)

Create a broker object.

Parameters
typeThe type of the broker to create.
nameThe name of the broker. It can be a nullptr or empty string to have a name automatically assigned.
initStringAn initialization string to send to the core-the format is similar to command line arguments. Typical options include a broker address such as –broker="XSSAF" if this is a subbroker, or the number of federates, or the address. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A helics_broker object. @forcpponly It will be NULL if there was an error indicated in the err object. @endforcpponly

References helics::BrokerFactory::create(), helics::DEFAULT, helics_error::error_code, helics_error_invalid_argument, helics_error::message, and helics::UNRECOGNIZED.

Referenced by helicscpp::Broker::Broker().

◆ helicsCreateBrokerFromArgs()

helics_broker helicsCreateBrokerFromArgs ( const char *  type,
const char *  name,
int  argc,
const char *const *  argv,
helics_error err 
)

Create a core object by passing command line arguments.

Parameters
typeThe type of the core to create.
nameThe name of the core. It can be a nullptr or empty string to have a name automatically assigned. @forcpponly
argcThe number of arguments. @endforcpponly
argvThe list of string values from a command line. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A helics_core object.

References helics::BrokerFactory::create(), helics::DEFAULT, helics_error::error_code, helics_error_invalid_argument, helics_error::message, and helics::UNRECOGNIZED.

Referenced by helicscpp::Broker::Broker().

◆ helicsCreateCombinationFederate()

helics_federate helicsCreateCombinationFederate ( const char *  fedName,
helics_federate_info  fi,
helics_error err 
)

Create a combination federate from a federate info object.

Combination federates are both value federates and message federates, objects can be used in all functions that take a helics_federate, helics_message_federate or helics_federate object as an argument

Parameters
fedNameA string with the name of the federate, can be NULL or an empty string to pull the default name from fi.
fiThe federate info object that contains details on the federate. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An opaque value federate object nullptr if the object creation failed.

Referenced by helicscpp::CombinationFederate::CombinationFederate().

◆ helicsCreateCombinationFederateFromConfig()

helics_federate helicsCreateCombinationFederateFromConfig ( const char *  configFile,
helics_error err 
)

Create a combination federate from a JSON file or JSON string or TOML file.

Combination federates are both value federates and message federates, objects can be used in all functions that take a helics_federate, helics_message_federate or helics_federate object as an argument

Parameters
configFileA JSON file or a JSON string or TOML file that contains setup and configuration information. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An opaque combination federate object.

Referenced by helicscpp::CombinationFederate::CombinationFederate().

◆ helicsCreateCore()

helics_core helicsCreateCore ( const char *  type,
const char *  name,
const char *  initString,
helics_error err 
)

Create a core object.

Parameters
typeThe type of the core to create.
nameThe name of the core. It can be a nullptr or empty string to have a name automatically assigned.
initStringAn initialization string to send to the core. The format is similar to command line arguments. Typical options include a broker name, the broker address, the number of federates, etc. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A helics_core object. @forcpponly If the core is invalid, err will contain the corresponding error message and the returned object will be NULL. @endforcpponly

References helics::DEFAULT, helics_error::error_code, helics::CoreFactory::FindOrCreate(), helics_error_invalid_argument, helics_error::message, and helics::UNRECOGNIZED.

Referenced by helicscpp::Core::Core().

◆ helicsCreateCoreFromArgs()

helics_core helicsCreateCoreFromArgs ( const char *  type,
const char *  name,
int  argc,
const char *const *  argv,
helics_error err 
)

Create a core object by passing command line arguments.

Parameters
typeThe type of the core to create.
nameThe name of the core. It can be a nullptr or empty string to have a name automatically assigned. @forcpponly
argcThe number of arguments. @endforcpponly
argvThe list of string values from a command line. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A helics_core object.

References helics::DEFAULT, helics_error::error_code, helics::CoreFactory::FindOrCreate(), helics_error_invalid_argument, helics_error::message, and helics::UNRECOGNIZED.

Referenced by helicscpp::Core::Core().

◆ helicsCreateFederateInfo()

helics_federate_info helicsCreateFederateInfo ( void  )

Create a federate info object for specifying federate information when constructing a federate.

Returns
A helics_federate_info object which is a reference to the created object.

Referenced by helicscpp::FederateInfo::FederateInfo().

◆ helicsCreateMessageFederate()

helics_federate helicsCreateMessageFederate ( const char *  fedName,
helics_federate_info  fi,
helics_error err 
)

Create a message federate from a federate info object.

helics_message_federate objects can be used in all functions that take a helics_message_federate or helics_federate object as an argument.

Parameters
fedNameThe name of the federate to create.
fiThe federate info object that contains details on the federate. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An opaque message federate object.

Referenced by helicscpp::MessageFederate::MessageFederate().

◆ helicsCreateMessageFederateFromConfig()

helics_federate helicsCreateMessageFederateFromConfig ( const char *  configFile,
helics_error err 
)

Create a message federate from a JSON file or JSON string or TOML file.

helics_message_federate objects can be used in all functions that take a helics_message_federate or helics_federate object as an argument.

Parameters
configFileA Config(JSON,TOML) file or a JSON string that contains setup and configuration information. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An opaque message federate object.

Referenced by helicscpp::MessageFederate::MessageFederate().

◆ helicsCreateQuery()

helics_query helicsCreateQuery ( const char *  target,
const char *  query 
)

Create a query object.

A query object consists of a target and query string.

Parameters
targetThe name of the target to query.
queryThe query to make of the target.

Referenced by helicscpp::Core::query(), helicscpp::Broker::query(), and helicscpp::Federate::query().

◆ helicsCreateValueFederate()

helics_federate helicsCreateValueFederate ( const char *  fedName,
helics_federate_info  fi,
helics_error err 
)

Create a value federate from a federate info object.

helics_federate objects can be used in all functions that take a helics_federate or helics_federate object as an argument.

Parameters
fedNameThe name of the federate to create, can NULL or an empty string to use the default name from fi or an assigned name.
fiThe federate info object that contains details on the federate. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An opaque value federate object.

Referenced by helicscpp::ValueFederate::ValueFederate().

◆ helicsCreateValueFederateFromConfig()

helics_federate helicsCreateValueFederateFromConfig ( const char *  configFile,
helics_error err 
)

Create a value federate from a JSON file, JSON string, or TOML file.

helics_federate objects can be used in all functions that take a helics_federate or helics_federate object as an argument.

Parameters
configFileA JSON file or a JSON string or TOML file that contains setup and configuration information. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An opaque value federate object.

Referenced by helicscpp::ValueFederate::ValueFederate().

◆ helicsErrorClear()

void helicsErrorClear ( helics_error err)

Clear an error object.

clear an error object

References helics_error::error_code, and helics_error::message.

◆ helicsErrorInitialize()

helics_error helicsErrorInitialize ( void  )

Return an initialized error object.

References helics_error::error_code, and helics_error::message.

◆ helicsFederateAddDependency()

void helicsFederateAddDependency ( helics_federate  fed,
const char *  fedName,
helics_error err 
)

Add a time dependency for a federate. The federate will depend on the given named federate for time synchronization.

Parameters
fedThe federate to add the dependency for.
fedNameThe name of the federate to depend on. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::addDependency().

◆ helicsFederateClone()

helics_federate helicsFederateClone ( helics_federate  fed,
helics_error err 
)

Create a new reference to an existing federate.

This will create a new helics_federate object that references the existing federate. The new object must be freed as well.

Parameters
fedAn existing helics_federate. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A new reference to the same federate.

Referenced by helicscpp::Federate::Federate(), helicscpp::FederateInfo::FederateInfo(), helicsGetFederateByName(), helicscpp::FederateInfo::operator=(), and helicscpp::Federate::operator=().

◆ helicsFederateDestroy()

void helicsFederateDestroy ( helics_federate  fed)

Disconnect and free a federate.

References fed, helicsFederateFinalize(), and helicsFederateFree().

◆ helicsFederateDisconnect()

void helicsFederateDisconnect ( helics_federate  fed,
helics_error err 
)

Disconnect/finalize the federate. This function halts all communication in the federate and disconnects it from the core. This call is identical to helicsFederateFinalize.

◆ helicsFederateDisconnectAsync()

void helicsFederateDisconnectAsync ( helics_federate  fed,
helics_error err 
)

Disconnect/finalize the federate in an async call. This call is identical to helicsFederateFinalizeAsync.

◆ helicsFederateDisconnectComplete()

void helicsFederateDisconnectComplete ( helics_federate  fed,
helics_error err 
)

Complete the asynchronous disconnect/finalize call. This call is identical to helicsFederateFinalizeComplete.

◆ helicsFederateEnterExecutingMode()

void helicsFederateEnterExecutingMode ( helics_federate  fed,
helics_error err 
)

Request that the federate enter the Execution mode.

This call is blocking until granted entry by the core object. On return from this call the federate will be at time 0. For an asynchronous alternative call see /ref helicsFederateEnterExecutingModeAsync.

Parameters
fedA federate to change modes. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterExecutingMode().

◆ helicsFederateEnterExecutingModeAsync()

void helicsFederateEnterExecutingModeAsync ( helics_federate  fed,
helics_error err 
)

Request that the federate enter the Execution mode.

This call is non-blocking and will return immediately. Call /ref helicsFederateEnterExecutingModeComplete to finish the call sequence.

Parameters
fedThe federate object to complete the call. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterExecutingModeAsync().

◆ helicsFederateEnterExecutingModeComplete()

void helicsFederateEnterExecutingModeComplete ( helics_federate  fed,
helics_error err 
)

Complete the call to /ref helicsFederateEnterExecutingModeAsync.

Parameters
fedThe federate object to complete the call. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterExecutingModeComplete().

◆ helicsFederateEnterExecutingModeIterative()

helics_iteration_result helicsFederateEnterExecutingModeIterative ( helics_federate  fed,
helics_iteration_request  iterate,
helics_error err 
)

Request an iterative time.

This call allows for finer grain control of the iterative process than /ref helicsFederateRequestTime. It takes a time and iteration request, and returns a time and iteration status.

Parameters
fedThe federate to make the request of.
iterateThe requested iteration mode. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An iteration structure with field containing the time and iteration status.

Referenced by helicscpp::Federate::enterExecutingMode().

◆ helicsFederateEnterExecutingModeIterativeAsync()

void helicsFederateEnterExecutingModeIterativeAsync ( helics_federate  fed,
helics_iteration_request  iterate,
helics_error err 
)

Request an iterative entry to the execution mode.

This call allows for finer grain control of the iterative process than /ref helicsFederateRequestTime. It takes a time and iteration request, and returns a time and iteration status

Parameters
fedThe federate to make the request of.
iterateThe requested iteration mode. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterExecutingModeAsync().

◆ helicsFederateEnterExecutingModeIterativeComplete()

helics_iteration_result helicsFederateEnterExecutingModeIterativeComplete ( helics_federate  fed,
helics_error err 
)

Complete the asynchronous iterative call into ExecutionMode.

Parameters
fedThe federate to make the request of. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
An iteration object containing the iteration time and iteration_status.

Referenced by helicscpp::Federate::enterExecutingModeComplete().

◆ helicsFederateEnterInitializingMode()

void helicsFederateEnterInitializingMode ( helics_federate  fed,
helics_error err 
)

Enter the initialization state of a federate.

The initialization state allows initial values to be set and received if the iteration is requested on entry to the execution state. This is a blocking call and will block until the core allows it to proceed.

Parameters
fedThe federate to operate on. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterInitializingMode().

◆ helicsFederateEnterInitializingModeAsync()

void helicsFederateEnterInitializingModeAsync ( helics_federate  fed,
helics_error err 
)

Non blocking alternative to helicsFederateEnterInitializingMode.

The function helicsFederateEnterInitializationModeFinalize must be called to finish the operation.

Parameters
fedThe federate to operate on. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterInitializingModeAsync().

◆ helicsFederateEnterInitializingModeComplete()

void helicsFederateEnterInitializingModeComplete ( helics_federate  fed,
helics_error err 
)

Finalize the entry to initialize mode that was initiated with /ref heliceEnterInitializingModeAsync.

Parameters
fedThe federate desiring to complete the initialization step. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::enterInitializingModeComplete().

◆ helicsFederateFinalize()

void helicsFederateFinalize ( helics_federate  fed,
helics_error err 
)

Finalize the federate. This function halts all communication in the federate and disconnects it from the core.

Referenced by helicscpp::Federate::finalize(), and helicsFederateDestroy().

◆ helicsFederateFinalizeAsync()

void helicsFederateFinalizeAsync ( helics_federate  fed,
helics_error err 
)

Finalize the federate in an async call.

Referenced by helicscpp::Federate::finalizeAsync().

◆ helicsFederateFinalizeComplete()

void helicsFederateFinalizeComplete ( helics_federate  fed,
helics_error err 
)

Complete the asynchronous finalize call.

Referenced by helicscpp::Federate::finalizeComplete().

◆ helicsFederateFree()

void helicsFederateFree ( helics_federate  fed)

Release the memory associated with a federate.

References helics::CoreFactory::cleanUpCores(), fed, and helics::getFedObject().

Referenced by helicsFederateDestroy(), and helicscpp::Federate::~Federate().

◆ helicsFederateGetCoreObject()

helics_core helicsFederateGetCoreObject ( helics_federate  fed,
helics_error err 
)

Get the core object associated with a federate.

Parameters
fedA federate object. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A core object, nullptr if invalid.

Referenced by helicscpp::Federate::getCore().

◆ helicsFederateGetCurrentTime()

helics_time helicsFederateGetCurrentTime ( helics_federate  fed,
helics_error err 
)

Get the current time of the federate.

Parameters
fedThe federate object to query. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly
Returns
The current time of the federate.

Referenced by helicscpp::Federate::getCurrentTime().

◆ helicsFederateGetFlagOption()

helics_bool helicsFederateGetFlagOption ( helics_federate  fed,
int  flag,
helics_error err 
)

Get a flag value for a federate.

Parameters
fedThe federate to get the flag for.
flagThe flag to query. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly
Returns
The value of the flag.

Referenced by helicscpp::Federate::getFlagOption().

◆ helicsFederateGetIntegerProperty()

int helicsFederateGetIntegerProperty ( helics_federate  fed,
int  intProperty,
helics_error err 
)

Get the current value of an integer property (such as a logging level).

Parameters
fedThe federate to get the flag for.
intPropertyA code for the property to set /ref helics_handle_options. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly
Returns
The value of the property.

Referenced by helicscpp::Federate::getIntegerProperty().

◆ helicsFederateGetName()

const char* helicsFederateGetName ( helics_federate  fed)

Get the name of the federate.

Parameters
fedThe federate object to query.
Returns
A pointer to a string with the name.

Referenced by helicscpp::Federate::getName().

◆ helicsFederateGetState()

helics_federate_state helicsFederateGetState ( helics_federate  fed,
helics_error err 
)

Get the current state of a federate.

Parameters
fedThe federate to query. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
State the resulting state if void return helics_ok.

Referenced by helicscpp::Federate::getCurrentMode().

◆ helicsFederateGetTimeProperty()

helics_time helicsFederateGetTimeProperty ( helics_federate  fed,
int  timeProperty,
helics_error err 
)

Get the current value of a time based property in a federate.

Parameters
fedThe federate query.
timePropertyThe property to query. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::getTimeProperty().

◆ helicsFederateGlobalError()

void helicsFederateGlobalError ( helics_federate  fed,
int  errorCode,
const char *  errorString 
)

Generate a global error from a federate.

A global error halts the co-simulation completely.

Parameters
fedThe federate to create an error in.
errorCodeThe integer code for the error.
errorStringA string describing the error.

Referenced by helicscpp::Federate::globalError().

◆ helicsFederateInfoClone()

helics_federate_info helicsFederateInfoClone ( helics_federate_info  fi,
helics_error err 
)

Create a federate info object from an existing one and clone the information.

Parameters
fiA federateInfo object to duplicate. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A helics_federate_info object which is a reference to the created object.

◆ helicsFederateInfoFree()

void helicsFederateInfoFree ( helics_federate_info  fi)

Delete the memory associated with a federate info object.

Referenced by helicscpp::FederateInfo::operator=(), and helicscpp::FederateInfo::~FederateInfo().

◆ helicsFederateInfoLoadFromArgs()

void helicsFederateInfoLoadFromArgs ( helics_federate_info  fi,
int  argc,
const char *const *  argv,
helics_error err 
)

Load federate info from command line arguments.

Parameters
fiA federateInfo object.
argcThe number of command line arguments.
argvAn array of strings from the command line. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsFederateInfoSetBroker()

void helicsFederateInfoSetBroker ( helics_federate_info  fi,
const char *  broker,
helics_error err 
)

Set the name or connection information for a broker.

This is only used if the core is automatically created, the broker information will be transferred to the core for connection.

Parameters
fiThe federate info object to alter.
brokerA string which defines the connection information for a broker either a name or an address. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setBroker().

◆ helicsFederateInfoSetBrokerInitString()

void helicsFederateInfoSetBrokerInitString ( helics_federate_info  fi,
const char *  brokerInit,
helics_error err 
)

Set the initialization string that a core will pass to a generated broker usually in the form of command line arguments.

Parameters
fiThe federate info object to alter.
brokerInitA string with command line arguments for a generated broker. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setBrokerInit().

◆ helicsFederateInfoSetBrokerKey()

void helicsFederateInfoSetBrokerKey ( helics_federate_info  fi,
const char *  brokerkey,
helics_error err 
)

Set the key for a broker connection.

This is only used if the core is automatically created, the broker information will be transferred to the core for connection.

Parameters
fiThe federate info object to alter.
brokerkeyA string containing a key for the broker to connect. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setBrokerKey().

◆ helicsFederateInfoSetBrokerPort()

void helicsFederateInfoSetBrokerPort ( helics_federate_info  fi,
int  brokerPort,
helics_error err 
)

Set the port to use for the broker.

This is only used if the core is automatically created, the broker information will be transferred to the core for connection. This will only be useful for network broker connections.

Parameters
fiThe federate info object to alter.
brokerPortThe integer port number to use for connection with a broker. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsFederateInfoSetCoreInitString()

void helicsFederateInfoSetCoreInitString ( helics_federate_info  fi,
const char *  coreInit,
helics_error err 
)

Set the initialization string for the core usually in the form of command line arguments.

Parameters
fiThe federate info object to alter.
coreInitA string containing command line arguments to be passed to the core. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setCoreInit().

◆ helicsFederateInfoSetCoreName()

void helicsFederateInfoSetCoreName ( helics_federate_info  fi,
const char *  corename,
helics_error err 
)

Set the name of the core to link to for a federate.

Parameters
fiThe federate info object to alter.
corenameThe identifier for a core to link to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setCoreName().

◆ helicsFederateInfoSetCoreType()

void helicsFederateInfoSetCoreType ( helics_federate_info  fi,
int  coretype,
helics_error err 
)

Set the core type by integer code.

Valid values available by definitions in api-data.h.

Parameters
fiThe federate info object to alter.
coretypeAn numerical code for a core type see /ref helics_core_type. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::FederateInfo(), and helicscpp::FederateInfo::setCoreType().

◆ helicsFederateInfoSetCoreTypeFromString()

void helicsFederateInfoSetCoreTypeFromString ( helics_federate_info  fi,
const char *  coretype,
helics_error err 
)

Set the core type from a string.

Parameters
fiThe federate info object to alter.
coretypeA string naming a core type. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::FederateInfo(), and helicscpp::FederateInfo::setCoreType().

◆ helicsFederateInfoSetFlagOption()

void helicsFederateInfoSetFlagOption ( helics_federate_info  fi,
int  flag,
helics_bool  value,
helics_error err 
)

Set a flag in the info structure.

Valid flags are available /ref helics_federate_flags.

Parameters
fiThe federate info object to alter.
flagA numerical index for a flag.
valueThe desired value of the flag helics_true or helics_false. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setFlagOption().

◆ helicsFederateInfoSetIntegerProperty()

void helicsFederateInfoSetIntegerProperty ( helics_federate_info  fi,
int  intProperty,
int  propertyValue,
helics_error err 
)

Set an integer property for a federate.

Set known properties.

Parameters
fiThe federateInfo object to alter.
intPropertyAn int identifying the property.
propertyValueThe value to set the property to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setProperty().

◆ helicsFederateInfoSetLocalPort()

void helicsFederateInfoSetLocalPort ( helics_federate_info  fi,
const char *  localPort,
helics_error err 
)

Set the local port to use.

This is only used if the core is automatically created, the port information will be transferred to the core for connection.

Parameters
fiThe federate info object to alter.
localPortA string with the port information to use as the local server port can be a number or "auto" or "os_local". @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsFederateInfoSetSeparator()

void helicsFederateInfoSetSeparator ( helics_federate_info  fi,
char  separator,
helics_error err 
)

Set the separator character in the info structure.

The separator character is the separation character for local publications/endpoints in creating their global name. For example if the separator character is '/' then a local endpoint would have a globally reachable name of fedName/localName.

Parameters
fiThe federate info object to alter.
separatorThe character to use as a separator. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setSeparator().

◆ helicsFederateInfoSetTimeProperty()

void helicsFederateInfoSetTimeProperty ( helics_federate_info  fi,
int  timeProperty,
helics_time  propertyValue,
helics_error err 
)

Set the output delay for a federate.

Parameters
fiThe federate info object to alter.
timePropertyAn integer representation of the time based property to set see /ref helics_properties.
propertyValueThe value of the property to set the timeProperty to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::FederateInfo::setProperty().

◆ helicsFederateIsAsyncOperationCompleted()

helics_bool helicsFederateIsAsyncOperationCompleted ( helics_federate  fed,
helics_error err 
)

Check if the current Asynchronous operation has completed.

Parameters
fedThe federate to operate on. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
helics_false if not completed, helics_true if completed.

Referenced by helicscpp::Federate::isAsyncOperationCompleted().

◆ helicsFederateIsValid()

helics_bool helicsFederateIsValid ( helics_federate  fed)

Check if a federate_object is valid.

Returns
helics_true if the federate is a valid active federate, helics_false otherwise

◆ helicsFederateLocalError()

void helicsFederateLocalError ( helics_federate  fed,
int  errorCode,
const char *  errorString 
)

Generate a local error in a federate.

This will propagate through the co-simulation but not necessarily halt the co-simulation, it has a similar effect to finalize but does allow some interaction with a core for a brief time.

Parameters
fedThe federate to create an error in.
errorCodeThe integer code for the error.
errorStringA string describing the error.

Referenced by helicscpp::Federate::localError().

◆ helicsFederateLogDebugMessage()

void helicsFederateLogDebugMessage ( helics_federate  fed,
const char *  logmessage,
helics_error err 
)

Log a debug message through a federate.

Parameters
fedThe federate to log the debug message through.
logmessageThe message to put in the log. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::logDebugMessage().

◆ helicsFederateLogErrorMessage()

void helicsFederateLogErrorMessage ( helics_federate  fed,
const char *  logmessage,
helics_error err 
)

Log an error message through a federate.

Parameters
fedThe federate to log the error message through.
logmessageThe message to put in the log. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::logErrorMessage().

◆ helicsFederateLogInfoMessage()

void helicsFederateLogInfoMessage ( helics_federate  fed,
const char *  logmessage,
helics_error err 
)

Log an info message through a federate.

Parameters
fedThe federate to log the info message through.
logmessageThe message to put in the log. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::logInfoMessage().

◆ helicsFederateLogLevelMessage()

void helicsFederateLogLevelMessage ( helics_federate  fed,
int  loglevel,
const char *  logmessage,
helics_error err 
)

Log a message through a federate.

Parameters
fedThe federate to log the message through.
loglevelThe level of the message to log see /ref helics_log_levels.
logmessageThe message to put in the log. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::logMessage().

◆ helicsFederateLogWarningMessage()

void helicsFederateLogWarningMessage ( helics_federate  fed,
const char *  logmessage,
helics_error err 
)

Log a warning message through a federate.

Parameters
fedThe federate to log the warning message through.
logmessageThe message to put in the log. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::logWarningMessage().

◆ helicsFederateRegisterInterfaces()

void helicsFederateRegisterInterfaces ( helics_federate  fed,
const char *  file,
helics_error err 
)

Load interfaces from a file.

Parameters
fedThe federate to which to load interfaces.
fileThe name of a file to load the interfaces from either JSON, or TOML. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::registerInterfaces().

◆ helicsFederateRequestNextStep()

helics_time helicsFederateRequestNextStep ( helics_federate  fed,
helics_error err 
)

Request the next time step for federate execution.

Feds should have setup the period or minDelta for this to work well but it will request the next time step which is the current time plus the minimum time step.

Parameters
fedThe federate to make the request of. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
The time granted to the federate, will return helics_time_maxtime if the simulation has terminated or is invalid

Referenced by helicscpp::Federate::requestNextStep().

◆ helicsFederateRequestTime()

helics_time helicsFederateRequestTime ( helics_federate  fed,
helics_time  requestTime,
helics_error err 
)

Request the next time for federate execution.

Parameters
fedThe federate to make the request of.
requestTimeThe next requested time. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
The time granted to the federate, will return helics_time_maxtime if the simulation has terminated or is invalid.

Referenced by helicscpp::Federate::requestTime().

◆ helicsFederateRequestTimeAdvance()

helics_time helicsFederateRequestTimeAdvance ( helics_federate  fed,
helics_time  timeDelta,
helics_error err 
)

Request the next time for federate execution.

Parameters
fedThe federate to make the request of.
timeDeltaThe requested amount of time to advance. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
The time granted to the federate, will return helics_time_maxtime if the simulation has terminated or is invalid

Referenced by helicscpp::Federate::requestTimeAdvance().

◆ helicsFederateRequestTimeAsync()

void helicsFederateRequestTimeAsync ( helics_federate  fed,
helics_time  requestTime,
helics_error err 
)

Request the next time for federate execution in an asynchronous call.

Call /ref helicsFederateRequestTimeComplete to finish the call.

Parameters
fedThe federate to make the request of.
requestTimeThe next requested time. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::requestTimeAsync().

◆ helicsFederateRequestTimeComplete()

helics_time helicsFederateRequestTimeComplete ( helics_federate  fed,
helics_error err 
)

Complete an asynchronous requestTime call.

Parameters
fedThe federate to make the request of. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
The time granted to the federate, will return helics_time_maxtime if the simulation has terminated.

Referenced by helicscpp::Federate::requestTimeComplete().

◆ helicsFederateRequestTimeIterative()

helics_time helicsFederateRequestTimeIterative ( helics_federate  fed,
helics_time  requestTime,
helics_iteration_request  iterate,
helics_iteration_result outIteration,
helics_error err 
)

Request an iterative time.

This call allows for finer grain control of the iterative process than /ref helicsFederateRequestTime. It takes a time and and iteration request, and returns a time and iteration status.

Parameters
fedThe federate to make the request of.
requestTimeThe next desired time.
iterateThe requested iteration mode. @forcpponly
[out]outIterationThe iteration specification of the result. @endforcpponly @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
The granted time, will return helics_time_maxtime if the simulation has terminated along with the appropriate iteration result. @beginPythonOnly This function also returns the iteration specification of the result. @endPythonOnly

Referenced by helicscpp::Federate::requestTimeIterative().

◆ helicsFederateRequestTimeIterativeAsync()

void helicsFederateRequestTimeIterativeAsync ( helics_federate  fed,
helics_time  requestTime,
helics_iteration_request  iterate,
helics_error err 
)

Request an iterative time through an asynchronous call.

This call allows for finer grain control of the iterative process than /ref helicsFederateRequestTime. It takes a time and iteration request, and returns a time and iteration status. Call /ref helicsFederateRequestTimeIterativeComplete to finish the process.

Parameters
fedThe federate to make the request of.
requestTimeThe next desired time.
iterateThe requested iteration mode. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::requestTimeIterativeAsync().

◆ helicsFederateRequestTimeIterativeComplete()

helics_time helicsFederateRequestTimeIterativeComplete ( helics_federate  fed,
helics_iteration_result outIterate,
helics_error err 
)

Complete an iterative time request asynchronous call.

Parameters
fedThe federate to make the request of. @forcpponly
[out]outIterateThe iteration specification of the result.
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
The granted time, will return helics_time_maxtime if the simulation has terminated. @beginPythonOnly This function also returns the iteration specification of the result. @endPythonOnly

Referenced by helicscpp::Federate::requestTimeIterativeComplete().

◆ helicsFederateSetFlagOption()

void helicsFederateSetFlagOption ( helics_federate  fed,
int  flag,
helics_bool  flagValue,
helics_error err 
)

Set a flag for the federate.

Parameters
fedThe federate to alter a flag for.
flagThe flag to change.
flagValueThe new value of the flag. 0 for false, !=0 for true. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::setFlagOption().

◆ helicsFederateSetGlobal()

void helicsFederateSetGlobal ( helics_federate  fed,
const char *  valueName,
const char *  value,
helics_error err 
)

Set a federation global value through a federate.

This overwrites any previous value for this name.

Parameters
fedThe federate to set the global through.
valueNameThe name of the global to set.
valueThe value of the global. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Federate::setGlobal().

◆ helicsFederateSetIntegerProperty()

void helicsFederateSetIntegerProperty ( helics_federate  fed,
int  intProperty,
int  propertyVal,
helics_error err 
)

Set an integer based property of a federate.

Parameters
fedThe federate to change the property for.
intPropertyThe property to set.
propertyValThe value of the property. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::setProperty().

◆ helicsFederateSetLogFile()

void helicsFederateSetLogFile ( helics_federate  fed,
const char *  logFile,
helics_error err 
)

Set the logging file for a federate (actually on the core associated with a federate).

Parameters
fedThe federate to set the log file for.
logFileThe name of the log file. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

◆ helicsFederateSetSeparator()

void helicsFederateSetSeparator ( helics_federate  fed,
char  separator,
helics_error err 
)

Set the separator character in a federate.

The separator character is the separation character for local publications/endpoints in creating their global name. For example if the separator character is '/' then a local endpoint would have a globally reachable name of fedName/localName.

Parameters
fedThe federate info object to alter.
separatorThe character to use as a separator. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::setSeparator().

◆ helicsFederateSetTimeProperty()

void helicsFederateSetTimeProperty ( helics_federate  fed,
int  timeProperty,
helics_time  time,
helics_error err 
)

Set a time based property for a federate.

Parameters
fedThe federate object to set the property for.
timePropertyA integer code for a time property.
timeThe requested value of the property. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Federate::setProperty().

◆ helicsGetBuildFlags()

const char* helicsGetBuildFlags ( void  )

Get the build flags used to compile HELICS.

References helics::buildFlags.

Referenced by helicscpp::buildFlags().

◆ helicsGetCompilerVersion()

const char* helicsGetCompilerVersion ( void  )

Get the compiler version used to compile HELICS.

References helics::compiler.

Referenced by helicscpp::compilerVersion().

◆ helicsGetFederateByName()

helics_federate helicsGetFederateByName ( const char *  fedName,
helics_error err 
)

Get an existing federate object from a core by name.

The federate must have been created by one of the other functions and at least one of the objects referencing the created federate must still be active in the process.

Parameters
fedNameThe name of the federate to retrieve. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
NULL if no fed is available by that name otherwise a helics_federate with that name.

References helics_error::error_code, fed, helics_error_invalid_argument, helicsFederateClone(), and helics_error::message.

◆ helicsGetFlagIndex()

int helicsGetFlagIndex ( const char *  val)

Get a property index for use in /ref helicsFederateInfoSetFlagOption, /ref helicsFederateSetFlagOption,

Parameters
valA string with the option name.
Returns
An int with the property code or (-1) if not a valid property.

◆ helicsGetOptionIndex()

int helicsGetOptionIndex ( const char *  val)

Get an option index for use in /ref helicsPublicationSetOption, /ref helicsInputSetOption, /ref helicsEndpointSetOption, /ref helicsFilterSetOption, and the corresponding get functions.

Parameters
valA string with the option name.
Returns
An int with the option index or (-1) if not a valid property.

◆ helicsGetOptionValue()

int helicsGetOptionValue ( const char *  val)

Get an option value for use in /ref helicsPublicationSetOption, /ref helicsInputSetOption, /ref helicsEndpointSetOption, /ref helicsFilterSetOption.

Parameters
valA string representing the value.
Returns
An int with the option value or (-1) if not a valid value.

◆ helicsGetPropertyIndex()

int helicsGetPropertyIndex ( const char *  val)

Get a property index for use in /ref helicsFederateInfoSetFlagOption, /ref helicsFederateInfoSetTimeProperty, or /ref helicsFederateInfoSetIntegerProperty

Parameters
valA string with the property name.
Returns
An int with the property code or (-1) if not a valid property.

◆ helicsGetVersion()

const char* helicsGetVersion ( void  )

Get a version string for HELICS.

References helics::versionString.

Referenced by helicscpp::getHelicsVersionString(), and helicscpp::version().

◆ helicsIsCoreTypeAvailable()

helics_bool helicsIsCoreTypeAvailable ( const char *  type)

Returns true if core/broker type specified is available in current compilation.

Parameters
typeA string representing a core type.

Options include "zmq", "udp", "ipc", "interprocess", "tcp", "default", "mpi".

References helics_false, and helics_true.

◆ helicsLoadSignalHandler()

void helicsLoadSignalHandler ( )

Load a signal handler that handles Ctrl-C and shuts down all HELICS brokers, cores, and federates then exits the process.

Referenced by helicsLoadSignalHandlerCallback().

◆ helicsLoadSignalHandlerCallback()

void helicsLoadSignalHandlerCallback ( helics_bool(*)(int)  handler)

Load a custom signal handler to execute prior to the abort signal handler.

This function is not 100% reliable it will most likely work but uses some functions and techniques that are not 100% guaranteed to work in a signal handler and in worst case it could deadlock. That is somewhat unlikely given usage patterns but it is possible. The callback has signature helics_bool(*handler)(int) and it will take the SIG_INT as an argument and return a boolean. If the boolean return value is helics_true (or the callback is null) the default signal handler is run after the callback finishes; if it is helics_false the default callback is not run and the default signal handler is executed.

References helicsLoadSignalHandler().

◆ helicsQueryBrokerExecute()

const char* helicsQueryBrokerExecute ( helics_query  query,
helics_broker  broker,
helics_error err 
)

Execute a query directly on a broker.

The call will block until the query finishes which may require communication or other delays.

Parameters
queryThe query object to use in the query.
brokerThe broker to send the query to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A pointer to a string. The string will remain valid until the query is freed or executed again. @forcpponly The return will be nullptr if broker or query is an invalid object, the return string will be "#invalid" if the query itself was invalid @endforcpponly

Referenced by helicscpp::Broker::query().

◆ helicsQueryCoreExecute()

const char* helicsQueryCoreExecute ( helics_query  query,
helics_core  core,
helics_error err 
)

Execute a query directly on a core.

The call will block until the query finishes which may require communication or other delays.

Parameters
queryThe query object to use in the query.
coreThe core to send the query to. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A pointer to a string. The string will remain valid until the query is freed or executed again. @forcpponly The return will be nullptr if core or query is an invalid object, the return string will be "#invalid" if the query itself was invalid. @endforcpponly

Referenced by helicscpp::Core::query().

◆ helicsQueryExecute()

const char* helicsQueryExecute ( helics_query  query,
helics_federate  fed,
helics_error err 
)

Execute a query.

The call will block until the query finishes which may require communication or other delays.

Parameters
queryThe query object to use in the query.
fedA federate to send the query through. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A pointer to a string. The string will remain valid until the query is freed or executed again. @forcpponly The return will be nullptr if fed or query is an invalid object, the return string will be "#invalid" if the query itself was invalid. @endforcpponly

Referenced by helicscpp::Federate::query().

◆ helicsQueryExecuteAsync()

void helicsQueryExecuteAsync ( helics_query  query,
helics_federate  fed,
helics_error err 
)

Execute a query in a non-blocking call.

Parameters
queryThe query object to use in the query.
fedA federate to send the query through. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsQueryExecuteComplete()

const char* helicsQueryExecuteComplete ( helics_query  query,
helics_error err 
)

Complete the return from a query called with /ref helicsExecuteQueryAsync.

The function will block until the query completes /ref isQueryComplete can be called to determine if a query has completed or not.

Parameters
queryThe query object to complete execution of. @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly
Returns
A pointer to a string. The string will remain valid until the query is freed or executed again. @forcpponly The return will be nullptr if query is an invalid object @endforcpponly

◆ helicsQueryFree()

void helicsQueryFree ( helics_query  query)

Free the memory associated with a query object.

Referenced by helicscpp::Core::query(), helicscpp::Broker::query(), and helicscpp::Federate::query().

◆ helicsQueryIsCompleted()

helics_bool helicsQueryIsCompleted ( helics_query  query)

Check if an asynchronously executed query has completed.

This function should usually be called after a QueryExecuteAsync function has been called.

Parameters
queryThe query object to check if completed.
Returns
Will return helics_true if an asynchronous query has completed or a regular query call was made with a result, and false if an asynchronous query has not completed or is invalid

◆ helicsQuerySetOrdering()

void helicsQuerySetOrdering ( helics_query  query,
int32_t  mode,
helics_error err 
)

Update the ordering mode of the query, fast runs on priority channels, ordered goes on normal channels but goes in sequence

Parameters
queryThe query object to change the order for.
mode0 for fast, 1 for ordered

@forcpponly

Parameters
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

Referenced by helicscpp::Core::query(), helicscpp::Broker::query(), and helicscpp::Federate::query().

◆ helicsQuerySetQueryString()

void helicsQuerySetQueryString ( helics_query  query,
const char *  queryString,
helics_error err 
)

Update the queryString of a query.

Parameters
queryThe query object to change the target of.
queryStringthe new queryString @forcpponly
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly

◆ helicsQuerySetTarget()

void helicsQuerySetTarget ( helics_query  query,
const char *  target,
helics_error err 
)

Update the target of a query.

Parameters
queryThe query object to change the target of.
targetthe name of the target to query

@forcpponly

Parameters
[in,out]errAn error object that will contain an error code and string if any error occurred during the execution of the function. @endforcpponly