Go to the documentation of this file.
19 boost::mutex::scoped_lock lock(
mutex_);
33 if(current_state >
Init){
34 if(!
driver_->getState().isReady()) status.
error(
"CAN not ready");
38 if(current_state >
Init){
39 if(!
driver_->getState().isReady()) status.
error(
"CAN not ready");
46 report.
error(
"CAN layer not ready");
56 std::stringstream sstr;
59 boost::mutex::scoped_lock lock(
mutex_);
64 report.
add(
"can_error_frame", sstr.str());
72 status.
warn(
"CAN thread already running");
74 status.
error(
"CAN init failed");
82 status.
error(
"CAN init timed out");
85 if(!
driver_->getState().isReady()){
86 status.
error(
"CAN is not ready");
94 status.
warn(
"CAN shutdown timed out");
106 if(!
driver_->getState().isReady()){
virtual void handleWrite(LayerStatus &status, const LayerState ¤t_state)
CANLayer(const can::DriverInterfaceSharedPtr &driver, const std::string &device, bool loopback)
const void error(const std::string &r)
virtual void handleHalt(LayerStatus &status)
void add(const std::string &key, const T &value)
const void warn(const std::string &r)
virtual void handleShutdown(LayerStatus &status)
can::SettingsConstSharedPtr settings_
std::shared_ptr< DriverInterface > DriverInterfaceSharedPtr
#define ROSCANOPEN_ERROR(name, args)
virtual void handleRecover(LayerStatus &status)
boost::system::error_code error_code
can::DriverInterfaceSharedPtr driver_
std::array< value_type, 8 > data
const std::string device_
std::shared_ptr< const Settings > SettingsConstSharedPtr
void handleFrame(const can::Frame &msg)
can::FrameListenerConstSharedPtr error_listener_
virtual bool isReady() const
virtual void handleDiag(LayerReport &report)
bool wait(const can::State::DriverState &s, const DurationType &duration)
CommInterface::FrameListenerConstSharedPtr FrameListenerConstSharedPtr
virtual void handleRead(LayerStatus &status, const LayerState ¤t_state)
std::shared_ptr< boost::thread > thread_
enum can::State::DriverState driver_state
CANLayer(const can::DriverInterfaceSharedPtr &driver, const std::string &device, bool loopback, can::SettingsConstSharedPtr settings)
virtual void handleInit(LayerStatus &status)
unsigned int internal_error
canopen_master
Author(s): Mathias Lüdtke
autogenerated on Wed Mar 2 2022 00:52:26