![]() |
Open Test Framework
|
|
For read and write access to an external system (DLL), the data types must be converted between the external system and the OTX. The rules for the automatic conversion are described in the following section.
A data type conversion can be performed automatically or explicitly:
Important: The automatic conversion must be supported by all custom implementations!
During automatic conversion, the mapping editor checks for permissible data types (see below). Explicit conversion can be enabled for a parameter using the "Convert" checkbox. During explicit conversion, the mapping editor does not check whether the data types are convertible. All conversions are permissible. In this case, the user is responsible for ensuring error-free conversion.
Important: With explicit conversion, the user is responsible for error-free conversion!
There are two conversion directions. Each direction has the following associated OTX declaration types.
ContextVariable StateVariable Only the following OTX data types are supported:
Note: The BlackBox data type allows mapping to any external data type.
Note: The user-defined data types List, Map, and Structure can recursively contain the supported data types (including
List,Map, andStructure) in any combination and depth.
The following table lists all possible automatic conversions from DLL to OTX and vice versa. The mapping editor lists all parameters with permitted data types for mapping. The conversion occurs automatically. The conversion checkbox is not selected.
Note: The external data types (DLL) may have different names depending on the target system (C++, DotNet, or Java).
| DLL | OTX | ||||||
|---|---|---|---|---|---|---|---|
| String | Boolean | Integer | Float | ByteField | Enumeration | BlackBox | |
| string | Yes | Yes | |||||
| bool | YesA | Yes | Yes | Yes | Yes | ||
| int, long | Yes | Yes | Yes | Yes | |||
| float, double | YesB | Yes | Yes | ||||
| byte[] | Yes | Yes | |||||
| enum | YesC | Yes | Yes | Yes | |||
| AnyOtherType | Yes | ||||||
"true" or "false" | B: Point as floating point separator , e.g. 10.2 | C: Name of the enumeration element | OTX | DLL | ||||||
|---|---|---|---|---|---|---|---|
| string | bool | int,long | float, double | byte[] | enum | AnyOtherType | |
| String | Yes | ||||||
| Boolean | YesA | Yes | Yes | Yes | |||
| Integer | Yes | Yes | Yes | ||||
| Float | YesB | Yes | |||||
| ByteField | Yes | ||||||
| Enumeration | YesC | Yes | Yes | ||||
| BlackBox | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
"true" or "false" | B: Point as floating point separator , e.g. 10.2 | C: Name of the enumeration element Note:
Lists,Maps, andStructurescan be mapped with the data types specified above in any combination and depth. The structural design of the @รง List,Map, orStructure(structure: element name and element data type) must be identical. For example, aList<List<Integer>>can be mapped to aList<List<String>.
Note: Only three levels are tested!
Important: The Mapping-Editor checks the correct data types only for automatic conversion!
Important: The Default Custom Implementation will throw an exception, if the data types cannot be converted automatically.
For explicit conversion, the conversion checkbox must be set in the mapping editor. Any data type can then be mapped.
Important: The editor does not check for correct conversion. Users must implement special conversions themselves using their own custom implementation!