28 #include <boost/shared_ptr.hpp> 33 namespace canopen_schunk {
92 static void addEmergencyErrorMap(
const std::string& filename,
const std::string& block_identifier);
100 static void addErrorRegisterMap(
const std::string& filename,
const std::string& block_identifier);
static std::string lookupEECString(const uint16_t error_code)
void printLastErrors(SDO &sdo)
Print all errors present in error register 0x1003.
eEMCY_STATUS m_error_state
static void addEmergencyErrorMap(const std::string &filename, const std::string &block_identifier)
Adds new information from an ini file to the emergency error map.
void clearErrorHistory(SDO &sdo)
Clear the error register 0x1003.
virtual void update(const CanMsg &msg)
update Updates the EMCY object with a received EMCY Message
uint16_t m_eec
emergency_error_code;
eEMCY_STATUS getEmcyStatus() const
Returns the state of the EMCY state machine.
static std::map< uint16_t, std::string > m_eec_map
bool getErrorInformation(uint16_t &eec, uint8_t &error_register, std::vector< uint8_t > &msef)
Returns the full error information.
The EMCY class handles the spontaneously occurring Emergency (EMCY) messages, keeps track of a nodes ...
void printError(SDO &sdo, const uint8_t error_nr=1)
Prints a specific error from the error register 0x1003.
EMCY(const uint8_t node_id)
EMCY Constructs a new EMCY object. The error map will be filled separately.
static const uint16_t EMCY_ERROR_RESET_NO_ERROR
static std::string lookupErrorRegisterString(const uint8_t error_code)
static std::map< uint8_t, std::string > m_error_register_map
eEMCY_STATUS
DS301 requests state error_free and error_occurred. This could be mapped into a bool, but maybe some other implementation needs more states, so we use an enum.
boost::shared_ptr< const EMCY > ConstPtr
The SDO class represents Service Data Objects (SDO) that are used for slow access of the canOpen obje...
boost::shared_ptr< EMCY > Ptr
uint8_t m_error_register
register in which the error occured
boost::mutex m_data_buffer_mutex
std::vector< uint8_t > m_msef
manufacturer-specific error code
static void addErrorRegisterMap(const std::string &filename, const std::string &block_identifier)
Adds new information from an ini file to the error_register map.
virtual std::string lookupMSEFString() const