MIRA
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SCITOSModule Class Referenceabstract

Base class for all driver modules of a SCITOS robot. More...

#include <SCITOSModule.h>

Inheritance diagram for SCITOSModule:
Inheritance graph
[legend]

Public Types

enum  Flags
 
typedef std::multimap< std::string, std::string > ChannelNameMapping
 
typedef std::map< std::string, StatusChannelStatusMap
 
typedef std::map< std::string, StatusStatusMap
 

Public Member Functions

 SCITOSModule ()
 
virtual ~SCITOSModule ()
 
template<typename Reflector >
void reflect (Reflector &r)
 Reflect method for serialization. More...
 
void initialize (SCITOSManager *manager, mira::can::CANOpenNodeInfo nodeInfo, XMLDom *xml)
 Initializes the module with the manager that owns the module, the nodeID the module is bound to and the XML configuration to deserialize parameters from. More...
 
virtual std::string getName () const
 
void updateStatus (mira::can::CANOpenNodeStatus status)
 Update the status of the can node the module is attached to. More...
 
virtual void statusChanged (mira::can::CANOpenNodeStatus status)
 Overload if listening on status changed. More...
 
void pauseModule ()
 
void resumeModule ()
 
void destructModule ()
 
Class const & getClass () const
 
void enableSubscriberCallbacks (bool enable)
 
StatusManagergetStatusManager ()
 
void setHeartbeatInterval (const Duration &interval)
 
void setName (const std::string &name)
 
Duration getHeartbeatInterval () const
 
void heartbeat ()
 
bool hasHeartbeatTimeout () const
 
void bootup (const std::string &message, const std::string &trText="")
 
void bootupFinished ()
 
void recoverFinished ()
 
void recover (const std::string &message, const std::string &trText="")
 
void ok (const std::string &category="")
 
bool warning (const std::string &category, const std::string &message, const std::string &trText="")
 
bool error (const std::string &category, const std::string &message, const std::string &trText="")
 
bool setStatus (Status::StatusMode mode, const std::string &category, const std::string &message, const std::string &trText="")
 
Status::StatusMode getStatus () const
 
StatusMap getStatusMap () const
 
virtual StatusManager::StatusMap getStatusMap ()
 
virtual StatusManager::StatusMap getStatusMap ()
 
void checkin (const ResourceName &fullname, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (const ResourceName &ns, const std::string &name, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (Authority &iParent, const ResourceName &ns, const std::string &name)
 
void checkin (Authority &iParent, const std::string &name)
 
void checkin (const ResourceName &fullname, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (const ResourceName &ns, const std::string &name, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (Authority &iParent, const ResourceName &ns, const std::string &name)
 
void checkin (Authority &iParent, const std::string &name)
 
void checkout ()
 
void checkout ()
 
bool isValid () const
 
bool isValid () const
 
void validate () const
 
void validate () const
 
AuthorityRuntimePtr getRuntime ()
 
AuthorityRuntimePtr getRuntime ()
 
std::set< Authority *> getChildren ()
 
std::set< Authority *> getChildren ()
 
void addImmediateHandler (DiagnosticRunnablePtr runnable)
 
void addImmediateHandler (DiagnosticRunnablePtr runnable)
 
void addImmediateHandlerFunction (F &&fn)
 
void addImmediateHandlerFunction (F &&fn)
 
void addFinalizeHandler (DiagnosticRunnablePtr runnable)
 
void addFinalizeHandler (DiagnosticRunnablePtr runnable)
 
void addFinalizeHandlerFunction (F &&fn)
 
void addFinalizeHandlerFunction (F &&fn)
 
TimerPtr createTimer (Duration period, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Time time, TimerCallback callback)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &), Class *obj)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &))
 
TimerPtr createTimer (Duration period, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Time time, TimerCallback callback)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &), Class *obj)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &))
 
void removeTimer (TimerPtr timer)
 
void removeTimer (TimerPtr timer)
 
virtual void start ()
 
virtual void start ()
 
virtual void stop ()
 
virtual void stop ()
 
bool spin (const Duration &maxWait=Duration::infinity())
 
bool spin (const Duration &maxWait=Duration::infinity())
 
virtual bool hasUnrecoverableFailure () const
 
