blob: 53860e2fdd887dbe1596f268083394b92403a634 [file] [log] [blame]
jwendelil4ee5bf282020-05-25 16:20:07 +02001#ifndef BASYX_MAP_V2_SDK_DATASPECIFICATIONIEC61360_H
2#define BASYX_MAP_V2_SDK_DATASPECIFICATIONIEC61360_H
3
4#include <BaSyx/submodel/api_v2/dataspecification/IDataSpecificationIEC61360.h>
5
6#include <BaSyx/submodel/map_v2/common/LangStringSet.h>
7#include <BaSyx/submodel/map_v2/reference/Reference.h>
jwendelil4ee5bf282020-05-25 16:20:07 +02008#include <BaSyx/vab/ElementMap.h>
9
10namespace basyx {
11namespace submodel {
12namespace map {
13class DataSpecificationIEC61360
14 : public api::IDataSpecificationIEC61360
jwendelil4ee5bf282020-05-25 16:20:07 +020015 , public virtual vab::ElementMap
16{
17public:
18 struct Path
19 {
20 static constexpr char PreferredName[] = "preferredName";
21 static constexpr char ShortName[] = "shortName";
22 static constexpr char Unit[] = "unit";
23 static constexpr char UnitId[] = "unitId";
24 static constexpr char SourceOfDefinition[] = "sourceOfDefinition";
25 static constexpr char Symbol[] = "symbol";
26 static constexpr char DataType[] = "dataType";
27 static constexpr char Definition[] = "definition";
28 static constexpr char ValueFormat[] = "valueFormat";
29 static constexpr char ValueList[] = "valueList";
30 static constexpr char ValueId[] = "valueId";
31 static constexpr char LevelType[] = "levelType";
32 };
33
34 DataSpecificationIEC61360() = delete;
35 DataSpecificationIEC61360(map::LangStringSet & preferred_name);
36
37 api::ILangStringSet & PreferredName() override;
38 api::ILangStringSet & ShortName() override;
39 api::ILangStringSet & Definition() override;
40
41 std::string * const getUnit() override;
42 api::IReference * const getUnitId() override;
43 std::string * const getSourceOfDefinition() override;
44 std::string * const getSymbol() override;
45 DataTypeIEC61360 getDataType() const override;
46 std::string * const getValueFormat() override;
47 /* TODO
48 MISSINGTYPE const getValueList() override;
49 MISSINGTYPE const getValueDataType() override;
50 */
51 api::IReference * const getValueId() override;
52 LevelType getLevelType() const override;
53
54
55 void setPreferredName(const api::ILangStringSet & preferredName);
56 void setShortName(const api::ILangStringSet & shortName);
57 void setDefinition(const api::ILangStringSet & definition);
58 void setUnit(const std::string & unit) override;
59 void setUnitId(std::unique_ptr<api::IReference> unitId);
60 void setSourceOfDefinition(const std::string & sourceOfDefinition) override;
61 void setSymbol(const std::string & symbol);
62 void setDataType(DataTypeIEC61360 dataType) override;
63 void setValueFormat(const std::string & valueFormat) override;
64 /* TODO
65 void setValueList(const MISSINGTYPE);
66 void setValueDataType(const MISSINGTYPE);
67 */
68 void setValueId(std::unique_ptr<api::IReference> valueId);
69 void setLevelType(LevelType levelType) override;
70
71private:
72 map::LangStringSet preferred_name, short_name, definition;
73 std::unique_ptr<api::IReference> unitId, valueId;
74};
75
76}
77}
78}
79#endif //BASYX_MAP_V2_SDK_DATASPECIFICATIONIEC61360_H