joint_dispatcher
Classes | Public Member Functions | Protected Member Functions | List of all members
joint_dispatcher::StateAggregator Class Reference

#include <StateAggregator.hpp>

Public Member Functions

const std::vector< size_t > getActuatorIds () const
 
 StateAggregator (const std::vector< std::pair< size_t, std::string > > &stateMap, boost::function< void(const base::commands::Joints &status)> writeStatusCallback, base::Time statusInterval)
 
 ~StateAggregator ()
 
void setNewStatus (size_t stateId, const base::Time stateTime, const base::JointState &state)
 
void checkWriteState ()
 
void reset ()
 

Protected Member Functions

const base::commands::Joints & getStatus () const
 

Constructor & Destructor Documentation

◆ StateAggregator()

joint_dispatcher::StateAggregator::StateAggregator ( const std::vector< std::pair< size_t, std::string > > &  stateMap,
boost::function< void(const base::commands::Joints &status)>  writeStatusCallback,
base::Time  statusInterval 
)

◆ ~StateAggregator()

joint_dispatcher::StateAggregator::~StateAggregator ( )
inline

Member Function Documentation

◆ checkWriteState()

void joint_dispatcher::StateAggregator::checkWriteState ( )

Checks if we got a full state and writes it using the writeStatusCallback function. Should be called regulary

◆ getActuatorIds()

const std::vector< size_t > joint_dispatcher::StateAggregator::getActuatorIds ( ) const

◆ getStatus()

const base::commands::Joints& joint_dispatcher::StateAggregator::getStatus ( ) const
inlineprotected

◆ reset()

void joint_dispatcher::StateAggregator::reset ( )

Resets the aggregator state while keeping the id mapping and the names in the state.

◆ setNewStatus()

void joint_dispatcher::StateAggregator::setNewStatus ( size_t  stateId,
const base::Time  stateTime,
const base::JointState &  state 
)

Updates a single status in the aggregator. This function also triggers the write of teh full state.


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