Fawkes API Fawkes Development Version
fawkes::gpp::GologppFawkesBackend Class Reference

A Golog++ backend to get data from and send commands to Fawkes. More...

Inheritance diagram for fawkes::gpp::GologppFawkesBackend:

Public Member Functions

 GologppFawkesBackend (Configuration *config, std::string cfg_prefix, Logger *logger, BlackBoard *blackboard)
 Constructor. More...
 
virtual void preempt_activity (std::shared_ptr< gologpp::Activity > a) override
 Preempt the currently running activity. More...
 
virtual gologpp::Clock::time_point time () const noexcept override
 Get the current time from Fawkes. More...
 
- Public Member Functions inherited from fawkes::ClockAspect
 ClockAspect ()
 Constructor. More...
 
virtual ~ClockAspect ()
 Virtual empty destructor. More...
 
void init_ClockAspect (Clock *clock)
 Set the clock. More...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 
- Public Member Functions inherited from fawkes::GologppDispatcherAspect
 GologppDispatcherAspect ()
 Constructor. More...
 
void init_GologppDispatcherAspect (gpp::ActionExecutorDispatcher *dispatcher)
 Init GologppDispatcherAspect. More...
 
void finalize_GologppDispatcherAspect ()
 Finalize the GologppDispatcherAspect. More...
 
- Public Member Functions inherited from fawkes::AspectProviderAspect
 AspectProviderAspect (AspectIniFin *inifin)
 Constructor. More...
 
 AspectProviderAspect (const std::list< AspectIniFin * > aspects)
 Constructor. More...
 
virtual ~AspectProviderAspect ()
 Virtual empty destructor. More...
 
const std::list< AspectIniFin * > & aspect_provider_aspects () const
 Get name of the provided aspect. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 
- Protected Attributes inherited from fawkes::ClockAspect
Clockclock
 By means of this member access to the clock is given. More...
 
- Protected Attributes inherited from fawkes::GologppDispatcherAspect
gpp::ActionExecutorDispatchergologpp_dispatcher
 A pointer to the dispatcher that the aspect provides. More...
 

Detailed Description

A Golog++ backend to get data from and send commands to Fawkes.

The backend currently only provides access to the skiller for action execution.

Definition at line 42 of file gologpp_fawkes_backend.h.

Constructor & Destructor Documentation

◆ GologppFawkesBackend()

fawkes::gpp::GologppFawkesBackend::GologppFawkesBackend ( Configuration config,
std::string  cfg_prefix,
Logger logger,
BlackBoard blackboard 
)

Constructor.

Parameters
configThe configuration to read from
cfg_prefixThe spec-specific config prefix to use
loggerThe logger to use for log messages
blackboardThe blackboard to use to access the skiller

Definition at line 51 of file gologpp_fawkes_backend.cpp.

References fawkes::Configuration::get_bool_or_default(), fawkes::Configuration::get_string_or_default(), fawkes::Configuration::get_strings_or_defaults(), fawkes::Configuration::get_uint_or_default(), and fawkes::gpp::ActionExecutorDispatcher::register_executor().

◆ ~GologppFawkesBackend()

fawkes::gpp::GologppFawkesBackend::~GologppFawkesBackend ( )
virtual

Definition at line 80 of file gologpp_fawkes_backend.cpp.

Member Function Documentation

◆ preempt_activity()

void fawkes::gpp::GologppFawkesBackend::preempt_activity ( std::shared_ptr< gologpp::Activity >  a)
overridevirtual

Preempt the currently running activity.

Determine the right executor and instruct the executor to stop the activity.

Parameters
aThe activity to stop

Definition at line 89 of file gologpp_fawkes_backend.cpp.

References fawkes::gpp::ActionExecutorDispatcher::get_executor().

◆ time()

gologpp::Clock::time_point fawkes::gpp::GologppFawkesBackend::time ( ) const
overridevirtualnoexcept

Get the current time from Fawkes.

Returns
the current time

Definition at line 99 of file gologpp_fawkes_backend.cpp.

References fawkes::ClockAspect::clock, fawkes::Time::in_sec(), and fawkes::Clock::now().


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