Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
E
evsuits
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
OpsTeam
evsuits
Commits
ac05ab42
提交
ac05ab42
authored
9月 17, 2019
作者:
blu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
big refacting of communitation architect
上级
1455e1eb
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
8 行增加
和
8 行删除
+8
-8
evdaemon.cpp
opencv-motion-detect/evdaemon.cpp
+2
-2
evmgr.cpp
opencv-motion-detect/evmgr.cpp
+1
-1
evmlmotion.cpp
opencv-motion-detect/evmlmotion.cpp
+1
-1
evpuller.cpp
opencv-motion-detect/evpuller.cpp
+1
-1
evpusher.cpp
opencv-motion-detect/evpusher.cpp
+1
-1
evslicer.cpp
opencv-motion-detect/evslicer.cpp
+2
-2
没有找到文件。
opencv-motion-detect/evdaemon.cpp
浏览文件 @
ac05ab42
...
@@ -99,7 +99,6 @@ private:
...
@@ -99,7 +99,6 @@ private:
pid_t
pid
;
pid_t
pid
;
for
(
auto
&
[
k
,
v
]
:
data
.
items
())
{
for
(
auto
&
[
k
,
v
]
:
data
.
items
())
{
if
(
k
==
this
->
devSn
)
{
if
(
k
==
this
->
devSn
)
{
// startup evmgr
peerId
=
v
[
"sn"
].
get
<
string
>
()
+
":evmgr:0"
;
peerId
=
v
[
"sn"
].
get
<
string
>
()
+
":evmgr:0"
;
this
->
peerData
[
"config"
][
peerId
]
=
v
;
this
->
peerData
[
"config"
][
peerId
]
=
v
;
if
(
this
->
peerData
[
"status"
].
count
(
peerId
)
==
0
)
{
if
(
this
->
peerData
[
"status"
].
count
(
peerId
)
==
0
)
{
...
@@ -107,6 +106,7 @@ private:
...
@@ -107,6 +106,7 @@ private:
}
else
{
}
else
{
// nop
// nop
}
}
this
->
peerData
[
"enabled"
][
peerId
]
=
1
;
}
}
// startup other submodules
// startup other submodules
...
@@ -313,7 +313,7 @@ private:
...
@@ -313,7 +313,7 @@ private:
this
->
peerData
[
"status"
][
selfId
]
=
chrono
::
duration_cast
<
chrono
::
seconds
>
(
chrono
::
system_clock
::
now
().
time_since_epoch
()).
count
();
this
->
peerData
[
"status"
][
selfId
]
=
chrono
::
duration_cast
<
chrono
::
seconds
>
(
chrono
::
system_clock
::
now
().
time_since_epoch
()).
count
();
// msg to peer
// msg to peer
string
myId
=
devSn
+
":
0
:0"
;
string
myId
=
devSn
+
":
evmgr
:0"
;
int
minLen
=
std
::
min
(
body
[
1
].
size
(),
myId
.
size
());
int
minLen
=
std
::
min
(
body
[
1
].
size
(),
myId
.
size
());
if
(
memcmp
((
void
*
)(
body
[
1
].
data
()),
myId
.
data
(),
minLen
)
!=
0
)
{
if
(
memcmp
((
void
*
)(
body
[
1
].
data
()),
myId
.
data
(),
minLen
)
!=
0
)
{
// message to other peer
// message to other peer
...
...
opencv-motion-detect/evmgr.cpp
浏览文件 @
ac05ab42
...
@@ -176,7 +176,7 @@ private:
...
@@ -176,7 +176,7 @@ private:
this
->
peerData
[
"status"
][
selfId
]
=
chrono
::
duration_cast
<
chrono
::
seconds
>
(
chrono
::
system_clock
::
now
().
time_since_epoch
()).
count
();
this
->
peerData
[
"status"
][
selfId
]
=
chrono
::
duration_cast
<
chrono
::
seconds
>
(
chrono
::
system_clock
::
now
().
time_since_epoch
()).
count
();
// msg to peer
// msg to peer
string
myId
=
devSn
+
":
0
:0"
;
string
myId
=
devSn
+
":
evmgr
:0"
;
int
minLen
=
std
::
min
(
body
[
1
].
size
(),
myId
.
size
());
int
minLen
=
std
::
min
(
body
[
1
].
size
(),
myId
.
size
());
if
(
memcmp
((
void
*
)(
body
[
1
].
data
()),
myId
.
data
(),
minLen
)
!=
0
)
{
if
(
memcmp
((
void
*
)(
body
[
1
].
data
()),
myId
.
data
(),
minLen
)
!=
0
)
{
// message to other peer
// message to other peer
...
...
opencv-motion-detect/evmlmotion.cpp
浏览文件 @
ac05ab42
...
@@ -235,7 +235,7 @@ private:
...
@@ -235,7 +235,7 @@ private:
int
ret
=
0
;
int
ret
=
0
;
vector
<
vector
<
uint8_t
>
>
body
;
vector
<
vector
<
uint8_t
>
>
body
;
// since identity is auto set
// since identity is auto set
body
.
push_back
(
str2body
(
mgrSn
+
":
0
:0"
));
body
.
push_back
(
str2body
(
mgrSn
+
":
evmgr
:0"
));
body
.
push_back
(
str2body
(
EV_MSG_META_PING
));
// blank meta
body
.
push_back
(
str2body
(
EV_MSG_META_PING
));
// blank meta
body
.
push_back
(
str2body
(
MSG_HELLO
));
body
.
push_back
(
str2body
(
MSG_HELLO
));
...
...
opencv-motion-detect/evpuller.cpp
浏览文件 @
ac05ab42
...
@@ -132,7 +132,7 @@ private:
...
@@ -132,7 +132,7 @@ private:
int
ping
()
int
ping
()
{
{
int
ret
=
0
;
int
ret
=
0
;
vector
<
vector
<
uint8_t
>
>
body
=
{
str2body
(
mgrSn
+
":
0
:0"
),
str2body
(
EV_MSG_META_PING
),
str2body
(
MSG_HELLO
)};
vector
<
vector
<
uint8_t
>
>
body
=
{
str2body
(
mgrSn
+
":
evmgr
:0"
),
str2body
(
EV_MSG_META_PING
),
str2body
(
MSG_HELLO
)};
ret
=
z_send_multiple
(
pDealer
,
body
);
ret
=
z_send_multiple
(
pDealer
,
body
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
...
opencv-motion-detect/evpusher.cpp
浏览文件 @
ac05ab42
...
@@ -146,7 +146,7 @@ private:
...
@@ -146,7 +146,7 @@ private:
{
{
// send hello to router
// send hello to router
int
ret
=
0
;
int
ret
=
0
;
vector
<
vector
<
uint8_t
>
>
body
=
{
str2body
(
mgrSn
+
":
0
:0"
),
str2body
(
EV_MSG_META_PING
),
str2body
(
MSG_HELLO
)};
vector
<
vector
<
uint8_t
>
>
body
=
{
str2body
(
mgrSn
+
":
evmgr
:0"
),
str2body
(
EV_MSG_META_PING
),
str2body
(
MSG_HELLO
)};
ret
=
z_send_multiple
(
pDealer
,
body
);
ret
=
z_send_multiple
(
pDealer
,
body
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
spdlog
::
error
(
"evpusher {} {} failed to send multiple: {}"
,
devSn
,
iid
,
zmq_strerror
(
zmq_errno
()));
spdlog
::
error
(
"evpusher {} {} failed to send multiple: {}"
,
devSn
,
iid
,
zmq_strerror
(
zmq_errno
()));
...
...
opencv-motion-detect/evslicer.cpp
浏览文件 @
ac05ab42
...
@@ -148,7 +148,7 @@ private:
...
@@ -148,7 +148,7 @@ private:
}
}
numSlices
=
24
*
days
*
60
/
minutes
;
numSlices
=
24
*
days
*
60
/
minutes
;
spdlog
::
info
(
"evslicer mkdir -p {}"
,
selfId
,
urlOut
);
spdlog
::
info
(
"evslicer mkdir -p {}"
,
selfId
,
urlOut
);
ret
=
system
((
string
(
"mkdir -p "
)
+
urlOut
).
c_str
());
ret
=
system
((
string
(
"mkdir -p "
)
+
urlOut
).
c_str
());
// if(ret == -1) {
// if(ret == -1) {
...
@@ -209,7 +209,7 @@ private:
...
@@ -209,7 +209,7 @@ private:
// send hello to router
// send hello to router
int
ret
=
0
;
int
ret
=
0
;
/// identity is auto set
/// identity is auto set
vector
<
vector
<
uint8_t
>
>
body
=
{
str2body
(
mgrSn
+
":
0
:0"
),
str2body
(
EV_MSG_META_PING
),
str2body
(
MSG_HELLO
)};
vector
<
vector
<
uint8_t
>
>
body
=
{
str2body
(
mgrSn
+
":
evmgr
:0"
),
str2body
(
EV_MSG_META_PING
),
str2body
(
MSG_HELLO
)};
ret
=
z_send_multiple
(
pDealer
,
body
);
ret
=
z_send_multiple
(
pDealer
,
body
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
spdlog
::
error
(
"evslicer {} failed to send multiple: {}"
,
selfId
,
zmq_strerror
(
zmq_errno
()));
spdlog
::
error
(
"evslicer {} failed to send multiple: {}"
,
selfId
,
zmq_strerror
(
zmq_errno
()));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论