yarp-devices
Loading...
Searching...
No Matches
roboticslab::NmtProtocol Class Referencefinal

Representation of NMT protocol.

#include <NmtProtocol.hpp>

Public Member Functions

 NmtProtocol (std::uint8_t id, ICanSenderDelegate *sender=nullptr)
 Constructor, registers CAN sender handle.
void configureSender (ICanSenderDelegate *sender)
 Configure CAN sender delegate handle.
bool issueServiceCommand (NmtService command)
 Send NMT service indication.
bool accept (const std::uint8_t *data)
 Invoke callback on parsed CAN message data.
template<typename Fn>
void registerHandler (Fn &&fn)
 Register callback.
void unregisterHandler ()
 Unregister callback.

Static Public Attributes

static constexpr std::uint8_t BROADCAST = 0
 Broadcast CAN ID.

Private Types

using HandlerFn = std::function<void(NmtState)>

Private Attributes

std::uint8_t id
ICanSenderDelegate * sender
HandlerFn callback

The documentation for this class was generated from the following files:
  • libraries/CanOpenNodeLib/NmtProtocol.hpp
  • libraries/CanOpenNodeLib/NmtProtocol.cpp