Пример #1
0
 virtual void handleRxFrame(const uavcan::CanRxFrame& frame, uavcan::CanIOFlags flags)
 {
     std::cout << "RX frame [flags=" << flags << "]: " << frame.toString() << std::endl;
     if ((flags & uavcan::CanIOFlagLoopback) == 0)
     {
         rx_frames.push_back(frame);
     }
 }
Пример #2
0
 /**
  * This handler will be invoked by the main node thread.
  */
 void handleRxFrame(const uavcan::CanRxFrame& frame, uavcan::CanIOFlags flags) override
 {
     UAVCAN_TRACE("VirtualCanDriver", "RX [flags=%u]: %s", unsigned(flags), frame.toString().c_str());
     if (frame.iface_index < num_ifaces_)
     {
         ifaces_[frame.iface_index]->addRxFrame(frame, flags);
         event_.signal();
     }
     else
     {
         assert(false);
     }
 }