Fawkes API Fawkes Development Version
gologpp_fawkes_backend.h
1/***************************************************************************
2 * gologpp_fawkes_backend.cpp - Fawkes backend for Golog++
3 *
4 * Created: Mon 26 Aug 2019 CEST 15:38
5 * Copyright 2019 Victor Mataré <matare@fh-aachen.de>
6 * Till Hofmann <hofmann@kbsg.rwth-aachen.de>
7 ****************************************************************************/
8
9/* This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Library General Public License for more details.
18 *
19 * Read the full text in the LICENSE.GPL file in the doc directory.
20 */
21
22#ifndef FAWKES_GOLOGPP_FAWKES_BACKEND_H_
23#define FAWKES_GOLOGPP_FAWKES_BACKEND_H_
24
25#include "action_executor.h"
26#include "aspect/action_executor_dispatcher.h"
27#include "aspect/action_executor_dispatcher_inifin.h"
28
29#include <aspect/aspect_provider.h>
30#include <aspect/clock.h>
31#include <aspect/inifins/inifin.h>
32#include <blackboard/blackboard.h>
33#include <golog++/model/platform_backend.h>
34#include <logging/logger.h>
35
36namespace fawkes {
37class SkillerInterface;
38class Configuration;
39
40namespace gpp {
41
42class GologppFawkesBackend : public gologpp::PlatformBackend,
43 public ClockAspect,
46{
47public:
49 std::string cfg_prefix,
50 Logger * logger,
51 BlackBoard * blackboard);
52 virtual ~GologppFawkesBackend();
53
54 virtual void preempt_activity(std::shared_ptr<gologpp::Activity> a) override;
55 virtual gologpp::Clock::time_point time() const noexcept override;
56
57private:
58 virtual void execute_activity(std::shared_ptr<gologpp::Activity>) override;
59
60 SkillerInterface * skiller_if_;
61 Logger * logger_;
62 BlackBoard * blackboard_;
63 ActionExecutorDispatcher action_dispatcher_;
64 GologppDispatcherAspectIniFin dispatcher_inifin_;
65};
66
67} // namespace gpp
68} // namespace fawkes
69
70#endif
Thread aspect provide a new aspect.
The BlackBoard abstract class.
Definition: blackboard.h:46
Thread aspect that allows to obtain the current time from the clock.
Definition: clock.h:34
Interface for configuration handling.
Definition: config.h:68
The initializer/finalizer for the GologppDispatcherAspect.
An aspect that provides access to the Golog++ Action Executor Dispatcher.
Interface for logging.
Definition: logger.h:42
SkillerInterface Fawkes BlackBoard Interface.
Dispatch an activity to a number of registered executors by checking all registered executors subsequ...
A Golog++ backend to get data from and send commands to Fawkes.
virtual gologpp::Clock::time_point time() const noexcept override
Get the current time from Fawkes.
virtual void preempt_activity(std::shared_ptr< gologpp::Activity > a) override
Preempt the currently running activity.
GologppFawkesBackend(Configuration *config, std::string cfg_prefix, Logger *logger, BlackBoard *blackboard)
Constructor.
Fawkes library namespace.