#include <event_manager.hpp>
Public Member Functions | |
EventManager () | |
void | init (const std::string &sigslots_namespace) |
void | update (const CoreSensors::Data &new_state, const std::vector< uint16_t > &cliff_data) |
void | update (const uint16_t &digital_input) |
void | update (bool is_plugged, bool is_alive) |
Private Attributes | |
uint16_t | last_digital_input |
RobotEvent::State | last_robot_state |
CoreSensors::Data | last_state |
ecl::Signal< const BumperEvent & > | sig_bumper_event |
ecl::Signal< const ButtonEvent & > | sig_button_event |
ecl::Signal< const CliffEvent & > | sig_cliff_event |
ecl::Signal< const InputEvent & > | sig_input_event |
ecl::Signal< const PowerEvent & > | sig_power_event |
ecl::Signal< const RobotEvent & > | sig_robot_event |
ecl::Signal< const WheelEvent & > | sig_wheel_event |
Definition at line 112 of file event_manager.hpp.
kobuki::EventManager::EventManager | ( | ) | [inline] |
Definition at line 114 of file event_manager.hpp.
void kobuki::EventManager::init | ( | const std::string & | sigslots_namespace | ) |
Definition at line 28 of file event_manager.cpp.
void kobuki::EventManager::update | ( | const CoreSensors::Data & | new_state, |
const std::vector< uint16_t > & | cliff_data | ||
) |
Update with incoming data and emit events if necessary.
new_state | Updated core sensors state |
cliff_data | Cliff sensors readings (we include them as an extra information on cliff events) |
Definition at line 43 of file event_manager.cpp.
void kobuki::EventManager::update | ( | const uint16_t & | new_digital_input | ) |
Emit events if something changed in the digital input port.
new_digital_input | New values on digital input port. |
Definition at line 261 of file event_manager.cpp.
void kobuki::EventManager::update | ( | bool | is_plugged, |
bool | is_alive | ||
) |
Emit events if the robot gets online/offline.
is_plugged | Is the USB cable connected?. |
is_alive | Is the robot alive?. |
Definition at line 283 of file event_manager.cpp.
uint16_t kobuki::EventManager::last_digital_input [private] |
Definition at line 132 of file event_manager.hpp.
Definition at line 133 of file event_manager.hpp.
Definition at line 131 of file event_manager.hpp.
ecl::Signal<const BumperEvent&> kobuki::EventManager::sig_bumper_event [private] |
Definition at line 136 of file event_manager.hpp.
ecl::Signal<const ButtonEvent&> kobuki::EventManager::sig_button_event [private] |
Definition at line 135 of file event_manager.hpp.
ecl::Signal<const CliffEvent&> kobuki::EventManager::sig_cliff_event [private] |
Definition at line 137 of file event_manager.hpp.
ecl::Signal<const InputEvent&> kobuki::EventManager::sig_input_event [private] |
Definition at line 140 of file event_manager.hpp.
ecl::Signal<const PowerEvent&> kobuki::EventManager::sig_power_event [private] |
Definition at line 139 of file event_manager.hpp.
ecl::Signal<const RobotEvent&> kobuki::EventManager::sig_robot_event [private] |
Definition at line 141 of file event_manager.hpp.
ecl::Signal<const WheelEvent&> kobuki::EventManager::sig_wheel_event [private] |
Definition at line 138 of file event_manager.hpp.