| | |
| | | #ifndef DEFS_KP8LKGD0 |
| | | #define DEFS_KP8LKGD0 |
| | | |
| | | #include <boost/uuid/uuid.hpp> |
| | | #include <boost/uuid/uuid_generators.hpp> |
| | | #include <string> |
| | | |
| | | typedef boost::uuids::uuid MQId; |
| | | typedef uint64_t MQId; |
| | | |
| | | const MQId kBusQueueId = boost::uuids::string_generator()("01234567-89ab-cdef-8349-1234567890ff"); |
| | | const MQId kBHNodeInit = 10; |
| | | const MQId kBHTopicCenter = 100; |
| | | const MQId kBHTopicBus = 101; |
| | | const MQId kBHUniCenter = 102; |
| | | inline const MQId BHInitAddress() { return kBHNodeInit; } |
| | | inline const MQId BHTopicCenterAddress() { return kBHTopicCenter; } |
| | | inline const MQId BHTopicBusAddress() { return kBHTopicBus; } |
| | | inline const MQId BHUniCenterAddress() { return kBHUniCenter; } |
| | | |
| | | const int kBHCenterPort = 24287; |
| | | const char kTopicSep = '.'; |
| | | namespace bhome_shm |
| | | { |
| | | class SharedMemory; |
| | | } // namespace bhome_shm |
| | | |
| | | std::string BHomeShmName(); |
| | | bhome_shm::SharedMemory &BHomeShm(); |
| | | bool GlobalInit(bhome_shm::SharedMemory &shm); |
| | | typedef std::string Topic; |
| | | void SetLastError(const int ec, const std::string &msg); |
| | | void GetLastError(int &ec, std::string &msg); |
| | | //TODO center can check shm for previous crash. |
| | | |
| | | #endif // end of include guard: DEFS_KP8LKGD0 |