yarp-devices
SdoReplier.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __SDO_REPLIER_HPP__
4 #define __SDO_REPLIER_HPP__
5 
6 #include <yarp/os/PortReader.h>
7 
8 #include "ICanMessageNotifier.hpp"
9 #include "ICanSenderDelegate.hpp"
10 
11 namespace roboticslab
12 {
13 
23 class SdoReplier final : public yarp::os::PortReader,
24  public ICanMessageNotifier
25 {
26 public:
28  SdoReplier();
29 
31  ~SdoReplier() override;
32 
34  bool read(yarp::os::ConnectionReader & reader) override;
35 
37  bool notifyMessage(const can_message & msg) override;
38 
41  { this->sender = sender; }
42 
43 private:
44  ICanSenderDelegate * sender;
45 
46  class Private;
47  Private * priv;
48 };
49 
50 } // namespace roboticslab
51 
52 #endif // __SDO_REPLIER_HPP__
Implementation-agnostic consumer for RX CAN transfers.
Definition: ICanMessageNotifier.hpp:22
Implementation-agnostic consumer for TX CAN transfers.
Definition: ICanSenderDelegate.hpp:22
RPC replier for remote SDO transfers.
Definition: SdoReplier.hpp:25
bool read(yarp::os::ConnectionReader &reader) override
Read this object from the network.
Definition: SdoReplier.cpp:150
~SdoReplier() override
Destructor.
Definition: SdoReplier.cpp:143
bool notifyMessage(const can_message &msg) override
Tell observers a new CAN message has arrived.
Definition: SdoReplier.cpp:335
void configureSender(ICanSenderDelegate *sender)
Configure CAN sender handle.
Definition: SdoReplier.hpp:40
SdoReplier()
Constructor.
Definition: SdoReplier.cpp:136
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6
Proxy CAN message structure.
Definition: CanMessage.hpp:20