Go to the documentation of this file.
15 *(uint32_t*)
this = val;
20 const uint32_t
get()
const {
return *(uint32_t*)
this; }
27 *(uint32_t*)
this = val;
34 uint8_t manufacturer_specific_error_field[5];
69 if(current_state ==
Ready){
71 status.
error(
"Node has emergency error");
80 uint8_t error_register = 0;
82 report.
error(
"Could not read error error_register");
87 if(error_register & 1){
88 report.
error(
"Node has emergency error");
89 }
else if(error_register & ~32){
90 report.
warn(
"Error register is not zero");
92 report.
add(
"error_register", (uint32_t) error_register);
95 std::stringstream buf;
96 for(
size_t i = 0; i < num; ++i) {
106 catch (
const std::out_of_range & e){
107 buf <<
"NOT_IN_DICT!";
110 buf <<
"LIST_UNDERFLOW!";
115 report.
add(
"errors", buf.str());
120 uint8_t error_register = 0;
122 status.
error(
"Could not read error error_register");
124 }
else if(error_register & 1){
125 ROSCANOPEN_ERROR(
"canopen_master",
"error register: " <<
int(error_register));
126 status.
error(
"Node has emergency error");
virtual void handleDiag(LayerReport &report)
const uint32_t get() const
virtual void handleInit(LayerStatus &status)
Frame(const can::Frame &f)
void resetErrors(LayerStatus &status)
const void error(const std::string &r)
const ObjectStorageSharedPtr storage_
void add(const std::string &key, const T &value)
const void warn(const std::string &r)
virtual void handleShutdown(LayerStatus &status)
std::shared_ptr< CommInterface > CommInterfaceSharedPtr
virtual void handleRead(LayerStatus &status, const LayerState ¤t_state)
ObjectStorage::Entry< uint8_t > error_register_
#define ROSCANOPEN_ERROR(name, args)
virtual void handleHalt(LayerStatus &status)
EMCYHandler(const can::CommInterfaceSharedPtr interface, const ObjectStorageSharedPtr storage)
ObjectStorage::Entry< uint8_t > num_errors_
virtual void handleWrite(LayerStatus &status, const LayerState ¤t_state)
std::atomic< bool > has_error_
can::FrameListenerConstSharedPtr emcy_listener_
virtual void handleRecover(LayerStatus &status)
void handleEMCY(const can::Frame &msg)
ObjectStorage::ObjectStorageSharedPtr ObjectStorageSharedPtr
canopen_master
Author(s): Mathias Lüdtke
autogenerated on Wed Mar 2 2022 00:52:26