tallakt-picopc 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +28 -0
- data/README.rdoc +58 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/lib/picopc.rb +2 -0
- data/lib/picopc/olegen_opc_automation.rb +1940 -0
- data/lib/picopc/picopc.rb +113 -0
- data/spec/picopc_spec.rb +59 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- data/tallakt-picopc.gemspec +58 -0
- metadata +83 -0
data/LICENSE
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
(The MIT license)
|
2
|
+
|
3
|
+
|
4
|
+
Copyright (c) 2010 Siv Ing R Østerhus AS
|
5
|
+
|
6
|
+
Written by Tallak Tveide
|
7
|
+
|
8
|
+
Permission is hereby granted, free of charge, to any person
|
9
|
+
obtaining a copy of this software and associated documentation
|
10
|
+
files (the "Software"), to deal in the Software without
|
11
|
+
restriction, including without limitation the rights to use,
|
12
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
13
|
+
copies of the Software, and to permit persons to whom the
|
14
|
+
Software is furnished to do so, subject to the following
|
15
|
+
conditions:
|
16
|
+
|
17
|
+
The above copyright notice and this permission notice shall be
|
18
|
+
included in all copies or substantial portions of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
22
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
23
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
24
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
25
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
27
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
28
|
+
|
data/README.rdoc
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
= PicOpc
|
2
|
+
|
3
|
+
* http://github.com/tallakt/picopc
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
Pico OPC is a small library for Ruby 1.9 on Windows that can communicate with OPC (OLE for Process control) servers. OPC is frequently used for process control applications (eg. PLC programming, factory systems). Using this library it is possible to automate testing of such systems.
|
8
|
+
|
9
|
+
Since the library is based on an inefficient command set (only reads/writes one value at a time, without callbacks), and is still in an early version, don't use this library for mission critical applications.
|
10
|
+
|
11
|
+
For a more full featured OPC library i recommend OpenOPC written in Python (http://openopc.sourceforge.net/). This package also has some very useful command line tools that work well with PicOpc.
|
12
|
+
|
13
|
+
PicOpc supports 'Classic' OPC - ie DCOM based. All commands are blocking (ie. program halts until operation has completed)
|
14
|
+
|
15
|
+
To run the tests, you must install the rspec gem and the free Matrikon OPC Simulation application.
|
16
|
+
|
17
|
+
== Examples
|
18
|
+
|
19
|
+
this simple example covers most functionality
|
20
|
+
|
21
|
+
PicOpc.connect 'Matrikon.OPC.Simulation' do |opc|
|
22
|
+
# Read a variable
|
23
|
+
puts opc.read('Random.Int1')
|
24
|
+
# write a variable
|
25
|
+
opc.write('Bucket Brigade.String', 'PicOpc Rules!')
|
26
|
+
|
27
|
+
# Alternate syntax
|
28
|
+
puts opc['Random.Int1']
|
29
|
+
opc['Bucket Brigade.String'] = 'PicOpc Rules!'
|
30
|
+
|
31
|
+
# Defining tags with shortcuts
|
32
|
+
opc.tag 'Random.Int1', :ri
|
33
|
+
opc.tag 'Bucket Brigade.String', :bbs
|
34
|
+
puts opc.ri
|
35
|
+
opc.bbs = 'PicOpc Rules!'
|
36
|
+
end
|
37
|
+
|
38
|
+
Note that all exceptions thrown are of the class +PicOpcException+.
|
39
|
+
|
40
|
+
|
41
|
+
If you don't want to use a block you can do this:
|
42
|
+
|
43
|
+
opc = PicOpc::Client.new 'Matrikon.OPC.Simulation'
|
44
|
+
puts opc.read('Random.Int1')
|
45
|
+
opc.cleanup
|
46
|
+
|
47
|
+
Sometimes you may want to tweak the :cache option
|
48
|
+
|
49
|
+
PicOpc.connect 'Matrikon.OPC.Simulation', :cache => true { |opc| ... }
|
50
|
+
|
51
|
+
Using cached reads is a lot faster, but depends on your OPC server to update the values from it's source (usually the PLC). Default behaviour is to read from the device.
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
== Install
|
56
|
+
|
57
|
+
[sudo] gem install tallakt-picopc
|
58
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "tallakt-picopc"
|
8
|
+
gem.summary = %Q{Pico OPC: very tiny OPc implementation for Ruby}
|
9
|
+
gem.description = %Q{A simple DCOM OPC library for ruby that allows simple access to OPC servers but with poor efficiency}
|
10
|
+
gem.email = "tallak@tveide.net"
|
11
|
+
gem.homepage = "http://github.com/tallakt/picopc"
|
12
|
+
gem.authors = ["Tallak Tveide"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
+
gem.required_ruby_version = '>= 1.9.0'
|
15
|
+
gem.requirements << 'To run tests, you must install Matrikon OPC Simulator'
|
16
|
+
gem.requirements << 'PicOpc will only run on Windows systems due to DCOM dependency'
|
17
|
+
# generates an error, no big deal
|
18
|
+
# gem.platform = Gem::Platform::WIN32
|
19
|
+
gem.rdoc_options << '--title' << 'PicOpc -- Tiny Ruby OPC' <<
|
20
|
+
'--main' << 'README' <<
|
21
|
+
'--line-numbers'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
26
|
+
end
|
27
|
+
Jeweler::GemcutterTasks.new
|
28
|
+
rescue LoadError
|
29
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
30
|
+
end
|
31
|
+
|
32
|
+
require 'spec/rake/spectask'
|
33
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
34
|
+
spec.libs << 'lib' << 'spec'
|
35
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
36
|
+
end
|
37
|
+
|
38
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
39
|
+
spec.libs << 'lib' << 'spec'
|
40
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
41
|
+
spec.rcov = true
|
42
|
+
end
|
43
|
+
|
44
|
+
task :spec => :check_dependencies
|
45
|
+
|
46
|
+
task :default => :spec
|
47
|
+
|
48
|
+
require 'rake/rdoctask'
|
49
|
+
Rake::RDocTask.new do |rdoc|
|
50
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
51
|
+
|
52
|
+
rdoc.rdoc_dir = 'rdoc'
|
53
|
+
rdoc.title = "picopc #{version}"
|
54
|
+
rdoc.rdoc_files.include('README*')
|
55
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/lib/picopc.rb
ADDED
@@ -0,0 +1,1940 @@
|
|
1
|
+
require 'win32ole'
|
2
|
+
require 'win32ole/property'
|
3
|
+
|
4
|
+
#
|
5
|
+
module OPCNamespaceTypes
|
6
|
+
include WIN32OLE::VARIANT
|
7
|
+
attr_reader :lastargs
|
8
|
+
OPCHierarchical = 1
|
9
|
+
OPCFlat = 2
|
10
|
+
end
|
11
|
+
|
12
|
+
#
|
13
|
+
module OPCDataSource
|
14
|
+
include WIN32OLE::VARIANT
|
15
|
+
attr_reader :lastargs
|
16
|
+
OPCCache = 1
|
17
|
+
OPCDevice = 2
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
module OPCAccessRights
|
22
|
+
include WIN32OLE::VARIANT
|
23
|
+
attr_reader :lastargs
|
24
|
+
OPCReadable = 1
|
25
|
+
OPCWritable = 2
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
module OPCServerState
|
30
|
+
include WIN32OLE::VARIANT
|
31
|
+
attr_reader :lastargs
|
32
|
+
OPCRunning = 1
|
33
|
+
OPCFailed = 2
|
34
|
+
OPCNoconfig = 3
|
35
|
+
OPCSuspended = 4
|
36
|
+
OPCTest = 5
|
37
|
+
OPCDisconnected = 6
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
module OPCErrors
|
42
|
+
include WIN32OLE::VARIANT
|
43
|
+
attr_reader :lastargs
|
44
|
+
OPCInvalidHandle = -1073479679
|
45
|
+
OPCBadType = -1073479676
|
46
|
+
OPCPublic = -1073479675
|
47
|
+
OPCBadRights = -1073479674
|
48
|
+
OPCUnknownItemID = -1073479673
|
49
|
+
OPCInvalidItemID = -1073479672
|
50
|
+
OPCInvalidFilter = -1073479671
|
51
|
+
OPCUnknownPath = -1073479670
|
52
|
+
OPCRange = -1073479669
|
53
|
+
OPCDuplicateName = -1073479668
|
54
|
+
OPCUnsupportedRate = 262157
|
55
|
+
OPCClamp = 262158
|
56
|
+
OPCInuse = 262159
|
57
|
+
OPCInvalidConfig = -1073479664
|
58
|
+
OPCNotFound = -1073479663
|
59
|
+
OPCInvalidPID = -1073479165
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
module OPCQuality
|
64
|
+
include WIN32OLE::VARIANT
|
65
|
+
attr_reader :lastargs
|
66
|
+
OPCQualityMask = 192
|
67
|
+
OPCQualityBad = 0
|
68
|
+
OPCQualityUncertain = 64
|
69
|
+
OPCQualityGood = 192
|
70
|
+
end
|
71
|
+
|
72
|
+
#
|
73
|
+
module OPCQualityStatus
|
74
|
+
include WIN32OLE::VARIANT
|
75
|
+
attr_reader :lastargs
|
76
|
+
OPCStatusMask = 252
|
77
|
+
OPCStatusConfigError = 4
|
78
|
+
OPCStatusNotConnected = 8
|
79
|
+
OPCStatusDeviceFailure = 12
|
80
|
+
OPCStatusSensorFailure = 16
|
81
|
+
OPCStatusLastKnown = 20
|
82
|
+
OPCStatusCommFailure = 24
|
83
|
+
OPCStatusOutOfService = 28
|
84
|
+
OPCStatusLastUsable = 68
|
85
|
+
OPCStatusSensorCal = 80
|
86
|
+
OPCStatusEGUExceeded = 84
|
87
|
+
OPCStatusSubNormal = 88
|
88
|
+
OPCStatusLocalOverride = 216
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
module OPCQualityLimits
|
93
|
+
include WIN32OLE::VARIANT
|
94
|
+
attr_reader :lastargs
|
95
|
+
OPCLimitMask = 3
|
96
|
+
OPCLimitOk = 0
|
97
|
+
OPCLimitLow = 1
|
98
|
+
OPCLimitHigh = 2
|
99
|
+
OPCLimitConst = 3
|
100
|
+
end
|
101
|
+
|
102
|
+
# OPCServer Object
|
103
|
+
module IOPCAutoServer
|
104
|
+
include WIN32OLE::VARIANT
|
105
|
+
attr_reader :lastargs
|
106
|
+
|
107
|
+
# DATE StartTime
|
108
|
+
# Time the Server Started
|
109
|
+
def StartTime()
|
110
|
+
ret = _getproperty(1610743808, [], [])
|
111
|
+
@lastargs = WIN32OLE::ARGV
|
112
|
+
ret
|
113
|
+
end
|
114
|
+
|
115
|
+
# DATE CurrentTime
|
116
|
+
def CurrentTime()
|
117
|
+
ret = _getproperty(1610743809, [], [])
|
118
|
+
@lastargs = WIN32OLE::ARGV
|
119
|
+
ret
|
120
|
+
end
|
121
|
+
|
122
|
+
# DATE LastUpdateTime
|
123
|
+
# Last time the server sent data
|
124
|
+
def LastUpdateTime()
|
125
|
+
ret = _getproperty(1610743810, [], [])
|
126
|
+
@lastargs = WIN32OLE::ARGV
|
127
|
+
ret
|
128
|
+
end
|
129
|
+
|
130
|
+
# I2 MajorVersion
|
131
|
+
def MajorVersion()
|
132
|
+
ret = _getproperty(1610743811, [], [])
|
133
|
+
@lastargs = WIN32OLE::ARGV
|
134
|
+
ret
|
135
|
+
end
|
136
|
+
|
137
|
+
# I2 MinorVersion
|
138
|
+
def MinorVersion()
|
139
|
+
ret = _getproperty(1610743812, [], [])
|
140
|
+
@lastargs = WIN32OLE::ARGV
|
141
|
+
ret
|
142
|
+
end
|
143
|
+
|
144
|
+
# I2 BuildNumber
|
145
|
+
def BuildNumber()
|
146
|
+
ret = _getproperty(1610743813, [], [])
|
147
|
+
@lastargs = WIN32OLE::ARGV
|
148
|
+
ret
|
149
|
+
end
|
150
|
+
|
151
|
+
# BSTR VendorInfo
|
152
|
+
# Server Vendor's name
|
153
|
+
def VendorInfo()
|
154
|
+
ret = _getproperty(1610743814, [], [])
|
155
|
+
@lastargs = WIN32OLE::ARGV
|
156
|
+
ret
|
157
|
+
end
|
158
|
+
|
159
|
+
# I4 ServerState
|
160
|
+
# Returns an OPCServerState
|
161
|
+
def ServerState()
|
162
|
+
ret = _getproperty(1610743815, [], [])
|
163
|
+
@lastargs = WIN32OLE::ARGV
|
164
|
+
ret
|
165
|
+
end
|
166
|
+
|
167
|
+
# BSTR ServerName
|
168
|
+
# Returns this server's name
|
169
|
+
def ServerName()
|
170
|
+
ret = _getproperty(1610743816, [], [])
|
171
|
+
@lastargs = WIN32OLE::ARGV
|
172
|
+
ret
|
173
|
+
end
|
174
|
+
|
175
|
+
# BSTR ServerNode
|
176
|
+
# Returns this server's node
|
177
|
+
def ServerNode()
|
178
|
+
ret = _getproperty(1610743817, [], [])
|
179
|
+
@lastargs = WIN32OLE::ARGV
|
180
|
+
ret
|
181
|
+
end
|
182
|
+
|
183
|
+
# BSTR ClientName
|
184
|
+
# Identify the client
|
185
|
+
def ClientName()
|
186
|
+
ret = _getproperty(1610743818, [], [])
|
187
|
+
@lastargs = WIN32OLE::ARGV
|
188
|
+
ret
|
189
|
+
end
|
190
|
+
|
191
|
+
# I4 LocaleID
|
192
|
+
def LocaleID()
|
193
|
+
ret = _getproperty(1610743820, [], [])
|
194
|
+
@lastargs = WIN32OLE::ARGV
|
195
|
+
ret
|
196
|
+
end
|
197
|
+
|
198
|
+
# I4 Bandwidth
|
199
|
+
# Might possibly be Percent utilization
|
200
|
+
def Bandwidth()
|
201
|
+
ret = _getproperty(1610743822, [], [])
|
202
|
+
@lastargs = WIN32OLE::ARGV
|
203
|
+
ret
|
204
|
+
end
|
205
|
+
|
206
|
+
# OPCGroups OPCGroups
|
207
|
+
# The collection of OPCGroup Objects
|
208
|
+
def OPCGroups()
|
209
|
+
ret = _getproperty(0, [], [])
|
210
|
+
@lastargs = WIN32OLE::ARGV
|
211
|
+
ret
|
212
|
+
end
|
213
|
+
|
214
|
+
# VARIANT PublicGroupNames
|
215
|
+
# Returns an array of names
|
216
|
+
def PublicGroupNames()
|
217
|
+
ret = _getproperty(1610743824, [], [])
|
218
|
+
@lastargs = WIN32OLE::ARGV
|
219
|
+
ret
|
220
|
+
end
|
221
|
+
|
222
|
+
# VOID ClientName
|
223
|
+
# Identify the client
|
224
|
+
def ClientName=(arg0)
|
225
|
+
ret = _setproperty(1610743818, [arg0], [VT_BSTR])
|
226
|
+
@lastargs = WIN32OLE::ARGV
|
227
|
+
ret
|
228
|
+
end
|
229
|
+
|
230
|
+
# VOID LocaleID
|
231
|
+
def LocaleID=(arg0)
|
232
|
+
ret = _setproperty(1610743820, [arg0], [VT_I4])
|
233
|
+
@lastargs = WIN32OLE::ARGV
|
234
|
+
ret
|
235
|
+
end
|
236
|
+
|
237
|
+
# VARIANT GetOPCServers
|
238
|
+
# Returns an array of Server names, optionally on another node
|
239
|
+
# VARIANT arg0 --- Node [IN]
|
240
|
+
def GetOPCServers(arg0=nil)
|
241
|
+
ret = _invoke(1610743825, [arg0], [VT_VARIANT])
|
242
|
+
@lastargs = WIN32OLE::ARGV
|
243
|
+
ret
|
244
|
+
end
|
245
|
+
|
246
|
+
# VOID Connect
|
247
|
+
# Connect to a named OPC Server
|
248
|
+
# BSTR arg0 --- ProgID [IN]
|
249
|
+
# VARIANT arg1 --- Node [IN]
|
250
|
+
def Connect(arg0, arg1=nil)
|
251
|
+
ret = _invoke(1610743826, [arg0, arg1], [VT_BSTR, VT_VARIANT])
|
252
|
+
@lastargs = WIN32OLE::ARGV
|
253
|
+
ret
|
254
|
+
end
|
255
|
+
|
256
|
+
# VOID Disconnect
|
257
|
+
# End Connection with OPC Server
|
258
|
+
def Disconnect()
|
259
|
+
ret = _invoke(1610743827, [], [])
|
260
|
+
@lastargs = WIN32OLE::ARGV
|
261
|
+
ret
|
262
|
+
end
|
263
|
+
|
264
|
+
# OPCBrowser CreateBrowser
|
265
|
+
# Create a new OPCBrowser Object
|
266
|
+
def CreateBrowser()
|
267
|
+
ret = _invoke(1610743828, [], [])
|
268
|
+
@lastargs = WIN32OLE::ARGV
|
269
|
+
ret
|
270
|
+
end
|
271
|
+
|
272
|
+
# BSTR GetErrorString
|
273
|
+
# Convert an error code to a descriptive string
|
274
|
+
# I4 arg0 --- ErrorCode [IN]
|
275
|
+
def GetErrorString(arg0)
|
276
|
+
ret = _invoke(1610743829, [arg0], [VT_I4])
|
277
|
+
@lastargs = WIN32OLE::ARGV
|
278
|
+
ret
|
279
|
+
end
|
280
|
+
|
281
|
+
# VARIANT QueryAvailableLocaleIDs
|
282
|
+
# The LocaleIDs supported by this server
|
283
|
+
def QueryAvailableLocaleIDs()
|
284
|
+
ret = _invoke(1610743830, [], [])
|
285
|
+
@lastargs = WIN32OLE::ARGV
|
286
|
+
ret
|
287
|
+
end
|
288
|
+
|
289
|
+
# VOID QueryAvailableProperties
|
290
|
+
# BSTR arg0 --- ItemID [IN]
|
291
|
+
# I4 arg1 --- Count [OUT]
|
292
|
+
# I4 arg2 --- PropertyIDs [OUT]
|
293
|
+
# BSTR arg3 --- Descriptions [OUT]
|
294
|
+
# I2 arg4 --- DataTypes [OUT]
|
295
|
+
def QueryAvailableProperties(arg0, arg1, arg2, arg3, arg4)
|
296
|
+
ret = _invoke(1610743831, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_BYREF|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_BSTR, VT_BYREF|VT_ARRAY|VT_I2])
|
297
|
+
@lastargs = WIN32OLE::ARGV
|
298
|
+
ret
|
299
|
+
end
|
300
|
+
|
301
|
+
# VOID GetItemProperties
|
302
|
+
# BSTR arg0 --- ItemID [IN]
|
303
|
+
# I4 arg1 --- Count [IN]
|
304
|
+
# I4 arg2 --- PropertyIDs [IN]
|
305
|
+
# VARIANT arg3 --- PropertyValues [OUT]
|
306
|
+
# I4 arg4 --- Errors [OUT]
|
307
|
+
def GetItemProperties(arg0, arg1, arg2, arg3, arg4)
|
308
|
+
ret = _invoke(1610743832, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4])
|
309
|
+
@lastargs = WIN32OLE::ARGV
|
310
|
+
ret
|
311
|
+
end
|
312
|
+
|
313
|
+
# VOID LookupItemIDs
|
314
|
+
# BSTR arg0 --- ItemID [IN]
|
315
|
+
# I4 arg1 --- Count [IN]
|
316
|
+
# I4 arg2 --- PropertyIDs [IN]
|
317
|
+
# BSTR arg3 --- NewItemIDs [OUT]
|
318
|
+
# I4 arg4 --- Errors [OUT]
|
319
|
+
def LookupItemIDs(arg0, arg1, arg2, arg3, arg4)
|
320
|
+
ret = _invoke(1610743833, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_BSTR, VT_BYREF|VT_ARRAY|VT_I4])
|
321
|
+
@lastargs = WIN32OLE::ARGV
|
322
|
+
ret
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
# OPC Automation Groups Collection
|
327
|
+
module OPCGroups
|
328
|
+
include WIN32OLE::VARIANT
|
329
|
+
attr_reader :lastargs
|
330
|
+
|
331
|
+
# IOPCAutoServer Parent
|
332
|
+
# Returns the parent OPCServer
|
333
|
+
def Parent()
|
334
|
+
ret = _getproperty(1610743808, [], [])
|
335
|
+
@lastargs = WIN32OLE::ARGV
|
336
|
+
ret
|
337
|
+
end
|
338
|
+
|
339
|
+
# BOOL DefaultGroupIsActive
|
340
|
+
def DefaultGroupIsActive()
|
341
|
+
ret = _getproperty(1610743809, [], [])
|
342
|
+
@lastargs = WIN32OLE::ARGV
|
343
|
+
ret
|
344
|
+
end
|
345
|
+
|
346
|
+
# I4 DefaultGroupUpdateRate
|
347
|
+
def DefaultGroupUpdateRate()
|
348
|
+
ret = _getproperty(1610743811, [], [])
|
349
|
+
@lastargs = WIN32OLE::ARGV
|
350
|
+
ret
|
351
|
+
end
|
352
|
+
|
353
|
+
# R4 DefaultGroupDeadband
|
354
|
+
def DefaultGroupDeadband()
|
355
|
+
ret = _getproperty(1610743813, [], [])
|
356
|
+
@lastargs = WIN32OLE::ARGV
|
357
|
+
ret
|
358
|
+
end
|
359
|
+
|
360
|
+
# I4 DefaultGroupLocaleID
|
361
|
+
def DefaultGroupLocaleID()
|
362
|
+
ret = _getproperty(1610743815, [], [])
|
363
|
+
@lastargs = WIN32OLE::ARGV
|
364
|
+
ret
|
365
|
+
end
|
366
|
+
|
367
|
+
# I4 DefaultGroupTimeBias
|
368
|
+
def DefaultGroupTimeBias()
|
369
|
+
ret = _getproperty(1610743817, [], [])
|
370
|
+
@lastargs = WIN32OLE::ARGV
|
371
|
+
ret
|
372
|
+
end
|
373
|
+
|
374
|
+
# I4 Count
|
375
|
+
# Number of items in the Collection
|
376
|
+
def Count()
|
377
|
+
ret = _getproperty(1610743819, [], [])
|
378
|
+
@lastargs = WIN32OLE::ARGV
|
379
|
+
ret
|
380
|
+
end
|
381
|
+
|
382
|
+
# VOID DefaultGroupIsActive
|
383
|
+
def DefaultGroupIsActive=(arg0)
|
384
|
+
ret = _setproperty(1610743809, [arg0], [VT_BOOL])
|
385
|
+
@lastargs = WIN32OLE::ARGV
|
386
|
+
ret
|
387
|
+
end
|
388
|
+
|
389
|
+
# VOID DefaultGroupUpdateRate
|
390
|
+
def DefaultGroupUpdateRate=(arg0)
|
391
|
+
ret = _setproperty(1610743811, [arg0], [VT_I4])
|
392
|
+
@lastargs = WIN32OLE::ARGV
|
393
|
+
ret
|
394
|
+
end
|
395
|
+
|
396
|
+
# VOID DefaultGroupDeadband
|
397
|
+
def DefaultGroupDeadband=(arg0)
|
398
|
+
ret = _setproperty(1610743813, [arg0], [VT_R4])
|
399
|
+
@lastargs = WIN32OLE::ARGV
|
400
|
+
ret
|
401
|
+
end
|
402
|
+
|
403
|
+
# VOID DefaultGroupLocaleID
|
404
|
+
def DefaultGroupLocaleID=(arg0)
|
405
|
+
ret = _setproperty(1610743815, [arg0], [VT_I4])
|
406
|
+
@lastargs = WIN32OLE::ARGV
|
407
|
+
ret
|
408
|
+
end
|
409
|
+
|
410
|
+
# VOID DefaultGroupTimeBias
|
411
|
+
def DefaultGroupTimeBias=(arg0)
|
412
|
+
ret = _setproperty(1610743817, [arg0], [VT_I4])
|
413
|
+
@lastargs = WIN32OLE::ARGV
|
414
|
+
ret
|
415
|
+
end
|
416
|
+
|
417
|
+
# OPCGroup Item
|
418
|
+
# Returns an OPCGroup by index (starts at 1) or name
|
419
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
420
|
+
def Item(arg0)
|
421
|
+
ret = _invoke(0, [arg0], [VT_VARIANT])
|
422
|
+
@lastargs = WIN32OLE::ARGV
|
423
|
+
ret
|
424
|
+
end
|
425
|
+
|
426
|
+
# OPCGroup Add
|
427
|
+
# Adds an OPCGroup to the collection
|
428
|
+
# VARIANT arg0 --- Name [IN]
|
429
|
+
def Add(arg0=nil)
|
430
|
+
ret = _invoke(1610743822, [arg0], [VT_VARIANT])
|
431
|
+
@lastargs = WIN32OLE::ARGV
|
432
|
+
ret
|
433
|
+
end
|
434
|
+
|
435
|
+
# OPCGroup GetOPCGroup
|
436
|
+
# Returns an OPCGroup specified by server handle or name
|
437
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
438
|
+
def GetOPCGroup(arg0)
|
439
|
+
ret = _invoke(1610743823, [arg0], [VT_VARIANT])
|
440
|
+
@lastargs = WIN32OLE::ARGV
|
441
|
+
ret
|
442
|
+
end
|
443
|
+
|
444
|
+
# VOID RemoveAll
|
445
|
+
# Remove all groups and their items
|
446
|
+
def RemoveAll()
|
447
|
+
ret = _invoke(1610743824, [], [])
|
448
|
+
@lastargs = WIN32OLE::ARGV
|
449
|
+
ret
|
450
|
+
end
|
451
|
+
|
452
|
+
# VOID Remove
|
453
|
+
# Removes an OPCGroup specified by server handle or name
|
454
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
455
|
+
def Remove(arg0)
|
456
|
+
ret = _invoke(1610743825, [arg0], [VT_VARIANT])
|
457
|
+
@lastargs = WIN32OLE::ARGV
|
458
|
+
ret
|
459
|
+
end
|
460
|
+
|
461
|
+
# OPCGroup ConnectPublicGroup
|
462
|
+
# Adds an existing public OPCGroup to the collection
|
463
|
+
# BSTR arg0 --- Name [IN]
|
464
|
+
def ConnectPublicGroup(arg0)
|
465
|
+
ret = _invoke(1610743826, [arg0], [VT_BSTR])
|
466
|
+
@lastargs = WIN32OLE::ARGV
|
467
|
+
ret
|
468
|
+
end
|
469
|
+
|
470
|
+
# VOID RemovePublicGroup
|
471
|
+
# Removes a public OPCGroup specified by server handle or name
|
472
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
473
|
+
def RemovePublicGroup(arg0)
|
474
|
+
ret = _invoke(1610743827, [arg0], [VT_VARIANT])
|
475
|
+
@lastargs = WIN32OLE::ARGV
|
476
|
+
ret
|
477
|
+
end
|
478
|
+
|
479
|
+
# VOID GlobalDataChange EVENT in DIOPCGroupsEvent
|
480
|
+
# I4 arg0 --- TransactionID [IN]
|
481
|
+
# I4 arg1 --- GroupHandle [IN]
|
482
|
+
# I4 arg2 --- NumItems [IN]
|
483
|
+
# I4 arg3 --- ClientHandles [IN]
|
484
|
+
# VARIANT arg4 --- ItemValues [IN]
|
485
|
+
# I4 arg5 --- Qualities [IN]
|
486
|
+
# DATE arg6 --- TimeStamps [IN]
|
487
|
+
def GlobalDataChange(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
|
488
|
+
ret = _invoke(1, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I4, VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_DATE])
|
489
|
+
@lastargs = WIN32OLE::ARGV
|
490
|
+
ret
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
494
|
+
# Collection of OPC Group objects
|
495
|
+
module IOPCGroups
|
496
|
+
include WIN32OLE::VARIANT
|
497
|
+
attr_reader :lastargs
|
498
|
+
|
499
|
+
# IOPCAutoServer Parent
|
500
|
+
# Returns the parent OPCServer
|
501
|
+
def Parent()
|
502
|
+
ret = _getproperty(1610743808, [], [])
|
503
|
+
@lastargs = WIN32OLE::ARGV
|
504
|
+
ret
|
505
|
+
end
|
506
|
+
|
507
|
+
# BOOL DefaultGroupIsActive
|
508
|
+
def DefaultGroupIsActive()
|
509
|
+
ret = _getproperty(1610743809, [], [])
|
510
|
+
@lastargs = WIN32OLE::ARGV
|
511
|
+
ret
|
512
|
+
end
|
513
|
+
|
514
|
+
# I4 DefaultGroupUpdateRate
|
515
|
+
def DefaultGroupUpdateRate()
|
516
|
+
ret = _getproperty(1610743811, [], [])
|
517
|
+
@lastargs = WIN32OLE::ARGV
|
518
|
+
ret
|
519
|
+
end
|
520
|
+
|
521
|
+
# R4 DefaultGroupDeadband
|
522
|
+
def DefaultGroupDeadband()
|
523
|
+
ret = _getproperty(1610743813, [], [])
|
524
|
+
@lastargs = WIN32OLE::ARGV
|
525
|
+
ret
|
526
|
+
end
|
527
|
+
|
528
|
+
# I4 DefaultGroupLocaleID
|
529
|
+
def DefaultGroupLocaleID()
|
530
|
+
ret = _getproperty(1610743815, [], [])
|
531
|
+
@lastargs = WIN32OLE::ARGV
|
532
|
+
ret
|
533
|
+
end
|
534
|
+
|
535
|
+
# I4 DefaultGroupTimeBias
|
536
|
+
def DefaultGroupTimeBias()
|
537
|
+
ret = _getproperty(1610743817, [], [])
|
538
|
+
@lastargs = WIN32OLE::ARGV
|
539
|
+
ret
|
540
|
+
end
|
541
|
+
|
542
|
+
# I4 Count
|
543
|
+
# Number of items in the Collection
|
544
|
+
def Count()
|
545
|
+
ret = _getproperty(1610743819, [], [])
|
546
|
+
@lastargs = WIN32OLE::ARGV
|
547
|
+
ret
|
548
|
+
end
|
549
|
+
|
550
|
+
# VOID DefaultGroupIsActive
|
551
|
+
def DefaultGroupIsActive=(arg0)
|
552
|
+
ret = _setproperty(1610743809, [arg0], [VT_BOOL])
|
553
|
+
@lastargs = WIN32OLE::ARGV
|
554
|
+
ret
|
555
|
+
end
|
556
|
+
|
557
|
+
# VOID DefaultGroupUpdateRate
|
558
|
+
def DefaultGroupUpdateRate=(arg0)
|
559
|
+
ret = _setproperty(1610743811, [arg0], [VT_I4])
|
560
|
+
@lastargs = WIN32OLE::ARGV
|
561
|
+
ret
|
562
|
+
end
|
563
|
+
|
564
|
+
# VOID DefaultGroupDeadband
|
565
|
+
def DefaultGroupDeadband=(arg0)
|
566
|
+
ret = _setproperty(1610743813, [arg0], [VT_R4])
|
567
|
+
@lastargs = WIN32OLE::ARGV
|
568
|
+
ret
|
569
|
+
end
|
570
|
+
|
571
|
+
# VOID DefaultGroupLocaleID
|
572
|
+
def DefaultGroupLocaleID=(arg0)
|
573
|
+
ret = _setproperty(1610743815, [arg0], [VT_I4])
|
574
|
+
@lastargs = WIN32OLE::ARGV
|
575
|
+
ret
|
576
|
+
end
|
577
|
+
|
578
|
+
# VOID DefaultGroupTimeBias
|
579
|
+
def DefaultGroupTimeBias=(arg0)
|
580
|
+
ret = _setproperty(1610743817, [arg0], [VT_I4])
|
581
|
+
@lastargs = WIN32OLE::ARGV
|
582
|
+
ret
|
583
|
+
end
|
584
|
+
|
585
|
+
# OPCGroup Item
|
586
|
+
# Returns an OPCGroup by index (starts at 1) or name
|
587
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
588
|
+
def Item(arg0)
|
589
|
+
ret = _invoke(0, [arg0], [VT_VARIANT])
|
590
|
+
@lastargs = WIN32OLE::ARGV
|
591
|
+
ret
|
592
|
+
end
|
593
|
+
|
594
|
+
# OPCGroup Add
|
595
|
+
# Adds an OPCGroup to the collection
|
596
|
+
# VARIANT arg0 --- Name [IN]
|
597
|
+
def Add(arg0=nil)
|
598
|
+
ret = _invoke(1610743822, [arg0], [VT_VARIANT])
|
599
|
+
@lastargs = WIN32OLE::ARGV
|
600
|
+
ret
|
601
|
+
end
|
602
|
+
|
603
|
+
# OPCGroup GetOPCGroup
|
604
|
+
# Returns an OPCGroup specified by server handle or name
|
605
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
606
|
+
def GetOPCGroup(arg0)
|
607
|
+
ret = _invoke(1610743823, [arg0], [VT_VARIANT])
|
608
|
+
@lastargs = WIN32OLE::ARGV
|
609
|
+
ret
|
610
|
+
end
|
611
|
+
|
612
|
+
# VOID RemoveAll
|
613
|
+
# Remove all groups and their items
|
614
|
+
def RemoveAll()
|
615
|
+
ret = _invoke(1610743824, [], [])
|
616
|
+
@lastargs = WIN32OLE::ARGV
|
617
|
+
ret
|
618
|
+
end
|
619
|
+
|
620
|
+
# VOID Remove
|
621
|
+
# Removes an OPCGroup specified by server handle or name
|
622
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
623
|
+
def Remove(arg0)
|
624
|
+
ret = _invoke(1610743825, [arg0], [VT_VARIANT])
|
625
|
+
@lastargs = WIN32OLE::ARGV
|
626
|
+
ret
|
627
|
+
end
|
628
|
+
|
629
|
+
# OPCGroup ConnectPublicGroup
|
630
|
+
# Adds an existing public OPCGroup to the collection
|
631
|
+
# BSTR arg0 --- Name [IN]
|
632
|
+
def ConnectPublicGroup(arg0)
|
633
|
+
ret = _invoke(1610743826, [arg0], [VT_BSTR])
|
634
|
+
@lastargs = WIN32OLE::ARGV
|
635
|
+
ret
|
636
|
+
end
|
637
|
+
|
638
|
+
# VOID RemovePublicGroup
|
639
|
+
# Removes a public OPCGroup specified by server handle or name
|
640
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
641
|
+
def RemovePublicGroup(arg0)
|
642
|
+
ret = _invoke(1610743827, [arg0], [VT_VARIANT])
|
643
|
+
@lastargs = WIN32OLE::ARGV
|
644
|
+
ret
|
645
|
+
end
|
646
|
+
end
|
647
|
+
|
648
|
+
# OPC Automation Group
|
649
|
+
module OPCGroup
|
650
|
+
include WIN32OLE::VARIANT
|
651
|
+
attr_reader :lastargs
|
652
|
+
|
653
|
+
# IOPCAutoServer Parent
|
654
|
+
# Returns the parent OPCServer
|
655
|
+
def Parent()
|
656
|
+
ret = _getproperty(1610743808, [], [])
|
657
|
+
@lastargs = WIN32OLE::ARGV
|
658
|
+
ret
|
659
|
+
end
|
660
|
+
|
661
|
+
# BSTR Name
|
662
|
+
def Name()
|
663
|
+
ret = _getproperty(1610743809, [], [])
|
664
|
+
@lastargs = WIN32OLE::ARGV
|
665
|
+
ret
|
666
|
+
end
|
667
|
+
|
668
|
+
# BOOL IsPublic
|
669
|
+
# True if this group is public
|
670
|
+
def IsPublic()
|
671
|
+
ret = _getproperty(1610743811, [], [])
|
672
|
+
@lastargs = WIN32OLE::ARGV
|
673
|
+
ret
|
674
|
+
end
|
675
|
+
|
676
|
+
# BOOL IsActive
|
677
|
+
# True if this group is active
|
678
|
+
def IsActive()
|
679
|
+
ret = _getproperty(1610743812, [], [])
|
680
|
+
@lastargs = WIN32OLE::ARGV
|
681
|
+
ret
|
682
|
+
end
|
683
|
+
|
684
|
+
# BOOL IsSubscribed
|
685
|
+
# True if this group will get asynchronous data updates
|
686
|
+
def IsSubscribed()
|
687
|
+
ret = _getproperty(1610743814, [], [])
|
688
|
+
@lastargs = WIN32OLE::ARGV
|
689
|
+
ret
|
690
|
+
end
|
691
|
+
|
692
|
+
# I4 ClientHandle
|
693
|
+
def ClientHandle()
|
694
|
+
ret = _getproperty(1610743816, [], [])
|
695
|
+
@lastargs = WIN32OLE::ARGV
|
696
|
+
ret
|
697
|
+
end
|
698
|
+
|
699
|
+
# I4 ServerHandle
|
700
|
+
def ServerHandle()
|
701
|
+
ret = _getproperty(1610743818, [], [])
|
702
|
+
@lastargs = WIN32OLE::ARGV
|
703
|
+
ret
|
704
|
+
end
|
705
|
+
|
706
|
+
# I4 LocaleID
|
707
|
+
def LocaleID()
|
708
|
+
ret = _getproperty(1610743819, [], [])
|
709
|
+
@lastargs = WIN32OLE::ARGV
|
710
|
+
ret
|
711
|
+
end
|
712
|
+
|
713
|
+
# I4 TimeBias
|
714
|
+
def TimeBias()
|
715
|
+
ret = _getproperty(1610743821, [], [])
|
716
|
+
@lastargs = WIN32OLE::ARGV
|
717
|
+
ret
|
718
|
+
end
|
719
|
+
|
720
|
+
# R4 DeadBand
|
721
|
+
def DeadBand()
|
722
|
+
ret = _getproperty(1610743823, [], [])
|
723
|
+
@lastargs = WIN32OLE::ARGV
|
724
|
+
ret
|
725
|
+
end
|
726
|
+
|
727
|
+
# I4 UpdateRate
|
728
|
+
# Rate data can be returned to an application (in mSec)
|
729
|
+
def UpdateRate()
|
730
|
+
ret = _getproperty(1610743825, [], [])
|
731
|
+
@lastargs = WIN32OLE::ARGV
|
732
|
+
ret
|
733
|
+
end
|
734
|
+
|
735
|
+
# OPCItems OPCItems
|
736
|
+
# Returns the OPCItems collection
|
737
|
+
def OPCItems()
|
738
|
+
ret = _getproperty(0, [], [])
|
739
|
+
@lastargs = WIN32OLE::ARGV
|
740
|
+
ret
|
741
|
+
end
|
742
|
+
|
743
|
+
# VOID Name
|
744
|
+
def Name=(arg0)
|
745
|
+
ret = _setproperty(1610743809, [arg0], [VT_BSTR])
|
746
|
+
@lastargs = WIN32OLE::ARGV
|
747
|
+
ret
|
748
|
+
end
|
749
|
+
|
750
|
+
# VOID IsActive
|
751
|
+
# True if this group is active
|
752
|
+
def IsActive=(arg0)
|
753
|
+
ret = _setproperty(1610743812, [arg0], [VT_BOOL])
|
754
|
+
@lastargs = WIN32OLE::ARGV
|
755
|
+
ret
|
756
|
+
end
|
757
|
+
|
758
|
+
# VOID IsSubscribed
|
759
|
+
# True if this group will get asynchronous data updates
|
760
|
+
def IsSubscribed=(arg0)
|
761
|
+
ret = _setproperty(1610743814, [arg0], [VT_BOOL])
|
762
|
+
@lastargs = WIN32OLE::ARGV
|
763
|
+
ret
|
764
|
+
end
|
765
|
+
|
766
|
+
# VOID ClientHandle
|
767
|
+
def ClientHandle=(arg0)
|
768
|
+
ret = _setproperty(1610743816, [arg0], [VT_I4])
|
769
|
+
@lastargs = WIN32OLE::ARGV
|
770
|
+
ret
|
771
|
+
end
|
772
|
+
|
773
|
+
# VOID LocaleID
|
774
|
+
def LocaleID=(arg0)
|
775
|
+
ret = _setproperty(1610743819, [arg0], [VT_I4])
|
776
|
+
@lastargs = WIN32OLE::ARGV
|
777
|
+
ret
|
778
|
+
end
|
779
|
+
|
780
|
+
# VOID TimeBias
|
781
|
+
def TimeBias=(arg0)
|
782
|
+
ret = _setproperty(1610743821, [arg0], [VT_I4])
|
783
|
+
@lastargs = WIN32OLE::ARGV
|
784
|
+
ret
|
785
|
+
end
|
786
|
+
|
787
|
+
# VOID DeadBand
|
788
|
+
def DeadBand=(arg0)
|
789
|
+
ret = _setproperty(1610743823, [arg0], [VT_R4])
|
790
|
+
@lastargs = WIN32OLE::ARGV
|
791
|
+
ret
|
792
|
+
end
|
793
|
+
|
794
|
+
# VOID UpdateRate
|
795
|
+
# Rate data can be returned to an application (in mSec)
|
796
|
+
def UpdateRate=(arg0)
|
797
|
+
ret = _setproperty(1610743825, [arg0], [VT_I4])
|
798
|
+
@lastargs = WIN32OLE::ARGV
|
799
|
+
ret
|
800
|
+
end
|
801
|
+
|
802
|
+
# VOID SyncRead
|
803
|
+
# I2 arg0 --- Source [IN]
|
804
|
+
# I4 arg1 --- NumItems [IN]
|
805
|
+
# I4 arg2 --- ServerHandles [IN]
|
806
|
+
# VARIANT arg3 --- Values [OUT]
|
807
|
+
# I4 arg4 --- Errors [OUT]
|
808
|
+
# VARIANT arg5 --- Qualities [OUT]
|
809
|
+
# VARIANT arg6 --- TimeStamps [OUT]
|
810
|
+
def SyncRead(arg0, arg1, arg2, arg3, arg4, arg5=nil, arg6=nil)
|
811
|
+
ret = _invoke(1610743828, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I2, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_VARIANT, VT_BYREF|VT_VARIANT])
|
812
|
+
@lastargs = WIN32OLE::ARGV
|
813
|
+
ret
|
814
|
+
end
|
815
|
+
|
816
|
+
# VOID SyncWrite
|
817
|
+
# I4 arg0 --- NumItems [IN]
|
818
|
+
# I4 arg1 --- ServerHandles [IN]
|
819
|
+
# VARIANT arg2 --- Values [IN]
|
820
|
+
# I4 arg3 --- Errors [OUT]
|
821
|
+
def SyncWrite(arg0, arg1, arg2, arg3)
|
822
|
+
ret = _invoke(1610743829, [arg0, arg1, arg2, arg3], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4])
|
823
|
+
@lastargs = WIN32OLE::ARGV
|
824
|
+
ret
|
825
|
+
end
|
826
|
+
|
827
|
+
# VOID AsyncRead
|
828
|
+
# I4 arg0 --- NumItems [IN]
|
829
|
+
# I4 arg1 --- ServerHandles [IN]
|
830
|
+
# I4 arg2 --- Errors [OUT]
|
831
|
+
# I4 arg3 --- TransactionID [IN]
|
832
|
+
# I4 arg4 --- CancelID [OUT]
|
833
|
+
def AsyncRead(arg0, arg1, arg2, arg3, arg4)
|
834
|
+
ret = _invoke(1610743830, [arg0, arg1, arg2, arg3, arg4], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_I4, VT_BYREF|VT_I4])
|
835
|
+
@lastargs = WIN32OLE::ARGV
|
836
|
+
ret
|
837
|
+
end
|
838
|
+
|
839
|
+
# VOID AsyncWrite
|
840
|
+
# I4 arg0 --- NumItems [IN]
|
841
|
+
# I4 arg1 --- ServerHandles [IN]
|
842
|
+
# VARIANT arg2 --- Values [IN]
|
843
|
+
# I4 arg3 --- Errors [OUT]
|
844
|
+
# I4 arg4 --- TransactionID [IN]
|
845
|
+
# I4 arg5 --- CancelID [OUT]
|
846
|
+
def AsyncWrite(arg0, arg1, arg2, arg3, arg4, arg5)
|
847
|
+
ret = _invoke(1610743831, [arg0, arg1, arg2, arg3, arg4, arg5], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_I4, VT_BYREF|VT_I4])
|
848
|
+
@lastargs = WIN32OLE::ARGV
|
849
|
+
ret
|
850
|
+
end
|
851
|
+
|
852
|
+
# VOID AsyncRefresh
|
853
|
+
# I2 arg0 --- Source [IN]
|
854
|
+
# I4 arg1 --- TransactionID [IN]
|
855
|
+
# I4 arg2 --- CancelID [OUT]
|
856
|
+
def AsyncRefresh(arg0, arg1, arg2)
|
857
|
+
ret = _invoke(1610743832, [arg0, arg1, arg2], [VT_I2, VT_I4, VT_BYREF|VT_I4])
|
858
|
+
@lastargs = WIN32OLE::ARGV
|
859
|
+
ret
|
860
|
+
end
|
861
|
+
|
862
|
+
# VOID AsyncCancel
|
863
|
+
# I4 arg0 --- CancelID [IN]
|
864
|
+
def AsyncCancel(arg0)
|
865
|
+
ret = _invoke(1610743833, [arg0], [VT_I4])
|
866
|
+
@lastargs = WIN32OLE::ARGV
|
867
|
+
ret
|
868
|
+
end
|
869
|
+
|
870
|
+
# VOID DataChange EVENT in DIOPCGroupEvent
|
871
|
+
# I4 arg0 --- TransactionID [IN]
|
872
|
+
# I4 arg1 --- NumItems [IN]
|
873
|
+
# I4 arg2 --- ClientHandles [IN]
|
874
|
+
# VARIANT arg3 --- ItemValues [IN]
|
875
|
+
# I4 arg4 --- Qualities [IN]
|
876
|
+
# DATE arg5 --- TimeStamps [IN]
|
877
|
+
def DataChange(arg0, arg1, arg2, arg3, arg4, arg5)
|
878
|
+
ret = _invoke(1, [arg0, arg1, arg2, arg3, arg4, arg5], [VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_DATE])
|
879
|
+
@lastargs = WIN32OLE::ARGV
|
880
|
+
ret
|
881
|
+
end
|
882
|
+
|
883
|
+
# VOID AsyncReadComplete EVENT in DIOPCGroupEvent
|
884
|
+
# I4 arg0 --- TransactionID [IN]
|
885
|
+
# I4 arg1 --- NumItems [IN]
|
886
|
+
# I4 arg2 --- ClientHandles [IN]
|
887
|
+
# VARIANT arg3 --- ItemValues [IN]
|
888
|
+
# I4 arg4 --- Qualities [IN]
|
889
|
+
# DATE arg5 --- TimeStamps [IN]
|
890
|
+
# I4 arg6 --- Errors [IN]
|
891
|
+
def AsyncReadComplete(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
|
892
|
+
ret = _invoke(2, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_DATE, VT_BYREF|VT_ARRAY|VT_I4])
|
893
|
+
@lastargs = WIN32OLE::ARGV
|
894
|
+
ret
|
895
|
+
end
|
896
|
+
|
897
|
+
# VOID AsyncWriteComplete EVENT in DIOPCGroupEvent
|
898
|
+
# I4 arg0 --- TransactionID [IN]
|
899
|
+
# I4 arg1 --- NumItems [IN]
|
900
|
+
# I4 arg2 --- ClientHandles [IN]
|
901
|
+
# I4 arg3 --- Errors [IN]
|
902
|
+
def AsyncWriteComplete(arg0, arg1, arg2, arg3)
|
903
|
+
ret = _invoke(3, [arg0, arg1, arg2, arg3], [VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4])
|
904
|
+
@lastargs = WIN32OLE::ARGV
|
905
|
+
ret
|
906
|
+
end
|
907
|
+
|
908
|
+
# VOID AsyncCancelComplete EVENT in DIOPCGroupEvent
|
909
|
+
# I4 arg0 --- CancelID [IN]
|
910
|
+
def AsyncCancelComplete(arg0)
|
911
|
+
ret = _invoke(4, [arg0], [VT_I4])
|
912
|
+
@lastargs = WIN32OLE::ARGV
|
913
|
+
ret
|
914
|
+
end
|
915
|
+
end
|
916
|
+
|
917
|
+
# OPC Group Object
|
918
|
+
module IOPCGroup
|
919
|
+
include WIN32OLE::VARIANT
|
920
|
+
attr_reader :lastargs
|
921
|
+
|
922
|
+
# IOPCAutoServer Parent
|
923
|
+
# Returns the parent OPCServer
|
924
|
+
def Parent()
|
925
|
+
ret = _getproperty(1610743808, [], [])
|
926
|
+
@lastargs = WIN32OLE::ARGV
|
927
|
+
ret
|
928
|
+
end
|
929
|
+
|
930
|
+
# BSTR Name
|
931
|
+
def Name()
|
932
|
+
ret = _getproperty(1610743809, [], [])
|
933
|
+
@lastargs = WIN32OLE::ARGV
|
934
|
+
ret
|
935
|
+
end
|
936
|
+
|
937
|
+
# BOOL IsPublic
|
938
|
+
# True if this group is public
|
939
|
+
def IsPublic()
|
940
|
+
ret = _getproperty(1610743811, [], [])
|
941
|
+
@lastargs = WIN32OLE::ARGV
|
942
|
+
ret
|
943
|
+
end
|
944
|
+
|
945
|
+
# BOOL IsActive
|
946
|
+
# True if this group is active
|
947
|
+
def IsActive()
|
948
|
+
ret = _getproperty(1610743812, [], [])
|
949
|
+
@lastargs = WIN32OLE::ARGV
|
950
|
+
ret
|
951
|
+
end
|
952
|
+
|
953
|
+
# BOOL IsSubscribed
|
954
|
+
# True if this group will get asynchronous data updates
|
955
|
+
def IsSubscribed()
|
956
|
+
ret = _getproperty(1610743814, [], [])
|
957
|
+
@lastargs = WIN32OLE::ARGV
|
958
|
+
ret
|
959
|
+
end
|
960
|
+
|
961
|
+
# I4 ClientHandle
|
962
|
+
def ClientHandle()
|
963
|
+
ret = _getproperty(1610743816, [], [])
|
964
|
+
@lastargs = WIN32OLE::ARGV
|
965
|
+
ret
|
966
|
+
end
|
967
|
+
|
968
|
+
# I4 ServerHandle
|
969
|
+
def ServerHandle()
|
970
|
+
ret = _getproperty(1610743818, [], [])
|
971
|
+
@lastargs = WIN32OLE::ARGV
|
972
|
+
ret
|
973
|
+
end
|
974
|
+
|
975
|
+
# I4 LocaleID
|
976
|
+
def LocaleID()
|
977
|
+
ret = _getproperty(1610743819, [], [])
|
978
|
+
@lastargs = WIN32OLE::ARGV
|
979
|
+
ret
|
980
|
+
end
|
981
|
+
|
982
|
+
# I4 TimeBias
|
983
|
+
def TimeBias()
|
984
|
+
ret = _getproperty(1610743821, [], [])
|
985
|
+
@lastargs = WIN32OLE::ARGV
|
986
|
+
ret
|
987
|
+
end
|
988
|
+
|
989
|
+
# R4 DeadBand
|
990
|
+
def DeadBand()
|
991
|
+
ret = _getproperty(1610743823, [], [])
|
992
|
+
@lastargs = WIN32OLE::ARGV
|
993
|
+
ret
|
994
|
+
end
|
995
|
+
|
996
|
+
# I4 UpdateRate
|
997
|
+
# Rate data can be returned to an application (in mSec)
|
998
|
+
def UpdateRate()
|
999
|
+
ret = _getproperty(1610743825, [], [])
|
1000
|
+
@lastargs = WIN32OLE::ARGV
|
1001
|
+
ret
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
# OPCItems OPCItems
|
1005
|
+
# Returns the OPCItems collection
|
1006
|
+
def OPCItems()
|
1007
|
+
ret = _getproperty(0, [], [])
|
1008
|
+
@lastargs = WIN32OLE::ARGV
|
1009
|
+
ret
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# VOID Name
|
1013
|
+
def Name=(arg0)
|
1014
|
+
ret = _setproperty(1610743809, [arg0], [VT_BSTR])
|
1015
|
+
@lastargs = WIN32OLE::ARGV
|
1016
|
+
ret
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
# VOID IsActive
|
1020
|
+
# True if this group is active
|
1021
|
+
def IsActive=(arg0)
|
1022
|
+
ret = _setproperty(1610743812, [arg0], [VT_BOOL])
|
1023
|
+
@lastargs = WIN32OLE::ARGV
|
1024
|
+
ret
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
# VOID IsSubscribed
|
1028
|
+
# True if this group will get asynchronous data updates
|
1029
|
+
def IsSubscribed=(arg0)
|
1030
|
+
ret = _setproperty(1610743814, [arg0], [VT_BOOL])
|
1031
|
+
@lastargs = WIN32OLE::ARGV
|
1032
|
+
ret
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
# VOID ClientHandle
|
1036
|
+
def ClientHandle=(arg0)
|
1037
|
+
ret = _setproperty(1610743816, [arg0], [VT_I4])
|
1038
|
+
@lastargs = WIN32OLE::ARGV
|
1039
|
+
ret
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
# VOID LocaleID
|
1043
|
+
def LocaleID=(arg0)
|
1044
|
+
ret = _setproperty(1610743819, [arg0], [VT_I4])
|
1045
|
+
@lastargs = WIN32OLE::ARGV
|
1046
|
+
ret
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# VOID TimeBias
|
1050
|
+
def TimeBias=(arg0)
|
1051
|
+
ret = _setproperty(1610743821, [arg0], [VT_I4])
|
1052
|
+
@lastargs = WIN32OLE::ARGV
|
1053
|
+
ret
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
# VOID DeadBand
|
1057
|
+
def DeadBand=(arg0)
|
1058
|
+
ret = _setproperty(1610743823, [arg0], [VT_R4])
|
1059
|
+
@lastargs = WIN32OLE::ARGV
|
1060
|
+
ret
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
# VOID UpdateRate
|
1064
|
+
# Rate data can be returned to an application (in mSec)
|
1065
|
+
def UpdateRate=(arg0)
|
1066
|
+
ret = _setproperty(1610743825, [arg0], [VT_I4])
|
1067
|
+
@lastargs = WIN32OLE::ARGV
|
1068
|
+
ret
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
# VOID SyncRead
|
1072
|
+
# I2 arg0 --- Source [IN]
|
1073
|
+
# I4 arg1 --- NumItems [IN]
|
1074
|
+
# I4 arg2 --- ServerHandles [IN]
|
1075
|
+
# VARIANT arg3 --- Values [OUT]
|
1076
|
+
# I4 arg4 --- Errors [OUT]
|
1077
|
+
# VARIANT arg5 --- Qualities [OUT]
|
1078
|
+
# VARIANT arg6 --- TimeStamps [OUT]
|
1079
|
+
def SyncRead(arg0, arg1, arg2, arg3, arg4, arg5=nil, arg6=nil)
|
1080
|
+
ret = _invoke(1610743828, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I2, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_VARIANT, VT_BYREF|VT_VARIANT])
|
1081
|
+
@lastargs = WIN32OLE::ARGV
|
1082
|
+
ret
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
# VOID SyncWrite
|
1086
|
+
# I4 arg0 --- NumItems [IN]
|
1087
|
+
# I4 arg1 --- ServerHandles [IN]
|
1088
|
+
# VARIANT arg2 --- Values [IN]
|
1089
|
+
# I4 arg3 --- Errors [OUT]
|
1090
|
+
def SyncWrite(arg0, arg1, arg2, arg3)
|
1091
|
+
ret = _invoke(1610743829, [arg0, arg1, arg2, arg3], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4])
|
1092
|
+
@lastargs = WIN32OLE::ARGV
|
1093
|
+
ret
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
# VOID AsyncRead
|
1097
|
+
# I4 arg0 --- NumItems [IN]
|
1098
|
+
# I4 arg1 --- ServerHandles [IN]
|
1099
|
+
# I4 arg2 --- Errors [OUT]
|
1100
|
+
# I4 arg3 --- TransactionID [IN]
|
1101
|
+
# I4 arg4 --- CancelID [OUT]
|
1102
|
+
def AsyncRead(arg0, arg1, arg2, arg3, arg4)
|
1103
|
+
ret = _invoke(1610743830, [arg0, arg1, arg2, arg3, arg4], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_I4, VT_BYREF|VT_I4])
|
1104
|
+
@lastargs = WIN32OLE::ARGV
|
1105
|
+
ret
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
# VOID AsyncWrite
|
1109
|
+
# I4 arg0 --- NumItems [IN]
|
1110
|
+
# I4 arg1 --- ServerHandles [IN]
|
1111
|
+
# VARIANT arg2 --- Values [IN]
|
1112
|
+
# I4 arg3 --- Errors [OUT]
|
1113
|
+
# I4 arg4 --- TransactionID [IN]
|
1114
|
+
# I4 arg5 --- CancelID [OUT]
|
1115
|
+
def AsyncWrite(arg0, arg1, arg2, arg3, arg4, arg5)
|
1116
|
+
ret = _invoke(1610743831, [arg0, arg1, arg2, arg3, arg4, arg5], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_I4, VT_BYREF|VT_I4])
|
1117
|
+
@lastargs = WIN32OLE::ARGV
|
1118
|
+
ret
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
# VOID AsyncRefresh
|
1122
|
+
# I2 arg0 --- Source [IN]
|
1123
|
+
# I4 arg1 --- TransactionID [IN]
|
1124
|
+
# I4 arg2 --- CancelID [OUT]
|
1125
|
+
def AsyncRefresh(arg0, arg1, arg2)
|
1126
|
+
ret = _invoke(1610743832, [arg0, arg1, arg2], [VT_I2, VT_I4, VT_BYREF|VT_I4])
|
1127
|
+
@lastargs = WIN32OLE::ARGV
|
1128
|
+
ret
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
# VOID AsyncCancel
|
1132
|
+
# I4 arg0 --- CancelID [IN]
|
1133
|
+
def AsyncCancel(arg0)
|
1134
|
+
ret = _invoke(1610743833, [arg0], [VT_I4])
|
1135
|
+
@lastargs = WIN32OLE::ARGV
|
1136
|
+
ret
|
1137
|
+
end
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
# Collection of OPC Item objects
|
1141
|
+
module OPCItems
|
1142
|
+
include WIN32OLE::VARIANT
|
1143
|
+
attr_reader :lastargs
|
1144
|
+
|
1145
|
+
# OPCGroup Parent
|
1146
|
+
# Returns the parent OPCGroup
|
1147
|
+
def Parent()
|
1148
|
+
ret = _getproperty(1610743808, [], [])
|
1149
|
+
@lastargs = WIN32OLE::ARGV
|
1150
|
+
ret
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
# I2 DefaultRequestedDataType
|
1154
|
+
def DefaultRequestedDataType()
|
1155
|
+
ret = _getproperty(1610743809, [], [])
|
1156
|
+
@lastargs = WIN32OLE::ARGV
|
1157
|
+
ret
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
# BSTR DefaultAccessPath
|
1161
|
+
def DefaultAccessPath()
|
1162
|
+
ret = _getproperty(1610743811, [], [])
|
1163
|
+
@lastargs = WIN32OLE::ARGV
|
1164
|
+
ret
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
# BOOL DefaultIsActive
|
1168
|
+
def DefaultIsActive()
|
1169
|
+
ret = _getproperty(1610743813, [], [])
|
1170
|
+
@lastargs = WIN32OLE::ARGV
|
1171
|
+
ret
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# I4 Count
|
1175
|
+
# Number of items in the Collection
|
1176
|
+
def Count()
|
1177
|
+
ret = _getproperty(1610743815, [], [])
|
1178
|
+
@lastargs = WIN32OLE::ARGV
|
1179
|
+
ret
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
# VOID DefaultRequestedDataType
|
1183
|
+
def DefaultRequestedDataType=(arg0)
|
1184
|
+
ret = _setproperty(1610743809, [arg0], [VT_I2])
|
1185
|
+
@lastargs = WIN32OLE::ARGV
|
1186
|
+
ret
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
# VOID DefaultAccessPath
|
1190
|
+
def DefaultAccessPath=(arg0)
|
1191
|
+
ret = _setproperty(1610743811, [arg0], [VT_BSTR])
|
1192
|
+
@lastargs = WIN32OLE::ARGV
|
1193
|
+
ret
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# VOID DefaultIsActive
|
1197
|
+
def DefaultIsActive=(arg0)
|
1198
|
+
ret = _setproperty(1610743813, [arg0], [VT_BOOL])
|
1199
|
+
@lastargs = WIN32OLE::ARGV
|
1200
|
+
ret
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# OPCItem Item
|
1204
|
+
# Returns an OPCItem by index (starts at 1)
|
1205
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
1206
|
+
def Item(arg0)
|
1207
|
+
ret = _invoke(0, [arg0], [VT_VARIANT])
|
1208
|
+
@lastargs = WIN32OLE::ARGV
|
1209
|
+
ret
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
# OPCItem GetOPCItem
|
1213
|
+
# Returns an OPCItem specified by server handle
|
1214
|
+
# I4 arg0 --- ServerHandle [IN]
|
1215
|
+
def GetOPCItem(arg0)
|
1216
|
+
ret = _invoke(1610743818, [arg0], [VT_I4])
|
1217
|
+
@lastargs = WIN32OLE::ARGV
|
1218
|
+
ret
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# OPCItem AddItem
|
1222
|
+
# Adds an OPCItem object to the collection
|
1223
|
+
# BSTR arg0 --- ItemID [IN]
|
1224
|
+
# I4 arg1 --- ClientHandle [IN]
|
1225
|
+
def AddItem(arg0, arg1)
|
1226
|
+
ret = _invoke(1610743819, [arg0, arg1], [VT_BSTR, VT_I4])
|
1227
|
+
@lastargs = WIN32OLE::ARGV
|
1228
|
+
ret
|
1229
|
+
end
|
1230
|
+
|
1231
|
+
# VOID AddItems
|
1232
|
+
# Adds OPCItem objects to the collection
|
1233
|
+
# I4 arg0 --- NumItems [IN]
|
1234
|
+
# BSTR arg1 --- ItemIDs [IN]
|
1235
|
+
# I4 arg2 --- ClientHandles [IN]
|
1236
|
+
# I4 arg3 --- ServerHandles [OUT]
|
1237
|
+
# I4 arg4 --- Errors [OUT]
|
1238
|
+
# VARIANT arg5 --- RequestedDataTypes [IN]
|
1239
|
+
# VARIANT arg6 --- AccessPaths [IN]
|
1240
|
+
def AddItems(arg0, arg1, arg2, arg3, arg4, arg5=nil, arg6=nil)
|
1241
|
+
ret = _invoke(1610743820, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I4, VT_BYREF|VT_ARRAY|VT_BSTR, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_VARIANT, VT_VARIANT])
|
1242
|
+
@lastargs = WIN32OLE::ARGV
|
1243
|
+
ret
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
# VOID Remove
|
1247
|
+
# Removes OPCItem objects from the collection
|
1248
|
+
# I4 arg0 --- NumItems [IN]
|
1249
|
+
# I4 arg1 --- ServerHandles [IN]
|
1250
|
+
# I4 arg2 --- Errors [OUT]
|
1251
|
+
def Remove(arg0, arg1, arg2)
|
1252
|
+
ret = _invoke(1610743821, [arg0, arg1, arg2], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4])
|
1253
|
+
@lastargs = WIN32OLE::ARGV
|
1254
|
+
ret
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
# VOID Validate
|
1258
|
+
# ?
|
1259
|
+
# I4 arg0 --- NumItems [IN]
|
1260
|
+
# BSTR arg1 --- ItemIDs [IN]
|
1261
|
+
# I4 arg2 --- Errors [OUT]
|
1262
|
+
# VARIANT arg3 --- RequestedDataTypes [IN]
|
1263
|
+
# VARIANT arg4 --- AccessPaths [IN]
|
1264
|
+
def Validate(arg0, arg1, arg2, arg3=nil, arg4=nil)
|
1265
|
+
ret = _invoke(1610743822, [arg0, arg1, arg2, arg3, arg4], [VT_I4, VT_BYREF|VT_ARRAY|VT_BSTR, VT_BYREF|VT_ARRAY|VT_I4, VT_VARIANT, VT_VARIANT])
|
1266
|
+
@lastargs = WIN32OLE::ARGV
|
1267
|
+
ret
|
1268
|
+
end
|
1269
|
+
|
1270
|
+
# VOID SetActive
|
1271
|
+
# Set the active state of OPCItem objects
|
1272
|
+
# I4 arg0 --- NumItems [IN]
|
1273
|
+
# I4 arg1 --- ServerHandles [IN]
|
1274
|
+
# BOOL arg2 --- ActiveState [IN]
|
1275
|
+
# I4 arg3 --- Errors [OUT]
|
1276
|
+
def SetActive(arg0, arg1, arg2, arg3)
|
1277
|
+
ret = _invoke(1610743823, [arg0, arg1, arg2, arg3], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BOOL, VT_BYREF|VT_ARRAY|VT_I4])
|
1278
|
+
@lastargs = WIN32OLE::ARGV
|
1279
|
+
ret
|
1280
|
+
end
|
1281
|
+
|
1282
|
+
# VOID SetClientHandles
|
1283
|
+
# Set the Client handles of OPCItem objects
|
1284
|
+
# I4 arg0 --- NumItems [IN]
|
1285
|
+
# I4 arg1 --- ServerHandles [IN]
|
1286
|
+
# I4 arg2 --- ClientHandles [IN]
|
1287
|
+
# I4 arg3 --- Errors [OUT]
|
1288
|
+
def SetClientHandles(arg0, arg1, arg2, arg3)
|
1289
|
+
ret = _invoke(1610743824, [arg0, arg1, arg2, arg3], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4])
|
1290
|
+
@lastargs = WIN32OLE::ARGV
|
1291
|
+
ret
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
# VOID SetDataTypes
|
1295
|
+
# Set the Data Types of OPCItem objects
|
1296
|
+
# I4 arg0 --- NumItems [IN]
|
1297
|
+
# I4 arg1 --- ServerHandles [IN]
|
1298
|
+
# I4 arg2 --- RequestedDataTypes [IN]
|
1299
|
+
# I4 arg3 --- Errors [OUT]
|
1300
|
+
def SetDataTypes(arg0, arg1, arg2, arg3)
|
1301
|
+
ret = _invoke(1610743825, [arg0, arg1, arg2, arg3], [VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4])
|
1302
|
+
@lastargs = WIN32OLE::ARGV
|
1303
|
+
ret
|
1304
|
+
end
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
# OPC Item object
|
1308
|
+
module OPCItem
|
1309
|
+
include WIN32OLE::VARIANT
|
1310
|
+
attr_reader :lastargs
|
1311
|
+
|
1312
|
+
# OPCGroup Parent
|
1313
|
+
# Returns the parent OPCGroup
|
1314
|
+
def Parent()
|
1315
|
+
ret = _getproperty(1610743808, [], [])
|
1316
|
+
@lastargs = WIN32OLE::ARGV
|
1317
|
+
ret
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
# I4 ClientHandle
|
1321
|
+
def ClientHandle()
|
1322
|
+
ret = _getproperty(1610743809, [], [])
|
1323
|
+
@lastargs = WIN32OLE::ARGV
|
1324
|
+
ret
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
# I4 ServerHandle
|
1328
|
+
def ServerHandle()
|
1329
|
+
ret = _getproperty(1610743811, [], [])
|
1330
|
+
@lastargs = WIN32OLE::ARGV
|
1331
|
+
ret
|
1332
|
+
end
|
1333
|
+
|
1334
|
+
# BSTR AccessPath
|
1335
|
+
def AccessPath()
|
1336
|
+
ret = _getproperty(1610743812, [], [])
|
1337
|
+
@lastargs = WIN32OLE::ARGV
|
1338
|
+
ret
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
# I4 AccessRights
|
1342
|
+
def AccessRights()
|
1343
|
+
ret = _getproperty(1610743813, [], [])
|
1344
|
+
@lastargs = WIN32OLE::ARGV
|
1345
|
+
ret
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
# BSTR ItemID
|
1349
|
+
def ItemID()
|
1350
|
+
ret = _getproperty(1610743814, [], [])
|
1351
|
+
@lastargs = WIN32OLE::ARGV
|
1352
|
+
ret
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
# BOOL IsActive
|
1356
|
+
def IsActive()
|
1357
|
+
ret = _getproperty(1610743815, [], [])
|
1358
|
+
@lastargs = WIN32OLE::ARGV
|
1359
|
+
ret
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
# I2 RequestedDataType
|
1363
|
+
def RequestedDataType()
|
1364
|
+
ret = _getproperty(1610743817, [], [])
|
1365
|
+
@lastargs = WIN32OLE::ARGV
|
1366
|
+
ret
|
1367
|
+
end
|
1368
|
+
|
1369
|
+
# VARIANT Value
|
1370
|
+
def Value()
|
1371
|
+
ret = _getproperty(0, [], [])
|
1372
|
+
@lastargs = WIN32OLE::ARGV
|
1373
|
+
ret
|
1374
|
+
end
|
1375
|
+
|
1376
|
+
# I4 Quality
|
1377
|
+
def Quality()
|
1378
|
+
ret = _getproperty(1610743820, [], [])
|
1379
|
+
@lastargs = WIN32OLE::ARGV
|
1380
|
+
ret
|
1381
|
+
end
|
1382
|
+
|
1383
|
+
# DATE TimeStamp
|
1384
|
+
def TimeStamp()
|
1385
|
+
ret = _getproperty(1610743821, [], [])
|
1386
|
+
@lastargs = WIN32OLE::ARGV
|
1387
|
+
ret
|
1388
|
+
end
|
1389
|
+
|
1390
|
+
# I2 CanonicalDataType
|
1391
|
+
def CanonicalDataType()
|
1392
|
+
ret = _getproperty(1610743822, [], [])
|
1393
|
+
@lastargs = WIN32OLE::ARGV
|
1394
|
+
ret
|
1395
|
+
end
|
1396
|
+
|
1397
|
+
# I2 EUType
|
1398
|
+
def EUType()
|
1399
|
+
ret = _getproperty(1610743823, [], [])
|
1400
|
+
@lastargs = WIN32OLE::ARGV
|
1401
|
+
ret
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
# VARIANT EUInfo
|
1405
|
+
def EUInfo()
|
1406
|
+
ret = _getproperty(1610743824, [], [])
|
1407
|
+
@lastargs = WIN32OLE::ARGV
|
1408
|
+
ret
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# VOID ClientHandle
|
1412
|
+
def ClientHandle=(arg0)
|
1413
|
+
ret = _setproperty(1610743809, [arg0], [VT_I4])
|
1414
|
+
@lastargs = WIN32OLE::ARGV
|
1415
|
+
ret
|
1416
|
+
end
|
1417
|
+
|
1418
|
+
# VOID IsActive
|
1419
|
+
def IsActive=(arg0)
|
1420
|
+
ret = _setproperty(1610743815, [arg0], [VT_BOOL])
|
1421
|
+
@lastargs = WIN32OLE::ARGV
|
1422
|
+
ret
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
# VOID RequestedDataType
|
1426
|
+
def RequestedDataType=(arg0)
|
1427
|
+
ret = _setproperty(1610743817, [arg0], [VT_I2])
|
1428
|
+
@lastargs = WIN32OLE::ARGV
|
1429
|
+
ret
|
1430
|
+
end
|
1431
|
+
|
1432
|
+
# VOID Read
|
1433
|
+
# I2 arg0 --- Source [IN]
|
1434
|
+
# VARIANT arg1 --- Value [OUT]
|
1435
|
+
# VARIANT arg2 --- Quality [OUT]
|
1436
|
+
# VARIANT arg3 --- TimeStamp [OUT]
|
1437
|
+
def Read(arg0, arg1=nil, arg2=nil, arg3=nil)
|
1438
|
+
ret = _invoke(1610743825, [arg0, arg1, arg2, arg3], [VT_I2, VT_BYREF|VT_VARIANT, VT_BYREF|VT_VARIANT, VT_BYREF|VT_VARIANT])
|
1439
|
+
@lastargs = WIN32OLE::ARGV
|
1440
|
+
ret
|
1441
|
+
end
|
1442
|
+
|
1443
|
+
# VOID Write
|
1444
|
+
# VARIANT arg0 --- Value [IN]
|
1445
|
+
def Write(arg0)
|
1446
|
+
ret = _invoke(1610743826, [arg0], [VT_VARIANT])
|
1447
|
+
@lastargs = WIN32OLE::ARGV
|
1448
|
+
ret
|
1449
|
+
end
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
# OPC Group Events
|
1453
|
+
module DIOPCGroupEvent
|
1454
|
+
include WIN32OLE::VARIANT
|
1455
|
+
attr_reader :lastargs
|
1456
|
+
|
1457
|
+
# VOID DataChange
|
1458
|
+
# I4 arg0 --- TransactionID [IN]
|
1459
|
+
# I4 arg1 --- NumItems [IN]
|
1460
|
+
# I4 arg2 --- ClientHandles [IN]
|
1461
|
+
# VARIANT arg3 --- ItemValues [IN]
|
1462
|
+
# I4 arg4 --- Qualities [IN]
|
1463
|
+
# DATE arg5 --- TimeStamps [IN]
|
1464
|
+
def DataChange(arg0, arg1, arg2, arg3, arg4, arg5)
|
1465
|
+
ret = _invoke(1, [arg0, arg1, arg2, arg3, arg4, arg5], [VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_DATE])
|
1466
|
+
@lastargs = WIN32OLE::ARGV
|
1467
|
+
ret
|
1468
|
+
end
|
1469
|
+
|
1470
|
+
# VOID AsyncReadComplete
|
1471
|
+
# I4 arg0 --- TransactionID [IN]
|
1472
|
+
# I4 arg1 --- NumItems [IN]
|
1473
|
+
# I4 arg2 --- ClientHandles [IN]
|
1474
|
+
# VARIANT arg3 --- ItemValues [IN]
|
1475
|
+
# I4 arg4 --- Qualities [IN]
|
1476
|
+
# DATE arg5 --- TimeStamps [IN]
|
1477
|
+
# I4 arg6 --- Errors [IN]
|
1478
|
+
def AsyncReadComplete(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
|
1479
|
+
ret = _invoke(2, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_DATE, VT_BYREF|VT_ARRAY|VT_I4])
|
1480
|
+
@lastargs = WIN32OLE::ARGV
|
1481
|
+
ret
|
1482
|
+
end
|
1483
|
+
|
1484
|
+
# VOID AsyncWriteComplete
|
1485
|
+
# I4 arg0 --- TransactionID [IN]
|
1486
|
+
# I4 arg1 --- NumItems [IN]
|
1487
|
+
# I4 arg2 --- ClientHandles [IN]
|
1488
|
+
# I4 arg3 --- Errors [IN]
|
1489
|
+
def AsyncWriteComplete(arg0, arg1, arg2, arg3)
|
1490
|
+
ret = _invoke(3, [arg0, arg1, arg2, arg3], [VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_I4])
|
1491
|
+
@lastargs = WIN32OLE::ARGV
|
1492
|
+
ret
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
# VOID AsyncCancelComplete
|
1496
|
+
# I4 arg0 --- CancelID [IN]
|
1497
|
+
def AsyncCancelComplete(arg0)
|
1498
|
+
ret = _invoke(4, [arg0], [VT_I4])
|
1499
|
+
@lastargs = WIN32OLE::ARGV
|
1500
|
+
ret
|
1501
|
+
end
|
1502
|
+
end
|
1503
|
+
|
1504
|
+
# OPC Groups Event
|
1505
|
+
module DIOPCGroupsEvent
|
1506
|
+
include WIN32OLE::VARIANT
|
1507
|
+
attr_reader :lastargs
|
1508
|
+
|
1509
|
+
# VOID GlobalDataChange
|
1510
|
+
# I4 arg0 --- TransactionID [IN]
|
1511
|
+
# I4 arg1 --- GroupHandle [IN]
|
1512
|
+
# I4 arg2 --- NumItems [IN]
|
1513
|
+
# I4 arg3 --- ClientHandles [IN]
|
1514
|
+
# VARIANT arg4 --- ItemValues [IN]
|
1515
|
+
# I4 arg5 --- Qualities [IN]
|
1516
|
+
# DATE arg6 --- TimeStamps [IN]
|
1517
|
+
def GlobalDataChange(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
|
1518
|
+
ret = _invoke(1, [arg0, arg1, arg2, arg3, arg4, arg5, arg6], [VT_I4, VT_I4, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_DATE])
|
1519
|
+
@lastargs = WIN32OLE::ARGV
|
1520
|
+
ret
|
1521
|
+
end
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
# OPC Browser
|
1525
|
+
module OPCBrowser
|
1526
|
+
include WIN32OLE::VARIANT
|
1527
|
+
attr_reader :lastargs
|
1528
|
+
|
1529
|
+
# I4 Organization
|
1530
|
+
# Returns one of OPCNamespaceTypes
|
1531
|
+
def Organization()
|
1532
|
+
ret = _getproperty(1610743808, [], [])
|
1533
|
+
@lastargs = WIN32OLE::ARGV
|
1534
|
+
ret
|
1535
|
+
end
|
1536
|
+
|
1537
|
+
# BSTR Filter
|
1538
|
+
# Filter narrows the search results
|
1539
|
+
def Filter()
|
1540
|
+
ret = _getproperty(1610743809, [], [])
|
1541
|
+
@lastargs = WIN32OLE::ARGV
|
1542
|
+
ret
|
1543
|
+
end
|
1544
|
+
|
1545
|
+
# I2 DataType
|
1546
|
+
# Data type used in ShowLeafs (any Variant type)
|
1547
|
+
def DataType()
|
1548
|
+
ret = _getproperty(1610743811, [], [])
|
1549
|
+
@lastargs = WIN32OLE::ARGV
|
1550
|
+
ret
|
1551
|
+
end
|
1552
|
+
|
1553
|
+
# I4 AccessRights
|
1554
|
+
# Access Rights used in ShowLeafs ()
|
1555
|
+
def AccessRights()
|
1556
|
+
ret = _getproperty(1610743813, [], [])
|
1557
|
+
@lastargs = WIN32OLE::ARGV
|
1558
|
+
ret
|
1559
|
+
end
|
1560
|
+
|
1561
|
+
# BSTR CurrentPosition
|
1562
|
+
# Position in the Tree
|
1563
|
+
def CurrentPosition()
|
1564
|
+
ret = _getproperty(1610743815, [], [])
|
1565
|
+
@lastargs = WIN32OLE::ARGV
|
1566
|
+
ret
|
1567
|
+
end
|
1568
|
+
|
1569
|
+
# I4 Count
|
1570
|
+
# Number of items in the Collection
|
1571
|
+
def Count()
|
1572
|
+
ret = _getproperty(1610743816, [], [])
|
1573
|
+
@lastargs = WIN32OLE::ARGV
|
1574
|
+
ret
|
1575
|
+
end
|
1576
|
+
|
1577
|
+
# VOID Filter
|
1578
|
+
# Filter narrows the search results
|
1579
|
+
def Filter=(arg0)
|
1580
|
+
ret = _setproperty(1610743809, [arg0], [VT_BSTR])
|
1581
|
+
@lastargs = WIN32OLE::ARGV
|
1582
|
+
ret
|
1583
|
+
end
|
1584
|
+
|
1585
|
+
# VOID DataType
|
1586
|
+
# Data type used in ShowLeafs (any Variant type)
|
1587
|
+
def DataType=(arg0)
|
1588
|
+
ret = _setproperty(1610743811, [arg0], [VT_I2])
|
1589
|
+
@lastargs = WIN32OLE::ARGV
|
1590
|
+
ret
|
1591
|
+
end
|
1592
|
+
|
1593
|
+
# VOID AccessRights
|
1594
|
+
# Access Rights used in ShowLeafs ()
|
1595
|
+
def AccessRights=(arg0)
|
1596
|
+
ret = _setproperty(1610743813, [arg0], [VT_I4])
|
1597
|
+
@lastargs = WIN32OLE::ARGV
|
1598
|
+
ret
|
1599
|
+
end
|
1600
|
+
|
1601
|
+
# BSTR Item
|
1602
|
+
# VARIANT arg0 --- ItemSpecifier [IN]
|
1603
|
+
def Item(arg0)
|
1604
|
+
ret = _invoke(1610743818, [arg0], [VT_VARIANT])
|
1605
|
+
@lastargs = WIN32OLE::ARGV
|
1606
|
+
ret
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
# VOID ShowBranches
|
1610
|
+
# Get all of the branch names that match the filter
|
1611
|
+
def ShowBranches()
|
1612
|
+
ret = _invoke(1610743819, [], [])
|
1613
|
+
@lastargs = WIN32OLE::ARGV
|
1614
|
+
ret
|
1615
|
+
end
|
1616
|
+
|
1617
|
+
# VOID ShowLeafs
|
1618
|
+
# Get all of the leaf names that match the filter
|
1619
|
+
# VARIANT arg0 --- Flat [IN]
|
1620
|
+
def ShowLeafs(arg0=nil)
|
1621
|
+
ret = _invoke(1610743820, [arg0], [VT_VARIANT])
|
1622
|
+
@lastargs = WIN32OLE::ARGV
|
1623
|
+
ret
|
1624
|
+
end
|
1625
|
+
|
1626
|
+
# VOID MoveUp
|
1627
|
+
# Move up a level in the tree
|
1628
|
+
def MoveUp()
|
1629
|
+
ret = _invoke(1610743821, [], [])
|
1630
|
+
@lastargs = WIN32OLE::ARGV
|
1631
|
+
ret
|
1632
|
+
end
|
1633
|
+
|
1634
|
+
# VOID MoveToRoot
|
1635
|
+
# Move up to the top (root) of the tree
|
1636
|
+
def MoveToRoot()
|
1637
|
+
ret = _invoke(1610743822, [], [])
|
1638
|
+
@lastargs = WIN32OLE::ARGV
|
1639
|
+
ret
|
1640
|
+
end
|
1641
|
+
|
1642
|
+
# VOID MoveDown
|
1643
|
+
# Move down into this branch
|
1644
|
+
# BSTR arg0 --- Branch [IN]
|
1645
|
+
def MoveDown(arg0)
|
1646
|
+
ret = _invoke(1610743823, [arg0], [VT_BSTR])
|
1647
|
+
@lastargs = WIN32OLE::ARGV
|
1648
|
+
ret
|
1649
|
+
end
|
1650
|
+
|
1651
|
+
# VOID MoveTo
|
1652
|
+
# Move to this absolute position
|
1653
|
+
# BSTR arg0 --- Branches [IN]
|
1654
|
+
def MoveTo(arg0)
|
1655
|
+
ret = _invoke(1610743824, [arg0], [VT_BYREF|VT_ARRAY|VT_BSTR])
|
1656
|
+
@lastargs = WIN32OLE::ARGV
|
1657
|
+
ret
|
1658
|
+
end
|
1659
|
+
|
1660
|
+
# BSTR GetItemID
|
1661
|
+
# Converts a leaf name to an ItemID
|
1662
|
+
# BSTR arg0 --- Leaf [IN]
|
1663
|
+
def GetItemID(arg0)
|
1664
|
+
ret = _invoke(1610743825, [arg0], [VT_BSTR])
|
1665
|
+
@lastargs = WIN32OLE::ARGV
|
1666
|
+
ret
|
1667
|
+
end
|
1668
|
+
|
1669
|
+
# VARIANT GetAccessPaths
|
1670
|
+
# Returns an array of Access Paths for an ItemID
|
1671
|
+
# BSTR arg0 --- ItemID [IN]
|
1672
|
+
def GetAccessPaths(arg0)
|
1673
|
+
ret = _invoke(1610743826, [arg0], [VT_BSTR])
|
1674
|
+
@lastargs = WIN32OLE::ARGV
|
1675
|
+
ret
|
1676
|
+
end
|
1677
|
+
end
|
1678
|
+
|
1679
|
+
# OPC Server Event
|
1680
|
+
module DIOPCServerEvent
|
1681
|
+
include WIN32OLE::VARIANT
|
1682
|
+
attr_reader :lastargs
|
1683
|
+
|
1684
|
+
# VOID ServerShutDown
|
1685
|
+
# BSTR arg0 --- Reason [IN]
|
1686
|
+
def ServerShutDown(arg0)
|
1687
|
+
ret = _invoke(1, [arg0], [VT_BSTR])
|
1688
|
+
@lastargs = WIN32OLE::ARGV
|
1689
|
+
ret
|
1690
|
+
end
|
1691
|
+
end
|
1692
|
+
|
1693
|
+
# OPC Automation Server
|
1694
|
+
class OPC_Automation_1 # OPCServer
|
1695
|
+
include WIN32OLE::VARIANT
|
1696
|
+
attr_reader :lastargs
|
1697
|
+
attr_reader :dispatch
|
1698
|
+
attr_reader :clsid
|
1699
|
+
attr_reader :progid
|
1700
|
+
|
1701
|
+
def initialize(obj = nil)
|
1702
|
+
@clsid = "{28E68F9A-8D75-11D1-8DC3-3C302A000000}"
|
1703
|
+
@progid = "OPC.Automation.1"
|
1704
|
+
if obj.nil?
|
1705
|
+
@dispatch = WIN32OLE.new @progid
|
1706
|
+
else
|
1707
|
+
@dispatch = obj
|
1708
|
+
end
|
1709
|
+
end
|
1710
|
+
|
1711
|
+
def method_missing(cmd, *arg)
|
1712
|
+
@dispatch.method_missing(cmd, *arg)
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
# DATE StartTime
|
1716
|
+
# Time the Server Started
|
1717
|
+
def StartTime()
|
1718
|
+
ret = @dispatch._getproperty(1610743808, [], [])
|
1719
|
+
@lastargs = WIN32OLE::ARGV
|
1720
|
+
ret
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
# DATE CurrentTime
|
1724
|
+
def CurrentTime()
|
1725
|
+
ret = @dispatch._getproperty(1610743809, [], [])
|
1726
|
+
@lastargs = WIN32OLE::ARGV
|
1727
|
+
ret
|
1728
|
+
end
|
1729
|
+
|
1730
|
+
# DATE LastUpdateTime
|
1731
|
+
# Last time the server sent data
|
1732
|
+
def LastUpdateTime()
|
1733
|
+
ret = @dispatch._getproperty(1610743810, [], [])
|
1734
|
+
@lastargs = WIN32OLE::ARGV
|
1735
|
+
ret
|
1736
|
+
end
|
1737
|
+
|
1738
|
+
# I2 MajorVersion
|
1739
|
+
def MajorVersion()
|
1740
|
+
ret = @dispatch._getproperty(1610743811, [], [])
|
1741
|
+
@lastargs = WIN32OLE::ARGV
|
1742
|
+
ret
|
1743
|
+
end
|
1744
|
+
|
1745
|
+
# I2 MinorVersion
|
1746
|
+
def MinorVersion()
|
1747
|
+
ret = @dispatch._getproperty(1610743812, [], [])
|
1748
|
+
@lastargs = WIN32OLE::ARGV
|
1749
|
+
ret
|
1750
|
+
end
|
1751
|
+
|
1752
|
+
# I2 BuildNumber
|
1753
|
+
def BuildNumber()
|
1754
|
+
ret = @dispatch._getproperty(1610743813, [], [])
|
1755
|
+
@lastargs = WIN32OLE::ARGV
|
1756
|
+
ret
|
1757
|
+
end
|
1758
|
+
|
1759
|
+
# BSTR VendorInfo
|
1760
|
+
# Server Vendor's name
|
1761
|
+
def VendorInfo()
|
1762
|
+
ret = @dispatch._getproperty(1610743814, [], [])
|
1763
|
+
@lastargs = WIN32OLE::ARGV
|
1764
|
+
ret
|
1765
|
+
end
|
1766
|
+
|
1767
|
+
# I4 ServerState
|
1768
|
+
# Returns an OPCServerState
|
1769
|
+
def ServerState()
|
1770
|
+
ret = @dispatch._getproperty(1610743815, [], [])
|
1771
|
+
@lastargs = WIN32OLE::ARGV
|
1772
|
+
ret
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
# BSTR ServerName
|
1776
|
+
# Returns this server's name
|
1777
|
+
def ServerName()
|
1778
|
+
ret = @dispatch._getproperty(1610743816, [], [])
|
1779
|
+
@lastargs = WIN32OLE::ARGV
|
1780
|
+
ret
|
1781
|
+
end
|
1782
|
+
|
1783
|
+
# BSTR ServerNode
|
1784
|
+
# Returns this server's node
|
1785
|
+
def ServerNode()
|
1786
|
+
ret = @dispatch._getproperty(1610743817, [], [])
|
1787
|
+
@lastargs = WIN32OLE::ARGV
|
1788
|
+
ret
|
1789
|
+
end
|
1790
|
+
|
1791
|
+
# BSTR ClientName
|
1792
|
+
# Identify the client
|
1793
|
+
def ClientName()
|
1794
|
+
ret = @dispatch._getproperty(1610743818, [], [])
|
1795
|
+
@lastargs = WIN32OLE::ARGV
|
1796
|
+
ret
|
1797
|
+
end
|
1798
|
+
|
1799
|
+
# I4 LocaleID
|
1800
|
+
def LocaleID()
|
1801
|
+
ret = @dispatch._getproperty(1610743820, [], [])
|
1802
|
+
@lastargs = WIN32OLE::ARGV
|
1803
|
+
ret
|
1804
|
+
end
|
1805
|
+
|
1806
|
+
# I4 Bandwidth
|
1807
|
+
# Might possibly be Percent utilization
|
1808
|
+
def Bandwidth()
|
1809
|
+
ret = @dispatch._getproperty(1610743822, [], [])
|
1810
|
+
@lastargs = WIN32OLE::ARGV
|
1811
|
+
ret
|
1812
|
+
end
|
1813
|
+
|
1814
|
+
# OPCGroups OPCGroups
|
1815
|
+
# The collection of OPCGroup Objects
|
1816
|
+
def OPCGroups()
|
1817
|
+
ret = @dispatch._getproperty(0, [], [])
|
1818
|
+
@lastargs = WIN32OLE::ARGV
|
1819
|
+
ret
|
1820
|
+
end
|
1821
|
+
|
1822
|
+
# VARIANT PublicGroupNames
|
1823
|
+
# Returns an array of names
|
1824
|
+
def PublicGroupNames()
|
1825
|
+
ret = @dispatch._getproperty(1610743824, [], [])
|
1826
|
+
@lastargs = WIN32OLE::ARGV
|
1827
|
+
ret
|
1828
|
+
end
|
1829
|
+
|
1830
|
+
# VOID ClientName
|
1831
|
+
# Identify the client
|
1832
|
+
def ClientName=(arg0)
|
1833
|
+
ret = @dispatch._setproperty(1610743818, [arg0], [VT_BSTR])
|
1834
|
+
@lastargs = WIN32OLE::ARGV
|
1835
|
+
ret
|
1836
|
+
end
|
1837
|
+
|
1838
|
+
# VOID LocaleID
|
1839
|
+
def LocaleID=(arg0)
|
1840
|
+
ret = @dispatch._setproperty(1610743820, [arg0], [VT_I4])
|
1841
|
+
@lastargs = WIN32OLE::ARGV
|
1842
|
+
ret
|
1843
|
+
end
|
1844
|
+
|
1845
|
+
# VARIANT GetOPCServers
|
1846
|
+
# Returns an array of Server names, optionally on another node
|
1847
|
+
# VARIANT arg0 --- Node [IN]
|
1848
|
+
def GetOPCServers(arg0=nil)
|
1849
|
+
ret = @dispatch._invoke(1610743825, [arg0], [VT_VARIANT])
|
1850
|
+
@lastargs = WIN32OLE::ARGV
|
1851
|
+
ret
|
1852
|
+
end
|
1853
|
+
|
1854
|
+
# VOID Connect
|
1855
|
+
# Connect to a named OPC Server
|
1856
|
+
# BSTR arg0 --- ProgID [IN]
|
1857
|
+
# VARIANT arg1 --- Node [IN]
|
1858
|
+
def Connect(arg0, arg1=nil)
|
1859
|
+
ret = @dispatch._invoke(1610743826, [arg0, arg1], [VT_BSTR, VT_VARIANT])
|
1860
|
+
@lastargs = WIN32OLE::ARGV
|
1861
|
+
ret
|
1862
|
+
end
|
1863
|
+
|
1864
|
+
# VOID Disconnect
|
1865
|
+
# End Connection with OPC Server
|
1866
|
+
def Disconnect()
|
1867
|
+
ret = @dispatch._invoke(1610743827, [], [])
|
1868
|
+
@lastargs = WIN32OLE::ARGV
|
1869
|
+
ret
|
1870
|
+
end
|
1871
|
+
|
1872
|
+
# OPCBrowser CreateBrowser
|
1873
|
+
# Create a new OPCBrowser Object
|
1874
|
+
def CreateBrowser()
|
1875
|
+
ret = @dispatch._invoke(1610743828, [], [])
|
1876
|
+
@lastargs = WIN32OLE::ARGV
|
1877
|
+
ret
|
1878
|
+
end
|
1879
|
+
|
1880
|
+
# BSTR GetErrorString
|
1881
|
+
# Convert an error code to a descriptive string
|
1882
|
+
# I4 arg0 --- ErrorCode [IN]
|
1883
|
+
def GetErrorString(arg0)
|
1884
|
+
ret = @dispatch._invoke(1610743829, [arg0], [VT_I4])
|
1885
|
+
@lastargs = WIN32OLE::ARGV
|
1886
|
+
ret
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
# VARIANT QueryAvailableLocaleIDs
|
1890
|
+
# The LocaleIDs supported by this server
|
1891
|
+
def QueryAvailableLocaleIDs()
|
1892
|
+
ret = @dispatch._invoke(1610743830, [], [])
|
1893
|
+
@lastargs = WIN32OLE::ARGV
|
1894
|
+
ret
|
1895
|
+
end
|
1896
|
+
|
1897
|
+
# VOID QueryAvailableProperties
|
1898
|
+
# BSTR arg0 --- ItemID [IN]
|
1899
|
+
# I4 arg1 --- Count [OUT]
|
1900
|
+
# I4 arg2 --- PropertyIDs [OUT]
|
1901
|
+
# BSTR arg3 --- Descriptions [OUT]
|
1902
|
+
# I2 arg4 --- DataTypes [OUT]
|
1903
|
+
def QueryAvailableProperties(arg0, arg1, arg2, arg3, arg4)
|
1904
|
+
ret = @dispatch._invoke(1610743831, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_BYREF|VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_BSTR, VT_BYREF|VT_ARRAY|VT_I2])
|
1905
|
+
@lastargs = WIN32OLE::ARGV
|
1906
|
+
ret
|
1907
|
+
end
|
1908
|
+
|
1909
|
+
# VOID GetItemProperties
|
1910
|
+
# BSTR arg0 --- ItemID [IN]
|
1911
|
+
# I4 arg1 --- Count [IN]
|
1912
|
+
# I4 arg2 --- PropertyIDs [IN]
|
1913
|
+
# VARIANT arg3 --- PropertyValues [OUT]
|
1914
|
+
# I4 arg4 --- Errors [OUT]
|
1915
|
+
def GetItemProperties(arg0, arg1, arg2, arg3, arg4)
|
1916
|
+
ret = @dispatch._invoke(1610743832, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_VARIANT, VT_BYREF|VT_ARRAY|VT_I4])
|
1917
|
+
@lastargs = WIN32OLE::ARGV
|
1918
|
+
ret
|
1919
|
+
end
|
1920
|
+
|
1921
|
+
# VOID LookupItemIDs
|
1922
|
+
# BSTR arg0 --- ItemID [IN]
|
1923
|
+
# I4 arg1 --- Count [IN]
|
1924
|
+
# I4 arg2 --- PropertyIDs [IN]
|
1925
|
+
# BSTR arg3 --- NewItemIDs [OUT]
|
1926
|
+
# I4 arg4 --- Errors [OUT]
|
1927
|
+
def LookupItemIDs(arg0, arg1, arg2, arg3, arg4)
|
1928
|
+
ret = @dispatch._invoke(1610743833, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_I4, VT_BYREF|VT_ARRAY|VT_I4, VT_BYREF|VT_ARRAY|VT_BSTR, VT_BYREF|VT_ARRAY|VT_I4])
|
1929
|
+
@lastargs = WIN32OLE::ARGV
|
1930
|
+
ret
|
1931
|
+
end
|
1932
|
+
|
1933
|
+
# VOID ServerShutDown EVENT in DIOPCServerEvent
|
1934
|
+
# BSTR arg0 --- Reason [IN]
|
1935
|
+
def ServerShutDown(arg0)
|
1936
|
+
ret = @dispatch._invoke(1, [arg0], [VT_BSTR])
|
1937
|
+
@lastargs = WIN32OLE::ARGV
|
1938
|
+
ret
|
1939
|
+
end
|
1940
|
+
end
|