CARMA C++
RemoteCanMaster.h
1 #ifndef REMOTECANMASTER_H
2 #define REMOTECANMASTER_H
3 
5 #include "carma/canbus/InetCan.h"
6 
7 namespace sza {
8 namespace antenna {
9 namespace canbus {
10 
11 class RemoteCanMaster : public sza::antenna::canbus::CanMaster {
12 public:
13 
18  RemoteCanMaster(std::string hostname);
19 
20  ~RemoteCanMaster();
21 
22  // Here's the trick: overload getMessage and postMessage to use
23  // InetCan (CanOverIp client) instead of CanDio but still use
24  // CanDio in emulation mode! This allows for the base master to
25  // still act on CanDio when it needs to while stubbing out the
26  // actual communication to occur over the network.
27 
32  void postMessage(
33  const carma::canbus::Message& msg,
34  carma::canbus::txPriorityType prio = carma::canbus::NORMAL);
35 
39  carma::canbus::Message getMessage();
40 
41 private:
42 
43  carma::canbus::InetCan remoteIo_;
44 }; // End class RemoteCanMaster
45 }}} // End namespace sza::antenna::canbus
46 #endif
InetCan class.
Definition: InetCan.h:22
Class to encapsulate a CAN message.
Definition: Message.h:21
Started: Fri Nov 21 16:20:41 UTC 2003.
Declaration of carma::canbus::InetCan class.
txPriorityType
CAN Tx priority type.
Definition: Types.h:194