AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Variable.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXFMI2_VARIABLE_H
18#define AGXFMI2_VARIABLE_H
19
20#include <agx/config/AGX_USE_FMI.h>
21
22#if AGX_USE_FMI()
23
24#include <agxFMI2/export.h>
25#include <agx/Object.h>
26
27namespace agxFMI2
28{
31
35 class AGXFMI_EXPORT Variable : public agx::Object
36 {
37 public:
38
39 enum Type
40 {
41 TYPE_REAL,
42 TYPE_INT,
43 TYPE_BOOL,
44 TYPE_STRING,
45 TYPE_ENUM,
46 TYPE_UNKNOWN
47 };
48
49 enum Variability
50 {
51 VARIABILITY_CONSTANT,
52 VARIABILITY_FIXED,
53 VARIABILITY_TUNABLE,
54 VARIABILITY_DISCRETE,
55 VARIABILITY_CONTINOUS,
56 VARIABILITY_UNKNOWN
57 };
58
59 enum Causality
60 {
61 CAUSALITY_PARAMETER,
62 CAUSALITY_CALCULATED_PARAMETER,
63 CAUSALITY_INPUT,
64 CAUSALITY_OUTPUT,
65 CAUSALITY_LOCAL,
66 CAUSALITY_INDEPENDENT,
67 CAUSALITY_UNKNOWN
68 };
69
70 enum Initiality
71 {
72 INITIALITY_EXACT,
73 INITIALITY_APPROX,
74 INITIALITY_CALCULATED,
75 INITIALITY_UNKNOWN
76 };
77
78
79 public:
80 Variable(const agx::Name& name = agx::Name());
81
83 void setDescription(const agx::String& description);
84
86 const agx::String& getDescription() const;
87
89 void setValueReference(agx::UInt32 vr);
90
92 agx::UInt32 getValueReference() const;
93
95 void setType(Type type);
96
98 Type getType() const;
99
101 const char *getTypeString();
102
104 void setVariability(Variability variability);
105
107 Variability getVariability() const;
108
110 const char *getVariabilityString();
111
113 void setCausality(Causality causality);
114
116 Causality getCausality() const;
117
119 const char *getCausalityString();
120
121
123 void setInitiality(Initiality initiality);
124
126 Initiality getInitiality() const;
127
129 const char *getInitialityString() const;
130
131 protected:
132 virtual ~Variable();
133
134 protected:
135 agx::String m_description;
136 agx::UInt32 m_valueReference;
137 Type m_type;
138 Variability m_variability;
139 Causality m_causality;
140 Initiality m_initiality;
141 };
142
143
144}
145
146#endif /* AGX_USE_FMI */
147
148#endif /* AGXFMI2_VARIABLE_H */
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXFMI_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition agx/Vector.h:34
Representation of a name string.
Definition Name.h:33
agx::Object is a refcounted object with a name.
Definition Object.h:59
AGXCORE_EXPORT Type * getType(const agx::String &name)
This namespace contains functionality for using AGX together with version 2 of the Functional Mockup ...
uint32_t UInt32
Definition Integer.h:32