Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蚂蚁寻路
zoompipeline
提交
20752510
zoompipeline
项目概览
蚂蚁寻路
/
zoompipeline
与 Fork 源项目一致
Fork自
colorEagleStdio / zoompipeline
通知
4
Star
1
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
20752510
编写于
5月 03, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add testing code, need debug
上级
19727fab
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
123 addition
and
7 deletion
+123
-7
FunctionalClientTest/maindialog.cpp
FunctionalClientTest/maindialog.cpp
+52
-1
FunctionalClientTest/maindialog.h
FunctionalClientTest/maindialog.h
+1
-0
FunctionalClientTest/maindialog.ui
FunctionalClientTest/maindialog.ui
+62
-1
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
+3
-1
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.cpp
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.cpp
+5
-4
未找到文件。
FunctionalClientTest/maindialog.cpp
浏览文件 @
20752510
...
...
@@ -645,7 +645,9 @@ int MainDialog::deal_current_message_block()
if
(
bytesLeft
)
return
0
;
char
*
ptr
=
m_currentBlock
.
data
();
const
char
*
ptr
=
m_currentBlock
.
constData
();
SMARTLINK_MSG_APP
*
pApp
=
(
SMARTLINK_MSG_APP
*
)(((
unsigned
char
*
)
(
ptr
))
+
sizeof
(
SMARTLINK_MSG
)
-
1
);
...
...
@@ -763,8 +765,57 @@ int MainDialog::deal_current_message_block()
else
QMessageBox
::
information
(
this
,
tr
(
"Failed!"
),
tr
(
"download in Failed!"
));
}
else
{
QString
str
;
int
nLen
=
m_currentHeader
.
data_length
;
for
(
int
i
=
0
;
i
<
nLen
;
i
++
)
{
str
+=
ptr
[
i
+
sizeof
(
SMARTLINK_MSG
)
-
1
];
}
ui
->
plainTextEdit_msg_recieved
->
setPlainText
(
str
);
}
m_currentBlock
=
QByteArray
();
return
0
;
}
void
MainDialog
::
on_pushButton_sendToClient_clicked
()
{
if
(
client
->
isOpen
()
==
false
)
{
QMessageBox
::
warning
(
this
,
"Please connect first!"
,
"Connect to server and test funcs"
);
return
;
}
if
(
m_bLogedIn
==
false
)
{
QMessageBox
::
warning
(
this
,
"Please log in the host first!"
,
"get uuid and login"
);
return
;
}
saveIni
();
QString
strMsg
=
ui
->
plainTextEdit_msg_to_client
->
toPlainText
();
QByteArray
arrMsg
(
strMsg
.
toStdString
().
c_str
());
QByteArray
array
(
sizeof
(
SMARTLINK_MSG
)
-
1
,
0
);
char
*
ptr
=
array
.
data
();
SMARTLINK_MSG
*
pMsg
=
(
SMARTLINK_MSG
*
)
ptr
;
pMsg
->
Mark
=
0x55AA
;
pMsg
->
version
=
1
;
pMsg
->
SerialNum
=
0
;
pMsg
->
Priority
=
1
;
pMsg
->
Reserved1
=
0
;
pMsg
->
source_id
=
(
quint32
)((
quint64
)(
ui
->
lineEdit_boxid
->
text
().
toUInt
())
&
0xffffffff
);
pMsg
->
destin_id
=
(
quint32
)((
quint64
)(
ui
->
lineEdit_client_uuid
->
text
().
toUInt
())
&
0xffffffff
);;
pMsg
->
data_length
=
arrMsg
.
size
();
pMsg
->
Reserved2
=
0
;
array
.
append
(
arrMsg
);
//3/10 possibility to send a data block to server
client
->
SendData
(
array
);
}
FunctionalClientTest/maindialog.h
浏览文件 @
20752510
...
...
@@ -71,6 +71,7 @@ public slots:
void
on_pushButton_box_download_uid_clicked
();
void
on_pushButton_client_downHost_clicked
();
void
on_pushButton_clientLogout_clicked
();
void
on_pushButton_sendToClient_clicked
();
};
...
...
FunctionalClientTest/maindialog.ui
浏览文件 @
20752510
...
...
@@ -101,7 +101,7 @@
<enum>
QTabWidget::Triangular
</enum>
</property>
<property
name=
"currentIndex"
>
<number>
0
</number>
<number>
1
</number>
</property>
<widget
class=
"QWidget"
name=
"tab"
>
<attribute
name=
"title"
>
...
...
@@ -377,6 +377,67 @@
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab_3"
>
<attribute
name=
"title"
>
<string>
Send Msg
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_8"
>
<item>
<widget
class=
"QLabel"
name=
"label_11"
>
<property
name=
"text"
>
<string>
Msg
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPlainTextEdit"
name=
"plainTextEdit_msg_to_client"
/>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_11"
>
<item>
<widget
class=
"QLabel"
name=
"label_12"
>
<property
name=
"text"
>
<string>
Send To UUID:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLineEdit"
name=
"lineEdit_client_uuid"
/>
</item>
<item>
<spacer
name=
"horizontalSpacer_6"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_sendToClient"
>
<property
name=
"text"
>
<string>
Send
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_13"
>
<property
name=
"text"
>
<string>
Recieved:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPlainTextEdit"
name=
"plainTextEdit_msg_recieved"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab_Message"
>
<attribute
name=
"title"
>
<string>
Logs
</string>
...
...
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
浏览文件 @
20752510
...
...
@@ -30,7 +30,6 @@ namespace SmartLink{
bool
regisitClientUUID
(
st_clientNode_baseTrans
*
);
st_clientNode_baseTrans
*
clientNodeFromUUID
(
quint32
);
st_clientNode_baseTrans
*
clientNodeFromSocket
(
QObject
*
);
bool
SendToNode
(
quint32
uuid
,
const
QByteArray
&
msg
);
//Heart beating and healthy
void
KickDeadClients
();
int
heartBeatingThrd
();
...
...
@@ -116,6 +115,9 @@ namespace SmartLink{
//a block of data has been successfuly sent
void
on_evt_RemoteData_transferred
(
QObject
*
/*svrHandle*/
,
qint64
/*bytes sent*/
);
//send msg to uuid
bool
SendToNode
(
quint32
uuid
,
const
QByteArray
&
msg
);
};
}
#endif // ST_CLIENT_TABLE_H
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.cpp
浏览文件 @
20752510
...
...
@@ -90,11 +90,12 @@ namespace SmartLink{
}
if
(
m_destin_uuid
==
0xffffffff
)
return
false
;
//Transfer
if
(
false
==
m_pClientTable
->
SendToNode
(
this
->
m_destin_uuid
,
m_currStBlock
))
{
//Send to Client
// //Transfer
// if (false==m_pClientTable->SendToNode(this->m_destin_uuid , m_currStBlock))
// {
}
//
}
}
delCurrBlock
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录