Rev 1315 | Rev 1319 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1315 | Rev 1317 | ||
|---|---|---|---|
| Line 9... | Line 9... | ||
| 9 | #define CANNET_H_ |
9 | #define CANNET_H_ |
| 10 | 10 | ||
| 11 | #include <boost/make_shared.hpp> |
11 | #include <boost/make_shared.hpp> |
| 12 | #include <boost/bind.hpp> |
12 | #include <boost/bind.hpp> |
| 13 | #include <boost/signal.hpp> |
13 | #include <boost/signal.hpp> |
| - | 14 | #include <boost/asio.hpp> |
|
| 14 | #include <string> |
15 | #include <string> |
| 15 | #include "broker/Subscriber.h" |
16 | #include "broker/Subscriber.h" |
| 16 | #include "broker/Broker.h" |
17 | #include "broker/Broker.h" |
| 17 | #include "message/Message.h" |
18 | #include "message/Message.h" |
| 18 | #include "message/Header.h" |
19 | #include "message/Header.h" |
| 19 | #include "utils/BitBuffer.h" |
20 | #include "utils/BitBuffer.h" |
| 20 | #include " |
21 | #include "net/UdpServer.h" |
| 21 | #include "log/Logger.h" |
22 | #include "log/Logger.h" |
| 22 | #include "utils/convert.h" |
23 | #include "utils/convert.h" |
| 23 | #include "types.h" |
24 | #include "types.h" |
| 24 | 25 | ||
| 25 | namespace atom { |
26 | namespace atom { |
| Line 27... | Line 28... | ||
| 27 | 28 | ||
| 28 | using namespace broker; |
29 | using namespace broker; |
| 29 | using namespace utils; |
30 | using namespace utils; |
| 30 | using namespace message; |
31 | using namespace message; |
| 31 | using namespace std; |
32 | using namespace std; |
| - | 33 | using boost::asio::ip::udp; |
|
| 32 | 34 | ||
| 33 | // public boost::signals::trackable, |
35 | // public boost::signals::trackable, |
| 34 | class CanNet : public Subscriber |
36 | class CanNet : public Subscriber |
| 35 | { |
37 | { |
| 36 | public: |
38 | public: |
| Line 50... | Line 52... | ||
| 50 | enum |
52 | enum |
| 51 | { |
53 | { |
| 52 | PACKET_START = 253, PACKET_END = 250, PACKET_PING = 251 |
54 | PACKET_START = 253, PACKET_END = 250, PACKET_PING = 251 |
| 53 | }; |
55 | }; |
| 54 | 56 | ||
| 55 | UdpServer::pointer myUdpServer; |
57 | net::UdpServer::pointer myUdpServer; |
| 56 | udp::endpoint myEndpoint; |
58 | udp::endpoint myEndpoint; |
| 57 | // TODO Add mutex lock for access to the buffer or are we safe? |
59 | // TODO Add mutex lock for access to the buffer or are we safe? |
| 58 | byte_list myBuffer; |
60 | byte_list myBuffer; |
| 59 | 61 | ||
| 60 | private: |
62 | private: |