Go to the documentation of this file.
10 template<
typename T > std::string
join(
const T &container,
const std::string &delim){
11 if(container.empty())
return std::string();
12 std::stringstream sstr;
13 typename T::const_iterator it = container.begin();
15 for(++it; it != container.end(); ++it){
47 boost::mutex::scoped_lock lock(
mutex_);
52 uint8_t
id = frame.
data[1];
79 if(current_state >
Init){
83 if(current_state >
Init){
87 boost::mutex::scoped_lock lock(
mutex_);
96 boost::mutex::scoped_lock lock(
mutex_);
100 status.
error(
"BCM_init failed");
103 int sc =
driver_->getInternalSocket();
105 struct can_filter filter[2];
107 filter[0].can_id =
NMT_ID;
108 filter[0].can_mask = CAN_SFF_MASK;
112 if(setsockopt(sc, SOL_CAN_RAW, CAN_RAW_FILTER, &filter,
sizeof(filter)) < 0){
113 status.
warn(
"could not set filter");
120 boost::mutex::scoped_lock lock(
mutex_);
126 boost::mutex::scoped_lock lock(
mutex_);
150 for(
int i = 0; i < sync_properties.
overflow_; ++i){
std::string join(const T &container, const std::string &delim)
bool startTX(DurationType period, Header header, size_t num, Frame *frames)
virtual void handleShutdown(LayerStatus &status)
const void error(const std::string &r)
void add(const std::string &key, const T &value)
const void warn(const std::string &r)
BCMsync(const std::string &device, can::SocketCANDriverSharedPtr driver, const SyncProperties &sync_properties)
std::vector< can::Frame > sync_frames_
virtual void handleInit(LayerStatus &status)
bool init(const std::string &device)
std::shared_ptr< SocketCANDriver > SocketCANDriverSharedPtr
virtual void handleDiag(LayerReport &report)
void setMonitored(const T &other)
void handleFrame(const can::Frame &frame)
void setIgnored(const T &other)
can::FrameListenerConstSharedPtr handler_
static const uint32_t NMT_ID
std::array< value_type, 8 > data
static const uint32_t ALL_NODES_MASK
std::set< int > ignored_nodes_
virtual void handleWrite(LayerStatus &status, const LayerState ¤t_state)
bool skipNode(uint8_t id)
virtual void handleHalt(LayerStatus &status)
std::set< int > monitored_nodes_
std::set< int > started_nodes_
bool stopTX(Header header)
const can::Header header_
can::SocketCANDriverSharedPtr driver_
virtual void handleRead(LayerStatus &status, const LayerState ¤t_state)
static const uint32_t HEARTBEAT_ID
CommInterface::FrameListenerConstSharedPtr FrameListenerConstSharedPtr
std::set< int > known_nodes_
virtual void handleRecover(LayerStatus &status)
canopen_master
Author(s): Mathias Lüdtke
autogenerated on Wed Mar 2 2022 00:52:26