71 bool start(
const std::string busname,
const std::string& baudrate);
81 bool start(
const std::string busname,
const unsigned baudrate);
100 static const bool debug =
false;
102 std::vector<std::unique_ptr<Device>> m_devices;
103 std::bitset<265> m_device_alive;
106 bool m_running{
false};
108 void device_alive_callback(
const uint8_t node_id);
Device & get_device(size_t index) const
Returns a reference to a slave device object.
size_t num_devices() const
Returns the number of slave devices in the network.
void stop()
Stops master and core.
bool start(const std::string busname, const std::string &baudrate)
Starts master and creates Core.
Master()
Constructor. Creates Core instance and adds NMT listener for new devices.
This class implements the Core of KaCanOpen It communicates with the CAN driver, sends CAN messages a...
This class represents a master node. It listens for new slaves and provides access to them via get_sl...
This class represents a CanOpen slave device in the network.
std::function< void(const uint8_t node_id) > DeviceAliveCallback
Type of a device alive callback function Important: Never call register_device_alive_callback() from ...