00001 #ifndef SOCKET_CAN_CONTROLLER_HPP
00002 #define SOCKET_CAN_CONTROLLER_HPP
00003
00004 #include <rtt/NonPeriodicActivity.hpp>
00005 #include "CANControllerInterface.hpp"
00006 #include "CANBusInterface.hpp"
00007 #include "CANMessage.hpp"
00008
00009 struct SocketCANControllerPrivate;
00010
00011 namespace RTT
00012 {
00013 namespace CAN
00014 {
00021 class SocketCANController: public CANControllerInterface,
00022 public NonPeriodicActivity
00023 {
00024 public:
00032 SocketCANController(int priority, std::string dev_name,
00033 int timeout);
00034
00035 virtual ~SocketCANController();
00036
00037
00038 bool initialize();
00039 void loop();
00040 bool breakLoop();
00041 void finalize();
00042
00043
00044 virtual void addBus(CANBusInterface* bus);
00045 virtual void process(const CANMessage* msg);
00046 bool readFromBuffer(void);
00047
00048 private:
00049 SocketCANControllerPrivate * const d;
00050
00051 };
00052 }
00053 }
00054 #endif