Changes have been pushed for the repository "fawkesrobotics/fawkes".

Clone:  https://github.com/fawkesrobotics/fawkes.git
Gitweb: https://github.com/fawkesrobotics/fawkes

The branch, common/gologpp has been updated
        to  0db58ec0adc8b37574b2e468740d10ae45b66a60 (commit)
       via  5d2c1e250948ef0e66f28ebe128de48b2e67174c (commit)
      from  866c2dbee355068d05b99629689fe4f8adc4be79 (commit)

https://github.com/fawkesrobotics/fawkes/tree/common/gologpp

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit 5d2c1e250948ef0e66f28ebe128de48b2e67174c
Author:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
AuthorDate: Wed Oct 16 09:42:02 2019 +0200
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Wed Oct 16 09:42:52 2019 +0200

    gologpp: add missing documentation
    
    This is a best-effort attempt to document code that is missing
    documentation.

https://github.com/fawkesrobotics/fawkes/commit/5d2c1e250

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 0db58ec0adc8b37574b2e468740d10ae45b66a60
Author:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
AuthorDate: Mon Oct 14 17:19:14 2019 +0200
Commit:     Till Hofmann <hofm...@kbsg.rwth-aachen.de>
CommitDate: Wed Oct 16 09:42:52 2019 +0200

    gologpp: turn action executor dispatcher into an aspect
    
    We may want to define multiple executors, e.g., a separate executor for
    refbox communication. As these cannot be part of this plugin, provide
    access to the dispatcher by creating an aspect that initializes the
    dispatcher and passes it to the components using the aspect.
    
    To create a new executor, inherit from the ActionExecutor and also add
    the GologppDispatcherAspect to your executor. When initializing the
    executor, register it with the dispatcher, so the dispatcher knows what
    executor to use for which activity.

https://github.com/fawkesrobotics/fawkes/commit/0db58ec0a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 src/plugins/gologpp/Makefile                       |  3 +-
 .../{ => aspect}/action_executor_dispatcher.cpp    | 48 +++++++++++++-
 .../{ => aspect}/action_executor_dispatcher.h      | 25 +++++--
 .../aspect/action_executor_dispatcher_inifin.cpp   | 77 ++++++++++++++++++++++
 .../aspect/action_executor_dispatcher_inifin.h}    | 28 ++++----
 src/plugins/gologpp/exog_manager.cpp               | 22 +++++--
 src/plugins/gologpp/exog_manager.h                 |  6 +-
 src/plugins/gologpp/gologpp_fawkes_backend.cpp     |  5 +-
 src/plugins/gologpp/gologpp_fawkes_backend.h       | 35 ++++++++--
 9 files changed, 213 insertions(+), 36 deletions(-)
 rename src/plugins/gologpp/{ => aspect}/action_executor_dispatcher.cpp (62%)
 rename src/plugins/gologpp/{ => aspect}/action_executor_dispatcher.h (70%)
 create mode 100644 
src/plugins/gologpp/aspect/action_executor_dispatcher_inifin.cpp
 copy src/{libs/aspect/inifins/syncpoint.h => 
plugins/gologpp/aspect/action_executor_dispatcher_inifin.h} (55%)


- *Diffs* -------------------------------------------------------------

- *commit* 5d2c1e250948ef0e66f28ebe128de48b2e67174c - - - - - - - - - -
Author:  Till Hofmann <hofm...@kbsg.rwth-aachen.de>
Date:    Wed Oct 16 09:42:02 2019 +0200
Subject: gologpp: add missing documentation

 src/plugins/gologpp/exog_manager.cpp | 22 +++++++++++++++++-----
 src/plugins/gologpp/exog_manager.h   |  6 +++---
 2 files changed, 20 insertions(+), 8 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/gologpp/exog_manager.cpp 
