| | |
| | | static std::unique_ptr<TopicNode> ptr; |
| | | if (!ptr && GlobalInit(BHomeShm())) { |
| | | auto InitLog = []() { |
| | | auto id = GetProcExe(); |
| | | char path[200] = {0}; |
| | | sprintf(path, "/opt/vasystem/valog/bhshmq_node_%s.log", id.c_str()); |
| | | ns_log::AddLog(path); |
| | | ns_log::AddLog(BHLogDir() + "bhshmq_node_" + GetProcExe() + ".log"); |
| | | return true; |
| | | }; |
| | | static bool init_log = InitLog(); |
| | |
| | | remote, remote_len, topic, topic_len, reply, reply_len, timeout_ms); |
| | | } |
| | | |
| | | int BHQueryProcs(const void *remote, |
| | | const int remote_len, |
| | | const void *query, |
| | | const int query_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms) |
| | | { |
| | | return BHApi_In2_Out1<BHAddress, MsgQueryProc, MsgQueryProcReply>( |
| | | &TopicNode::QueryProcs, |
| | | remote, remote_len, query, query_len, reply, reply_len, timeout_ms); |
| | | } |
| | | |
| | | int BHSubscribeTopics(const void *topics, const int topics_len, void **reply, int *reply_len, const int timeout_ms) |
| | | { |
| | | return BHApi_In1_Out1<MsgTopicList>(&TopicNode::Subscribe, topics, topics_len, reply, reply_len, timeout_ms); |