Fawkes API  Fawkes Development Version
ClipsRmTrigger Class Reference

#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...
 

Detailed Description

Author
Frederik Zwilling

Definition at line 36 of file clips_rm_trigger.h.

Constructor & Destructor Documentation

◆ ClipsRmTrigger()

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.

Parameters
assert_nameString used to identify this trigger in resulting facts
robot_memoryRobot Memory
clipsClips environment
loggerLogger

Definition at line 39 of file clips_rm_trigger.cpp.

Member Function Documentation

◆ callback()

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.

Parameters
updateupdated object

Definition at line 73 of file clips_rm_trigger.cpp.

References fawkes::MultiLogger::log_warn().

◆ set_trigger()

void ClipsRmTrigger::set_trigger ( EventTrigger trigger)

Set the trigger object given by the robot memory.

Parameters
triggerTrigger

Definition at line 62 of file clips_rm_trigger.cpp.


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