virtual bool hasUnrecoverableFailure () const
 
virtual bool isStarted () const
 
virtual bool isStarted () const
 
virtual bool isRunning () const
 
virtual bool isRunning () const
 
std::string resolveName (const std::string &name) const
 
std::string resolveName (const std::string &name) const
 
std::string resolveServiceName (const std::string &name) const
 
std::string resolveServiceName (const std::string &name) const
 
Channel< T > publish (const std::string &channelID)
 
Channel< T > publish (const std::string &channelID, const Typename &type)
 
Channel< T > publish (const std::string &channelID)
 
Channel< T > publish (const std::string &channelID, const Typename &type)
 
void unpublish (const std::string &channelID)
 
void unpublish (const std::string &channelID)
 
Channel< T > subscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > subscribeInterval (const std::string &channelID, boost::function< void(ChannelReadInterval< T >)> fn, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), Class *obj, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, boost::function< void(ChannelReadInterval< T >)> fn, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), Class *obj, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, boost::function< void(ChannelRead< T >)>, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, boost::function< void(ChannelRead< T >)>, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
ChannelRead< T > waitForData (Channel< T > channel, Duration timeout=Duration::infinity()) const
 
ChannelRead< T > waitForData (Channel< T > channel, Duration timeout=Duration::infinity()) const
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
Channel< T > getChannel (const std::string &channelID)
 
Channel< T > getChannel (const std::string &channelID)
 
bool isSubscribedOn (const std::string &channelID) const
 
bool isSubscribedOn (const std::string &channelID) const
 
 MIRA_DEPRECATED ("Please use isSubscribedOn() instead", bool hasSubscribedOn(const std::string &channelID) const)
 
 MIRA_DEPRECATED ("Please use isSubscribedOn() instead", bool hasSubscribedOn(const std::string &channelID) const)
 
bool hasPublished (const std::string &channelID) const
 
bool hasPublished (const std::string &channelID) const
 
bool doesChannelExist (const std::string &channelID) const
 
bool doesChannelExist (const std::string &channelID) const
 
bool waitForChannel (const std::string &channelID, const Duration &timeout=Duration::infinity()) const
 
bool waitForChannel (const std::string &channelID, const Duration &timeout=Duration::infinity()) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID, Duration timeout=Duration::invalid()) const
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time))
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time))
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time=Time()) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID) const
 
Transform getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &time=Time()) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time=Time()) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID) const
 
Transform getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &time=Time()) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) const
 
FrameworkTransformerNodegetTransformNode (const std::string &frameID) const
 
FrameworkTransformerNodegetTransformNode (const std::string &frameID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
void publishTransform (const std::string &frameID, const Transform &transform, const Time &time) const
 
void publishTransform (const std::string &frameID, const Transform &transform, const Time &time) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time, Filter &&filter) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time)
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time, Filter &&filter) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time)
 
void addTransformLink (const std::string &childID, const std::string &parentID) const
 
void addTransformLink (const std::string &childID, const std::string &parentID, FrameworkTransformerNode::Type type) const
 
void addTransformLink (const std::string &childID, const std::string &parentID) const
 
void addTransformLink (const std::string &childID, const std::string &parentID, FrameworkTransformerNode::Type type) const
 
void publishService (const std::string &name, Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (const std::string &name, Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void unpublishService ()
 
void unpublishService (const std::string &name)
 
void unpublishService ()
 
void unpublishService (const std::string &name)
 
RPCFuture< R > callService (const std::string &iService, const std::string &method, ARGS &&... args) const
 
RPCFuture< R > callService (const std::string &iService, const std::string &method, ARGS &&... args) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const json::Value &jsonRequest) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &jsonString) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const json::Value &params=json::Value()) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const std::string &params) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const RPCCallDefinition &rpc) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const json::Value &jsonRequest) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &jsonString) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const json::Value &params=json::Value()) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const std::string &params) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const RPCCallDefinition &rpc) const
 
bool existsService (const std::string &name) const
 
bool existsService (const std::string &name) const
 
bool implementsInterface (const std::string &name, const std::string &interface) const
 
bool implementsInterface (const std::string &name, const std::string &interface) const
 
bool waitForService (const std::string &name, Duration timeout=Duration::invalid()) const
 