b/src/plugins/gologpp/exog_manager.cpp
index a7d742cae..629da815f 100644
--- a/src/plugins/gologpp/exog_manager.cpp
+++ b/src/plugins/gologpp/exog_manager.cpp
@@ -30,7 +30,7 @@ using namespace gologpp;
 
 namespace fawkes_gpp {
 
-/** @class ExogManagerThread
+/** @class ExogManager
  * Watch/observe blackboard interfaces according to the mappings
  * specified for exogenous actions in the agent program. The config
  * has to specify whether some mapped backend name is supposed to be
@@ -54,8 +54,11 @@ ConfigError::ConfigError(const std::string &msg) : 
Exception(msg.c_str())
 }
 
 /** Constructor.
- * Construct an ExogManager thread and attach it to the main loop.
+ * Construct an ExogManager.
  * @param exec_thread The Golog++ ExecutionContext to use
+ * @param config The Fawkes configuration to read config values from
+ * @param blackboard The blackboard to use to read data from
+ * @param logger A logger instance to use for logging messages
  */
 ExogManager::ExogManager(GologppThread *exec_thread,
                          Configuration *config,
@@ -102,6 +105,9 @@ ExogManager::ExogManager(GologppThread *exec_thread,
        }
 }
 
+/** Get the ExogManager's thread name.
+ * @return the thread name
+ */
 const char *
 ExogManager::name()
 {
@@ -125,9 +131,15 @@ ExogManager::exog_queue_push(shared_ptr<ExogEvent> evt)
        exec_thread_->gologpp_context().exog_queue_push(evt);
 }
 
-ExogManager::BlackboardEventHandler::BlackboardEventHandler(fawkes::BlackBoard 
*   bb,
-                                                            
shared_ptr<ExogAction> exog,
-                                                            ExogManager &      
    exog_mgr)
+/** Construct an event handler.
+ * @param bb The fawkes blackboard to listen to
+ * @param exog The ExogAction to trigger on data change
+ * @param exog_mgr The ExogManager to send the ExogAction to
+ */
+fawkes_gpp::ExogManager::BlackboardEventHandler::BlackboardEventHandler(
+  fawkes::BlackBoard *                     bb,
+  gologpp::shared_ptr<gologpp::ExogAction> exog,
+  ExogManager &                            exog_mgr)
 : blackboard_(bb), target_exog_(exog), exog_manager_(exog_mgr)
 {
        for (const auto &pair : target_exog_->mapping().arg_mapping()) {
diff --git a/src/plugins/gologpp/exog_manager.h 
b/src/plugins/gologpp/exog_manager.h
index eaac0cc48..753985523 100644
--- a/src/plugins/gologpp/exog_manager.h
+++ b/src/plugins/gologpp/exog_manager.h
@@ -66,9 +66,9 @@ private:
        class BlackboardEventHandler
        {
        public:
-               BlackboardEventHandler(fawkes::BlackBoard *,
-                                      gologpp::shared_ptr<gologpp::ExogAction>,
-                                      ExogManager &exog_mgr);
+               BlackboardEventHandler(fawkes::BlackBoard *                     
bb,
+                                      gologpp::shared_ptr<gologpp::ExogAction> 
exog,
+                                      ExogManager &                            
exog_mgr);
                BlackboardEventHandler(const BlackboardEventHandler &) = delete;
                BlackboardEventHandler &operator=(const BlackboardEventHandler 
&) = delete;
                BlackboardEventHandler(BlackboardEventHandler &&)               
  = default;

- *commit* 0db58ec0adc8b37574b2e468740d10ae45b66a60 - - - - - - - - - -
Author:  Till Hofmann <hofm...@kbsg.rwth-aachen.de>
Date:    Mon Oct 14 17:19:14 2019 +0200
Subject: gologpp: turn action executor dispatcher into an aspect

 src/plugins/gologpp/Makefile                       |  3 +-
 .../{ => aspect}/action_executor_dispatcher.cpp    | 48 +++++++++++++-
 .../{ => aspect}/action_executor_dispatcher.h      | 25 +++++--
 .../aspect/action_executor_dispatcher_inifin.cpp   | 77 ++++++++++++++++++++++
 .../aspect/action_executor_dispatcher_inifin.h}    | 28 ++++----
 src/plugins/gologpp/gologpp_fawkes_backend.cpp     |  5 +-
 src/plugins/gologpp/gologpp_fawkes_backend.h       | 35 ++++++++--
 7 files changed, 193 insertions(+), 28 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/gologpp/Makefile b/src/plugins/gologpp/Makefile
index b87a45f10..a0222ee0e 100644
--- a/src/plugins/gologpp/Makefile
+++ b/src/plugins/gologpp/Makefile
@@ -18,7 +18,8 @@ include $(BASEDIR)/etc/buildsys/config.mk
 LIBS_gologpp = fawkescore fawkesutils fawkesblackboard \
            fawkesinterface SkillerInterface
 OBJS_gologpp = plugin.o execution_thread.o gologpp_fawkes_backend.o 
exog_manager.o \
-                                                        action_executor.o 
skiller_action_executor.o action_executor_dispatcher.o
+                                                        action_executor.o 
skiller_action_executor.o \
+                                                        
aspect/action_executor_dispatcher.o aspect/action_executor_dispatcher_inifin.o
 
 OBJS_all    = $(OBJS_gologpp)
 PLUGINS_all = $(PLUGINDIR)/gologpp.so
diff --git a/src/plugins/gologpp/gologpp_fawkes_backend.cpp 
b/src/plugins/gologpp/gologpp_fawkes_backend.cpp
index d571481f5..79e984ad1 100644
--- a/src/plugins/gologpp/gologpp_fawkes_backend.cpp
+++ b/src/plugins/gologpp/gologpp_fawkes_backend.cpp
@@ -45,7 +45,10 @@ using namespace fawkes;
 GologppFawkesBackend::GologppFawkesBackend(Configuration *config,
                                            Logger *       logger,
                                            BlackBoard *   blackboard)
-: config_(config), logger_(logger), blackboard_(blackboard)
+: AspectProviderAspect(&dispatcher_inifin_),
+  config_(config),
+  logger_(logger),
+  blackboard_(blackboard)
 {
        action_dispatcher_.register_executor(
          std::make_shared<SkillerActionExecutor>(logger, blackboard, config));
diff --git a/src/plugins/gologpp/gologpp_fawkes_backend.h 
b/src/plugins/gologpp/gologpp_fawkes_backend.h
index 061b20ed9..df8680015 100644
--- a/src/plugins/gologpp/gologpp_fawkes_backend.h
+++ b/src/plugins/gologpp/gologpp_fawkes_backend.h
@@ -23,9 +23,12 @@
 #define FAWKES_GOLOGPP_FAWKES_BACKEND_H_
 
 #include "action_executor.h"
-#include "action_executor_dispatcher.h"
+#include "aspect/action_executor_dispatcher.h"
+#include "aspect/action_executor_dispatcher_inifin.h"
 
+#include <aspect/aspect_provider.h>
 #include <aspect/clock.h>
+#include <aspect/inifins/inifin.h>
 #include <blackboard/blackboard.h>
 #include <config/config.h>
 #include <golog++/model/platform_backend.h>
@@ -35,9 +38,26 @@ namespace fawkes {
 class SkillerInterface;
 }
 
+//namespace fawkes {
+//
+//class GologppDispatcherAspectIniFin : public virtual AspectIniFin
+//{
+//  public:
+//  GologppDispatcherAspectIniFin(fawkes_gpp::ActionExecutorDispatcher 
*dispatcher);
+//     void init(Thread *thread);
+//     void finalize(Thread *thread);
+//  private:
+//       fawkes_gpp::ActionExecutorDispatcher *dispatcher_;
+//};
+//
+//} // namespace fawkes
+
 namespace fawkes_gpp {
 
-class GologppFawkesBackend : public gologpp::PlatformBackend, public 
fawkes::ClockAspect
+class GologppFawkesBackend : public gologpp::PlatformBackend,
+                             public fawkes::ClockAspect,
+                             public fawkes::GologppDispatcherAspect,
+                             public fawkes::AspectProviderAspect
 {
 public:
        GologppFawkesBackend(fawkes::Configuration *config,
@@ -51,11 +71,12 @@ public:
 private:
        virtual void execute_activity(std::shared_ptr<gologpp::Activity>) 
override;
 
-       fawkes::SkillerInterface *skiller_if_;
-       fawkes::Configuration *   config_;
-       fawkes::Logger *          logger_;
-       fawkes::BlackBoard *      blackboard_;
-       ActionExecutorDispatcher  action_dispatcher_;
+       fawkes::SkillerInterface *            skiller_if_;
+       fawkes::Configuration *               config_;
+       fawkes::Logger *                      logger_;
+       fawkes::BlackBoard *                  blackboard_;
+       ActionExecutorDispatcher              action_dispatcher_;
+       fawkes::GologppDispatcherAspectIniFin dispatcher_inifin_;
 };
 
 } // namespace fawkes_gpp



_______________________________________________
fawkes-commits mailing list
fawkes-commits@lists.kbsg.rwth-aachen.de
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to