亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? opcserverclass.cls

?? vb開發的一個opcclient源代碼
?? CLS
?? 第 1 頁 / 共 3 頁
字號:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "OPCServerClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' The OPCServerClass object is the basic building block object
' for your OPC application.  All interaction with an OPC server
' begins first by connecting to the OPC server.  The OPCServerClass
' object wraps the Automation interface OPCServer object.
' This diagram shows the relationships between the various components
' of the Automation interface wrapper.
'
' >  OPCServer                                      <
' >          |                                      <
' >          +-OPC Groups (Collection)              <
'                      |
'                      +-OPC Group
'                                |
'                                +-OPC Items (Collection)
'                                           |
'                                           +-OPC Items
'
' The OPCServerClass object handles functions found in the first two
' branches of this diagram, the OPCServer object and OPCGroups collection.
' I have not implemented all of the methods and properties found in these
' objects.  Adding access to any methods or properties not currently in
' this module is easy.
'
' The OPCServerClass object handles encapsulating the ServerShutDown
' event.  This allows each instance of an the OPCServerClass object
' you create to get its own ServerShutDown event.

Option Explicit
Option Base 1
' The OPCServer objects must be declared here due to the use of WithEvents
' The OPCServer object is the basic object of the the Automation
' Interface.
Dim WithEvents OPCServerObj As OPCServer
Attribute OPCServerObj.VB_VarHelpID = -1

' The server name is the Prog ID of the connected OPC Server. This
' string is passed to the ConnectOPCServer function of this module
' from the VB application.
Dim OPCServerName As String

' This is a string key used to reference this OPCServerClass object.  The
' OPCServerKey can be used by the VB application anyway the user
' sees fit.  In some cases this is used as a key in controls such as
' a treeview of a listview.
Dim OPCServerKey As String

' The ServerGroups object contains the OPCGroups collection of the
' Automation Interface.  This is used to add new groups to the OPC
' server.  This is shown in the function AddOPCGroup.  This collection
' is kept by the actual Automation Interface wrapper.  The OPCServerClass
' object also keeps its own collection of OPCGroupClass objects.
Dim ServerGroups As OPCGroups

' The OPCServerGroups collection keeps list of OPC groups just like the
' ServerGroups object above.  This collection however is a list of
' OPCGroupClass objects.  The OPCGroupClass object wrap the methods and
' properties of the Automation Interface's OPCGroup and OPCItems collection.
Dim OPCServerGroups As New Collection

' The OPCServerIndex is the numeric version of the OPCServerClass key.
Dim OPCServerIndex As Integer

' The OPCServerClass object has the ability to generate an event when
' an OPC server is shutting down.   When an OPC server supports the
' OPC 2.0 data access specification, it has the option of issuing a
' ServerShutDown event to any of it's attached clients.  In the case
' of a VB application the OPCServer oject will signal the
' ServerShutDown event.  This event is handled here in the OPCServerClass
' object.  If this event fires, the ServerShuttingDown event of the
' OPCServerClass object will be fired.  A VB application has the option of
' hooking this event to be informed when the OPC connection is going to be
' lost.
Public Event ServerShuttingDown(ByVal ServerKey As String)


' The GetOPCServerList function is used to get a list of OPC servers
' available on either the local machine or a remote machine by
' supplying an optional node name.  The GetOPCServerList function
' can be used without an existing OPC connection as you would expect
' otherwise we would have chicken and egg problem.
'
Sub GetOPCServerList(ByRef ServerList As Variant, Optional ByVal NodeName As Variant)
    Dim i As Integer
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetServersError
    
    ServerList = OPCServerObj.GetOPCServers(NodeName)
     
    GoTo SkipOPCGetServersError
    
ShowOPCGetServersError:
    Call DisplayOPC_COM_ErrorValue("Get OPC Server List", Err.Number)
SkipOPCGetServersError:
End Sub


