helics  2.8.1
FilterInfo.hpp
1 /*
2 Copyright (c) 2017-2021,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #pragma once
8 
9 #include "basic_core_types.hpp"
10 
11 #include <memory>
12 #include <string>
13 #include <utility>
14 #include <vector>
15 
16 namespace helics {
18 class FilterInfo {
19  public:
22  interface_handle handle_,
23  const std::string& key_,
24  const std::string& type_in_,
25  const std::string& type_out_,
26  bool destFilter_):
27  core_id(core_id_),
28  handle(handle_), key(key_), inputType(type_in_), outputType(type_out_),
29  dest_filter(destFilter_)
30  {
31  }
34 
35  const std::string key;
36  const std::string inputType;
37  const std::string outputType;
38  const bool dest_filter = false;
39  bool cloning = false;
40  uint16_t flags = 0;
41  // there is a 4 byte gap here
42  std::shared_ptr<FilterOperator> filterOp;
43 
44  std::vector<global_handle> sourceTargets;
45  std::vector<global_handle> destTargets;
47  void removeTarget(global_handle targetToRemove);
48 };
49 } // namespace helics
helics::FilterInfo
Definition: FilterInfo.hpp:18
helics::global_broker_id
Definition: global_federate_id.hpp:26
helics::FilterInfo::key
const std::string key
the identifier of the filter
Definition: FilterInfo.hpp:35
helics::FilterInfo::outputType
const std::string outputType
the outputType of data of the filter
Definition: FilterInfo.hpp:37
helics::FilterInfo::cloning
bool cloning
indicator that the filter is a destination filter
Definition: FilterInfo.hpp:39
helics::global_handle
Definition: global_federate_id.hpp:128
helics::FilterInfo::FilterInfo
FilterInfo(global_broker_id core_id_, interface_handle handle_, const std::string &key_, const std::string &type_in_, const std::string &type_out_, bool destFilter_)
Definition: FilterInfo.hpp:21
helics::FilterInfo::flags
uint16_t flags
flags for the filter
Definition: FilterInfo.hpp:40
helics::FilterInfo::inputType
const std::string inputType
the type of data for the filter
Definition: FilterInfo.hpp:36
helics::FilterInfo::filterOp
std::shared_ptr< FilterOperator > filterOp
the callback operation of the filter
Definition: FilterInfo.hpp:42
helics::interface_handle
Definition: federate_id.hpp:65
helics::FilterInfo::removeTarget
void removeTarget(global_handle targetToRemove)
Definition: FilterInfo.cpp:14
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helics::FilterInfo::core_id
const global_broker_id core_id
id of the core that manages the filter
Definition: FilterInfo.hpp:32
helics::FilterInfo::handle
const interface_handle handle
id handle of the filter
Definition: FilterInfo.hpp:33