yarp-devices
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
roboticslab::EmcyConsumer Class Referencefinal

Representation of CAN EMCY protocol.

#include <EmcyConsumer.hpp>

Public Types

using code_t = std::pair< std::uint16_t, std::string >
 Emergency error code.
 

Public Member Functions

 EmcyConsumer ()
 Constructor.
 
 ~EmcyConsumer ()
 Destructor.
 
bool accept (const std::uint8_t *data)
 Invoke callback on parsed CAN message data.
 
template<typename T >
void setErrorCodeRegistry ()
 Instantiate a non-default EMCY message parser.
 
template<typename Fn >
void registerHandler (Fn &&fn)
 Register callback.
 
void unregisterHandler ()
 Unregister callback.
 

Private Types

using HandlerFn = std::function< void(code_t, std::uint8_t, const std::uint8_t *)>
 

Private Attributes

HandlerFn callback
 
EmcyCodeRegistrycodeRegistry
 

The documentation for this class was generated from the following files: