43 #ifndef _MIRA_SCITOSMODULE_H_ 44 #define _MIRA_SCITOSMODULE_H_ 54 namespace mira {
namespace robot {
78 template<
typename Reflector>
81 r.roproperty(
"Status", mNodeInfo.status,
"The status of the module",
95 return getClass().getMetaInfo(
"Name");
109 void destructModule();
113 void processInitialization();
125 template <
typename T>
128 deserializeConfig(getName(), module, isOptional);
135 template <
typename T>
138 if (mXML->root().find(name) == mXML->root().end()) {
140 MIRA_LOG(
WARNING) <<
"SCITOSManager: No configuration for module '" << name <<
"', running with defaults";
143 MIRA_THROW(XInvalidConfig,
"SCITOSManager: No configuration for module '" << name <<
"', which is required";)
153 virtual void onInitialize() = 0;
164 void waitForHWTimestamp();
mira::can::CANOpenNodeInfo mNodeInfo
Informations about the CANOpen node.
Definition: SCITOSModule.h:171
virtual ~SCITOSModule()
Definition: SCITOSModule.h:75
void deserializeConfig(const std::string &name, T &module, bool isOptional=true)
See above.
Definition: SCITOSModule.h:136
Base class for all driver modules of a SCITOS robot.
Definition: SCITOSModule.h:66
SCITOSModule()
Definition: SCITOSModule.h:71
std::set< uint32 > mErrors
Definition: SCITOSModule.h:166
void reflect(Reflector &r)
Reflect method for serialization.
Definition: SCITOSModule.h:79
void deserialize(const std::string &name, T &value)
std::vector< uint32 > mPDOCallbacks
Definition: SCITOSModule.h:168
XMLDom * mXML
Definition: SCITOSModule.h:169
boost::function< void(const CANMessage &, const Time &)> PDOCallback
PropertyHint enumeration(const std::string &values)
boost::shared_ptr< SCITOSModule > SCITOSModulePtr
Definition: SCITOSModule.h:176
virtual void statusChanged(mira::can::CANOpenNodeStatus status)
Overload if listening on status changed.
Definition: SCITOSModule.h:105
virtual void onDestruct()
Definition: SCITOSModule.h:156
bool mIsRunning
Definition: SCITOSModule.h:173
#define MIRA_THROW(ex, msg)
#define MIRA_ABSTRACT_OBJECT(classIdentifier)
SCITOSManager * mManager
The pointer to the manager.
Definition: SCITOSModule.h:170
virtual void onResume()
Definition: SCITOSModule.h:155
virtual std::string getName() const
Definition: SCITOSModule.h:93
#define MLAB_SCITOS_EXPORT
Definition: SCITOSDefines.h:57
boost::thread mInitializationThread
Definition: SCITOSModule.h:172
Defines for the SCITOS robot drivers.
void deserializeConfig(T &module, bool isOptional=true)
module must have the specific subclass type to deserialize to subclass (not base class).
Definition: SCITOSModule.h:126
The SCITOSManager manages all driver modules of a SCITOS robot.
Definition: SCITOSManager.h:64
virtual void onPause()
Definition: SCITOSModule.h:154