/////////////////////////////////////////////////////////////////////////////
-- OPC Quick Client Distributed Source Code Version --
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
INTRODUCTION:
/////////////////////////////////////////////////////////////////////////////
The source code provide here is for a slightly stripped down version of our
OPC Quick Client application. (None of the code removed is central to
understanding how to use OPC.) This application has been around for a few
years and is used extensively by our developers and testers - it's proven
code. In it, you will see how to browse OPC servers, connect to them, add
groups and items, and read and write data. OPC versions 1.0 and 2.0 are
both supported. You may borrow freely from this code to create your own
OPC client applications.
The workspace and project files were created using Microsoft Visual C++ 6.0.
Several project configurations are provided: Win32 Release, Win32 Debug,
Unicode Release, and Unicode Debug.
Before you dive into the code, it is recommended that you first familiarize
yourself with the OPC Specification. This information is contained in the
"Data Access Custom Interface Standard" document publicly available for
download from opcfoundation.org. It is also recommended that you be fairly
proficient with the C++ programming language, MFC, and COM.
Though a great deal of internal documentation is included in the code, you
may need to refer to the Microsoft Developer's Network (MSDN) documentation
for additional information on Windows specific functions, structures, and
MFC classes.
There is a one-to-one relationship between certain object in a server
and here in this client. For example, the client may maintain a CKGroup
object which is associated with an OPC Group object in a server. To
prevent confusion, objects on the server side are referred to as OPC <Objects>
and the associated objects on the client side are given by their class name,
which generally start with "CK" for Class Kepware, or simply "object".
When you begin examining the code, we suggest that you look at the COM
interface classes first: advisesink.cpp, datasink20.cpp, and
shutdownsink.cpp. From there, you should look at server.cpp, group.cpp,
then item.cpp. This covers all of the OPC stuff. Having done that, all
of the Windows GUI code will make more sense. Look at document.cpp first,
then the associated views: groupview.cpp, itemview.cpp, and eventview.cpp.
You can look at incidental dialog and property sheet classes and the
miscellaneous utility classes like those in editfilters.cpp as you go.
Markers used by the Visual C++ class wizard ("//{{AFX_VIRTUAL(CKDocument)",
"//{{AFX_DATA_MAP(CKServerEnumerateGroupsDlg)", etc.) are scattered
throughout the code. If you wish to make your "borrowed" code a bit more
"pretty", you can remove them. Just be aware that the class wizard will
no longer work if you do.
You will need to have the VC++ UNICODE libraries installed on your system
in order to build the application. These libraries are NOT installed by
default, so make sure you have them using the steps below:
1) Run the VC++ 6.0 install program and allow it to detect the components
installed on your system.
2) Click the "Add/Remove" button.
3) Select the "VC++ MFC and Template Libraries" item and click the "Change
Options" button.
4) Select the "MS Foundation Class Libraries" item and click the "Change
Options" button.
5) Make sure "Shared Libraries for UNICODE" is checked. You might also
want to check "Static Libraries for UNICODE" while you're at it,
though you won't need them to build the Quick Client project as is.
/////////////////////////////////////////////////////////////////////////////
LEGAL STUFF:
/////////////////////////////////////////////////////////////////////////////
This programming example is provided "AS IS". As such Kepware, Inc.
makes no claims to the worthiness of the code and does not warranty
the code to be error free. It is provided freely and can be used in
your own projects. If you do find this code useful, place a little
marketing plug for Kepware in your code. While we would love to help
every one who is trying to write a great OPC client application, the
uniqueness of every project and the limited number of hours in a day
simply prevents us from doing so. If you really find yourself in a
bind, please contact Kepware's technical support. We will not be able
to assist you with server related problems unless you are using KepServer
or KepServerEx.
没有合适的资源?快使用搜索试试~ 我知道了~
Visual C++ OPC Client 与KEPServerEx V4.0连接
共97个文件
h:39个
cpp:30个
bmp:18个
1星 需积分: 50 37 下载量 21 浏览量
2017-04-08
17:31:26
上传
评论
收藏 306KB ZIP 举报
温馨提示
Visual C++ OPC Client 与KEPServerEx V4.0连接 官网原版
资源推荐
资源详情
资源评论
收起资源包目录
Visual C++ OPC Client Example.zip (97个子文件)
Visual C++ OPC Client Example
safelock.h 1KB
editfilters.cpp 14KB
README.txt 5KB
document.h 4KB
servergeterrorstringdlg.cpp 7KB
fixedsharedfile.h 3KB
opcda_i.c 3KB
opcda.h 93KB
listeditctrl.h 3KB
datasink20.h 3KB
grouppropertysheet.cpp 24KB
grouppropertysheet.h 5KB
item.cpp 24KB
opctestclient.cpp 13KB
server.h 5KB
res
newitem.bmp 238B
groupimages.bmp 1KB
itemimages.bmp 630B
validateitemgray.bmp 238B
opctestclient.rc2 405B
deleteitemgray.bmp 238B
validateitem.bmp 238B
deleteitem.bmp 238B
nextgray.bmp 238B
components.bmp 566B
dupitem.bmp 238B
opctestclient.ico 766B
toolbar.bmp 1KB
next.bmp 238B
previous.bmp 238B
previousgray.bmp 238B
dupitemgray.bmp 238B
eventimages.bmp 374B
checkboxes.bmp 418B
newitemgray.bmp 238B
opctestclient.dsw 855B
stdafx.h 2KB
safearray.h 2KB
opccomn_i.c 2KB
updateintervaldlg.cpp 4KB
shutdownsink.h 2KB
itemwritedlg.h 3KB
versioninfo.h 2KB
globals.cpp 8KB
itemwritedlg.cpp 16KB
opctestclient.dsp 13KB
opcquality.h 2KB
editfilters.h 4KB
opcerrors.h 5KB
opctestclient.rc 52KB
serverpropertysheet.h 5KB
mainwnd.cpp 41KB
itemview.cpp 80KB
listeditctrl.cpp 18KB
opctestclient.clw 13KB
opctestclient.aps 83KB
itempropertiesdlg.h 3KB
itemadddlg.cpp 64KB
serverenumgroupsdlg.cpp 13KB
serverpropertysheet.cpp 29KB
timestmp.h 4KB
advisesink.cpp 23KB
group.h 8KB
eventview.cpp 25KB
itempropertiesdlg.cpp 32KB
groupview.cpp 52KB
servergroupbynamedlg.cpp 6KB
advisesink.h 2KB
imagebutton.h 2KB
itemview.h 5KB
datasink20.cpp 17KB
opccomn.h 24KB
statusbartext.h 1KB
mainwnd.h 4KB
resource.h 13KB
statusbartext.cpp 3KB
updateintervaldlg.h 2KB
eventview.h 4KB
server.cpp 51KB
opctestclient.h 3KB
itemadddlg.h 5KB
shutdownsink.cpp 7KB
smarttooltip.cpp 6KB
servergeterrorstringdlg.h 2KB
imagebutton.cpp 4KB
group.cpp 117KB
groupview.h 3KB
timestmp.cpp 45KB
versioninfo.cpp 6KB
opcprops.h 2KB
serverenumgroupsdlg.h 2KB
smarttooltip.h 1KB
item.h 4KB
document.cpp 35KB
globals.h 5KB
safearray.cpp 15KB
servergroupbynamedlg.h 2KB
共 97 条
- 1
资源评论
- 薯条超人丶2017-05-26根本无法使用,大家不用浪费时间了。
t560311307
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功