| helics 3.6.1

CoreFederateInfo.hpp
1 /*
2 Copyright (c) 2017-2025,
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 "helicsTime.hpp"
10
11 #include <utility>
12 #include <vector>
13
14 namespace helics {
16 class CoreFederateInfo {
17 public:
18 std::vector<std::pair<int, Time>> timeProps;
19 std::vector<std::pair<int, int>> intProps;
20 std::vector<std::pair<int, bool>> flagProps;
21
24 void setProperty(int propId, double propVal) { timeProps.emplace_back(propId, propVal); }
25 void setProperty(int propId, int propVal) { intProps.emplace_back(propId, propVal); }
26 void setProperty(int propId, Time propVal) { timeProps.emplace_back(propId, propVal); }
28 void setFlagOption(int flagId, bool propVal = true) { flagProps.emplace_back(flagId, propVal); }
29 };
30
31 } // namespace helics
helics::CoreFederateInfo
Definition: CoreFederateInfo.hpp:16
helics::CoreFederateInfo::setFlagOption
void setFlagOption(int flagId, bool propVal=true)
Definition: CoreFederateInfo.hpp:28
helics::CoreFederateInfo::timeProps
std::vector< std::pair< int, Time > > timeProps
container for the timeProperties
Definition: CoreFederateInfo.hpp:18
helics::CoreFederateInfo::flagProps
std::vector< std::pair< int, bool > > flagProps
container for the binary flag options
Definition: CoreFederateInfo.hpp:20
helics::CoreFederateInfo::setProperty
void setProperty(int propId, double propVal)
Definition: CoreFederateInfo.hpp:24
helics::CoreFederateInfo::intProps
std::vector< std::pair< int, int > > intProps
container for the integer properties
Definition: CoreFederateInfo.hpp:19
helicsTime.hpp
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helics::Time
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27