提交 f5e395eb authored 作者: blu's avatar blu

init

上级 343c59d1
......@@ -72,6 +72,7 @@ private:
spdlog::error("failed to get local configuration");
exit(1);
}
// set all module status to 0
ret = LVDB::traverseConfigureModules(config, [](string modname, json &m)->int{
if(m.count("status") != 0)
......
......@@ -539,7 +539,7 @@ protected:
zmq_msg_t msg;
AVPacket packet;
//event thread
//event relay thread: motion to slicer
thEvent = thread([&,this]() {
json meta;
meta["type"] = EV_MSG_META_EVENT;
......
......@@ -68,12 +68,16 @@ private:
try {
// rep framectx
// TODO: verify sender id
auto meta = json::parse(body2str(v[1]));
string sMeta = body2str(v[1]);
string peerId = body2str(v[0]);
auto meta = json::parse(sMeta);
if(meta["type"].get<string>() == EV_MSG_META_AVFORMATCTX) {
vector<vector<uint8_t> > rep = {v[0], v[1], msgBody};
ret = z_send_multiple(pDealer, rep);
if(ret < 0) {
spdlog::error("evpuller {} failed send rep to requester {}: {}", selfId, body2str(v[0]), zmq_strerror(zmq_errno()));
spdlog::error("evpuller {} failed to send avformatctx data to requester {}: {}", selfId, peerId, zmq_strerror(zmq_errno()));
}else{
spdlog::info("evpuller {} success to send avformatctx data to requester {}", selfId, peerId);
}
}
else if(meta["type"].get<string>() == EV_MSG_META_EVENT) {
......@@ -115,7 +119,7 @@ protected:
break;
}
spdlog::info("evpuller repSrv {} {} waiting for req", devSn, iid);
spdlog::info("evpuller {} waiting for req", selfId);
// proto: [sender_id] [meta] [body]
auto v = z_recv_multiple(pDealer, false);
if(v.size() != 3) {
......
......@@ -372,6 +372,7 @@ json registry(const char *sn, const json &config)
// find local info in db
// request cloud info
// moc
return json();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论