helics
3.5.3
|
Functions related to message filters for the C api. More...
#include "helicsCore.h"
Go to the source code of this file.
Functions related to message filters for the C api.
HelicsFilter helicsCoreRegisterCloningFilter | ( | HelicsCore | core, |
const char * | name, | ||
HelicsError * | err | ||
) |
Create a cloning Filter on the specified core.
Cloning filters copy a message and send it to multiple locations, source and destination can be added through other functions.
core | The core to register through. | |
name | The name of the filter (can be NULL). | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::make_cloning_filter().
Referenced by helicscpp::Core::registerCloningFilter().
HelicsFilter helicsCoreRegisterFilter | ( | HelicsCore | core, |
HelicsFilterTypes | type, | ||
const char * | name, | ||
HelicsError * | err | ||
) |
Create a source Filter on the specified core.
Filters can be created through a federate or a core, linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise equivalent behavior.
core | The core to register through. | |
type | The type of filter to create /ref HelicsFilterTypes. | |
name | The name of the filter (can be NULL). | |
[in,out] | err | A pointer to an error object for catching errors. |
References HELICS_FILTER_TYPE_CUSTOM, and helics::make_filter().
Referenced by helicscpp::Core::registerFilter().
HelicsFilter helicsFederateGetFilter | ( | HelicsFederate | fed, |
const char * | name, | ||
HelicsError * | err | ||
) |
Get a filter by its name, typically already created via registerInterfaces file or something of that nature.
fed | The federate object to use to get the filter. | |
name | The name of the filter. | |
[in,out] | err | The error object to complete if there is an error. |
References HelicsError::error_code, HELICS_ERROR_INVALID_ARGUMENT, and HelicsError::message.
Referenced by helicscpp::Federate::getFilter().
HelicsFilter helicsFederateGetFilterByIndex | ( | HelicsFederate | fed, |
int | index, | ||
HelicsError * | err | ||
) |
Get a filter by its index, typically already created via registerInterfaces file or something of that nature.
fed | The federate object in which to create a publication. | |
index | The index of the publication to get. | |
[in,out] | err | A pointer to an error object for catching errors. |
References HelicsError::error_code, HELICS_ERROR_INVALID_ARGUMENT, and HelicsError::message.
Referenced by helicscpp::Federate::getFilter().
int helicsFederateGetFilterCount | ( | HelicsFederate | fed | ) |
Get the number of filters registered through a federate.
fed | The federate object to use to get the filter. |
Referenced by helicscpp::Federate::getFilterCount().
HelicsFilter helicsFederateRegisterCloningFilter | ( | HelicsFederate | fed, |
const char * | name, | ||
HelicsError * | err | ||
) |
Create a cloning Filter on the specified federate.
Cloning filters copy a message and send it to multiple locations, source and destination can be added through other functions.
fed | The federate to register through. | |
name | The name of the filter (can be NULL). | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::make_cloning_filter().
Referenced by helicscpp::Federate::registerCloningFilter().
HelicsFilter helicsFederateRegisterFilter | ( | HelicsFederate | fed, |
HelicsFilterTypes | type, | ||
const char * | name, | ||
HelicsError * | err | ||
) |
Create a source Filter on the specified federate.
Filters can be created through a federate or a core, linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise equivalent behavior
fed | The federate to register through. | |
type | The type of filter to create /ref HelicsFilterTypes. | |
name | The name of the filter (can be NULL). | |
[in,out] | err | A pointer to an error object for catching errors. |
References HELICS_FILTER_TYPE_CUSTOM, and helics::make_filter().
Referenced by helicscpp::Federate::registerFilter().
HelicsFilter helicsFederateRegisterGlobalCloningFilter | ( | HelicsFederate | fed, |
const char * | name, | ||
HelicsError * | err | ||
) |
Create a global cloning Filter on the specified federate.
Cloning filters copy a message and send it to multiple locations, source and destination can be added through other functions.
fed | The federate to register through. | |
name | The name of the filter (can be NULL). | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::make_cloning_filter().
Referenced by helicscpp::Federate::registerGlobalCloningFilter().
HelicsFilter helicsFederateRegisterGlobalFilter | ( | HelicsFederate | fed, |
HelicsFilterTypes | type, | ||
const char * | name, | ||
HelicsError * | err | ||
) |
Create a global source filter through a federate.
Filters can be created through a federate or a core, linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise equivalent behavior.
fed | The federate to register through. | |
type | The type of filter to create /ref HelicsFilterTypes. | |
name | The name of the filter (can be NULL). | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::make_filter().
Referenced by helicscpp::Federate::registerGlobalFilter().
void helicsFilterAddDestinationTarget | ( | HelicsFilter | filt, |
const char * | dst, | ||
HelicsError * | err | ||
) |
Add a destination target to a filter.
All messages going to a destination are copied to the delivery address(es).
filt | The given filter to add a destination target to. | |
dst | The name of the endpoint to add as a destination target. | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::Interface::addDestinationTarget().
Referenced by helicscpp::Filter::addDestinationTarget().
void helicsFilterAddSourceTarget | ( | HelicsFilter | filt, |
const char * | source, | ||
HelicsError * | err | ||
) |
Add a source target to a filter.
All messages coming from a source are copied to the delivery address(es).
filt | The given filter. | |
source | The name of the endpoint to add as a source target. | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::Interface::addSourceTarget().
Referenced by helicscpp::Filter::addSourceTarget().
const char* helicsFilterGetName | ( | HelicsFilter | filt | ) |
Get the name of the filter and store in the given string.
filt | The given filter. |
get the name of the filter
References helics::Interface::getName().
Referenced by helicscpp::Filter::getName().
HelicsBool helicsFilterIsValid | ( | HelicsFilter | filt | ) |
Check if a filter is valid.
filt | The filter object to check. |
References HELICS_FALSE, HELICS_TRUE, and helics::Interface::isValid().
Referenced by helicscpp::Filter::isValid().
void helicsFilterSet | ( | HelicsFilter | filt, |
const char * | prop, | ||
double | val, | ||
HelicsError * | err | ||
) |
Set a property on a filter.
filt | The filter to modify. | |
prop | A string containing the property to set. | |
val | A numerical value for the property. | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::Filter::set().
Referenced by helicscpp::Filter::set().
void helicsFilterSetString | ( | HelicsFilter | filt, |
const char * | prop, | ||
const char * | val, | ||
HelicsError * | err | ||
) |
Set a string property on a filter.
filt | The filter to modify. | |
prop | A string containing the property to set. | |
val | A string containing the new value. | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::Filter::setString().
Referenced by helicscpp::Filter::setString().