bool waitForService (const std::string &name, Duration timeout=Duration::invalid()) const
 
std::string waitForServiceInterface (const std::string &interface, Duration timeout=Duration::invalid()) const
 
std::string waitForServiceInterface (const std::string &interface, Duration timeout=Duration::invalid()) const
 
std::list< std::string > queryServicesForInterface (const std::string &interface) const
 
std::list< std::string > queryServicesForInterface (const std::string &interface) const
 
void registerCallbackForInterface (const std::string &interface, ServiceInterfaceHandler::Callback cb)
 
void registerCallbackForInterface (const std::string &interface, void(Class::*f)(const std::string &, const std::string &), Class *obj)
 
void registerCallbackForInterface (const std::string &interface, ServiceInterfaceHandler::Callback cb)
 
void registerCallbackForInterface (const std::string &interface, void(Class::*f)(const std::string &, const std::string &), Class *obj)
 
virtual boost::shared_ptr< PropertyNodegetProperties ()
 
virtual boost::shared_ptr< PropertyNodegetProperties ()
 
virtual std::set< std::string > getPublishedChannels ()
 
virtual std::set< std::string > getPublishedChannels ()
 
virtual std::set< std::string > getSubscribedChannels ()
 
virtual std::set< std::string > getSubscribedChannels ()
 
virtual std::set< std::string > getServiceInterfaces ()
 
virtual std::set< std::string > getServiceInterfaces ()
 
virtual ChannelNameMapping getPublishedChannelNames ()
 
virtual ChannelNameMapping getPublishedChannelNames ()
 
virtual ChannelNameMapping getSubscribedChannelNames ()
 
virtual ChannelNameMapping getSubscribedChannelNames ()
 
virtual ChannelStatusMap getSubscribedChannelStatus ()
 
virtual ChannelStatusMap getSubscribedChannelStatus ()
 
std::string getNamespace () const
 
std::string getNamespace () const
 
std::string getGlobalName () const
 
std::string getGlobalName () const
 
std::string getGlobalID () const
 
std::string getGlobalID () const
 
std::string getID () const
 
std::string getID () const
 
const AuthorityDescriptiongetDescription () const
 
const AuthorityDescriptiongetDescription () const
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

 NORMAL
 
 ANONYMOUS
 
 HIDDEN
 
 INVISIBLE_PUBLISHER_SUBSCRIBER
 
 INTERNAL
 
 INDEPENDENT_SUBSCRIBER_THREAD
 
 INDEPENDENT_RPC_THREAD
 
 NO_MAIN_THREAD
 

Protected Types

typedef std::map< std::string, RWAccessFlagsRWAccessMap
 
typedef std::list< AbstractChannelSubscriberPtrSubscribePtrList
 

Protected Member Functions

void processInitialization ()
 
void onError (const mira::can::CANMessage &message, const Time &time)
 
template<typename T >
void deserializeConfig (T &module, bool isOptional=true)
 module must have the specific subclass type to deserialize to subclass (not base class). More...
 
template<typename T >
void deserializeConfig (const std::string &name, T &module, bool isOptional=true)
 See above. More...
 
virtual void onInitialize ()=0
 Overwrite in derived class to initialize (register on PDOs,...) More...
 
virtual void onPause ()
 
virtual void onResume ()
 
virtual void onDestruct ()
 
uint32 addPDOListener (can::PDOCallback pFunc, uint32 pPDO)
 
void waitForHWTimestamp ()
 Call this method in derived modules at initialization to wait for hardware time synchronization. More...
 
virtual Class const & internalGetClass () const=0
 
Channel< T > toProxy (ConcreteChannel< T > *channel)
 
void setChannelReadAccess (const std::string &channelID)
 
void setChannelWriteAccess (const std::string &channelID)
 
void removeChannelReadAccess (const std::string &channelID)
 
void removeChannelWriteAccess (const std::string &channelID)
 
void insertChannelNameMapping (AbstractAuthority::ChannelNameMapping &map, const std::string &local, const std::string &global)
 
void eraseChannelNameMapping (AbstractAuthority::ChannelNameMapping &map, const std::string &local, const std::string &global)
 
void remotePublishService (const std::string &service) const
 
