Fawkes API  Fawkes Development Version
clips_rm_trigger.h
1 /***************************************************************************
2  * clips_rm_trigger.h - Class holding information and callback for trigger in CLIPS
3  *
4  *
5  * Created: 11:57:31 AM 2016
6  * Copyright 2016 Frederik Zwilling
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_SRC_PLUGINS_CLIPS_ROBOT_MEMORY_CLIPS_RM_TRIGGER_H_
23 #define FAWKES_SRC_PLUGINS_CLIPS_ROBOT_MEMORY_CLIPS_RM_TRIGGER_H_
24 
25 #include <core/utils/lockptr.h>
26 #include <logging/logger.h>
27 #include <plugins/robot-memory/robot_memory.h>
28 
29 #include <clipsmm.h>
30 #include <string>
31 
32 /** @class ClipsRmTrigger clips_rm_trigger.h
33  *
34  * @author Frederik Zwilling
35  */
37 {
38 public:
39  ClipsRmTrigger(std::string assert_name,
40  RobotMemory * robot_memory,
42  fawkes::Logger * logger);
43  virtual ~ClipsRmTrigger();
44 
45  void callback(mongo::BSONObj update);
46  void set_trigger(EventTrigger *trigger);
47 
48 private:
49  std::string assert_name;
50  EventTrigger * trigger;
51  RobotMemory * robot_memory;
53  fawkes::Logger * logger;
54 };
55 
56 #endif /* FAWKES_SRC_PLUGINS_CLIPS_ROBOT_MEMORY_CLIPS_RM_TRIGGER_H_ */
Class holding all information about an EventTrigger.
Definition: event_trigger.h:32
void callback(mongo::BSONObj update)
Callback function for the trigger.
ClipsRmTrigger(std::string assert_name, RobotMemory *robot_memory, fawkes::LockPtr< CLIPS::Environment > &clips, fawkes::Logger *logger)
Constructor with references to objects of the plugin.
void set_trigger(EventTrigger *trigger)
Set the trigger object given by the robot memory.
Access to the robot memory based on mongodb.
Definition: robot_memory.h:48
Interface for logging.
Definition: logger.h:41