Go to the documentation of this file.
29 #include <Ice/Handle.h>
30 #include <IceUtil/Time.h>
57 template <
class DerivedClass>
64 virtual void reset() = 0;
65 virtual bool isValid()
const = 0;
78 return dynamic_cast<const T*
>(
this);
85 return dynamic_cast<T*
>(
this);
90 virtual std::map<std::string, VariantBasePtr>
96 virtual void getDataFieldAs(std::size_t i, Ice::Byte& out)
const = 0;
97 virtual void getDataFieldAs(std::size_t i, Ice::Short& out)
const = 0;
102 virtual void getDataFieldAs(std::size_t i, std::string& out)
const = 0;
117 ControlTargetInfo<T> (*)(
void));
122 #define DETAIL_ControlTargetBase_DEFAULT_METHOD_IMPLEMENTATION \
123 ARMARX_PLACEMENT_CONSTRUCTION_HELPER \
124 using ControlTargetBase = ::armarx::ControlTargetBase; \
125 using VariantBasePtr = ::armarx::VariantBasePtr; \
126 std::string getControlTargetType(bool withoutNamespaceSpecifier = false) const override \
128 return armarx::GetTypeString(*this, withoutNamespaceSpecifier); \
130 void _check_for_static_GetClassMemberInfo_overload() \
133 ControlTargetHasGetClassMemberInfo<std::decay<decltype(*this)>::type>::value, \
134 "This class has to implement GetClassMemberInfo() returning " \
135 "an instance of ControlTargetInfo<THIS_CLASS_TYPE>"); \
137 std::map<std::string, VariantBasePtr> toVariants(const IceUtil::Time& timestamp) \
140 return ControlTargetInfo<std::decay<decltype(*this)>::type>::ToVariants(timestamp, this); \
142 std::size_t getNumberOfDataFields() const override \
144 return ControlTargetInfo<std::decay<decltype(*this)>::type>::GetNumberOfDataFields(); \
146 void getDataFieldAs(std::size_t i, bool& out) const override \
148 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
150 void getDataFieldAs(std::size_t i, Ice::Byte& out) const override \
152 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
154 void getDataFieldAs(std::size_t i, Ice::Short& out) const override \
156 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
158 void getDataFieldAs(std::size_t i, Ice::Int& out) const override \
160 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
162 void getDataFieldAs(std::size_t i, Ice::Long& out) const override \
164 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
166 void getDataFieldAs(std::size_t i, Ice::Float& out) const override \
168 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
170 void getDataFieldAs(std::size_t i, Ice::Double& out) const override \
172 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
174 void getDataFieldAs(std::size_t i, std::string& out) const override \
176 ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
178 const std::type_info& getDataFieldType(std::size_t i) const override \
180 return ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldType(i); \
182 std::vector<std::string> getDataFieldNames() const override \
184 return ControlTargetInfo<std::decay<decltype(*this)>::type>::GetDataFieldNames(); \
187 #define make_DummyControlTarget(Suffix, ControlMode) \
188 class DummyControlTarget##Suffix : public ControlTargetBase \
191 virtual const std::string& \
192 getControlMode() const override \
194 return ControlMode; \
201 isValid() const override \
205 DETAIL_ControlTargetBase_DEFAULT_METHOD_IMPLEMENTATION static ControlTargetInfo< \
206 DummyControlTarget##Suffix> \
207 GetClassMemberInfo() \
209 return ControlTargetInfo<DummyControlTarget##Suffix>{}; \
214 #undef make_DummyControlTarget
const VariantTypeId Float
Brief description of class JointControlTargetBase.
The ControlDevice class represents a logical unit accepting commands via its JointControllers.
::IceInternal::Handle<::armarx::VariantBase > VariantBasePtr
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
virtual const std::type_info & getDataFieldType(std::size_t i) const =0
make_DummyControlTarget(EmergencyStop, ControlModes::EmergencyStop)
virtual ~ControlTargetBase()=default
virtual const std::string & getControlMode() const =0
const VariantTypeId Double
ARMARX_META_MAKE_HAS_MEMBER_FNC_CHECK(ControlTargetHasGetClassMemberInfo, GetClassMemberInfo, ControlTargetInfo< T >(*)(void))
std::shared_ptr< Value > value()
virtual bool isValid() const =0
virtual void getDataFieldAs(std::size_t i, bool &out) const =0
armarx::core::time::DateTime Time
#define ARMARX_PLACEMENT_CONSTRUCTION_HELPER_BASE(CommonBaseType)
virtual std::string getControlTargetType(bool withoutNamespaceSpecifier=false) const =0
virtual std::map< std::string, VariantBasePtr > toVariants(const IceUtil::Time ×tamp) const =0
used to send the data to the DebugObserverTopic and to other Components (e.g. GUI widgets)
virtual std::vector< std::string > getDataFieldNames() const =0
void _copyTo(std::unique_ptr< T > &target) const
virtual std::size_t getNumberOfDataFields() const =0
This file offers overloads of toIce() and fromIce() functions for STL container types.