PropertyTree getPropertiesRPC ()
 
void setProperty (const std::string &property, const std::string &value)
 
std::string getProperty (const std::string &property) const
 
void setPropertyJSON (const std::string &property, const json::Value &value)
 
json::Value getPropertyJSON (const std::string &property) const
 

Protected Attributes

std::set< uint32 > mErrors
 
std::vector< uint32 > mPDOCallbacks
 
XMLDommXML
 
SCITOSManagermManager
 The pointer to the manager. More...
 
mira::can::CANOpenNodeInfo mNodeInfo
 Informations about the CANOpen node. More...
 
boost::thread mInitializationThread
 
bool mIsRunning
 
AuthorityDescription mDescription
 
boost::optional< StatusmBootUpStatus
 
boost::optional< StatusmRecoverStatus
 
Duration mHeartbeatInterval
 
boost::optional< TimemLastHeartbeat
 
StatusMap mStatusMap
 
std::string mName
 

Detailed Description

Base class for all driver modules of a SCITOS robot.

Constructor & Destructor Documentation

◆ SCITOSModule()

SCITOSModule ( )
inline

◆ ~SCITOSModule()

virtual ~SCITOSModule ( )
inlinevirtual

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

Reflect method for serialization.

◆ initialize()

void initialize ( SCITOSManager manager,
mira::can::CANOpenNodeInfo  nodeInfo,
XMLDom xml 
)

Initializes the module with the manager that owns the module, the nodeID the module is bound to and the XML configuration to deserialize parameters from.

◆ getName()

virtual std::string getName ( ) const
inlinevirtual

◆ updateStatus()

void updateStatus ( mira::can::CANOpenNodeStatus  status)

Update the status of the can node the module is attached to.

◆ statusChanged()

virtual void statusChanged ( mira::can::CANOpenNodeStatus  status)
inlinevirtual

Overload if listening on status changed.

◆ pauseModule()

void pauseModule ( )

◆ resumeModule()

void resumeModule ( )

◆ destructModule()

void destructModule ( )

◆ processInitialization()

void processInitialization ( )
protected

◆ onError()

void onError ( const mira::can::CANMessage message,
const Time time 
)
protected

◆ deserializeConfig() [1/2]

void deserializeConfig ( T &  module,
bool  isOptional = true 
)
inlineprotected

module must have the specific subclass type to deserialize to subclass (not base class).

Therefore needs a template class here. Call from subclass with deserializeConfig(*this) for automatic deduction of T.

Parameters
[in]isOptionalWhether module configuration is optional. If there is no configuration for the module and isOptional=true, XML deserialization is skipped (i.e. reflect() is not guaranteed to execute!). If isOptional=false, a missing configuration will throw XInvalidConfig.

◆ deserializeConfig() [2/2]

void deserializeConfig ( const std::string &  name,
T &  module,
bool  isOptional = true 
)
inlineprotected

See above.

This method allows to provide a specific name for the config node to read (if it should be different from module name).

◆ onInitialize()

virtual void onInitialize ( )
protectedpure virtual

Overwrite in derived class to initialize (register on PDOs,...)

◆ onPause()

virtual void onPause ( )
inlineprotectedvirtual

◆ onResume()

virtual void onResume ( )
inlineprotectedvirtual

◆ onDestruct()

virtual void onDestruct ( )
inlineprotectedvirtual

◆ addPDOListener()

uint32 addPDOListener ( can::PDOCallback  pFunc,
uint32  pPDO 
)
protected

◆ waitForHWTimestamp()

void waitForHWTimestamp ( )
protected

Call this method in derived modules at initialization to wait for hardware time synchronization.

Member Data Documentation

◆ mErrors

std::set<uint32> mErrors
protected

◆ mPDOCallbacks

std::vector<uint32> mPDOCallbacks
protected

◆ mXML

XMLDom* mXML
protected

◆ mManager

SCITOSManager* mManager
protected

The pointer to the manager.

◆ mNodeInfo

mira::can::CANOpenNodeInfo mNodeInfo
protected

Informations about the CANOpen node.

◆ mInitializationThread

boost::thread mInitializationThread
protected

◆ mIsRunning

bool mIsRunning
protected

The documentation for this class was generated from the following file: