Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
packml_stacklight::Utils Class Reference

#include <utils.h>

Inheritance diagram for packml_stacklight::Utils:
Inheritance graph
[legend]

Public Member Functions

std::map< std::string, uint8_t > getPubMap (packml_msgs::State current_state)
 
bool getShouldPublish (packml_msgs::State current_state)
 
bool getSuspendStarving ()
 
void maybeResetState (packml_msgs::State &current_state, ros::Time &last_time)
 
bool setSuspendStarving (bool starving=true)
 
 Utils ()
 
 ~Utils ()
 

Public Attributes

double flash_sec_buzzer_off_ = 2.0
 
double flash_sec_buzzer_on_ = 2.0
 
double flash_sec_light_off_ = 2.0
 
double flash_sec_light_on_ = 2.0
 
double publish_frequency_ = 0.5
 
double status_timeout_ = 30.0
 

Protected Member Functions

Action getActionFromState (packml_msgs::State current_state)
 
Flash::Value getBuzzerFlash (packml_msgs::State current_state)
 
Flash::Value getLightFlash (packml_msgs::State current_state)
 
std::map< std::string, uint8_t > getPubMap (Action action)
 

Protected Attributes

std::vector< Actionaction_vec_ = initDefaultStatusActions()
 

Private Member Functions

void getFlash (packml_msgs::State current_state, int8_t &last_state, packml_stacklight::Flash::Value &last_flash, ros::Time &last_time, double on_secs, double off_secs)
 
std::vector< ActioninitDefaultStatusActions ()
 

Detailed Description

Definition at line 32 of file utils.h.

Constructor & Destructor Documentation

packml_stacklight::Utils::Utils ( )

Definition at line 23 of file utils.cpp.

packml_stacklight::Utils::~Utils ( )

Definition at line 28 of file utils.cpp.

Member Function Documentation

Action packml_stacklight::Utils::getActionFromState ( packml_msgs::State  current_state)
protected

Definition at line 259 of file utils.cpp.

Flash::Value packml_stacklight::Utils::getBuzzerFlash ( packml_msgs::State  current_state)
protected

Definition at line 196 of file utils.cpp.

void packml_stacklight::Utils::getFlash ( packml_msgs::State  current_state,
int8_t &  last_state,
packml_stacklight::Flash::Value last_flash,
ros::Time last_time,
double  on_secs,
double  off_secs 
)
private

Definition at line 207 of file utils.cpp.

Flash::Value packml_stacklight::Utils::getLightFlash ( packml_msgs::State  current_state)
protected

Definition at line 185 of file utils.cpp.

std::map< std::string, uint8_t > packml_stacklight::Utils::getPubMap ( Action  action)
protected

Definition at line 269 of file utils.cpp.

std::map< std::string, uint8_t > packml_stacklight::Utils::getPubMap ( packml_msgs::State  current_state)

Definition at line 264 of file utils.cpp.

bool packml_stacklight::Utils::getShouldPublish ( packml_msgs::State  current_state)

Definition at line 236 of file utils.cpp.

bool packml_stacklight::Utils::getSuspendStarving ( )

Definition at line 173 of file utils.cpp.

std::vector< Action > packml_stacklight::Utils::initDefaultStatusActions ( )
private

Definition at line 33 of file utils.cpp.

void packml_stacklight::Utils::maybeResetState ( packml_msgs::State &  current_state,
ros::Time last_time 
)

Definition at line 338 of file utils.cpp.

bool packml_stacklight::Utils::setSuspendStarving ( bool  starving = true)

Definition at line 178 of file utils.cpp.

Member Data Documentation

std::vector<Action> packml_stacklight::Utils::action_vec_ = initDefaultStatusActions()
protected

Definition at line 35 of file utils.h.

double packml_stacklight::Utils::flash_sec_buzzer_off_ = 2.0

Definition at line 41 of file utils.h.

double packml_stacklight::Utils::flash_sec_buzzer_on_ = 2.0

Definition at line 40 of file utils.h.

double packml_stacklight::Utils::flash_sec_light_off_ = 2.0

Definition at line 39 of file utils.h.

double packml_stacklight::Utils::flash_sec_light_on_ = 2.0

Definition at line 38 of file utils.h.

double packml_stacklight::Utils::publish_frequency_ = 0.5

Definition at line 42 of file utils.h.

double packml_stacklight::Utils::status_timeout_ = 30.0

Definition at line 43 of file utils.h.


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


packml_stacklight
Author(s): Joshua Hatzenbuehler
autogenerated on Fri Jul 12 2019 03:31:01