From ffe8b7dc3d61e1d266fa986ecf19c98c8aa05d23 Mon Sep 17 00:00:00 2001
From: Mirko Waechter <mirko.waechter@kit.edu>
Date: Sat, 15 Apr 2017 15:45:10 +0200
Subject: [PATCH] added howto to add a new variant type to the statechart
 editor

---
 etc/doxygen/pages/HowTos.dox | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/etc/doxygen/pages/HowTos.dox b/etc/doxygen/pages/HowTos.dox
index c45f0fb6..7f9df4d9 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.
 */
-- 
GitLab