#include <motor.h>
Classes | |
class | Allocator |
Public Member Functions | |
virtual bool | enterModeAndWait (uint16_t mode) |
virtual uint16_t | getMode () |
virtual bool | isModeSupported (uint16_t mode) |
Motor402 (const std::string &name, boost::shared_ptr< ObjectStorage > storage, const canopen::Settings &settings) | |
virtual void | registerDefaultModes (boost::shared_ptr< ObjectStorage > storage) |
template<typename T > | |
bool | registerMode (uint16_t mode) |
template<typename T , typename T1 > | |
bool | registerMode (uint16_t mode, const T1 &t1) |
template<typename T , typename T1 , typename T2 > | |
bool | registerMode (uint16_t mode, const T1 &t1, const T2 &t2) |
virtual bool | setTarget (double val) |
Protected Member Functions | |
virtual void | handleDiag (LayerReport &report) |
virtual void | handleHalt (LayerStatus &status) |
virtual void | handleInit (LayerStatus &status) |
virtual void | handleRead (LayerStatus &status, const LayerState ¤t_state) |
virtual void | handleRecover (LayerStatus &status) |
virtual void | handleShutdown (LayerStatus &status) |
virtual void | handleWrite (LayerStatus &status, const LayerState ¤t_state) |
Private Member Functions | |
boost::shared_ptr< Mode > | allocMode (uint16_t mode) |
template<typename T , typename T1 > | |
void | createAndRegister (uint16_t mode, const T1 &t1) |
template<typename T , typename T1 , typename T2 > | |
void | createAndRegister (uint16_t mode, const T1 &t1, const T2 &t2) |
template<typename T > | |
void | createAndRegister0 (uint16_t mode) |
virtual bool | isModeSupportedByDevice (uint16_t mode) |
bool | readState (LayerStatus &status, const LayerState ¤t_state) |
void | registerMode (uint16_t id, const boost::shared_ptr< Mode > &m) |
bool | switchMode (LayerStatus &status, uint16_t mode) |
bool | switchState (LayerStatus &status, const State402::InternalState &target) |
Private Attributes | |
uint16_t | control_word_ |
canopen::ObjectStorage::Entry < uint16_t > | control_word_entry_ |
boost::mutex | cw_mutex_ |
boost::mutex | map_mutex_ |
boost::unordered_map< uint16_t, boost::function< void()> > | mode_allocators_ |
boost::condition_variable | mode_cond_ |
uint16_t | mode_id_ |
boost::mutex | mode_mutex_ |
boost::unordered_map< uint16_t, boost::shared_ptr< Mode > > | modes_ |
const bool | monitor_mode_ |
canopen::ObjectStorage::Entry < int8_t > | op_mode_ |
canopen::ObjectStorage::Entry < int8_t > | op_mode_display_ |
boost::shared_ptr< Mode > | selected_mode_ |
boost::atomic< bool > | start_fault_reset_ |
State402 | state_handler_ |
boost::atomic< uint16_t > | status_word_ |
canopen::ObjectStorage::Entry < uint16_t > | status_word_entry_ |
canopen::ObjectStorage::Entry < uint32_t > | supported_drive_modes_ |
const State402::InternalState | switching_state_ |
boost::atomic < State402::InternalState > | target_state_ |
canopen::Motor402::Motor402 | ( | const std::string & | name, |
boost::shared_ptr< ObjectStorage > | storage, | ||
const canopen::Settings & | settings | ||
) | [inline] |
boost::shared_ptr< Mode > canopen::Motor402::allocMode | ( | uint16_t | mode | ) | [private] |
void canopen::Motor402::createAndRegister | ( | uint16_t | mode, |
const T1 & | t1 | ||
) | [inline, private] |
void canopen::Motor402::createAndRegister | ( | uint16_t | mode, |
const T1 & | t1, | ||
const T2 & | t2 | ||
) | [inline, private] |
void canopen::Motor402::createAndRegister0 | ( | uint16_t | mode | ) | [inline, private] |
bool canopen::Motor402::enterModeAndWait | ( | uint16_t | mode | ) | [virtual] |
Implements canopen::MotorBase.
uint16_t canopen::Motor402::getMode | ( | ) | [virtual] |
Implements canopen::MotorBase.
void canopen::Motor402::handleDiag | ( | LayerReport & | report | ) | [protected, virtual] |
Implements canopen::Layer.
void canopen::Motor402::handleHalt | ( | LayerStatus & | status | ) | [protected, virtual] |
Implements canopen::Layer.
void canopen::Motor402::handleInit | ( | LayerStatus & | status | ) | [protected, virtual] |
Implements canopen::Layer.
void canopen::Motor402::handleRead | ( | LayerStatus & | status, |
const LayerState & | current_state | ||
) | [protected, virtual] |
Implements canopen::Layer.
void canopen::Motor402::handleRecover | ( | LayerStatus & | status | ) | [protected, virtual] |
Implements canopen::Layer.
void canopen::Motor402::handleShutdown | ( | LayerStatus & | status | ) | [protected, virtual] |
Implements canopen::Layer.
void canopen::Motor402::handleWrite | ( | LayerStatus & | status, |
const LayerState & | current_state | ||
) | [protected, virtual] |
Implements canopen::Layer.
bool canopen::Motor402::isModeSupported | ( | uint16_t | mode | ) | [virtual] |
Implements canopen::MotorBase.
bool canopen::Motor402::isModeSupportedByDevice | ( | uint16_t | mode | ) | [private, virtual] |
bool canopen::Motor402::readState | ( | LayerStatus & | status, |
const LayerState & | current_state | ||
) | [private] |
virtual void canopen::Motor402::registerDefaultModes | ( | boost::shared_ptr< ObjectStorage > | storage | ) | [inline, virtual] |
Reimplemented from canopen::MotorBase.
bool canopen::Motor402::registerMode | ( | uint16_t | mode | ) | [inline] |
bool canopen::Motor402::registerMode | ( | uint16_t | mode, |
const T1 & | t1 | ||
) | [inline] |
bool canopen::Motor402::registerMode | ( | uint16_t | mode, |
const T1 & | t1, | ||
const T2 & | t2 | ||
) | [inline] |
void canopen::Motor402::registerMode | ( | uint16_t | id, |
const boost::shared_ptr< Mode > & | m | ||
) | [private] |
bool canopen::Motor402::setTarget | ( | double | val | ) | [virtual] |
Implements canopen::MotorBase.
bool canopen::Motor402::switchMode | ( | LayerStatus & | status, |
uint16_t | mode | ||
) | [private] |
bool canopen::Motor402::switchState | ( | LayerStatus & | status, |
const State402::InternalState & | target | ||
) | [private] |
uint16_t canopen::Motor402::control_word_ [private] |
canopen::ObjectStorage::Entry<uint16_t > canopen::Motor402::control_word_entry_ [private] |
boost::mutex canopen::Motor402::cw_mutex_ [private] |
boost::mutex canopen::Motor402::map_mutex_ [private] |
boost::unordered_map<uint16_t, boost::function<void()> > canopen::Motor402::mode_allocators_ [private] |
boost::condition_variable canopen::Motor402::mode_cond_ [private] |
uint16_t canopen::Motor402::mode_id_ [private] |
boost::mutex canopen::Motor402::mode_mutex_ [private] |
boost::unordered_map<uint16_t, boost::shared_ptr<Mode> > canopen::Motor402::modes_ [private] |
const bool canopen::Motor402::monitor_mode_ [private] |
canopen::ObjectStorage::Entry<int8_t> canopen::Motor402::op_mode_ [private] |
canopen::ObjectStorage::Entry<int8_t> canopen::Motor402::op_mode_display_ [private] |
boost::shared_ptr<Mode> canopen::Motor402::selected_mode_ [private] |
boost::atomic<bool> canopen::Motor402::start_fault_reset_ [private] |
State402 canopen::Motor402::state_handler_ [private] |
boost::atomic<uint16_t> canopen::Motor402::status_word_ [private] |
canopen::ObjectStorage::Entry<uint16_t> canopen::Motor402::status_word_entry_ [private] |
canopen::ObjectStorage::Entry<uint32_t> canopen::Motor402::supported_drive_modes_ [private] |
const State402::InternalState canopen::Motor402::switching_state_ [private] |
boost::atomic<State402::InternalState> canopen::Motor402::target_state_ [private] |