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