diff --git a/etc/doxygen/pages/HowTos.dox b/etc/doxygen/pages/HowTos.dox index c45f0fb6708a3b7ce295c05a7395b022b74ff901..7f9df4d96dd16083e3696f8f375a4c5a1e20a370 100644 --- a/etc/doxygen/pages/HowTos.dox +++ b/etc/doxygen/pages/HowTos.dox @@ -49,6 +49,7 @@ namespace armarx * \see MyGuiPluginGuiPlugin */ ... +} \endcode and add it as subpage to ${PACKAGENAME}/etc/doxygen/pages/GuiPlugins.dox: @@ -102,4 +103,35 @@ In ~/.armarx/default.cfg add the line (the package list speficies the global def \verbatim ArmarX.DefaultPackages=${YOURPACKAGENAME},ArmarXCore, ArmarXGui, MemoryX, RobotAPI, RobotComponents, RobotSkillTemplates, ArmarXSimulation, VisionX \endverbatim + + +\page ArmarXGui-HowTos-Add-DataType-To-StatechartContext How to add your own data type to a statechart + +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: \ref ArmarXCore-HowTos-CustomVariant +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: +\verbatim +<?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> +\endverbatim + +Examples of this can be found in almost every ArmarX package. */