Fawkes API
Fawkes Development Version
|
#include <clips_rm_trigger.h>
Public Member Functions | |
ClipsRmTrigger (std::string assert_name, RobotMemory *robot_memory, fawkes::LockPtr< CLIPS::Environment > &clips, fawkes::Logger *logger) | |
Constructor with references to objects of the plugin. More... | |
void | callback (const bsoncxx::document::view &update) |
Callback function for the trigger. More... | |
void | set_trigger (EventTrigger *trigger) |
Set the trigger object given by the robot memory. More... | |
Definition at line 36 of file clips_rm_trigger.h.
ClipsRmTrigger::ClipsRmTrigger | ( | std::string | assert_name, |
RobotMemory * | robot_memory, | ||
fawkes::LockPtr< CLIPS::Environment > & | clips, | ||
fawkes::Logger * | logger | ||
) |
Constructor with references to objects of the plugin.
assert_name | String used to identify this trigger in resulting facts |
robot_memory | Robot Memory |
clips | Clips environment |
logger | Logger |
Definition at line 39 of file clips_rm_trigger.cpp.
void ClipsRmTrigger::callback | ( | const bsoncxx::document::view & | update | ) |
Callback function for the trigger.
Asserts a fact about the update with the assert_name and updated object. When you retract the fact about the update, also call bson-destroy on the included pointer to avoid memory leaks.
update | updated object |
Definition at line 73 of file clips_rm_trigger.cpp.
References fawkes::MultiLogger::log_warn().
void ClipsRmTrigger::set_trigger | ( | EventTrigger * | trigger | ) |
Set the trigger object given by the robot memory.
trigger | Trigger |
Definition at line 62 of file clips_rm_trigger.cpp.