Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
E
evsuits
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
OpsTeam
evsuits
Commits
1f1cb63f
提交
1f1cb63f
authored
9月 11, 2019
作者:
blu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
big refacting of communitation architect
上级
3d6a7e11
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
15 行增加
和
15 行删除
+15
-15
database-sqlite.cpp
opencv-motion-detect/database-sqlite.cpp
+1
-1
database.cpp
opencv-motion-detect/database.cpp
+4
-4
evcloudsvc.cpp
opencv-motion-detect/evcloudsvc.cpp
+3
-3
evdaemon.cpp
opencv-motion-detect/evdaemon.cpp
+6
-6
evmgr.cpp
opencv-motion-detect/evmgr.cpp
+1
-1
没有找到文件。
opencv-motion-detect/database-sqlite.cpp
浏览文件 @
1f1cb63f
...
...
@@ -213,7 +213,7 @@ int saveLocalConfigration(json &config, string fileName)
std
::
ofstream
o
(
fileName
);
o
<<
std
::
setw
(
4
)
<<
config
<<
std
::
endl
;
}
catch
(
exception
&
e
)
{
spdlog
::
error
(
"saveLocalConfigration failed to write configuration to file {}: {}
\n
{}"
,
fileName
,
e
.
what
(),
config
.
dump
(
4
));
spdlog
::
error
(
"saveLocalConfigration failed to write configuration to file {}: {}
\n
{}"
,
fileName
,
e
.
what
(),
config
.
dump
());
return
-
2
;
}
...
...
opencv-motion-detect/database.cpp
浏览文件 @
1f1cb63f
...
...
@@ -138,7 +138,7 @@ namespace LVDB {
ret
=
cb
(
modname
,
m
,
pUser
);
cnt
++
;
if
(
ret
<
0
)
{
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
(
4
));
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
());
return
ret
;
}
}
...
...
@@ -151,7 +151,7 @@ namespace LVDB {
ret
=
cb
(
mn
,
m
,
pUser
);
cnt
++
;
if
(
ret
<
0
)
{
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
(
4
));
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
());
return
ret
;
}
}
...
...
@@ -340,7 +340,7 @@ togo_end:
}
}
ret
=
setValue
(
value
.
dump
(
4
),
key
,
fileName
,
NULL
);
ret
=
setValue
(
value
.
dump
(),
key
,
fileName
,
NULL
);
return
ret
;
}
...
...
@@ -366,7 +366,7 @@ togo_end:
// {"sn":string, "updatetime": string, "lastboot": string}
int
_validateSn
(
const
json
&
info
)
{
if
(
info
.
count
(
"sn"
)
==
0
||
info
[
"sn"
].
size
()
==
0
)
{
spdlog
::
error
(
"invalid sn config:{}"
,
info
.
dump
(
4
));
spdlog
::
error
(
"invalid sn config:{}"
,
info
.
dump
());
return
-
1
;
}
...
...
opencv-motion-detect/evcloudsvc.cpp
浏览文件 @
1f1cb63f
...
...
@@ -80,7 +80,7 @@ private:
json
deltaCfg
=
json
();
if
(
newConfig
.
count
(
"data"
)
==
0
||
newConfig
[
"data"
].
size
()
==
0
)
{
ret
[
"code"
]
=
1
;
ret
[
"msg"
]
=
"evcloudsvc invalid config body received: "
+
newConfig
.
dump
(
4
);
ret
[
"msg"
]
=
"evcloudsvc invalid config body received: "
+
newConfig
.
dump
();
spdlog
::
error
(
ret
[
"msg"
].
get
<
string
>
());
}
else
{
...
...
@@ -153,7 +153,7 @@ private:
this
->
configMap
[
"mod2mgr"
][
modKey
]
=
k
;
}
else
{
string
msg
=
"evcloudsvc invalid config: "
+
data
.
dump
(
4
);;
string
msg
=
"evcloudsvc invalid config: "
+
data
.
dump
();;
ret
[
"code"
]
=
-
1
;
ret
[
"msg"
]
=
msg
;
spdlog
::
error
(
msg
);
...
...
@@ -179,7 +179,7 @@ private:
//save
iret
=
LVDB
::
setLocalConfig
(
v
,
k
);
if
(
iret
<
0
)
{
string
msg
=
"failed to save config "
+
k
+
" -> "
+
v
.
dump
(
4
);
string
msg
=
"failed to save config "
+
k
+
" -> "
+
v
.
dump
();
spdlog
::
error
(
msg
);
ret
[
"code"
]
=
iret
;
ret
[
"msg"
]
=
msg
;
...
...
opencv-motion-detect/evdaemon.cpp
浏览文件 @
1f1cb63f
...
...
@@ -110,7 +110,7 @@ class EvDaemon{
}
// startup other submodules
spdlog
::
info
(
"dump: {}"
,
v
.
dump
(
4
));
spdlog
::
info
(
"dump: {}"
,
v
.
dump
());
json
&
ipcs
=
v
[
"ipcs"
];
for
(
auto
&
ipc
:
ipcs
)
{
json
&
modules
=
ipc
[
"modules"
];
...
...
@@ -222,7 +222,7 @@ class EvDaemon{
json
*
cfg
=
cfgutils
::
findModuleConfig
(
peerId
,
jret
[
"data"
]);
json
diff
=
json
::
diff
(
this
->
config
,
jret
[
"data"
]);
// TODO:
spdlog
::
info
(
"evdaemon {} config diff: {}"
,
devSn
,
diff
.
dump
(
4
));
spdlog
::
info
(
"evdaemon {} config diff: {}"
,
devSn
,
diff
.
dump
());
if
(
cfg
==
NULL
)
{
spdlog
::
error
(
"evdaemon failed to find module {} in config {}"
,
peerId
,
jret
[
"data"
].
dump
());
...
...
@@ -415,7 +415,7 @@ class EvDaemon{
// its configuration message
if
(
meta
==
EV_MSG_META_CONFIG
)
{
if
(
data
.
size
()
==
0
)
{
spdlog
::
error
(
"evdaemon {} received invalid empty config"
);
spdlog
::
error
(
"evdaemon {} received invalid empty config"
,
devSn
);
}
else
{
json
diff
=
json
::
diff
(
this
->
config
,
data
);
if
(
diff
.
size
()
!=
0
)
{
...
...
@@ -424,7 +424,7 @@ class EvDaemon{
spdlog
::
info
(
"evdaemon {} received cloud config diff. origin:
\n
{}
\n
new
\n
{}"
,
devSn
,
this
->
config
.
dump
(),
data
.
dump
());
// TODO: detailed diff on submodules
}
else
{
spdlog
::
info
(
"evdaemon {} received same configuration and ignored: {}"
,
data
.
dump
());
spdlog
::
info
(
"evdaemon {} received same configuration and ignored: {}"
,
d
evSn
,
d
ata
.
dump
());
}
}
}
...
...
@@ -486,7 +486,7 @@ class EvDaemon{
newConfig
[
"data"
]
=
json
::
parse
(
req
.
body
)[
"data"
];
LVDB
::
setLocalConfig
(
newConfig
);
spdlog
::
info
(
"evmgr new config: {}"
,
newConfig
.
dump
(
4
));
spdlog
::
info
(
"evmgr new config: {}"
,
newConfig
.
dump
());
// TODO: restart other components
//
}
catch
(
exception
&
e
)
{
...
...
@@ -529,7 +529,7 @@ class EvDaemon{
exit
(
1
);
}
spdlog
::
info
(
"evdaemon boot
\n
{}"
,
info
.
dump
(
4
));
spdlog
::
info
(
"evdaemon boot
\n
{}"
,
info
.
dump
());
devSn
=
info
[
"sn"
];
...
...
opencv-motion-detect/evmgr.cpp
浏览文件 @
1f1cb63f
...
...
@@ -70,7 +70,7 @@ private:
//
if
(
config
[
"addr"
].
get
<
string
>
()
==
"*"
||
config
[
"addr"
].
get
<
string
>
()
==
"0.0.0.0"
)
{
spdlog
::
error
(
"invalid mgr address: {} in config:
\n
{}"
,
config
[
"addr"
].
get
<
string
>
(),
config
.
dump
(
4
));
spdlog
::
error
(
"invalid mgr address: {} in config:
\n
{}"
,
config
[
"addr"
].
get
<
string
>
(),
config
.
dump
());
goto
error_exit
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论