helics 3.7.0
Loading...
Searching...
No Matches
TranslatorInfo.hpp
1/*
2Copyright (c) 2017-2026,
3Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Energy
4Innovation LLC. See the top-level NOTICE for additional details. All rights reserved.
5SPDX-License-Identifier: BSD-3-Clause
6*/
7#pragma once
8
9#include "EndpointInfo.hpp"
10#include "InputInfo.hpp"
11#include "PublicationInfo.hpp"
12#include "basic_CoreTypes.hpp"
13
14#include <memory>
15#include <string>
16#include <utility>
17#include <vector>
18
19namespace helics {
21 GlobalHandle id;
22 std::string key;
23 std::string type;
24 TransInformation() = default;
25 TransInformation(GlobalHandle gid, std::string_view key_, std::string_view type_):
26 id(gid), key(key_), type(type_)
27 {
28 }
29};
30
33 public:
36 std::string_view key_,
37 std::string_view endpointType,
38 std::string_view units):
39 id(handle), key(key_), pub(handle, key_, "any", units), ipt(handle, key_, "any", units),
40 ept(handle, key_, endpointType)
41 {
42 }
44
45 const std::string key;
46 uint16_t flags = 0;
47 // there is a 4 byte gap here
48 std::shared_ptr<TranslatorOperator> tranOp;
49
50 private:
51 PublicationInfo pub;
52 InputInfo ipt;
53 EndpointInfo ept;
54
55 public:
56 PublicationInfo* getPubInfo() { return &pub; }
57 InputInfo* getInputInfo() { return &ipt; }
58 EndpointInfo* getEndpointInfo() { return &ept; }
59};
60} // namespace helics
Definition EndpointInfo.hpp:32
Definition GlobalFederateId.hpp:147
Definition InputInfo.hpp:21
Definition PublicationInfo.hpp:27
Definition TranslatorInfo.hpp:32
TranslatorInfo(GlobalHandle handle, std::string_view key_, std::string_view endpointType, std::string_view units)
Definition TranslatorInfo.hpp:35
const GlobalHandle id
id of the translator
Definition TranslatorInfo.hpp:43
uint16_t flags
flags for the translator
Definition TranslatorInfo.hpp:46
const std::string key
the identifier of the translator
Definition TranslatorInfo.hpp:45
std::shared_ptr< TranslatorOperator > tranOp
the callback operation of the translator
Definition TranslatorInfo.hpp:48
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition AsyncFedCallInfo.hpp:14
Definition TranslatorInfo.hpp:20