 |
helics
3.3.0
|
9 #include "../core/Core.hpp"
10 #include "Federate.hpp"
17 class FilterOperations;
33 #define EMPTY_STRING std::string_view()
42 bool disableAssign =
false;
44 std::shared_ptr<FilterOperations>
50 explicit Filter(
Federate* ffed, std::string_view filtName = EMPTY_STRING);
58 explicit Filter(
Core* core, std::string_view filtName = EMPTY_STRING);
60 virtual ~
Filter() =
default;
71 void setOperator(std::shared_ptr<FilterOperator> mo);
73 virtual const std::string&
getDisplayName()
const override {
return getName(); }
79 virtual void set(std::string_view property,
double val);
85 virtual void setString(std::string_view property, std::string_view val);
87 void addTarget(std::string_view target) { addSourceTarget(target); }
91 void setFilterOperations(std::shared_ptr<FilterOperations> filterOps);
111 std::string_view filtName = EMPTY_STRING);
126 void addDeliveryEndpoint(std::string_view endpoint);
129 void removeDeliveryEndpoint(std::string_view endpoint);
131 virtual void setString(std::string_view property, std::string_view val)
override;
134 friend class FilterFederateManager;
158 std::string_view name = EMPTY_STRING);
167 HELICS_CXX_EXPORT std::unique_ptr<Filter>
177 HELICS_CXX_EXPORT std::unique_ptr<Filter>
190 std::string_view delivery,
191 std::string_view name = EMPTY_STRING);
205 std::string_view delivery,
206 std::string_view name = EMPTY_STRING);
216 HELICS_CXX_EXPORT std::unique_ptr<CloningFilter>
219 std::string_view delivery,
220 std::string_view name = EMPTY_STRING);
230 HELICS_CXX_EXPORT std::unique_ptr<CloningFilter>
233 std::string_view delivery,
234 std::string_view name = EMPTY_STRING);
Core * cr
pointer to the core object
Definition: application_api/Federate.hpp:769
Definition: Filters.hpp:97
CloningFilter & registerGlobalCloningFilter(std::string_view filterName, std::string_view inputType=std::string_view{}, std::string_view outputType=std::string_view{})
Definition: Federate.cpp:1473
InterfaceVisibility
Definition: helicsTypes.hpp:40
@ HELICS_FILTER_TYPE_CLONE
Definition: helics_enums.h:373
CloningFilter & make_cloning_filter(FilterTypes type, Federate *mFed, std::string_view delivery, std::string_view name)
Definition: Filters.cpp:252
CloningFilter & operator=(CloningFilter &&filt)=default
void addOperations(Filter *filt, FilterTypes type, Core *)
Definition: Filters.cpp:47
@ HELICS_FILTER_TYPE_DELAY
Definition: helics_enums.h:363
CloningFilter & registerCloningFilter(std::string_view filterName, std::string_view inputType=std::string_view{}, std::string_view outputType=std::string_view{})
Definition: Federate.cpp:1459
FilterTypes filterTypeFromString(std::string_view filterType) noexcept
Definition: Filters.cpp:32
Definition: LocalFederateId.hpp:65
void addSourceTarget(std::string_view newTarget, InterfaceType hint=InterfaceType::UNKNOWN)
Definition: Federate.cpp:1590
virtual InterfaceHandle registerCloningFilter(std::string_view filterName, std::string_view type_in, std::string_view type_out)=0
Definition: Filters.hpp:39
virtual void set(std::string_view property, double val)
Definition: Filters.cpp:123
Definition: application_api/Federate.hpp:767
Definition: core/Core.hpp:41
virtual void setString(std::string_view property, std::string_view val)
Definition: Filters.cpp:130
Definition: application_api/CoreApp.hpp:25
void removeTarget(std::string_view targetToRemove)
Definition: Federate.cpp:1600
Filter & registerFilter(std::string_view filterName, std::string_view inputType=std::string_view{}, std::string_view outputType=std::string_view{})
Definition: Federate.cpp:1452
base helics enumerations for C and C++ API's
Filter & registerGlobalFilter(std::string_view filterName, std::string_view inputType=std::string_view{}, std::string_view outputType=std::string_view{})
Definition: Federate.cpp:1466
@ HELICS_FILTER_TYPE_CUSTOM
Definition: helics_enums.h:361
InterfaceHandle handle
the id as generated by the Federate
Definition: application_api/Federate.hpp:770
std::shared_ptr< Core > getCopyofCorePointer() const
Definition: application_api/CoreApp.hpp:184
void addDestinationTarget(std::string_view newTarget, InterfaceType hint=InterfaceType::UNKNOWN)
Definition: Federate.cpp:1595
void setOperator(std::shared_ptr< FilterOperator > mo)
Definition: Filters.cpp:112
virtual const std::string & getDisplayName() const override
Definition: Filters.hpp:73
void removeDeliveryEndpoint(std::string_view endpoint)
Definition: Filters.cpp:179
virtual void setFilterOperator(InterfaceHandle filter, std::shared_ptr< FilterOperator > callback)=0
@ HELICS_FILTER_TYPE_RANDOM_DELAY
Definition: helics_enums.h:365
@ HELICS_FILTER_TYPE_REROUTE
Definition: helics_enums.h:370
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
Filter & make_filter(FilterTypes type, Federate *mFed, std::string_view name)
Definition: Filters.cpp:202
virtual InterfaceHandle registerFilter(std::string_view filterName, std::string_view type_in, std::string_view type_out)=0
@ HELICS_FILTER_TYPE_RANDOM_DROP
Definition: helics_enums.h:367
Definition: application_api/Federate.hpp:48
const std::shared_ptr< Core > & getCorePointer()
Definition: application_api/Federate.hpp:710
virtual void setString(std::string_view property, std::string_view val) override
Definition: Filters.cpp:184
void addDeliveryEndpoint(std::string_view endpoint)
Definition: Filters.cpp:174
bool isCloningFilter() const
Definition: Filters.hpp:69
void setFilterOperations(std::shared_ptr< FilterOperations > filterOps)
Definition: Filters.cpp:117
@ HELICS_FILTER_TYPE_FIREWALL
Definition: helics_enums.h:376
FilterTypes
Definition: Filters.hpp:21