Update Introduction authored by Fabian Peller's avatar Fabian Peller
......@@ -7,7 +7,7 @@ Aron (ArmarX Object Notation) is the ArmarX implementation of variants which can
## Aron Type specification
An Aron type specification defines the static type for an Aron data DTO or an Aron data object. Since Aron supports maybe types (raw ptr, smart ptr, optional), every Aron type DTO contains a special member. It can only consist of the following types and information (AronVariant means any Type):
An Aron type specification defines the static type for an Aron data DTO or an Aron data object. It does not contain any data (e.g. an aron type list only knows the accepted type, not the list members). Since Aron supports maybe types (raw ptr, smart ptr, optional), every Aron type DTO contains a special member. It can only consist of the following types and information (AronVariant means any Type):
```cpp
Object { // dto called armarx::aron::type::dto::AronObject
......@@ -21,7 +21,7 @@ An Aron type specification defines the static type for an Aron data DTO or an Ar
List { // dto called armarx::aron::type::dto::List
AronVariant acceptedType;
}
Pair {
Pair { // ...
AronVariant acceptedType1;
AronVariant acceptedType2;
}
......@@ -70,3 +70,68 @@ An Aron type specification defines the static type for an Aron data DTO or an Ar
Time { // dto called armarx::aron::type::dto::AronTime
}
```
## Aron Data specification
Aron data objects and Aron data DTOs are similar structured to type objects and type DTOs. However, there are less classes for data objects and data DTOs. Aron data is completely decoupled from the static types and contains the data members (e.g. an aron data list only contains the list members (as AronVariants) and not the accepted type):
```cpp
Dict { // dto called armarx::aron::data::dto::Dict
map<string, AronVariant> members;
}
List { // dto called armarx::aron::data::dto::List
vector<AronVariant> elements;
}
NDArray { // ...
vector<int> shape;
string type;
vector<byte> data;
}
Int { // dto called armarx::aron::type::dto::AronInt
int value;
}
Long { // dto called armarx::aron::type::dto::AronLong
long value;
}
Float { // dto called armarx::aron::type::dto::AronFloat
float value;
}
Double { // dto called armarx::aron::type::dto::AronDouble
double value;
}
String { // dto called armarx::aron::type::dto::AronString
string value;
}
Bool { // dto called armarx::aron::type::dto::AronBool
bool value;
}
```
## Connection of Aron data and Aron type
Aron data contains less classes than Aron type. Because Aron data objects and DTOs do not check the type of the members (they can be any aron data (AronVariant)), we can only validate an aron data object or DTO if we have the type information. The following mapping describes, how data and types correspond.
```cpp
Aron Type | Aron Data
-------------------------------
Object -> Dict
Dict -> Dict
List -> List
Pair -> List
Tuple -> List
NDArray -> NDArray
Matrix -> NDArray
Quaternion -> NDArray
Position -> NDArray
Orientation -> NDArray
Pose -> NDArray
Image -> NDArray
PointCloud -> NDArray
IntEnum -> Int
Int -> Int
Long -> Long
Float -> Float
Double -> Double
String -> String
Bool -> Bool
Time -> Long
```
\ No newline at end of file