Public Member Functions | Private Attributes | List of all members
kobuki::EventManager Class Reference

#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
 

Detailed Description

Definition at line 112 of file event_manager.hpp.

Constructor & Destructor Documentation

kobuki::EventManager::EventManager ( )
inline

Definition at line 114 of file event_manager.hpp.

Member Function Documentation

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.

Parameters
new_stateUpdated core sensors state
cliff_dataCliff 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.

Parameters
new_digital_inputNew 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.

Parameters
is_pluggedIs the USB cable connected?.
is_aliveIs the robot alive?.

Definition at line 283 of file event_manager.cpp.

Member Data Documentation

uint16_t kobuki::EventManager::last_digital_input
private

Definition at line 132 of file event_manager.hpp.

RobotEvent::State kobuki::EventManager::last_robot_state
private

Definition at line 133 of file event_manager.hpp.

CoreSensors::Data kobuki::EventManager::last_state
private

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.


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


kobuki_driver
Author(s): Daniel Stonier , Younghun Ju , Jorge Santos Simon
autogenerated on Fri Sep 18 2020 03:22:02