| | |
| | | #define TOPIC_NODE_YVKWA6TF |
| | | |
| | | #include "msg.h" |
| | | #include "socket.h" |
| | | #include "shm_socket.h" |
| | | #include <atomic> |
| | | #include <memory> |
| | | #include <mutex> |
| | |
| | | SharedMemory &shm_; |
| | | ProcInfo info_; |
| | | |
| | | SharedMemory &shm() { return shm_; } |
| | | SharedMemory &shm() const { return shm_; } |
| | | const MQInfo &CenterAddr() const { return BHTopicCenterAddress(shm()); } |
| | | const MQInfo &BusAddr() const { return BHTopicBusAddress(shm()); } |
| | | |
| | | public: |
| | | TopicNode(SharedMemory &shm); |
| | | ~TopicNode(); |
| | | |
| | | // topic node |
| | | bool Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms); |
| | | bool Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms) { return UniRegister(false, proc, reply_body, timeout_ms); } |
| | | bool UniRegister(const bool internal, ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms); |
| | | bool Unregister(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms); |
| | | bool Heartbeat(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms); |
| | | bool Heartbeat(const int timeout_ms); |