Skip to main content

AVxcelerate Simulation Framework 2025 R2 SP02

kpi_definition

Last update: 19.09.2025
1
5
6#pragma once
7
8#include "core/time/i_clock/i_clock.h"
9#include <string>
10#include <vector>
11
17{
18namespace core
19{
20namespace kpi
21{
22
23enum class Type : uint8_t
24{
26 kScalar = 0,
27 kTimeSeries,
28 kLog,
29 kOther
30};
31
32class Datatype
33{
34 public:
35 enum class Value : uint8_t
36 {
38 kDouble = 0,
39 kInteger,
40 kString,
41 kBoolean,
42 kOther
43 };
44
45 Datatype();
46 Datatype(Value value);
47 Datatype(const std::string& value_string);
48
49 ~Datatype() = default;
50
51 operator Value() const;
52
53 std::string ToString() const noexcept;
54 void FromString(const std::string& value_string) noexcept;
55
56 bool operator==(Datatype other) const;
57
58 private:
59 Value value_;
60};
61
63
67{
68 core::time::Timestamp timestamp;
69 std::string name;
72 Datatype data_type;
73 std::string value;
74 std::string unit;
75 Type type;
76};
77
78inline bool operator==(const core::kpi::KpiContent& lhs, const core::kpi::KpiContent& rhs)
79{
80 return (lhs.timestamp == rhs.timestamp) && (lhs.name == rhs.name) && (lhs.data_type == rhs.data_type) &&
81 (lhs.value == rhs.value) && (lhs.unit == rhs.unit) && (lhs.type == rhs.type);
82}
83
89using KpiMessage = std::vector<KpiContent>;
90
91} // namespace kpi
92} // namespace core
93} // namespace simulation_framework
This is the concrete Topic class that can be used for creation of a communication channel with given ...
Definition topic.h:38
The namespace for all core functionalities under namespace simulation_framework.
The namespace for kpi definition and corresponding APIs under namespace simulation_framework::evaluat...
The top namespace for simulation framework.

Connect with Ansys