platform_linux.cpp
Go to the documentation of this file.
1 
7 
9  static uavcan_linux::SystemClock clock;
10  return clock;
11 }
12 
14  static uavcan_linux::SocketCanDriver driver(dynamic_cast<const uavcan_linux::SystemClock&>(getSystemClock()));
15  if (driver.getNumIfaces() == 0) {
16  if (driver.addIface("slcan0") < 0) {
17  throw std::runtime_error("Failed to add iface");
18  }
19  }
20  return driver;
21 }
std::uint8_t getNumIfaces() const override
Definition: socketcan.hpp:757
uavcan::ISystemClock & getSystemClock()
int addIface(const std::string &iface_name)
Definition: socketcan.hpp:765
uavcan::ICanDriver & getCanDriver()


uavcan_communicator
Author(s):
autogenerated on Wed Jan 11 2023 03:59:39