' This sub handles connecting with the selected OPC Server
' The OPCServer Object provides a method called 'Connect' that
' allows you to 'connect' with an OPC server.  The 'Connect'
' method can take two arguments, a server name and a Node name.
' In this example we don't use the Node name since it is
' optional.  When the 'Connect' method is called you should see
' the OPC Server application start if it is not aleady running.
' This function requires that the ServerKey be passed in as string
' forcing the VB application to manage the server keys.  Once a
' OPCServerClass object has been created and connected, the OPCGroupClass
' and OPCItemClass object create their own keys.
'
Function ConnectOPCServer(ServerName As String, ServerKey As String, ServerIndex As Integer, Optional ByVal NodeName As Variant)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCConnectError
    '
    'Create a new OPC Server object
    'Load the selected server name to start the interface
    Dim StoreName As String
    Dim StoreKey As String
    
    StoreName = ServerName
    OPCServerName = StoreName
    OPCServerIndex = ServerIndex
    
    ' The ServerKey is stored as part of the OPCServerClass object to
    ' make access the collections and treeview easier.
    StoreKey = ServerKey
    OPCServerKey = StoreKey
    
    'Attempt to connect with the server (Local only in this example)
    OPCServerObj.Connect OPCServerName, NodeName

    ' Establish the base group collection object to add new groups
    ' this object will be used below in the group interface functions
    ' At thismpoint there are no groups we simply have the interface
    ' that will allow groups to be added.
    Set ServerGroups = OPCServerObj.OPCGroups
    
    ' Establish the initial default conditions for new groups added to this
    ' server.
    SetDefaultGroupIsActive (True)
    SetDefaultGroupUpdateRate (100)
    SetDefaultGroupDeadBand (0)
    
    
    ConnectOPCServer = True
    GoTo SkipOPCConnectError
    
ShowOPCConnectError:
    Call DisplayOPC_COM_ErrorValue("Connect", Err.Number)
    ConnectOPCServer = False
SkipOPCConnectError:
End Function


' This sub handles disconnecting from the OPC Server.  The OPCServer
' Object provides the method 'Disconnect'.  Calling this on an
' active OPCServer object will release the OPC Server interface with
' your application.  When this occurs you should see the OPC server
' application shut down if it started automatically on the OPC
' connect. This function should not be called until the group(s) and items
' have been removed from this OPCServerClass object.
'
Function DisconnectOPCServer()
    'Set error handling for OPC Function
    On Error GoTo ShowOPCDisconnectError

    'Disconnect from the server, This should only occur after the
    'items and group have been removed.  The server will release
    ' the groups and items for this connection even if you don't
    ' but it is good practice to release the groups and items
    ' progmatically since you don't want to count on the OPC
    ' server to clean up after your application.
    OPCServerObj.Disconnect
    DisconnectOPCServer = True
    
    GoTo SkipDisconnectError
ShowOPCDisconnectError:
    Call DisplayOPC_COM_ErrorValue("Disconnect", Err.Number)
    DisconnectOPCServer = False
SkipDisconnectError:
End Function

' This function handles returning the OPCServerKey string. The
' OPCServerKey is local to the OPCSererClass object and does not
' interact with the underlying Automation Interface.
'
Function GetOPCServerKey()
    GetOPCServerKey = OPCServerKey
End Function

' This functions returns a reference to the OPCServerGroups
' collection maintained by the OPCServerClass object. The
' OPCServerGroups is local to the OPCSererClass object and is not
' retrieved from the underlying Automation Interface.
'
Function GetOPCServerGroupCollection()
    Set GetOPCServerGroupCollection = OPCServerGroups
End Function


' This function returns Serverindex as a numeric value.  The
' OPCServerIndex is local to the OPCSererClass object and does not
' interact with the underlying Automation Interface.
'
Function GetOPCServerIndex()
    GetOPCServerIndex = OPCServerIndex
End Function


' This function returns the name of the OPC Server, this is the ProgId
' of the OPC server.
'
Function GetServerName(ByRef ServerName As String)
    ' Attempt to get the server ServerName.
    ServerName = OPCServerName
    GetServerName = True
End Function


' The next set of functions provide wrappers to the OPCServer object
' methods that allow you to get the various properties of the OPCServer
' object.
'


