Rev 1595 | Rev 1598 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1595 | Rev 1596 | ||
|---|---|---|---|
| Line 26... | Line 26... | ||
| 26 | #include <boost/shared_ptr.hpp> |
26 | #include <boost/shared_ptr.hpp> |
| 27 | 27 | ||
| 28 | #include "logging/Logger.h" |
28 | #include "logging/Logger.h" |
| 29 | #include "broker/Subscriber.h" |
29 | #include "broker/Subscriber.h" |
| 30 | #include "net/types.h" |
30 | #include "net/types.h" |
| - | 31 | #include "type/Byteset.h" |
|
| - | 32 | #include "timer/Manager.h" |
|
| 31 | 33 | ||
| 32 | namespace atom { |
34 | namespace atom { |
| 33 | namespace can { |
35 | namespace can { |
| 34 | 36 | ||
| 35 | class Network : public broker::Subscriber |
37 | class Network : public broker::Subscriber |
| Line 43... | Line 45... | ||
| 43 | private: |
45 | private: |
| 44 | net::ClientId client_id_; |
46 | net::ClientId client_id_; |
| 45 | net::Protocol protocol_; |
47 | net::Protocol protocol_; |
| 46 | std::string address_; |
48 | std::string address_; |
| 47 | unsigned int port_or_baud_; |
49 | unsigned int port_or_baud_; |
| - | 50 | type::Byteset buffer_; |
|
| - | 51 | timer::TimerId timer_id_; |
|
| 48 | 52 | ||
| 49 | void SlotOnMessageHandler(broker::Message::Pointer message); |
53 | void SlotOnMessageHandler(broker::Message::Pointer message); |
| 50 | 54 | ||
| 51 | void SlotOnNewState(net::ClientId client_id, net::ServerId server_id, net::ClientState client_state); |
55 | void SlotOnNewState(net::ClientId client_id, net::ServerId server_id, net::ClientState client_state); |
| 52 | void SlotOnNewData(net::ClientId client_id, net::ServerId server_id, |
56 | void SlotOnNewData(net::ClientId client_id, net::ServerId server_id, type::Byteset data); |
| - | 57 | void SlotOnTimeout(timer::TimerId timer_id); |
|
| 53 | 58 | ||
| 54 | void SlotOnNewStateHandler(net::ClientId client_id, net::ServerId server_id, net::ClientState client_state); |
59 | void SlotOnNewStateHandler(net::ClientId client_id, net::ServerId server_id, net::ClientState client_state); |
| 55 | void SlotOnNewDataHandler(net::ClientId client_id, net::ServerId server_id, |
60 | void SlotOnNewDataHandler(net::ClientId client_id, net::ServerId server_id, type::Byteset data); |
| - | 61 | void SlotOnTimeoutHandler(timer::TimerId timer_id); |
|
| - | 62 | ||
| - | 63 | void ProcessBuffer(); |
|
| 56 | 64 | ||
| 57 | logging::Logger LOG; |
65 | logging::Logger LOG; |
| 58 | }; |
66 | }; |
| 59 | 67 | ||
| 60 | }; // namespace can |
68 | }; // namespace can |