diff --git a/archive/vn.cs/hshlp/CITICs_HsT2Hlp.dll b/archive/vn.cs/hshlp/CITICs_HsT2Hlp.dll
deleted file mode 100644
index ab3c99af..00000000
Binary files a/archive/vn.cs/hshlp/CITICs_HsT2Hlp.dll and /dev/null differ
diff --git a/archive/vn.cs/hshlp/CITICs_HsT2Hlp.h b/archive/vn.cs/hshlp/CITICs_HsT2Hlp.h
deleted file mode 100644
index fe0fd486..00000000
--- a/archive/vn.cs/hshlp/CITICs_HsT2Hlp.h
+++ /dev/null
@@ -1,141 +0,0 @@
-#ifndef __CITICS_HSHLP_H__
-#define __CITICS_HSHLP_H__
-
-#ifdef WIN32
-#ifdef CITICS_HSHLP_EXPORTS
-#define CITICS_HSHLP_API __declspec(dllexport)
-#else
-#define CITICS_HSHLP_API __declspec(dllimport)
-#endif
-
-#define CITICSSTDCALL __stdcall /* ensure stcall calling convention on NT */
-#else
-#define CITICS_HSHLP_API
-#define CITICSSTDCALL /* leave blank for other systems */
-#endif
-
-#define ERROR_MSG_SIZE 512
-//////////////////////////////////////////////////////////////////////////
-
-/**
-* 同步业务调用
-* 使用该标识调用业务时,系统处于阻塞状态直到返回应答信息或超时
-*/
-#define BIZCALL_SYNC 0
-
-/**
-* 异步业务调用
-* 使用该标识调用业务时,系统立即返回而不等待应答信息。
-* 需要调用QueueGetMsg获取应答结果信息
-*/
-#define BIZCALL_ASYNC 1
-
-/**
-* 订阅消息中心发布的消息信息
-* 标识该业务为消息订阅请求。如订阅成交推送数据、系统通知消息等
-* 需要调用QueueGetMsg获取订阅的信息
-*/
-#define BIZCALL_SUBSCRIBE 3
-
-typedef void *HSHLPCFGHANDLE;
-typedef void *HSHLPHANDLE;
-typedef void *HSHLPASYNCMSG;
-
-#pragma pack(1)
-
-/* 异步和订阅消息控制信息*/
-typedef struct
-{
- int nFlags; // 位标识信息,0x0:正常消息, >0:系统状态消息
- int nFuncID; // 异步请求功能号
- int nReqNo; // 异步请求接受序号,根据该序号和功能号对请求和应答数据匹配
- int nIssueType; // 发布消息类别
- int nErrorNo; // 错误代码
- HSHLPASYNCMSG HAsyncMsg; // 消息句柄
- char szErrorInfo[ERROR_MSG_SIZE+1]; // 错误信息
-}MSG_CTRL, *LPMSG_CTRL;
-
-#pragma pack()
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- // 初始化配置项,szConfigFile为空时则按系统默认值初始化,hConfig为出参
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_InitConfig(HSHLPCFGHANDLE* hConfig, const char* szConfigFile=NULL);
-
- // 加载配置文件项,可以加载多个不同的配置文件,返回不同的配置句柄。等同于InitConfig
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_LoadConfig(HSHLPCFGHANDLE* hConfig, const char* szConfigFile);
-
- // 重置服务器连接地址。格式:ip1:port1;ip2:port2;
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_ResetServer(HSHLPCFGHANDLE hConfig, const char* szAddr);
-
- // 根据配置句柄,初始化一个连接对象。
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_Init(HSHLPHANDLE* HlpHandle, HSHLPCFGHANDLE hConfig);
- // 释放连接句柄系统资源
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_Exit(HSHLPHANDLE HlpHandle);
-
- // 与服务器建立连接
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_ConnectServer(HSHLPHANDLE HlpHandle);
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_DisConnect(HSHLPHANDLE HlpHandle);
-
- // 提交业务请求,如果szParam参数为NULL,则认为是通过SetValue函数设置的请求参数
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_BizCallAndCommit(HSHLPHANDLE HlpHandle, int iFuncID, const char* szParam=NULL, int nBizCallType=BIZCALL_SYNC, LPMSG_CTRL lpMsgCtrl=NULL);
-
- // 获取记录行、列数,返回值为行、列数
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetRowCount(HSHLPHANDLE HlpHandle, LPMSG_CTRL lpMsgCtrl=NULL);
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetColCount(HSHLPHANDLE HlpHandle, LPMSG_CTRL lpMsgCtrl=NULL);
-
- // 获取字段名称,序号以0为基数
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetColName(HSHLPHANDLE HlpHandle, int iColumn, char* szColName, LPMSG_CTRL lpMsgCtrl=NULL);
-
- // 获取下一行记录,第一次调用则首先打开结果集,并把第0行作为当前记录行
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetNextRow(HSHLPHANDLE HlpHandle, LPMSG_CTRL lpMsgCtrl=NULL);
-
- // 根据字段名称,获取字段值
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetValue(HSHLPHANDLE HlpHandle, const char* szKeyName, char* szValue, LPMSG_CTRL lpMsgCtrl=NULL);
-
- // 根据字段序号获取字段值,序号以0为基数
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetValueByIndex(HSHLPHANDLE HlpHandle, int iColumn, char* szValue, LPMSG_CTRL lpMsgCtrl=NULL);
-
- // 获取当前错误代码和信息
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_GetErrorMsg(HSHLPHANDLE HlpHandle, int* piErrorCode, char* szErrorMsg);
-
-
- /************************************************************************/
- // 另一种请求参数设置的方法,一个一个的设置。
- // 初始化请求参数
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_BeginParam(HSHLPHANDLE HlpHandle);
- // 设置每个请求参数字段名称和值
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_SetValue(HSHLPHANDLE HlpHandle, const char* szKeyName, const char* szValue);
-
-
- /************************************************************************/
- // 异步请求和消息订阅相关函数
-
- // 获取异步消息队列中的消息数量
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_QueueMsgCount(HSHLPHANDLE HlpHandle);
-
- // 从队列中读取一条消息,如果队列中没有数据,该函数会一直阻塞不返回,直到nWaitTime超时时间后才返回。
- // nWaitTime: 单位毫秒
- // = 0: 立即返回;如果队列中有数据则返回Msg,且return值为 0,否则return值为-5(超时错误)
- // =-1: 阻塞,直到队列中有数据获取到Msg 才返回。否则将永久阻塞等待。return值为 0,
- // = 其它值:超时时间,如果队列中有数据则立即返回,否则等待time时间后返回。return值为 -5(超时错误)。
- // Return: 0: 队列中有数据且获取消息成功;
- // -5: 超时错误,在设定的时间内队列中没有数据。
- // 其它错误:
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_QueueGetMsg(HSHLPHANDLE HlpHandle, LPMSG_CTRL lpMsgCtrl /*Out*/, int nWaitTime=0);
-
- // 处理完成或者不需要该消息时,应及时删除该消息,否则消息将占用大量内存。
- // 如果不删除有可能每次都Get到同一条消息
- CITICS_HSHLP_API int CITICSSTDCALL CITICs_HsHlp_QueueEraseMsg(HSHLPHANDLE HlpHandle, LPMSG_CTRL lpMsgCtrl /*In*/);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/archive/vn.cs/hshlp/CITICs_HsT2Hlp.lib b/archive/vn.cs/hshlp/CITICs_HsT2Hlp.lib
deleted file mode 100644
index 159f5c18..00000000
Binary files a/archive/vn.cs/hshlp/CITICs_HsT2Hlp.lib and /dev/null differ
diff --git a/archive/vn.cs/hshlp/Hsconfig.ini b/archive/vn.cs/hshlp/Hsconfig.ini
deleted file mode 100644
index 7f986e97..00000000
--- a/archive/vn.cs/hshlp/Hsconfig.ini
+++ /dev/null
@@ -1,53 +0,0 @@
-[t2sdk]
-; 客户端要连接的服务端的IP和端口,可以配置一个或多个,中间以;分割,连接初始化时,会从这串服务端地址中,随即选择一个作为要建立连接的服务端
-servers=114.251.228.136:20008
-; 接收缓存的初始大小,单位字节,实际接收到服务端的数据时,可能会扩大(如果需要)
-init_recv_buf_size=512
-
-; 每块发送缓存的初始大小,单位字节,该大小也会根据需要动态扩大
-init_send_buf_size=512
-
-; 发送队列的大小,该大小不会动态变化,若该配置项很小,且连接发包很频繁,则可能
-; 因为发送队列满而造成发送失败
-send_queue_size=1000
-
-; lang用于指定T2_SDK错误信息的语言ID(2052为简体中文,1033为英文)
-; 默认为2052
-lang=2052
-
-; 此配置项请参看“注意事项”
-event_count=10
-
-; 许可证文件的路径,默认为当前目录下的license.dat。
-license_file=./license.dat
-
-
-[proxy]
-; 可配置采用何种代理配置http/socks4/socks5,空表示不采用代理
-proxy_type=
-
-; 代理服务器的IP地址
-ip=
-port=
-
-; 登陆代理服务器的用户名
-user_name=guest
-password=
-
-[safe]
-; 连接的安全模式,明文(none),通信密码(pwd),SSL(ssl)
-; 注意大小写敏感
-safe_level=none
-
-; 当连接的安全模式为pwd时,client_id配置项才生效
-client_id=
-
-; 在pwd模式下,当client_id为空时,comm_pwd为默认的密钥
-; 注意当client_id为空时,comm_pwd必须和服务端的配置一致方可正常使用,目前服务
-; 端的配置为888888
-comm_pwd=888888
-
-; 当连接的安全模式为ssl时,cert_file和cert_pwd配置项才生效
-; 证书文件路径
-cert_file=xxx.pem
-cert_pwd=xxxxxxxx
diff --git a/archive/vn.cs/hshlp/t2sdk.dll b/archive/vn.cs/hshlp/t2sdk.dll
deleted file mode 100644
index 4d41f138..00000000
Binary files a/archive/vn.cs/hshlp/t2sdk.dll and /dev/null differ
diff --git a/archive/vn.cs/hshlp/t2sdk.ini b/archive/vn.cs/hshlp/t2sdk.ini
deleted file mode 100644
index 5c3ba604..00000000
--- a/archive/vn.cs/hshlp/t2sdk.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-
-[t2sdk]
-#第三方许可证
-license_file=
-servers=192.168.94.85:8001
-login_name=
-init_recv_buf_size=512
-init_send_buf_size=512
-send_queue_size=1000
-#心跳时间
-heartbeat_time=10
-#接入用户密码
-license_pwd=
-
-[safe]
-safe_level=ssl
-#SSL证书
-cert_file=
-#SSL证书密码
-cert_pwd=
diff --git a/archive/vn.cs/hshlp/t2sdk.lib b/archive/vn.cs/hshlp/t2sdk.lib
deleted file mode 100644
index f9dc0419..00000000
Binary files a/archive/vn.cs/hshlp/t2sdk.lib and /dev/null differ
diff --git a/archive/vn.cs/test/(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat b/archive/vn.cs/test/(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat
deleted file mode 100644
index 8effa775..00000000
Binary files a/archive/vn.cs/test/(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat and /dev/null differ
diff --git a/archive/vn.cs/test/CITICs_HsT2Hlp.dll b/archive/vn.cs/test/CITICs_HsT2Hlp.dll
deleted file mode 100644
index ab3c99af..00000000
Binary files a/archive/vn.cs/test/CITICs_HsT2Hlp.dll and /dev/null differ
diff --git a/archive/vn.cs/test/Hsconfig.ini b/archive/vn.cs/test/Hsconfig.ini
deleted file mode 100644
index 7f986e97..00000000
--- a/archive/vn.cs/test/Hsconfig.ini
+++ /dev/null
@@ -1,53 +0,0 @@
-[t2sdk]
-; 客户端要连接的服务端的IP和端口,可以配置一个或多个,中间以;分割,连接初始化时,会从这串服务端地址中,随即选择一个作为要建立连接的服务端
-servers=114.251.228.136:20008
-; 接收缓存的初始大小,单位字节,实际接收到服务端的数据时,可能会扩大(如果需要)
-init_recv_buf_size=512
-
-; 每块发送缓存的初始大小,单位字节,该大小也会根据需要动态扩大
-init_send_buf_size=512
-
-; 发送队列的大小,该大小不会动态变化,若该配置项很小,且连接发包很频繁,则可能
-; 因为发送队列满而造成发送失败
-send_queue_size=1000
-
-; lang用于指定T2_SDK错误信息的语言ID(2052为简体中文,1033为英文)
-; 默认为2052
-lang=2052
-
-; 此配置项请参看“注意事项”
-event_count=10
-
-; 许可证文件的路径,默认为当前目录下的license.dat。
-license_file=./license.dat
-
-
-[proxy]
-; 可配置采用何种代理配置http/socks4/socks5,空表示不采用代理
-proxy_type=
-
-; 代理服务器的IP地址
-ip=
-port=
-
-; 登陆代理服务器的用户名
-user_name=guest
-password=
-
-[safe]
-; 连接的安全模式,明文(none),通信密码(pwd),SSL(ssl)
-; 注意大小写敏感
-safe_level=none
-
-; 当连接的安全模式为pwd时,client_id配置项才生效
-client_id=
-
-; 在pwd模式下,当client_id为空时,comm_pwd为默认的密钥
-; 注意当client_id为空时,comm_pwd必须和服务端的配置一致方可正常使用,目前服务
-; 端的配置为888888
-comm_pwd=888888
-
-; 当连接的安全模式为ssl时,cert_file和cert_pwd配置项才生效
-; 证书文件路径
-cert_file=xxx.pem
-cert_pwd=xxxxxxxx
diff --git a/archive/vn.cs/test/csauthor.dat b/archive/vn.cs/test/csauthor.dat
deleted file mode 100644
index 503bb365..00000000
--- a/archive/vn.cs/test/csauthor.dat
+++ /dev/null
@@ -1,16 +0,0 @@
-[auth_info]
-ProfileCode=af2ebd99da3c6636171ea72747a5e32d
-LimitDate=20300101
-AllowPushTransation=0
-AllowWbp=0
-AuthCode=AQAAAABo23AyYmI1MWQ2ZGFhN2ExMjI1OTQyODgzZjA2OWFhNDBmOQAAAAAAAAAAAAAAAA==
-[functions]
-func=
-;[ProcessInfo_0]
-;ProcessName=HsT2Hlp_Demo.exe,Hs.exe
-;NetIP=172.23.123.9
-;NetMask=255.255.255.0
-;[ProcessInfo_0]
-;ProcessName=Option_Demo.exe
-;NetIP=10.0.0.0
-;NetMask=255.0.0.0
diff --git a/archive/vn.cs/test/cslog/20150331.log b/archive/vn.cs/test/cslog/20150331.log
deleted file mode 100644
index 586549b8..00000000
--- a/archive/vn.cs/test/cslog/20150331.log
+++ /dev/null
@@ -1,2 +0,0 @@
-[114.251.228.136:20008 h034fd2a0/t2adc]14:40:07.278 -10033.54ms [-20] !Connect HSAR Server [-20] 注册超时。......
-[114.251.228.136:20008 h034fd2a0/t2adc]14:40:22.639 -0.01ms [0] !DisConnect HSAR Server, Last error message: [0] 注册超时。......
diff --git a/archive/vn.cs/test/cslog/20170411.log b/archive/vn.cs/test/cslog/20170411.log
deleted file mode 100644
index 59bd7b46..00000000
--- a/archive/vn.cs/test/cslog/20170411.log
+++ /dev/null
@@ -1 +0,0 @@
-[114.251.228.136:20008 h0302ce38/t2818]22:52:07.954 -10099.03ms [-11] !Connect HSAR Server [-11] 同步连接超时或发生错误。......
diff --git a/archive/vn.cs/test/cslog/cserror.log b/archive/vn.cs/test/cslog/cserror.log
deleted file mode 100644
index c839a1e8..00000000
--- a/archive/vn.cs/test/cslog/cserror.log
+++ /dev/null
@@ -1,17 +0,0 @@
-2015-03-31 14:15:01.664: --Get This machine ID【203】failed!
-2015-03-31 14:17:40.303: --Get This machine ID【203】failed!
-2015-03-31 14:20:04.287: --Get This machine ID【203】failed!
-2015-03-31 14:20:19.251: --Get This machine ID【203】failed!
-20150331 14:39:57.407 1: [h034fd2a0/t334c] the Connection has been disconnected.
-2015-03-31 14:44:13.047: --Get This machine ID【203】failed!
-2015-03-31 15:34:12.591: --Get This machine ID【203】failed!
-2015-04-01 10:33:25.959: --Get This machine ID【203】failed!
-2015-04-01 13:39:17.232: --Get This machine ID【203】failed!
-2015-04-01 13:44:00.590: --Get This machine ID【203】failed!
-2015-04-01 13:44:54.336: --Get This machine ID【203】failed!
-2015-04-01 13:45:17.417: --Get This machine ID【203】failed!
-20150401 13:48:50.439 1: [h04557720/t3530] the Connection has been disconnected.
-20150401 13:49:13.822 1: [h045f7720/t317c] the Connection has been disconnected.
-20150401 14:34:59.175 1: [h045a7720/t2f80] the Connection has been disconnected.
-2017-04-11 22:51:57.843: --The license infomation is error. This machine ID is:[16ec65f21e6068d6e3d4de7a6ce6979b] and you can find this ID code in 'cserror.log' file!
-2017-04-11 22:51:57.844: --'CITICs_HsT2Hlp.dll' Moudle is not licensed. The date of license to:[2017-06-11] , The all functions is not limited on the trail period!
diff --git a/archive/vn.cs/test/cstest.py b/archive/vn.cs/test/cstest.py
deleted file mode 100644
index 3735e271..00000000
--- a/archive/vn.cs/test/cstest.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# encoding: UTF-8
-
-import sys
-from time import sleep
-
-from PyQt4 import QtGui
-
-from vncshshlp import *
-
-#----------------------------------------------------------------------
-def print_dict(d):
- """鎸夌収閿兼墦鍗颁竴涓瓧鍏"""
- for key,value in d.items():
- print key + ':' + str(value)
-
-
-#----------------------------------------------------------------------
-def simple_log(func):
- """绠鍗曡楗板櫒鐢ㄤ簬杈撳嚭鍑芥暟鍚"""
- def wrapper(*args, **kw):
- print ""
- print str(func.__name__)
- return func(*args, **kw)
- return wrapper
-
-
-class TestHlp(CsHsHlp):
- #----------------------------------------------------------------------
- def __init__(self):
- """"""
- super(TestHlp, self).__init__()
-
- #----------------------------------------------------------------------
- @simple_log
- def onMsg(self, data):
- """"""
- print_dict(data)
-
-
-#----------------------------------------------------------------------
-def test():
- """娴嬭瘯鐢"""
- api = TestHlp()
-
- # 璇诲彇閰嶇疆鏂囦欢
- print api.loadConfig("Hsconfig.ini")
-
- # 鍒濆鍖
- print api.init()
-
- # 杩炴帴鏈嶅姟鍣
- print api.connectServer()
-
-
-if __name__ == '__main__':
- test()
\ No newline at end of file
diff --git a/archive/vn.cs/test/license.dat b/archive/vn.cs/test/license.dat
deleted file mode 100644
index 1bff812c..00000000
Binary files a/archive/vn.cs/test/license.dat and /dev/null differ
diff --git a/archive/vn.cs/test/t2sdk.dll b/archive/vn.cs/test/t2sdk.dll
deleted file mode 100644
index 4d41f138..00000000
Binary files a/archive/vn.cs/test/t2sdk.dll and /dev/null differ
diff --git a/archive/vn.cs/test/t2sdk.ini b/archive/vn.cs/test/t2sdk.ini
deleted file mode 100644
index 5c3ba604..00000000
--- a/archive/vn.cs/test/t2sdk.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-
-[t2sdk]
-#第三方许可证
-license_file=
-servers=192.168.94.85:8001
-login_name=
-init_recv_buf_size=512
-init_send_buf_size=512
-send_queue_size=1000
-#心跳时间
-heartbeat_time=10
-#接入用户密码
-license_pwd=
-
-[safe]
-safe_level=ssl
-#SSL证书
-cert_file=
-#SSL证书密码
-cert_pwd=
diff --git a/archive/vn.cs/test/vncshshlp.pyd b/archive/vn.cs/test/vncshshlp.pyd
deleted file mode 100644
index be1d8a07..00000000
Binary files a/archive/vn.cs/test/vncshshlp.pyd and /dev/null differ
diff --git a/archive/vn.cs/vncshshlp/Visual Studio 2013/settings/Windows Azure Subscriptions.xml b/archive/vn.cs/vncshshlp/Visual Studio 2013/settings/Windows Azure Subscriptions.xml
deleted file mode 100644
index 05fe7b9b..00000000
--- a/archive/vn.cs/vncshshlp/Visual Studio 2013/settings/Windows Azure Subscriptions.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
- AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA25n/ahjWHUaDiThcqA7VUAAAAAACAAAAAAAQZgAAAAEAACAAAACp8rAE6Rs+eDDGKoeibA0/oqMmdaA7onKWWZ9vNCMEegAAAAAOgAAAAAIAACAAAAArczqvArBQ6ZrDcryIUkYKHoCnxCFdBrwI86J8FMUqgxAAAADeYX9RIZdGPQWXXdIuo+DqQAAAAJVN3ajzOqDwXdZ1xR01lsdwXOYV0Tmyho0kIwaDp6GC5AH0RbotPHV7hgmKRkWjOR/bALilvW6H6V42wNTqvb8=
-
\ No newline at end of file
diff --git a/archive/vn.cs/vncshshlp/vncshshlp.sln b/archive/vn.cs/vncshshlp/vncshshlp.sln
deleted file mode 100644
index c9940863..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp.sln
+++ /dev/null
@@ -1,22 +0,0 @@
-锘
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.40629.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vncshshlp", "vncshshlp\vncshshlp.vcxproj", "{982DF24C-BCD1-4F25-BDE8-84ADB719588B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Debug|Win32.ActiveCfg = Debug|Win32
- {982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Debug|Win32.Build.0 = Debug|Win32
- {982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Release|Win32.ActiveCfg = Release|Win32
- {982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/ReadMe.txt b/archive/vn.cs/vncshshlp/vncshshlp/ReadMe.txt
deleted file mode 100644
index 2712d85e..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/ReadMe.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-锘========================================================================
- 鍔ㄦ侀摼鎺ュ簱锛歷ncshshlp 椤圭洰姒傝堪
-========================================================================
-
-搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 vncshshlp DLL銆
-
-鏈枃浠舵瑕佷粙缁嶇粍鎴 vncshshlp 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
-
-
-vncshshlp.vcxproj
- 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
-
-vncshshlp.vcxproj.filters
- 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
-
-vncshshlp.cpp
- 杩欐槸涓 DLL 婧愭枃浠躲
-
- 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
-
-/////////////////////////////////////////////////////////////////////////////
-鍏朵粬鏍囧噯鏂囦欢:
-
-StdAfx.h, StdAfx.cpp
- 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 vncshshlp.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
-
-/////////////////////////////////////////////////////////////////////////////
-鍏朵粬娉ㄩ噴:
-
-搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/dllmain.cpp b/archive/vn.cs/vncshshlp/vncshshlp/dllmain.cpp
deleted file mode 100644
index 260abc6d..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/dllmain.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// dllmain.cpp : 定义 DLL 应用程序的入口点。
-#include "stdafx.h"
-
-BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
-{
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
-}
-
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/stdafx.cpp b/archive/vn.cs/vncshshlp/vncshshlp/stdafx.cpp
deleted file mode 100644
index 63accacc..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/stdafx.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// stdafx.cpp : 只包括标准包含文件的源文件
-// vncshshlp.pch 将作为预编译头
-// stdafx.obj 将包含预编译类型信息
-
-#include "stdafx.h"
-
-// TODO: 在 STDAFX.H 中
-// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/stdafx.h b/archive/vn.cs/vncshshlp/vncshshlp/stdafx.h
deleted file mode 100644
index 2ec1caa0..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/stdafx.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// stdafx.h : 标准系统包含文件的包含文件,
-// 或是经常使用但不常更改的
-// 特定于项目的包含文件
-//
-
-#pragma once
-
-#include "targetver.h"
-
-#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
-// Windows 头文件:
-#include
-
-
-
-// TODO: 在此处引用程序需要的其他头文件
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/targetver.h b/archive/vn.cs/vncshshlp/vncshshlp/targetver.h
deleted file mode 100644
index 7a7d2c83..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/targetver.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-
-// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
-
-// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
-// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
-
-#include
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.cpp b/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.cpp
deleted file mode 100644
index 85147c02..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-// vncshshlp.cpp : 定义 DLL 应用程序的导出函数。
-//
-
-#include "stdafx.h"
-#include "vncshshlp.h"
-
-//------------------------------------------------------------------------
-//主动函数部分
-//------------------------------------------------------------------------
-
-//读取配置文件
-int CsHsHlp::loadConfig(string fileName)
-{
- int i = CITICs_HsHlp_LoadConfig(&this->cfgHandle, fileName.c_str());
- return i;
-};
-
-//初始化
-int CsHsHlp::init()
-{
- int i = CITICs_HsHlp_Init(&this->handle, this->cfgHandle);
- return i;
-};
-
-//连接服务器
-int CsHsHlp::connectServer()
-{
- int i = CITICs_HsHlp_ConnectServer(this->handle);
- return i;
-};
-
-//获取错误信息
-string CsHsHlp::getErrorMsg()
-{
- char msg[512];
- CITICs_HsHlp_GetErrorMsg(this->handle, NULL, msg);
- string errorMsg = msg;
- return errorMsg;
-};
-
-//初始化发包请求
-int CsHsHlp::beginParam()
-{
- int i = CITICs_HsHlp_BeginParam(this->handle);
- return i;
-};
-
-//设置发包的参数字段名称和值
-int CsHsHlp::setValue(string key, string value)
-{
- int i = CITICs_HsHlp_SetValue(this->handle, key.c_str(), value.c_str());
- return i;
-};
-
-//发包
-int CsHsHlp::bizCallAndCommit(int iFuncID)
-{
- int i = CITICs_HsHlp_BizCallAndCommit(this->handle, iFuncID, NULL, BIZCALL_ASYNC);
- return i;
-};
-
-//断开服务器
-int CsHsHlp::disconnect()
-{
- int i = CITICs_HsHlp_DisConnect(this->handle);
- return i;
-};
-
-//退出
-int CsHsHlp::exit()
-{
- int i = CITICs_HsHlp_Exit(this->handle);
- return i;
-};
-
-
-//------------------------------------------------------------------------
-//异步消息处理线程
-//------------------------------------------------------------------------
-
-//连续运行的消息处理函数
-void CsHsHlp::processMsg()
-{
- LPMSG_CTRL msg;
- int row = 0;
- int col = 0;
- char key[64] = {0};
- char value[512] = {0};
- memset(&msg, 0, sizeof(msg));
-
- while (1)
- {
- //读取消息
- CITICs_HsHlp_QueueGetMsg(this->handle, msg, -1);
-
- //生成字典并推送到Python中
- row = CITICs_HsHlp_GetRowCount(this->handle, msg); //获取msg行数(有多少个回应)
- col = CITICs_HsHlp_GetColCount(this->handle, msg); //获取msg列数(有哪些字段)
-
- for (int i = 0; i < row; i++)
- {
- if (0 == CITICs_HsHlp_GetNextRow(this->handle, msg))
- {
- dict data;
- for (int j = 0; j < col; j++)
- {
- CITICs_HsHlp_GetColName(this->handle, j, key);
- CITICs_HsHlp_GetValueByIndex(this->handle, j, value);
- string str_key = key;
- string str_value = value;
- data[str_key] = str_value;
- this->onMsg(data);
- }
- }
- }
-
- //从队列删除消息
- CITICs_HsHlp_QueueEraseMsg(this->handle, msg);
- }
-};
-
-
-
-///-------------------------------------------------------------------------------------
-///Boost.Python封装
-///-------------------------------------------------------------------------------------
-
-struct CsHsHlpWrap : CsHsHlp, wrapper < CsHsHlp >
-{
- virtual void onMsg(dict data)
- {
- //在向python环境中调用回调函数推送数据前,需要先获取全局锁GIL,防止解释器崩溃
- PyLock lock;
-
- //以下的try...catch...可以实现捕捉python环境中错误的功能,防止C++直接出现原因未知的崩溃
- try
- {
- this->get_override("onMsg")(data);
- }
- catch (error_already_set const &)
- {
- PyErr_Print();
- }
- };
-};
-
-
-BOOST_PYTHON_MODULE(vncshshlp)
-{
- PyEval_InitThreads(); //导入时运行,保证先创建GIL
-
- class_("CsHsHlp")
- .def("loadConfig", &CsHsHlpWrap::loadConfig)
- .def("init", &CsHsHlpWrap::init)
- .def("connectServer", &CsHsHlpWrap::connectServer)
- .def("getErrorMsg", &CsHsHlpWrap::getErrorMsg)
- .def("beginParam", &CsHsHlpWrap::beginParam)
- .def("setValue", &CsHsHlpWrap::setValue)
- .def("bizCallAndCommit", &CsHsHlpWrap::bizCallAndCommit)
- .def("disconnect", &CsHsHlpWrap::disconnect)
- .def("exit", &CsHsHlpWrap::exit)
-
- .def("onMsg", pure_virtual(&CsHsHlpWrap::onMsg))
- ;
-};
\ No newline at end of file
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.h b/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.h
deleted file mode 100644
index 03d3b24c..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.h
+++ /dev/null
@@ -1,123 +0,0 @@
-//说明部分
-
-//系统
-#include "stdafx.h"
-#include
-#include
-
-//Boost
-#define BOOST_PYTHON_STATIC_LIB
-#include //python封装
-#include //python封装
-#include //python封装
-#include //python封装
-#include //python封装
-#include //任务队列的线程功能
-#include //任务队列的线程功能
-#include //任务队列的任务实现
-
-//API
-#include "CITICs_HsT2Hlp.h"
-
-//命名空间
-using namespace std;
-using namespace boost::python;
-using namespace boost;
-
-
-///-------------------------------------------------------------------------------------
-///API中的部分组件
-///-------------------------------------------------------------------------------------
-
-//GIL全局锁简化获取用,
-//用于帮助C++线程获得GIL锁,从而防止python崩溃
-class PyLock
-{
-private:
- PyGILState_STATE gil_state;
-
-public:
- //在某个函数方法中创建该对象时,获得GIL锁
- PyLock()
- {
- gil_state = PyGILState_Ensure();
- }
-
- //在某个函数完成后销毁该对象时,解放GIL锁
- ~PyLock()
- {
- PyGILState_Release(gil_state);
- }
-};
-
-
-
-///-------------------------------------------------------------------------------------
-///封装类
-///-------------------------------------------------------------------------------------
-
-class CsHsHlp
-{
-private:
- HSHLPCFGHANDLE cfgHandle; //配置指针
- HSHLPHANDLE handle; //操作对象指针
- thread *task_thread; //工作线程指针(向python中推送数据)
-
-public:
- CsHsHlp()
- {
- function0 f = boost::bind(&CsHsHlp::processMsg, this);
- //thread t(f);
- //this->task_thread = &t;
- };
-
- ~CsHsHlp()
- {
-
- };
-
- //------------------------------------------------------------------------
- //主动函数部分
- //------------------------------------------------------------------------
-
- //读取配置文件
- int loadConfig(string fileName);
-
- //初始化
- int init();
-
- //连接服务器
- int connectServer();
-
- //获取错误信息
- string getErrorMsg();
-
- //初始化发包请求
- int beginParam();
-
- //设置发包的参数字段名称和值
- int setValue(string key, string value);
-
- //发包
- int bizCallAndCommit(int iFuncID);
-
- //断开服务器
- int disconnect();
-
- //退出
- int exit();
-
- //------------------------------------------------------------------------
- //异步消息处理线程
- //------------------------------------------------------------------------
-
- //连续运行的消息处理函数
- void processMsg();
-
- //------------------------------------------------------------------------
- //Python中继承的回调函数
- //------------------------------------------------------------------------
-
- //向Python中推送消息的函数
- virtual void onMsg(dict data) {};
-};
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj b/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj
deleted file mode 100644
index 772453c2..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj
+++ /dev/null
@@ -1,117 +0,0 @@
-锘
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
-
- {982DF24C-BCD1-4F25-BDE8-84ADB719588B}
- Win32Proj
- vncshshlp
-
-
-
- DynamicLibrary
- true
- v120
- Unicode
-
-
- DynamicLibrary
- false
- v120
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
- X:\GithubProject\vnpy\vn.archive\vn.cs\hshlp;D:\Anaconda2\include;D:\boost_1_57_0;$(IncludePath)
- D:\boost_1_57_0\libs;D:\Anaconda2\libs;X:\GithubProject\vnpy\vn.archive\vn.cs\hshlp;$(ReferencePath)
- .pyd
-
-
-
- Use
- Level3
- Disabled
- WIN32;_DEBUG;_WINDOWS;_USRDLL;VNCSHSHLP_EXPORTS;%(PreprocessorDefinitions)
- true
-
-
- Windows
- true
-
-
-
-
- Level3
- Use
- MaxSpeed
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;VNCSHSHLP_EXPORTS;%(PreprocessorDefinitions)
- true
-
-
- Windows
- true
- true
- true
- X:\GithubProject\vnpy\vn.archive\vn.cs\hshlp;D:\Anaconda2\libs;D:\boost_1_57_0\stage\lib;%(AdditionalLibraryDirectories)
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
- false
-
-
-
-
- Create
- Create
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj.filters b/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj.filters
deleted file mode 100644
index d886f6be..00000000
--- a/archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj.filters
+++ /dev/null
@@ -1,61 +0,0 @@
-锘
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;hm;inl;inc;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Resource Files
-
-
- Resource Files
-
-
-
-
- Resource Files
-
-
- Resource Files
-
-
-
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 00000000..fc2140fa
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,26 @@
+# encoding: UTF-8
+
+from setuptools import setup
+import vnpy
+
+
+long_desc = """
+"""
+
+
+setup(
+ name='vnpy',
+ version=vnpy.__version__,
+ description='A utility for crawling historical and Real-time Quotes data of China stocks',
+ long_description = long_desc,
+ author=vnpy.__author__,
+ author_email='vn.py@foxmail.com',
+ license='MIT',
+ url='http://www.vnpy.org',
+ keywords='Python quantitative trading framework',
+ classifiers=['Development Status :: 4 - Beta',
+ 'Programming Language :: Python :: 2.7'
+ 'License :: OSI Approved :: MIT License'],
+ packages=['vnpy','vnpy.api', 'vnpy.event', 'vnpy.rpc', 'vnpy.trader'],
+ package_data={'': ['*.json']},
+)
\ No newline at end of file
diff --git a/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py b/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py
index 3a12839e..917601d8 100644
--- a/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py
+++ b/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py
@@ -411,8 +411,6 @@ class CshshlpTdApi(CsHsHlp):
order.exchange = exchangeMapReverse.get(d['exchange_type'], EXCHANGE_UNKNOWN)
order.vtSymbol = '.'.join([order.symbol, order.exchange])
- #self.batchNo += 1
- #batchNo = str(self.batchNo)
batchNo = d['batch_no']
self.batchNo = max(self.batchNo, int(batchNo))
@@ -424,8 +422,7 @@ class CshshlpTdApi(CsHsHlp):
order.direction = directionMapReverse.get(d['entrust_bs'], DIRECTION_UNKNOWN)
order.offset = offsetMapReverse.get(d['entrust_oc'], OFFSET_UNKNOWN)
- #order.status = statusMapReverse.get(d['entrust_status'], STATUS_UNKNOWN)
- order.status = statusMapReverse.get(d['entrust_status'], d['entrust_status'])
+ order.status = statusMapReverse.get(d['entrust_status'], STATUS_UNKNOWN)
order.price = float(d['opt_entrust_price'])
order.totalVolume = int(float(d['entrust_amount']))
@@ -494,11 +491,11 @@ class CshshlpTdApi(CsHsHlp):
pos.direction = posDirectionMapReverse.get(d['opthold_type'], DIRECTION_UNKNOWN)
pos.vtPositionName = '.'.join([pos.vtSymbol, pos.direction])
- pos.position = int(float(d['current_amount']))
+ pos.position = int(float(d['hold_amount']))
pos.positionProfit = float(d['income_balance'])
pos.price = float(d['opt_cost_price'])
- pos.frozen = int((float(d['current_amount']) - float(d['enable_amount'])))
-
+ pos.frozen = int((float(d['hold_amount']) - float(d['enable_amount'])))
+
self.gateway.onPosition(pos)
#----------------------------------------------------------------------
@@ -689,7 +686,7 @@ class CshshlpTdApi(CsHsHlp):
def qryContract(self):
""""""
req = self.generateReq()
- #req = {}
+ req['request_num'] = '10000'
self.sendReq(FUNCTION_QRYCONTRACT, req)
#----------------------------------------------------------------------
@@ -699,7 +696,7 @@ class CshshlpTdApi(CsHsHlp):
return
req = self.generateReq()
- d['request_num'] = '1000'
+ req['request_num'] = '10000'
self.sendReq(FUNCTION_QRYPOSITION, req)
#----------------------------------------------------------------------
@@ -709,7 +706,6 @@ class CshshlpTdApi(CsHsHlp):
return
req = self.generateReq()
- d['money_type'] = 'cny'
self.sendReq(FUNCTION_QRYACCOUNT, req)
#----------------------------------------------------------------------
diff --git a/vnpy/trader/gateway/ctpGateway/CTP_connect.json b/vnpy/trader/gateway/ctpGateway/CTP_connect.json
index 8c00b919..e4bfa6b8 100644
--- a/vnpy/trader/gateway/ctpGateway/CTP_connect.json
+++ b/vnpy/trader/gateway/ctpGateway/CTP_connect.json
@@ -1,7 +1,7 @@
{
"brokerID": "9999",
- "tdAddress": "tcp://180.168.146.187:10030",
- "password": "19890624",
- "mdAddress": "tcp://180.168.146.187:10031",
- "userID": "000300"
+ "mdAddress": "tcp://180.168.146.187:10011",
+ "tdAddress": "tcp://180.168.146.187:10001",
+ "userID": "simnow鐢宠",
+ "password": "simnow鐢宠"
}
\ No newline at end of file