|
The Statechart Editor offers a list of different data types that can be passed via transitions of statecharts. To create your own data type you first have to define a new variant type as described here: How to Create Custom Variant Types Then you have provide the statechart editor with some information about the new data type by editing the VariantInfo-${PACKAGENAME}.xml. This file is located in each package at ${PACKAGENAME}/data/${PACKAGENAME}/VariantInfo-${PACKAGENAME}.xml. This file might look like this:
<?xml version="1.0" encoding="utf-8"?> <VariantInfo> <!-- Name of the library to be linked--> <Lib name="ArmarXCoreEigen3Variants"> <VariantFactory <!-- Path to the object factory file --> include="ArmarXCore/util/variants/eigen3/Eigen3VariantObjectFactories.h" /> <Variant <!-- Name of the type as generated by Ice --> baseType="::armarx::MatrixFloatBase" <!-- Name of the type of the interface implementation --> dataType="::armarx::MatrixFloat" <!-- Some human friendly name that is displayed in the statechart editor --> humanName="MatrixFloat" <!-- Include path of the variant implementation --> include="ArmarXCore/util/variants/eigen3/MatrixVariant.h" /> </Lib> </VariantInfo>
Examples of this can be found in almost every ArmarX package.