' Get the server StartTime property
' The server start time returns the time the server has started on
' the host machine.  The server start time is unique to the
' server. All connected clients will receive the same time.
'
Function GetStartTime(ByRef StartTime As Date)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCStartTimeError
    
    ' Attempt to get the server start time.
    StartTime = OPCServerObj.StartTime
    GetStartTime = True
    GoTo SkipOPCStartTimeError
    
ShowOPCStartTimeError:
    Call DisplayOPC_COM_ErrorValue("StartTime", Err.Number)
    GetStartTime = False
    
SkipOPCStartTimeError:
End Function


' Get the server CurrentTime property
' The value is the current time at the server.  It is acquired
' by the OPC automation interface using the GetStatus interface.
'
Function GetCurrentTime(ByRef CurrentTime As Date)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCCurrentTimeError
    
    ' Attempt to get the server current time.
    CurrentTime = OPCServerObj.CurrentTime
    GetCurrentTime = True
    GoTo SkipOPCCurrentTimeError
    
ShowOPCCurrentTimeError:
    Call DisplayOPC_COM_ErrorValue("CurrentTime", Err.Number)
    GetCurrentTime = False
    
SkipOPCCurrentTimeError:
End Function


' Get the LastUpdateTime property
' The LastUpdateTime return the time the last update occured
' for the server this value is for all clients connected to
' the server therfore the time returned may not be the last
' time your client received an update.
'
Function GetLastUpdateTime(ByRef LastUpdateTime As Date)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCLastUpdateTimeError
    
    ' Attempt to get the server Last Update time.
    LastUpdateTime = OPCServerObj.LastUpdateTime
    GetLastUpdateTime = True
    GoTo SkipOPCLastUpdateTimeError

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区中文字幕| 亚洲裸体在线观看| 欧美日韩精品一区二区三区四区| av在线不卡电影| 成人免费毛片a| jlzzjlzz亚洲日本少妇| 成人av网址在线观看| av在线不卡网| 精品1区2区3区| 欧美一区二区三区在线视频| 日韩免费电影一区| 国产日产精品1区| 亚洲欧美国产77777| 亚洲电影欧美电影有声小说| 日韩 欧美一区二区三区| 久久精品国产秦先生| 黑人巨大精品欧美一区| 国产ts人妖一区二区| 北条麻妃一区二区三区| 欧美性一区二区| 欧美一级xxx| 国产欧美精品日韩区二区麻豆天美| 国产亚洲一二三区| 亚洲卡通欧美制服中文| 日本成人中文字幕在线视频| 国产不卡视频在线观看| 日本丶国产丶欧美色综合| 5858s免费视频成人| 国产亚洲精品bt天堂精选| 亚洲人快播电影网| 久久精品国产亚洲一区二区三区| 成人免费黄色在线| 欧美日韩三级一区| 国产欧美日韩精品在线| 亚洲成人免费视| 成人免费av资源| 欧美日韩黄色一区二区| 久久久蜜臀国产一区二区| 综合色天天鬼久久鬼色| 久久精品国产亚洲高清剧情介绍| av在线不卡电影| 精品精品欲导航| 亚洲综合一二三区| 国产精一区二区三区| 欧美特级限制片免费在线观看| 亚洲精品一区二区三区在线观看| 一区av在线播放| 成人av中文字幕| 精品福利视频一区二区三区| 亚洲一级电影视频| 91在线国内视频| 久久久99精品免费观看不卡| 偷窥少妇高潮呻吟av久久免费| 成人免费av在线| 久久新电视剧免费观看| 日本不卡中文字幕| 欧美性xxxxxx少妇| 一区二区三区中文在线| 成人美女视频在线看| 精品国产凹凸成av人网站| 丝袜美腿高跟呻吟高潮一区| 日本韩国一区二区三区视频| 欧美激情综合五月色丁香小说| 久久99九九99精品| 日韩午夜在线观看视频| 蜜桃视频在线一区| 9191精品国产综合久久久久久| 亚洲啪啪综合av一区二区三区| 成人手机在线视频| 中文字幕乱码日本亚洲一区二区| 国产一区二区三区精品欧美日韩一区二区三区 | 懂色av一区二区三区免费观看| 337p亚洲精品色噜噜狠狠| 亚洲成人精品在线观看| 欧美日韩一区在线观看| 亚洲va韩国va欧美va| 欧美精品久久一区| 五月天国产精品| 日韩西西人体444www| 极品美女销魂一区二区三区免费| 日韩美女一区二区三区四区| 久久精品国产亚洲aⅴ | 国产91精品在线观看| 久久久久久久久岛国免费| 国产精品中文欧美| 国产女主播视频一区二区| 成人福利视频网站| 国产精品电影院| 欧美少妇bbb| 青草国产精品久久久久久| 精品免费视频一区二区| 成人午夜精品在线| 亚洲男人的天堂在线观看| 欧美性生活大片视频| 日韩精品成人一区二区三区| 欧美xxxx在线观看| 国产91露脸合集magnet| 亚洲综合一二三区| 精品国产一区二区三区久久久蜜月| 激情av综合网| 亚洲女人的天堂| 欧美欧美午夜aⅴ在线观看| 麻豆成人综合网| 欧美国产一区在线| 欧美视频一区二区三区在线观看| 蜜臀a∨国产成人精品| 中文字幕巨乱亚洲| 777欧美精品| 成人激情小说网站| 天堂蜜桃91精品| 国产欧美一区二区三区在线老狼| 色综合久久久久综合| 精品一区二区av| 一区二区三区四区中文字幕| 欧美一区二区美女| 色狠狠一区二区| 国产一区在线观看视频| 夜夜嗨av一区二区三区网页| 久久久五月婷婷| 欧美日韩三级在线| 成人久久18免费网站麻豆| 免费成人在线网站| 亚洲日本在线a| 久久久久久久久久久久久夜| 欧美日韩国产三级| 99v久久综合狠狠综合久久| 久久机这里只有精品| 亚洲国产精品久久艾草纯爱| 国产精品伦理一区二区| 精品欧美黑人一区二区三区| 欧美视频完全免费看| 91丝袜美腿高跟国产极品老师 | 欧美日韩久久一区| 99久久国产综合精品麻豆| 久久国产剧场电影| 丝袜亚洲精品中文字幕一区| 一区二区三区视频在线观看 | 欧亚洲嫩模精品一区三区| 国产九色sp调教91| 国产制服丝袜一区| 麻豆91精品视频| 日本成人在线看| 日韩av成人高清| 日韩经典一区二区| 午夜精品久久久| 亚洲成人动漫av| 婷婷亚洲久悠悠色悠在线播放| 一区二区欧美国产| 一区二区三区波多野结衣在线观看 | 欧美变态tickling挠脚心| 欧美日韩精品一区二区三区四区 | 日韩一区日韩二区| 国产精品三级久久久久三级| 久久久噜噜噜久久人人看 | 亚洲精品国产无天堂网2021| 一区在线观看免费| 一区二区三区在线免费| 一区二区三区四区在线播放| 亚洲午夜免费电影| 日韩av电影免费观看高清完整版在线观看 | 一区二区三区免费观看| 亚洲精品欧美激情| 亚洲午夜激情网站| 视频在线在亚洲| 黄色日韩网站视频| 成人网在线免费视频| 一本在线高清不卡dvd| 欧美午夜在线观看| 欧美一级欧美三级在线观看| 精品剧情v国产在线观看在线| 久久综合视频网| 中文字幕欧美日韩一区| 一区二区三区四区高清精品免费观看| 亚洲一区二三区| 麻豆成人久久精品二区三区红 | 一区二区视频免费在线观看| 亚洲资源在线观看| 精品一区二区三区免费视频| 粉嫩一区二区三区在线看| 色先锋aa成人| 日韩一级完整毛片| 国产三级精品视频| 五月天网站亚洲| 国产一区不卡精品| 欧美日韩美少妇| 久久青草国产手机看片福利盒子| 自拍偷拍国产精品| 日本一不卡视频| av动漫一区二区| 91麻豆精品久久久久蜜臀| 日本一区免费视频| 视频在线观看一区| 91蜜桃免费观看视频| 4438x成人网最大色成网站| 国产精品午夜在线| 蜜桃av一区二区在线观看| 99久久国产免费看| 久久久久久久精| 美女尤物国产一区| 91国内精品野花午夜精品|