Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
zoompipeline
提交
5be54e73
zoompipeline
项目概览
colorEagleStdio
/
zoompipeline
通知
181
Star
12
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
zoompipeline
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5be54e73
编写于
1月 06, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prepare for function develop.
上级
66134ea4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
13 deletion
+34
-13
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
+1
-1
ZoomPipeline_FuncSvr/smartlink/st_clientnode.cpp
ZoomPipeline_FuncSvr/smartlink/st_clientnode.cpp
+4
-4
ZoomPipeline_FuncSvr/smartlink/st_clientnode.h
ZoomPipeline_FuncSvr/smartlink/st_clientnode.h
+4
-2
ZoomPipeline_FuncSvr/smartlink/st_message.h
ZoomPipeline_FuncSvr/smartlink/st_message.h
+25
-6
未找到文件。
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
浏览文件 @
5be54e73
...
...
@@ -21,7 +21,7 @@ public:
protected:
QList
<
st_clientNode
*>
m_nodeToBeDel
;
QMutex
m_hash_mutex
;
QMap
<
QString
,
st_clientNode
*>
m_hash_uuid2node
;
QMap
<
quint32
,
st_clientNode
*>
m_hash_uuid2node
;
QMap
<
QObject
*
,
st_clientNode
*>
m_hash_sock2node
;
ZPNetwork
::
zp_net_ThreadPool
*
m_pThreadPool
;
ZPTaskEngine
::
zp_pipeline
*
m_pTaskEngine
;
...
...
ZoomPipeline_FuncSvr/smartlink/st_clientnode.cpp
浏览文件 @
5be54e73
...
...
@@ -5,8 +5,9 @@ st_clientNode::st_clientNode(st_client_table * pClientTable, QObject * pClientSo
zp_plTaskBase
(
parent
)
{
m_bUUIDRecieved
=
false
;
m_currentRed
=
0
;
m_pClientSock
=
pClientSock
;
m_uuid
=
""
;
m_uuid
=
0xffffffff
;
//Not Valid
m_pClientTable
=
pClientTable
;
bTermSet
=
false
;
}
...
...
@@ -26,11 +27,10 @@ int st_clientNode::run()
QByteArray
block
;
m_mutex
.
lock
();
//Limit max pending blocks.if blocks too long, memory will be low
while
(
m_list_RawData
.
size
()
>=
25
6
)
m_list_RawData
.
pop_front
();
//while (m_list_RawData.size()>=1
6)
//
m_list_RawData.pop_front();
if
(
m_list_RawData
.
size
())
{
block
=
*
m_list_RawData
.
begin
();
m_list_RawData
.
pop_front
();
}
...
...
ZoomPipeline_FuncSvr/smartlink/st_clientnode.h
浏览文件 @
5be54e73
...
...
@@ -26,7 +26,7 @@ public:
//push new binary data into queue
int
push_new_data
(
const
QByteArray
&
dtarray
);
const
QString
&
uuid
(){
return
m_uuid
;}
quint32
uuid
(){
return
m_uuid
;}
QObject
*
sock
()
{
return
m_pClientSock
;}
bool
bTermSet
;
...
...
@@ -35,12 +35,14 @@ public:
//data items
protected:
//The current Read Offset
int
m_currentRed
;
//The raw data queue and its mutex
QList
<
QByteArray
>
m_list_RawData
;
QMutex
m_mutex
;
//UUID of this equipment
bool
m_bUUIDRecieved
;
QString
m_uuid
;
quint32
m_uuid
;
//Client ID
//Client socket handle of this connection
QObject
*
m_pClientSock
;
...
...
ZoomPipeline_FuncSvr/smartlink/st_message.h
浏览文件 @
5be54e73
...
...
@@ -3,14 +3,33 @@
#pragma pack (push,1)
#define SMARTLINK_UUID_LEN 24
#if defined(__GNUC__)
typedef
struct
tag_smartlink_message
{
unsigned
char
Mark
[
2
];
//Always be "S" and "T" in upper case
unsigned
int32_t
version
;
//Structure Version
unsigned
int32_t
source_id
;
//0xffffffff means from server
unsigned
int32_t
destin_id
;
//0xffffffff means to server
struct
tag_payload
{
unsigned
int32_t
data_length
;
//Data at least have 2 byte, for heart-beating counter.
unsigned
int8_t
data
[
2
];
}
payload
;
}
SMARTLINK_MSG
;
#endif
#if defined(_MSC_VER)
typedef
struct
tag_smartlink_message
{
unsigned
char
uuid_from
[
SMARTLINK_UUID_LEN
];
unsigned
char
uuid_to
[
SMARTLINK_UUID_LEN
];
unsigned
char
message_size
[
2
];
// an Int-16 size of this message block,message_size[0] is low 8 bits, 1 is height 8 bits
unsigned
char
message_block
[
1
];
// an message-Block array, have message_size items.
}
SMARTLINK_MSG
;
unsigned
char
Mark
[
2
];
//Always be "S" and "T" in upper case
unsigned
__int32
version
;
//Structure Version
unsigned
__int32
source_id
;
//0xffffffff means from server
unsigned
__int32
destin_id
;
//0xffffffff means to server
struct
tag_payload
{
unsigned
__int32
data_length
;
//Data at least have 2 byte, for heart-beating counter.
unsigned
__int8
data
[
2
];
}
payload
;
}
SMARTLINK_MSG
;
#endif
#pragma pack(pop)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录