Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

client OPC avec Python

1 réponse
Avatar
deltrain
bonjour
Voici le fichier g=E9g=E9r=E9 par makepy pour obtenir les m=E9thodes afin
d'utilier l'interface COM pour d=E9velopper un client OPC

********************

# -*- coding: mbcs -*-
# Created by makepy.py version 0.4.95
# By python version 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310
32 bit (Intel)]
# From type library 'OPCDAAuto.dll'
# On Wed May 09 08:26:18 2007
"""Matrikon OPC Automation 2.0"""
makepy_version =3D '0.4.95'
python_version =3D 0x20500f0

import win32com.client.CLSIDToClass, pythoncom
import win32com.client.util
from pywintypes import IID
from win32com.client import Dispatch

# The following 3 lines may need tweaking for the particular server
# Candidates are pythoncom.Missing, .Empty and .ArgNotFound
defaultNamedOptArg=3Dpythoncom.Empty
defaultNamedNotOptArg=3Dpythoncom.Empty
defaultUnnamedArg=3Dpythoncom.Empty

CLSID =3D IID('{F8582D24-88FB-11D0-B850-00C0F0104305}')
MajorVersion =3D 1
MinorVersion =3D 0
LibraryFlags =3D 8
LCID =3D 0x0

class constants:
OPCReadable =3D0x1 # from enum OPCAccessRights
OPCWritable =3D0x2 # from enum OPCAccessRights
OPCCache =3D0x1 # from enum OPCDataSource
OPCDevice =3D0x2 # from enum OPCDataSource
OPCBadRights =3D-1073479674 # from enum OPCErrors
OPCBadType =3D-1073479676 # from enum OPCErrors
OPCClamp =3D0x4000e # from enum OPCErrors
OPCDuplicateName =3D-1073479668 # from enum OPCErrors
OPCInuse =3D0x4000f # from enum OPCErrors
OPCInvalidConfig =3D-1073479664 # from enum OPCErrors
OPCInvalidFilter =3D-1073479671 # from enum OPCErrors
OPCInvalidHandle =3D-1073479679 # from enum OPCErrors
OPCInvalidItemID =3D-1073479672 # from enum OPCErrors
OPCInvalidPID =3D-1073479165 # from enum OPCErrors
OPCNotFound =3D-1073479663 # from enum OPCErrors
OPCPublic =3D-1073479675 # from enum OPCErrors
OPCRange =3D-1073479669 # from enum OPCErrors
OPCUnknownItemID =3D-1073479673 # from enum OPCErrors
OPCUnknownPath =3D-1073479670 # from enum OPCErrors
OPCUnsupportedRate =3D0x4000d # from enum OPCErrors
OPCFlat =3D0x2 # from enum
OPCNamespaceTypes
OPCHierarchical =3D0x1 # from enum
OPCNamespaceTypes
OPCQualityBad =3D0x0 # from enum OPCQuality
OPCQualityGood =3D0xc0 # from enum OPCQuality
OPCQualityMask =3D0xc0 # from enum OPCQuality
OPCQualityUncertain =3D0x40 # from enum OPCQuality
OPCLimitConst =3D0x3 # from enum
OPCQualityLimits
OPCLimitHigh =3D0x2 # from enum
OPCQualityLimits
OPCLimitLow =3D0x1 # from enum
OPCQualityLimits
OPCLimitMask =3D0x3 # from enum
OPCQualityLimits
OPCLimitOk =3D0x0 # from enum
OPCQualityLimits
OPCStatusCommFailure =3D0x18 # from enum
OPCQualityStatus
OPCStatusConfigError =3D0x4 # from enum
OPCQualityStatus
OPCStatusDeviceFailure =3D0xc # from enum
OPCQualityStatus
OPCStatusEGUExceeded =3D0x54 # from enum
OPCQualityStatus
OPCStatusLastKnown =3D0x14 # from enum
OPCQualityStatus
OPCStatusLastUsable =3D0x44 # from enum
OPCQualityStatus
OPCStatusLocalOverride =3D0xd8 # from enum
OPCQualityStatus
OPCStatusMask =3D0xfc # from enum
OPCQualityStatus
OPCStatusNotConnected =3D0x8 # from enum
OPCQualityStatus
OPCStatusOutOfService =3D0x1c # from enum
OPCQualityStatus
OPCStatusSensorCal =3D0x50 # from enum
OPCQualityStatus
OPCStatusSensorFailure =3D0x10 # from enum
OPCQualityStatus
OPCStatusSubNormal =3D0x58 # from enum
OPCQualityStatus
OPCDisconnected =3D0x6 # from enum OPCServerState
OPCFailed =3D0x2 # from enum OPCServerState
OPCNoconfig =3D0x3 # from enum OPCServerState
OPCRunning =3D0x1 # from enum OPCServerState
OPCSuspended =3D0x4 # from enum OPCServerState
OPCTest =3D0x5 # from enum OPCServerState

class DIOPCGroupEvent:
"""OPC Group Events"""
CLSID =3D CLSID_Sink =3D IID('{F8582D2B-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')
_public_methods_ =3D [] # For COM Server support
_dispid_to_func_ =3D {
4 : "OnAsyncCancelComplete",
1 : "OnDataChange",
2 : "OnAsyncReadComplete",
3 : "OnAsyncWriteComplete",
}

def __init__(self, oobj =3D None):
if oobj is None:
self._olecp =3D None
else:
import win32com.server.util
from win32com.server.policy import EventHandlerPolicy
=09
cpc=3Doobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContainer)
cp=3Dcpc.FindConnectionPoint(self.CLSID_Sink)
cookie=3Dcp.Advise(win32com.server.util.wrap(self,
usePolicy=3DEventHandlerPolicy))
self._olecp,self._olecp_cookie =3D cp,cookie
def __del__(self):
try:
self.close()
except pythoncom.com_error:
pass
def close(self):
if self._olecp is not None:
cp,cookie,self._olecp,self._olecp_cookie =3D
self._olecp,self._olecp_cookie,None,None
cp.Unadvise(cookie)
def _query_interface_(self, iid):
import win32com.server.util
if iid=3D=3Dself.CLSID_Sink: return win32com.server.util.wrap(self)

# Event Handlers
# If you create handlers, they should have the following prototypes:
# def OnAsyncCancelComplete(self, CancelID=3DdefaultNamedNotOptArg):
# def OnDataChange(self, TransactionID=3DdefaultNamedNotOptArg,
NumItems=3DdefaultNamedNotOptArg, ClientHandles=3DdefaultNamedNotOptArg,
ItemValues=3DdefaultNamedNotOptArg
# , Qualities=3DdefaultNamedNotOptArg,
TimeStamps=3DdefaultNamedNotOptArg):
# def OnAsyncReadComplete(self, TransactionID=3DdefaultNamedNotOptArg,
NumItems=3DdefaultNamedNotOptArg, ClientHandles=3DdefaultNamedNotOptArg,
ItemValues=3DdefaultNamedNotOptArg
# , Qualities=3DdefaultNamedNotOptArg,
TimeStamps=3DdefaultNamedNotOptArg, Errors=3DdefaultNamedNotOptArg):
# def OnAsyncWriteComplete(self, TransactionID=3DdefaultNamedNotOptArg,
NumItems=3DdefaultNamedNotOptArg, ClientHandles=3DdefaultNamedNotOptArg,
Errors=3DdefaultNamedNotOptArg):


class DIOPCGroupsEvent:
"""OPC Groups Event"""
CLSID =3D CLSID_Sink =3D IID('{F8582D29-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')
_public_methods_ =3D [] # For COM Server support
_dispid_to_func_ =3D {
1 : "OnGlobalDataChange",
}

def __init__(self, oobj =3D None):
if oobj is None:
self._olecp =3D None
else:
import win32com.server.util
from win32com.server.policy import EventHandlerPolicy
=09
cpc=3Doobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContainer)
cp=3Dcpc.FindConnectionPoint(self.CLSID_Sink)
cookie=3Dcp.Advise(win32com.server.util.wrap(self,
usePolicy=3DEventHandlerPolicy))
self._olecp,self._olecp_cookie =3D cp,cookie
def __del__(self):
try:
self.close()
except pythoncom.com_error:
pass
def close(self):
if self._olecp is not None:
cp,cookie,self._olecp,self._olecp_cookie =3D
self._olecp,self._olecp_cookie,None,None
cp.Unadvise(cookie)
def _query_interface_(self, iid):
import win32com.server.util
if iid=3D=3Dself.CLSID_Sink: return win32com.server.util.wrap(self)

# Event Handlers
# If you create handlers, they should have the following prototypes:
# def OnGlobalDataChange(self, TransactionID=3DdefaultNamedNotOptArg,
GroupHandle=3DdefaultNamedNotOptArg, NumItems=3DdefaultNamedNotOptArg,
ClientHandles=3DdefaultNamedNotOptArg
# , ItemValues=3DdefaultNamedNotOptArg,
Qualities=3DdefaultNamedNotOptArg, TimeStamps=3DdefaultNamedNotOptArg):


class DIOPCServerEvent:
"""OPC Server Event"""
CLSID =3D CLSID_Sink =3D IID('{F8582D26-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D IID('{F8582D2E-88FB-11D0-B850-00C0F0104305}')
_public_methods_ =3D [] # For COM Server support
_dispid_to_func_ =3D {
1 : "OnServerShutDown",
}

def __init__(self, oobj =3D None):
if oobj is None:
self._olecp =3D None
else:
import win32com.server.util
from win32com.server.policy import EventHandlerPolicy
=09
cpc=3Doobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContainer)
cp=3Dcpc.FindConnectionPoint(self.CLSID_Sink)
cookie=3Dcp.Advise(win32com.server.util.wrap(self,
usePolicy=3DEventHandlerPolicy))
self._olecp,self._olecp_cookie =3D cp,cookie
def __del__(self):
try:
self.close()
except pythoncom.com_error:
pass
def close(self):
if self._olecp is not None:
cp,cookie,self._olecp,self._olecp_cookie =3D
self._olecp,self._olecp_cookie,None,None
cp.Unadvise(cookie)
def _query_interface_(self, iid):
import win32com.server.util
if iid=3D=3Dself.CLSID_Sink: return win32com.server.util.wrap(self)

# Event Handlers
# If you create handlers, they should have the following prototypes:
# def OnServerShutDown(self, Reason=3DdefaultNamedNotOptArg):


from win32com.client import DispatchBaseClass
class IOPCAutoServer(DispatchBaseClass):
"""OPCServer Object"""
CLSID =3D IID('{F8582D25-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D IID('{F8582D2E-88FB-11D0-B850-00C0F0104305}')

def Connect(self, ProgID=3DdefaultNamedNotOptArg,
Node=3DdefaultNamedOptArg):
"""Connect to a named OPC Server"""
return self._oleobj_.InvokeTypes(1610743826, LCID, 1, (24, 0), ((8,
1), (12, 17)),ProgID
, Node)

# Result is of type OPCBrowser
def CreateBrowser(self):
"""Create a new OPCBrowser Object"""
ret =3D self._oleobj_.InvokeTypes(1610743828, LCID, 1, (9, 0), (),)
if ret is not None:
ret =3D Dispatch(ret, 'CreateBrowser', '{F8582D27-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

def DecodeSubseconds(self, TimeStamp=3DdefaultNamedNotOptArg,
Subseconds=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743834, 1, (7, 0), ((7, 1), (16396,
18)), 'DecodeSubseconds', None,TimeStamp
, Subseconds)

def Disconnect(self):
"""End Connection with OPC Server"""
return self._oleobj_.InvokeTypes(1610743827, LCID, 1, (24, 0), (),)

def GetErrorString(self, ErrorCode=3DdefaultNamedNotOptArg):
"""Convert an error code to a descriptive string"""
# Result is a Unicode object - return as-is for this version of
Python
return self._oleobj_.InvokeTypes(1610743829, LCID, 1, (8, 0), ((3,
1),),ErrorCode
)

def GetItemProperties(self, ItemID=3DdefaultNamedNotOptArg,
Count=3DdefaultNamedNotOptArg, PropertyIDs=3DdefaultNamedNotOptArg,
PropertyValues=3Dpythoncom.Missing
, Errors=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743832, 1, (24, 0), ((8, 1), (3, 1),
(24579, 1), (24588, 2), (24579, 2)), 'GetItemProperties', None,ItemID
, Count, PropertyIDs, PropertyValues, Errors) #page 41

def GetOPCServers(self, Node=3DdefaultNamedOptArg):
"""Returns an array of Server names, optionally on another node"""
return self._ApplyTypes_(1610743825, 1, (12, 0), ((12, 17),),
'GetOPCServers', None,Node
)

def LookupItemIDs(self, ItemID=3DdefaultNamedNotOptArg,
Count=3DdefaultNamedNotOptArg, PropertyIDs=3DdefaultNamedNotOptArg,
NewItemIDs=3Dpythoncom.Missing
, Errors=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743833, 1, (24, 0), ((8, 1), (3, 1),
(24579, 1), (24584, 2), (24579, 2)), 'LookupItemIDs', None,ItemID
, Count, PropertyIDs, NewItemIDs, Errors)

def QueryAvailableLocaleIDs(self):
"""The LocaleIDs supported by this server"""
return self._ApplyTypes_(1610743830, 1, (12, 0), (),
'QueryAvailableLocaleIDs', None,)

def QueryAvailableProperties(self, ItemID=3DdefaultNamedNotOptArg,
Count=3Dpythoncom.Missing, PropertyIDs=3Dpythoncom.Missing,
Descriptions=3Dpythoncom.Missing
, DataTypes=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743831, 1, (24, 0), ((8, 1), (16387,
2), (24579, 2), (24584, 2), (24578, 2)), 'QueryAvailableProperties',
None,ItemID
, Count, PropertyIDs, Descriptions, DataTypes)

_prop_map_get_ =3D {
"Bandwidth": (1610743822, 2, (3, 0), (), "Bandwidth", None),
"BuildNumber": (1610743813, 2, (2, 0), (), "BuildNumber", None),
"ClientName": (1610743818, 2, (8, 0), (), "ClientName", None),
"CurrentTime": (1610743809, 2, (7, 0), (), "CurrentTime", None),
"LastUpdateTime": (1610743810, 2, (7, 0), (), "LastUpdateTime",
None),
"LocaleID": (1610743820, 2, (3, 0), (), "LocaleID", None),
"MajorVersion": (1610743811, 2, (2, 0), (), "MajorVersion", None),
"MinorVersion": (1610743812, 2, (2, 0), (), "MinorVersion", None),
# Method 'OPCGroups' returns object of type 'OPCGroups'
"OPCGroups": (0, 2, (13, 0), (), "OPCGroups", '{F8582D2F-88FB-11D0-
B850-00C0F0104305}'),
"PublicGroupNames": (1610743824, 2, (12, 0), (), "PublicGroupNames",
None),
"ServerName": (1610743816, 2, (8, 0), (), "ServerName", None),
"ServerNode": (1610743817, 2, (8, 0), (), "ServerNode", None),
"ServerState": (1610743815, 2, (3, 0), (), "ServerState", None),
"StartTime": (1610743808, 2, (7, 0), (), "StartTime", None),
"VendorInfo": (1610743814, 2, (8, 0), (), "VendorInfo", None),
}
_prop_map_put_ =3D {
"ClientName": ((1610743818, LCID, 4, 0),()),
"LocaleID": ((1610743820, LCID, 4, 0),()),
}
# Default property for this class is 'OPCGroups'
def __call__(self):
return self._ApplyTypes_(*(0, 2, (13, 0), (), "OPCGroups",
'{F8582D2F-88FB-11D0-B850-00C0F0104305}'))
# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))

class IOPCGroup(DispatchBaseClass):
"""OPC Group Object"""
CLSID =3D IID('{F8582D2A-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')

def AsyncCancel(self, CancelID=3DdefaultNamedNotOptArg):
return self._oleobj_.InvokeTypes(1610743833, LCID, 1, (24, 0), ((3,
1),),CancelID
)

def AsyncRead(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg, Errors=3Dpythoncom.Missing,
TransactionID=3DdefaultNamedNotOptArg
, CancelID=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743830, 1, (24, 0), ((3, 1), (24579,
1), (24579, 2), (3, 1), (16387, 2)), 'AsyncRead', None,NumItems
, ServerHandles, Errors, TransactionID, CancelID)

def AsyncRefresh(self, Source=3DdefaultNamedNotOptArg,
TransactionID=3DdefaultNamedNotOptArg, CancelID=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743832, 1, (24, 0), ((2, 1), (3, 1),
(16387, 2)), 'AsyncRefresh', None,Source
, TransactionID, CancelID)

def AsyncWrite(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg, Values=3DdefaultNamedNotOptArg,
Errors=3Dpythoncom.Missing
, TransactionID=3DdefaultNamedNotOptArg, CancelID=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743831, 1, (24, 0), ((3, 1), (24579,
1), (24588, 1), (24579, 2), (3, 1), (16387, 2)), 'AsyncWrite',
None,NumItems
, ServerHandles, Values, Errors, TransactionID, CancelID
)

def SyncRead(self, Source=3DdefaultNamedNotOptArg,
NumItems=3DdefaultNamedNotOptArg, ServerHandles=3DdefaultNamedNotOptArg,
Values=3Dpythoncom.Missing
, Errors=3Dpythoncom.Missing, Qualities=3Dpythoncom.Missing,
TimeStamps=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743828, 1, (24, 0), ((2, 1), (3, 1),
(24579, 1), (24588, 2), (24579, 2), (16396, 18), (16396, 18)),
'SyncRead', None,Source
, NumItems, ServerHandles, Values, Errors, Qualities
, TimeStamps)

def SyncWrite(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg, Values=3DdefaultNamedNotOptArg,
Errors=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743829, 1, (24, 0), ((3, 1), (24579,
1), (24588, 1), (24579, 2)), 'SyncWrite', None,NumItems
, ServerHandles, Values, Errors)

_prop_map_get_ =3D {
"ClientHandle": (1610743816, 2, (3, 0), (), "ClientHandle", None),
"DeadBand": (1610743823, 2, (4, 0), (), "DeadBand", None),
"IsActive": (1610743812, 2, (11, 0), (), "IsActive", None),
"IsPublic": (1610743811, 2, (11, 0), (), "IsPublic", None),
"IsSubscribed": (1610743814, 2, (11, 0), (), "IsSubscribed", None),
"LocaleID": (1610743819, 2, (3, 0), (), "LocaleID", None),
"Name": (1610743809, 2, (8, 0), (), "Name", None),
# Method 'OPCItems' returns object of type 'OPCItems'
"OPCItems": (0, 2, (9, 0), (), "OPCItems", '{F8582D2C-88FB-11D0-
B850-00C0F0104305}'),
# Method 'Parent' returns object of type 'IOPCAutoServer'
"Parent": (1610743808, 2, (9, 0), (), "Parent", '{F8582D25-88FB-11D0-
B850-00C0F0104305}'),
"ServerHandle": (1610743818, 2, (3, 0), (), "ServerHandle", None),
"TimeBias": (1610743821, 2, (3, 0), (), "TimeBias", None),
"UpdateRate": (1610743825, 2, (3, 0), (), "UpdateRate", None),
}
_prop_map_put_ =3D {
"ClientHandle": ((1610743816, LCID, 4, 0),()),
"DeadBand": ((1610743823, LCID, 4, 0),()),
"IsActive": ((1610743812, LCID, 4, 0),()),
"IsSubscribed": ((1610743814, LCID, 4, 0),()),
"LocaleID": ((1610743819, LCID, 4, 0),()),
"Name": ((1610743809, LCID, 4, 0),()),
"TimeBias": ((1610743821, LCID, 4, 0),()),
"UpdateRate": ((1610743825, LCID, 4, 0),()),
}
# Default property for this class is 'OPCItems'
def __call__(self):
return self._ApplyTypes_(*(0, 2, (9, 0), (), "OPCItems",
'{F8582D2C-88FB-11D0-B850-00C0F0104305}'))
# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))

class IOPCGroups(DispatchBaseClass):
"""Collection of OPC Group objects"""
CLSID =3D IID('{F8582D28-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')

# Result is of type OPCGroup
def Add(self, Name=3DdefaultNamedOptArg):
"""Adds an OPCGroup to the collection"""
ret =3D self._oleobj_.InvokeTypes(1610743822, LCID, 1, (13, 0), ((12,
17),),Name
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret =3D ret.QueryInterface(pythoncom.IID_IDispatch)
except pythoncom.error:
return ret
ret =3D Dispatch(ret, 'Add', '{F8582D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

# Result is of type OPCGroup
def ConnectPublicGroup(self, Name=3DdefaultNamedNotOptArg):
"""Adds an existing public OPCGroup to the collection"""
ret =3D self._oleobj_.InvokeTypes(1610743826, LCID, 1, (13, 0), ((8,
1),),Name
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret =3D ret.QueryInterface(pythoncom.IID_IDispatch)
except pythoncom.error:
return ret
ret =3D Dispatch(ret, 'ConnectPublicGroup', '{F8582D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

# Result is of type OPCGroup
def GetOPCGroup(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Returns an OPCGroup specified by server handle or name"""
ret =3D self._oleobj_.InvokeTypes(1610743823, LCID, 1, (13, 0), ((12,
1),),ItemSpecifier
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret =3D ret.QueryInterface(pythoncom.IID_IDispatch)
except pythoncom.error:
return ret
ret =3D Dispatch(ret, 'GetOPCGroup', '{F8582D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

# Result is of type OPCGroup
def Item(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Returns an OPCGroup by index (starts at 1) or name"""
ret =3D self._oleobj_.InvokeTypes(0, LCID, 1, (13, 0), ((12,
1),),ItemSpecifier
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret =3D ret.QueryInterface(pythoncom.IID_IDispatch)
except pythoncom.error:
return ret
ret =3D Dispatch(ret, 'Item', '{F8582D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

def Remove(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Removes an OPCGroup specified by server handle or name"""
return self._oleobj_.InvokeTypes(1610743825, LCID, 1, (24, 0), ((12,
1),),ItemSpecifier
)

def RemoveAll(self):
"""Remove all groups and their items"""
return self._oleobj_.InvokeTypes(1610743824, LCID, 1, (24, 0), (),)

def RemovePublicGroup(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Removes a public OPCGroup specified by server handle or name"""
return self._oleobj_.InvokeTypes(1610743827, LCID, 1, (24, 0), ((12,
1),),ItemSpecifier
)

_prop_map_get_ =3D {
"Count": (1610743819, 2, (3, 0), (), "Count", None),
"DefaultGroupDeadband": (1610743813, 2, (4, 0), (),
"DefaultGroupDeadband", None),
"DefaultGroupIsActive": (1610743809, 2, (11, 0), (),
"DefaultGroupIsActive", None),
"DefaultGroupLocaleID": (1610743815, 2, (3, 0), (),
"DefaultGroupLocaleID", None),
"DefaultGroupTimeBias": (1610743817, 2, (3, 0), (),
"DefaultGroupTimeBias", None),
"DefaultGroupUpdateRate": (1610743811, 2, (3, 0), (),
"DefaultGroupUpdateRate", None),
# Method 'Parent' returns object of type 'IOPCAutoServer'
"Parent": (1610743808, 2, (9, 0), (), "Parent", '{F8582D25-88FB-11D0-
B850-00C0F0104305}'),
}
_prop_map_put_ =3D {
"DefaultGroupDeadband": ((1610743813, LCID, 4, 0),()),
"DefaultGroupIsActive": ((1610743809, LCID, 4, 0),()),
"DefaultGroupLocaleID": ((1610743815, LCID, 4, 0),()),
"DefaultGroupTimeBias": ((1610743817, LCID, 4, 0),()),
"DefaultGroupUpdateRate": ((1610743811, LCID, 4, 0),()),
}
# Default method for this class is 'Item'
def __call__(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Returns an OPCGroup by index (starts at 1) or name"""
ret =3D self._oleobj_.InvokeTypes(0, LCID, 1, (13, 0), ((12,
1),),ItemSpecifier
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret =3D ret.QueryInterface(pythoncom.IID_IDispatch)
except pythoncom.error:
return ret
ret =3D Dispatch(ret, '__call__', '{F8582D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))
def __iter__(self):
"Return a Python iterator for this object"
ob =3D self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),())
return win32com.client.util.Iterator(ob)
def _NewEnum(self):
"Create an enumerator from this object"
return
win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13,
10),()),'{F8582D30-88FB-11D0-B850-00C0F0104305}')
def __getitem__(self, index):
"Allow this class to be accessed as a collection"
if not self.__dict__.has_key('_enum_'):
self.__dict__['_enum_'] =3D self._NewEnum()
return self._enum_.__getitem__(index)
#This class has Count() property - allow len(ob) to provide this
def __len__(self):
return self._ApplyTypes_(*(1610743819, 2, (3, 0), (), "Count",
None))
#This class has a __len__ - this is needed so 'if object:' always
returns TRUE.
def __nonzero__(self):
return True

class OPCBrowser(DispatchBaseClass):
"""OPC Browser"""
CLSID =3D IID('{F8582D27-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D None

def GetAccessPaths(self, ItemID=3DdefaultNamedNotOptArg):
"""Returns an array of Access Paths for an ItemID"""
return self._ApplyTypes_(1610743827, 1, (12, 0), ((8, 1),),
'GetAccessPaths', None,ItemID
)

def GetItemID(self, Leaf=3DdefaultNamedNotOptArg):
"""Converts a leaf name to an ItemID"""
# Result is a Unicode object - return as-is for this version of
Python
return self._oleobj_.InvokeTypes(1610743826, LCID, 1, (8, 0), ((8,
1),),Leaf
)

def Item(self, ItemSpecifier=3DdefaultNamedNotOptArg):
# Result is a Unicode object - return as-is for this version of
Python
return self._oleobj_.InvokeTypes(1610743819, LCID, 1, (8, 0), ((12,
1),),ItemSpecifier
)

def MoveDown(self, Branch=3DdefaultNamedNotOptArg):
"""Move down into this branch"""
return self._oleobj_.InvokeTypes(1610743824, LCID, 1, (24, 0), ((8,
1),),Branch
)

def MoveTo(self, Branches=3DdefaultNamedNotOptArg):
"""Move to this absolute position"""
return self._oleobj_.InvokeTypes(1610743825, LCID, 1, (24, 0),
((24584, 1),),Branches
)

def MoveToRoot(self):
"""Move up to the top (root) of the tree"""
return self._oleobj_.InvokeTypes(1610743823, LCID, 1, (24, 0), (),)

def MoveUp(self):
"""Move up a level in the tree"""
return self._oleobj_.InvokeTypes(1610743822, LCID, 1, (24, 0), (),)

def ShowBranches(self):
"""Get all of the branch names that match the filter"""
return self._oleobj_.InvokeTypes(1610743820, LCID, 1, (24, 0), (),)

def ShowLeafs(self, Flat=3DdefaultNamedOptArg):
"""Get all of the leaf names that match the filter"""
return self._oleobj_.InvokeTypes(1610743821, LCID, 1, (24, 0), ((12,
17),),Flat
)

_prop_map_get_ =3D {
"AccessRights": (1610743813, 2, (3, 0), (), "AccessRights", None),
"Count": (1610743817, 2, (3, 0), (), "Count", None),
"CurrentPosition": (1610743815, 2, (8, 0), (), "CurrentPosition",
None),
"DataType": (1610743811, 2, (2, 0), (), "DataType", None),
"Filter": (1610743809, 2, (8, 0), (), "Filter", None),
"Organization": (1610743808, 2, (3, 0), (), "Organization", None),
}
_prop_map_put_ =3D {
"AccessRights": ((1610743813, LCID, 4, 0),()),
"CurrentPosition": ((1610743815, LCID, 4, 0),()),
"DataType": ((1610743811, LCID, 4, 0),()),
"Filter": ((1610743809, LCID, 4, 0),()),
}
def __iter__(self):
"Return a Python iterator for this object"
ob =3D self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),())
return win32com.client.util.Iterator(ob)
def _NewEnum(self):
"Create an enumerator from this object"
return
win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13,
10),()),None)
def __getitem__(self, index):
"Allow this class to be accessed as a collection"
if not self.__dict__.has_key('_enum_'):
self.__dict__['_enum_'] =3D self._NewEnum()
return self._enum_.__getitem__(index)
#This class has Count() property - allow len(ob) to provide this
def __len__(self):
return self._ApplyTypes_(*(1610743817, 2, (3, 0), (), "Count",
None))
#This class has a __len__ - this is needed so 'if object:' always
returns TRUE.
def __nonzero__(self):
return True

class OPCItem(DispatchBaseClass):
"""OPC Item object"""
CLSID =3D IID('{F8582D2D-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D None

def Read(self, Source=3DdefaultNamedNotOptArg, Value=3Dpythoncom.Missing,
Quality=3Dpythoncom.Missing, TimeStamp=3Dpythoncom.Missing):
return self._ApplyTypes_(1610743826, 1, (24, 0), ((2, 1), (16396,
18), (16396, 18), (16396, 18)), 'Read', None,Source
, Value, Quality, TimeStamp)

def Write(self, Value=3DdefaultNamedNotOptArg):
return self._oleobj_.InvokeTypes(1610743827, LCID, 1, (24, 0), ((12,
1),),Value
)

_prop_map_get_ =3D {
"AccessPath": (1610743812, 2, (8, 0), (), "AccessPath", None),
"AccessRights": (1610743813, 2, (3, 0), (), "AccessRights", None),
"CanonicalDataType": (1610743822, 2, (2, 0), (),
"CanonicalDataType", None),
"ClientHandle": (1610743809, 2, (3, 0), (), "ClientHandle", None),
"EUInfo": (1610743824, 2, (12, 0), (), "EUInfo", None),
"EUType": (1610743823, 2, (2, 0), (), "EUType", None),
"IsActive": (1610743815, 2, (11, 0), (), "IsActive", None),
"ItemID": (1610743814, 2, (8, 0), (), "ItemID", None),
# Method 'Parent' returns object of type 'OPCGroup'
"Parent": (1610743808, 2, (13, 0), (), "Parent",
'{F8582D30-88FB-11D0-B850-00C0F0104305}'),
"Quality": (1610743820, 2, (3, 0), (), "Quality", None),
"RequestedDataType": (1610743817, 2, (2, 0), (),
"RequestedDataType", None),
"ServerHandle": (1610743811, 2, (3, 0), (), "ServerHandle", None),
"TimeStamp": (1610743821, 2, (7, 0), (), "TimeStamp", None),
"Updated": (1610743825, 2, (11, 0), (), "Updated", None),
"Value": (0, 2, (12, 0), (), "Value", None),
}
_prop_map_put_ =3D {
"ClientHandle": ((1610743809, LCID, 4, 0),()),
"IsActive": ((1610743815, LCID, 4, 0),()),
"RequestedDataType": ((1610743817, LCID, 4, 0),()),
}
# Default property for this class is 'Value'
def __call__(self):
return self._ApplyTypes_(*(0, 2, (12, 0), (), "Value", None))
# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))

class OPCItems(DispatchBaseClass):
"""Collection of OPC Item objects"""
CLSID =3D IID('{F8582D2C-88FB-11D0-B850-00C0F0104305}')
coclass_clsid =3D None

# Result is of type OPCItem
def AddItem(self, ItemID=3DdefaultNamedNotOptArg,
ClientHandle=3DdefaultNamedNotOptArg):
"""Adds an OPCItem object to the collection"""
ret =3D self._oleobj_.InvokeTypes(1610743819, LCID, 1, (9, 0), ((8,
1), (3, 1)),ItemID
, ClientHandle)
if ret is not None:
ret =3D Dispatch(ret, 'AddItem', '{F8582D2D-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

def AddItems(self, NumItems=3DdefaultNamedNotOptArg,
ItemIDs=3DdefaultNamedNotOptArg, ClientHandles=3DdefaultNamedNotOptArg,
ServerHandles=3Dpythoncom.Missing
, Errors=3Dpythoncom.Missing, RequestedDataTypes=3DdefaultNamedOptArg,
AccessPaths=3DdefaultNamedOptArg):
"""Adds OPCItem objects to the collection"""
return self._ApplyTypes_(1610743820, 1, (24, 0), ((3, 1), (24584,
1), (24579, 1), (24579, 2), (24579, 2), (12, 17), (12, 17)),
'AddItems', None,NumItems
, ItemIDs, ClientHandles, ServerHandles, Errors, RequestedDataTypes
, AccessPaths)

# Result is of type OPCItem
def GetOPCItem(self, ServerHandle=3DdefaultNamedNotOptArg):
"""Returns an OPCItem specified by server handle"""
ret =3D self._oleobj_.InvokeTypes(1610743818, LCID, 1, (9, 0), ((3,
1),),ServerHandle
)
if ret is not None:
ret =3D Dispatch(ret, 'GetOPCItem', '{F8582D2D-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

# Result is of type OPCItem
def Item(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Returns an OPCItem by index (starts at 1)"""
ret =3D self._oleobj_.InvokeTypes(0, LCID, 1, (9, 0), ((12,
1),),ItemSpecifier
)
if ret is not None:
ret =3D Dispatch(ret, 'Item', '{F8582D2D-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

def Remove(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg, Errors=3Dpythoncom.Missing):
"""Removes OPCItem objects from the collection"""
return self._ApplyTypes_(1610743821, 1, (24, 0), ((3, 1), (24579,
1), (24579, 2)), 'Remove', None,NumItems
, ServerHandles, Errors)

def SetActive(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg,
ActiveState=3DdefaultNamedNotOptArg, Errors=3Dpythoncom.Missing):
"""Set the active state of OPCItem objects"""
return self._ApplyTypes_(1610743823, 1, (24, 0), ((3, 1), (24579,
1), (11, 1), (24579, 2)), 'SetActive', None,NumItems
, ServerHandles, ActiveState, Errors)

def SetClientHandles(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg,
ClientHandles=3DdefaultNamedNotOptArg, Errors=3Dpythoncom.Missing):
"""Set the Client handles of OPCItem objects"""
return self._ApplyTypes_(1610743824, 1, (24, 0), ((3, 1), (24579,
1), (24579, 1), (24579, 2)), 'SetClientHandles', None,NumItems
, ServerHandles, ClientHandles, Errors)

def SetDataTypes(self, NumItems=3DdefaultNamedNotOptArg,
ServerHandles=3DdefaultNamedNotOptArg,
RequestedDataTypes=3DdefaultNamedNotOptArg, Errors=3Dpythoncom.Missing):
"""Set the Data Types of OPCItem objects"""
return self._ApplyTypes_(1610743825, 1, (24, 0), ((3, 1), (24579,
1), (24579, 1), (24579, 2)), 'SetDataTypes', None,NumItems
, ServerHandles, RequestedDataTypes, Errors)

def Validate(self, NumItems=3DdefaultNamedNotOptArg,
ItemIDs=3DdefaultNamedNotOptArg, Errors=3Dpythoncom.Missing,
RequestedDataTypes=3DdefaultNamedOptArg
, AccessPaths=3DdefaultNamedOptArg):
"""?"""
return self._ApplyTypes_(1610743822, 1, (24, 0), ((3, 1), (24584,
1), (24579, 2), (12, 17), (12, 17)), 'Validate', None,NumItems
, ItemIDs, Errors, RequestedDataTypes, AccessPaths)

_prop_map_get_ =3D {
"Count": (1610743815, 2, (3, 0), (), "Count", None),
"DefaultAccessPath": (1610743811, 2, (8, 0), (),
"DefaultAccessPath", None),
"DefaultIsActive": (1610743813, 2, (11, 0), (), "DefaultIsActive",
None),
"DefaultRequestedDataType": (1610743809, 2, (2, 0), (),
"DefaultRequestedDataType", None),
# Method 'Parent' returns object of type 'OPCGroup'
"Parent": (1610743808, 2, (13, 0), (), "Parent",
'{F8582D30-88FB-11D0-B850-00C0F0104305}'),
}
_prop_map_put_ =3D {
"DefaultAccessPath": ((1610743811, LCID, 4, 0),()),
"DefaultIsActive": ((1610743813, LCID, 4, 0),()),
"DefaultRequestedDataType": ((1610743809, LCID, 4, 0),()),
}
# Default method for this class is 'Item'
def __call__(self, ItemSpecifier=3DdefaultNamedNotOptArg):
"""Returns an OPCItem by index (starts at 1)"""
ret =3D self._oleobj_.InvokeTypes(0, LCID, 1, (9, 0), ((12,
1),),ItemSpecifier
)
if ret is not None:
ret =3D Dispatch(ret, '__call__', '{F8582D2D-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=3D0)
return ret

# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))
def __iter__(self):
"Return a Python iterator for this object"
ob =3D self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),())
return win32com.client.util.Iterator(ob)
def _NewEnum(self):
"Create an enumerator from this object"
return
win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13,
10),()),'{F8582D2D-88FB-11D0-B850-00C0F0104305}')
def __getitem__(self, index):
"Allow this class to be accessed as a collection"
if not self.__dict__.has_key('_enum_'):
self.__dict__['_enum_'] =3D self._NewEnum()
return self._enum_.__getitem__(index)
#This class has Count() property - allow len(ob) to provide this
def __len__(self):
return self._ApplyTypes_(*(1610743815, 2, (3, 0), (), "Count",
None))
#This class has a __len__ - this is needed so 'if object:' always
returns TRUE.
def __nonzero__(self):
return True

from win32com.client import CoClassBaseClass
class OPCGroup(CoClassBaseClass): # A CoClass
# OPC Automation Group
CLSID =3D IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')
coclass_sources =3D [
DIOPCGroupEvent,
]
default_source =3D DIOPCGroupEvent
coclass_interfaces =3D [
IOPCGroup,
]
default_interface =3D IOPCGroup

class OPCGroups(CoClassBaseClass): # A CoClass
# OPC Automation Groups Collection
CLSID =3D IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')
coclass_sources =3D [
DIOPCGroupsEvent,
]
default_source =3D DIOPCGroupsEvent
coclass_interfaces =3D [
IOPCGroups,
]
default_interface =3D IOPCGroups

# This CoClass is known by the name 'Matrikon.OPC.Automation.1'
class OPCServer(CoClassBaseClass): # A CoClass
# OPC Automation Server
CLSID =3D IID('{F8582D2E-88FB-11D0-B850-00C0F0104305}')
coclass_sources =3D [
DIOPCServerEvent,
]
default_source =3D DIOPCServerEvent
coclass_interfaces =3D [
IOPCAutoServer,
]
default_interface =3D IOPCAutoServer

IOPCAutoServer_vtables_dispatch_ =3D 1
IOPCAutoServer_vtables_ =3D [
(( 'StartTime' , 'StartTime' , ), 1610743808, (1610743808, (),
[ (16391, 10, None, None) , ], 1 , 2 , 4 , 0 , 28 , (3, 0, None,
None) , 0 , )),
(( 'CurrentTime' , 'CurrentTime' , ), 1610743809, (1610743809, (),
[ (16391, 10, None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None,
None) , 0 , )),
(( 'LastUpdateTime' , 'LastUpdateTime' , ), 1610743810, (1610743810,
(), [ (16391, 10, None, None) , ], 1 , 2 , 4 , 0 , 36 , (3, 0, None,
None) , 0 , )),
(( 'MajorVersion' , 'MajorVersion' , ), 1610743811, (1610743811, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'MinorVersion' , 'MinorVersion' , ), 1610743812, (1610743812, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 44 , (3, 0, None,
None) , 0 , )),
(( 'BuildNumber' , 'BuildNumber' , ), 1610743813, (1610743813, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 , (3, 0, None,
None) , 0 , )),
(( 'VendorInfo' , 'VendorInfo' , ), 1610743814, (1610743814, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 52 , (3, 0, None,
None) , 0 , )),
(( 'ServerState' , 'ServerState' , ), 1610743815, (1610743815, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 , (3, 0, None,
None) , 0 , )),
(( 'ServerName' , 'ServerName' , ), 1610743816, (1610743816, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 60 , (3, 0, None,
None) , 0 , )),
(( 'ServerNode' , 'ServerNode' , ), 1610743817, (1610743817, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 64 , (3, 0, None,
None) , 0 , )),
(( 'ClientName' , 'ClientName' , ), 1610743818, (1610743818, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 68 , (3, 0, None,
None) , 0 , )),
(( 'ClientName' , 'ClientName' , ), 1610743818, (1610743818, (),
[ (8, 1, None, None) , ], 1 , 4 , 4 , 0 , 72 , (3, 0, None, None) ,
0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743820, (1610743820, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 76 , (3, 0, None,
None) , 0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743820, (1610743820, (), [ (3, 1,
None, None) , ], 1 , 4 , 4 , 0 , 80 , (3, 0, None, None) , 0 , )),
(( 'Bandwidth' , 'Bandwidth' , ), 1610743822, (1610743822, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 84 , (3, 0, None,
None) , 0 , )),
(( 'OPCGroups' , 'ppGroups' , ), 0, (0, (), [ (16397, 10, None,
"IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')") , ], 1 , 2 , 4 , 0 ,
88 , (3, 0, None, None) , 0 , )),
(( 'PublicGroupNames' , 'PublicGroups' , ), 1610743824, (1610743824,
(), [ (16396, 10, None, None) , ], 1 , 2 , 4 , 0 , 92 , (3, 0, None,
None) , 0 , )),
(( 'GetOPCServers' , 'Node' , 'OPCServers' , ), 1610743825,
(1610743825, (), [ (12, 17, None, None) ,
(16396, 10, None, None) , ], 1 , 1 , 4 , 1 , 96 , (3, 0, None,
None) , 0 , )),
(( 'Connect' , 'ProgID' , 'Node' , ), 1610743826, (1610743826, (),
[ (8, 1, None, None) ,
(12, 17, None, None) , ], 1 , 1 , 4 , 1 , 100 , (3, 0, None,
None) , 0 , )),
(( 'Disconnect' , ), 1610743827, (1610743827, (), [ ], 1 , 1 , 4 ,
0 , 104 , (3, 0, None, None) , 0 , )),
(( 'CreateBrowser' , 'ppBrowser' , ), 1610743828, (1610743828, (),
[ (16393, 10, None, "IID('{F8582D27-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 108 , (3, 0, None, None) ,
0 , )),
(( 'GetErrorString' , 'ErrorCode' , 'ErrorString' , ), 1610743829,
(1610743829, (), [ (3, 1, None, None) ,
(16392, 10, None, None) , ], 1 , 1 , 4 , 0 , 112 , (3, 0, None,
None) , 0 , )),
(( 'QueryAvailableLocaleIDs' , 'LocaleIDs' , ), 1610743830,
(1610743830, (), [ (16396, 10, None, None) , ], 1 , 1 , 4 , 0 , 116 ,
(3, 0, None, None) , 0 , )),
(( 'QueryAvailableProperties' , 'ItemID' , 'Count' , 'PropertyIDs' ,
'Descriptions' ,
'DataTypes' , ), 1610743831, (1610743831, (), [ (8, 1, None,
None) , (16387, 2, None, None) , (24579, 2, None, None) ,
(24584, 2, None, None) , (24578, 2, None, None) , ], 1 , 1 , 4 ,
0 , 120 , (3, 0, None, None) , 0 , )),
(( 'GetItemProperties' , 'ItemID' , 'Count' , 'PropertyIDs' ,
'PropertyValues' ,
'Errors' , ), 1610743832, (1610743832, (), [ (8, 1, None, None) ,
(3, 1, None, None) , (24579, 1, None, None) ,
(24588, 2, None, None) , (24579, 2, None, None) , ], 1 , 1 , 4 ,
0 , 124 , (3, 0, None, None) , 0 , )),
(( 'LookupItemIDs' , 'ItemID' , 'Count' , 'PropertyIDs' ,
'NewItemIDs' ,
'Errors' , ), 1610743833, (1610743833, (), [ (8, 1, None, None) ,
(3, 1, None, None) , (24579, 1, None, None) ,
(24584, 2, None, None) , (24579, 2, None, None) , ], 1 , 1 , 4 ,
0 , 128 , (3, 0, None, None) , 0 , )),
(( 'DecodeSubseconds' , 'TimeStamp' , 'Subseconds' ,
'TimestampWithoutSubseconds' , ), 1610743834, (1610743834, (), [
(7, 1, None, None) , (16396, 18, None, None) , (16391, 10, None,
None) , ], 1 , 1 , 4 , 1 , 132 , (3, 0, None, None) , 0 , )),
]

IOPCGroup_vtables_dispatch_ =3D 1
IOPCGroup_vtables_ =3D [
(( 'Parent' , 'ppParent' , ), 1610743808, (1610743808, (), [ (16393,
10, None, "IID('{F8582D25-88FB-11D0-B850-00C0F0104305}')") , ], 1 ,
2 , 4 , 0 , 28 , (3, 0, None, None) , 0 , )),
(( 'Name' , 'Name' , ), 1610743809, (1610743809, (), [ (16392, 10,
None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None, None) , 0 , )),
(( 'Name' , 'Name' , ), 1610743809, (1610743809, (), [ (8, 1, None,
None) , ], 1 , 4 , 4 , 0 , 36 , (3, 0, None, None) , 0 , )),
(( 'IsPublic' , 'IsPublic' , ), 1610743811, (1610743811, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'IsActive' , 'IsActive' , ), 1610743812, (1610743812, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 44 , (3, 0, None,
None) , 0 , )),
(( 'IsActive' , 'IsActive' , ), 1610743812, (1610743812, (), [ (11,
1, None, None) , ], 1 , 4 , 4 , 0 , 48 , (3, 0, None, None) , 0 , )),
(( 'IsSubscribed' , 'IsSubscribed' , ), 1610743814, (1610743814, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 52 , (3, 0, None,
None) , 0 , )),
(( 'IsSubscribed' , 'IsSubscribed' , ), 1610743814, (1610743814, (),
[ (11, 1, None, None) , ], 1 , 4 , 4 , 0 , 56 , (3, 0, None, None) ,
0 , )),
(( 'ClientHandle' , 'ClientHandle' , ), 1610743816, (1610743816, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 60 , (3, 0, None,
None) , 0 , )),
(( 'ClientHandle' , 'ClientHandle' , ), 1610743816, (1610743816, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 64 , (3, 0, None, None) ,
0 , )),
(( 'ServerHandle' , 'ServerHandle' , ), 1610743818, (1610743818, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 68 , (3, 0, None,
None) , 0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743819, (1610743819, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 72 , (3, 0, None,
None) , 0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743819, (1610743819, (), [ (3, 1,
None, None) , ], 1 , 4 , 4 , 0 , 76 , (3, 0, None, None) , 0 , )),
(( 'TimeBias' , 'TimeBias' , ), 1610743821, (1610743821, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 80 , (3, 0, None,
None) , 0 , )),
(( 'TimeBias' , 'TimeBias' , ), 1610743821, (1610743821, (), [ (3, 1,
None, None) , ], 1 , 4 , 4 , 0 , 84 , (3, 0, None, None) , 0 , )),
(( 'DeadBand' , 'DeadBand' , ), 1610743823, (1610743823, (),
[ (16388, 10, None, None) , ], 1 , 2 , 4 , 0 , 88 , (3, 0, None,
None) , 0 , )),
(( 'DeadBand' , 'DeadBand' , ), 1610743823, (1610743823, (), [ (4, 1,
None, None) , ], 1 , 4 , 4 , 0 , 92 , (3, 0, None, None) , 0 , )),
(( 'UpdateRate' , 'UpdateRate' , ), 1610743825, (1610743825, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 96 , (3, 0, None,
None) , 0 , )),
(( 'UpdateRate' , 'UpdateRate' , ), 1610743825, (1610743825, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 100 , (3, 0, None, None) ,
0 , )),
(( 'OPCItems' , 'ppItems' , ), 0, (0, (), [ (16393, 10, None,
"IID('{F8582D2C-88FB-11D0-B850-00C0F0104305}')") , ], 1 , 2 , 4 , 0 ,
104 , (3, 0, None, None) , 0 , )),
(( 'SyncRead' , 'Source' , 'NumItems' , 'ServerHandles' , 'Values' ,
'Errors' , 'Qualities' , 'TimeStamps' , ), 1610743828, (1610743828,
(), [ (2, 1, None, None) ,
(3, 1, None, None) , (24579, 1, None, None) , (24588, 2, None,
None) , (24579, 2, None, None) , (16396, 18, None, None) ,
(16396, 18, None, None) , ], 1 , 1 , 4 , 2 , 108 , (3, 0, None,
None) , 0 , )),
(( 'SyncWrite' , 'NumItems' , 'ServerHandles' , 'Values' ,
'Errors' ,
), 1610743829, (1610743829, (), [ (3, 1, None, None) , (24579, 1,
None, None) , (24588, 1, None, None) , (24579, 2, None, None) , ], 1 ,
1 , 4 , 0 , 112 , (3, 0, None, None) , 0 , )),
(( 'AsyncRead' , 'NumItems' , 'ServerHandles' , 'Errors' ,
'TransactionID' ,
'CancelID' , ), 1610743830, (1610743830, (), [ (3, 1, None, None) ,
(24579, 1, None, None) , (24579, 2, None, None) ,
(3, 1, None, None) , (16387, 2, None, None) , ], 1 , 1 , 4 , 0 ,
116 , (3, 0, None, None) , 0 , )),
(( 'AsyncWrite' , 'NumItems' , 'ServerHandles' , 'Values' ,
'Errors' ,
'TransactionID' , 'CancelID' , ), 1610743831, (1610743831, (),
[ (3, 1, None, None) , (24579, 1, None, None) ,
(24588, 1, None, None) , (24579, 2, None, None) , (3, 1, None,
None) , (16387, 2, None, None) , ], 1 , 1 , 4 , 0 , 120 , (3, 0, None,
None) , 0 , )),
(( 'AsyncRefresh' , 'Source' , 'TransactionID' , 'CancelID' , ),
1610743832, (1610743832, (), [
(2, 1, None, None) , (3, 1, None, None) , (16387, 2, None,
None) , ], 1 , 1 , 4 , 0 , 124 , (3, 0, None, None) , 0 , )),
(( 'AsyncCancel' , 'CancelID' , ), 1610743833, (1610743833, (), [ (3,
1, None, None) , ], 1 , 1 , 4 , 0 , 128 , (3, 0, None, None) , 0 , )),
]

IOPCGroups_vtables_dispatch_ =3D 1
IOPCGroups_vtables_ =3D [
(( 'Parent' , 'ppParent' , ), 1610743808, (1610743808, (), [ (16393,
10, None, "IID('{F8582D25-88FB-11D0-B850-00C0F0104305}')") , ], 1 ,
2 , 4 , 0 , 28 , (3, 0, None, None) , 0 , )),
(( 'DefaultGroupIsActive' , 'DefaultGroupIsActive' , ), 1610743809,
(1610743809, (), [ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 32 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupIsActive' , 'DefaultGroupIsActive' , ), 1610743809,
(1610743809, (), [ (11, 1, None, None) , ], 1 , 4 , 4 , 0 , 36 , (3,
0, None, None) , 0 , )),
(( 'DefaultGroupUpdateRate' , 'DefaultGroupUpdateRate' , ),
1610743811, (1610743811, (), [ (16387, 10, None, None) , ], 1 , 2 ,
4 , 0 , 40 , (3, 0, None, None) , 0 , )),
(( 'DefaultGroupUpdateRate' , 'DefaultGroupUpdateRate' , ),
1610743811, (1610743811, (), [ (3, 1, None, None) , ], 1 , 4 , 4 , 0 ,
44 , (3, 0, None, None) , 0 , )),
(( 'DefaultGroupDeadband' , 'DefaultGroupDeadband' , ), 1610743813,
(1610743813, (), [ (16388, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupDeadband' , 'DefaultGroupDeadband' , ), 1610743813,
(1610743813, (), [ (4, 1, None, None) , ], 1 , 4 , 4 , 0 , 52 , (3, 0,
None, None) , 0 , )),
(( 'DefaultGroupLocaleID' , 'DefaultGroupLocaleID' , ), 1610743815,
(1610743815, (), [ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupLocaleID' , 'DefaultGroupLocaleID' , ), 1610743815,
(1610743815, (), [ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 60 , (3, 0,
None, None) , 0 , )),
(( 'DefaultGroupTimeBias' , 'DefaultGroupTimeBias' , ), 1610743817,
(1610743817, (), [ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 64 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupTimeBias' , 'DefaultGroupTimeBias' , ), 1610743817,
(1610743817, (), [ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 68 , (3, 0,
None, None) , 0 , )),
(( 'Count' , 'Count' , ), 1610743819, (1610743819, (), [ (16387, 10,
None, None) , ], 1 , 2 , 4 , 0 , 72 , (3, 0, None, None) , 0 , )),
(( '_NewEnum' , 'ppUnk' , ), -4, (-4, (), [ (16397, 10, None,
None) , ], 1 , 2 , 4 , 0 , 76 , (3, 0, None, None) , 1 , )),
(( 'Item' , 'ItemSpecifier' , 'ppGroup' , ), 0, (0, (), [ (12, 1,
None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 80 , (3, 0, None, None) ,
0 , )),
(( 'Add' , 'Name' , 'ppGroup' , ), 1610743822, (1610743822, (),
[ (12, 17, None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 1 , 84 , (3, 0, None, None) ,
0 , )),
(( 'GetOPCGroup' , 'ItemSpecifier' , 'ppGroup' , ), 1610743823,
(1610743823, (), [ (12, 1, None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 88 , (3, 0, None, None) ,
0 , )),
(( 'RemoveAll' , ), 1610743824, (1610743824, (), [ ], 1 , 1 , 4 , 0 ,
92 , (3, 0, None, None) , 0 , )),
(( 'Remove' , 'ItemSpecifier' , ), 1610743825, (1610743825, (),
[ (12, 1, None, None) , ], 1 , 1 , 4 , 0 , 96 , (3, 0, None, None) ,
0 , )),
(( 'ConnectPublicGroup' , 'Name' , 'ppGroup' , ), 1610743826,
(1610743826, (), [ (8, 1, None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 100 , (3, 0, None, None) ,
0 , )),
(( 'RemovePublicGroup' , 'ItemSpecifier' , ), 1610743827,
(1610743827, (), [ (12, 1, None, None) , ], 1 , 1 , 4 , 0 , 104 , (3,
0, None, None) , 0 , )),
]

OPCBrowser_vtables_dispatch_ =3D 1
OPCBrowser_vtables_ =3D [
(( 'Organization' , 'Organization' , ), 1610743808, (1610743808, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 28 , (3, 0, None,
None) , 0 , )),
(( 'Filter' , 'Filter' , ), 1610743809, (1610743809, (), [ (16392,
10, None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None, None) , 0 , )),
(( 'Filter' , 'Filter' , ), 1610743809, (1610743809, (), [ (8, 1,
None, None) , ], 1 , 4 , 4 , 0 , 36 , (3, 0, None, None) , 0 , )),
(( 'DataType' , 'DataType' , ), 1610743811, (1610743811, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'DataType' , 'DataType' , ), 1610743811, (1610743811, (), [ (2, 1,
None, None) , ], 1 , 4 , 4 , 0 , 44 , (3, 0, None, None) , 0 , )),
(( 'AccessRights' , 'AccessRights' , ), 1610743813, (1610743813, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 , (3, 0, None,
None) , 0 , )),
(( 'AccessRights' , 'AccessRights' , ), 1610743813, (1610743813, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 52 , (3, 0, None, None) ,
0 , )),
(( 'CurrentPosition' , 'CurrentPosition' , ), 1610743815,
(1610743815, (), [ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 ,
(3, 0, None, None) , 0 , )),
(( 'CurrentPosition' , 'CurrentPosition' , ), 1610743815,
(1610743815, (), [ (8, 1, None, None) , ], 1 , 4 , 4 , 0 , 60 , (3, 0,
None, None) , 0 , )),
(( 'Count' , 'Count' , ), 1610743817, (1610743817, (), [ (16387, 10,
None, None) , ], 1 , 2 , 4 , 0 , 64 , (3, 0, None, None) , 0 , )),
(( '_NewEnum' , 'ppUnk' , ), -4, (-4, (), [ (16397, 10, None,
None) , ], 1 , 2 , 4 , 0 , 68 , (3, 0, None, None) , 1 , )),
(( 'Item' , 'ItemSpecifier' , 'Item' , ), 1610743819, (1610743819,
(), [ (12, 1, None, None) ,
(16392, 10, None, None) , ], 1 , 1 , 4 , 0 , 72 , (3, 0, None,
None) , 0 , )),
(( 'ShowBranches' , ), 1610743820, (1610743820, (), [ ], 1 , 1 , 4 ,
0 , 76 , (3, 0, None, None) , 0 , )),
(( 'ShowLeafs' , 'Flat' , ), 1610743821, (1610743821, (), [ (12, 17,
None, None) , ], 1 , 1 , 4 , 1 , 80 , (3, 0, None, None) , 0 , )),
(( 'MoveUp' , ), 1610743822, (1610743822, (), [ ], 1 , 1 , 4 , 0 ,
84 , (3, 0, None, None) , 0 , )),
(( 'MoveToRoot' , ), 1610743823, (1610743823, (), [ ], 1 , 1 , 4 ,
0 , 88 , (3, 0, None, None) , 0 , )),
(( 'MoveDown' , 'Branch' , ), 1610743824, (1610743824, (), [ (8, 1,
None, None) , ], 1 , 1 , 4 , 0 , 92 , (3, 0, None, None) , 0 , )),
(( 'MoveTo' , 'Branches' , ), 1610743825, (1610743825, (), [ (24584,
1, None, None) , ], 1 , 1 , 4 , 0 , 96 , (3, 0, None, None) , 0 , )),
(( 'GetItemID' , 'Leaf' , 'ItemID' , ), 1610743826, (1610743826, (),
[ (8, 1, None, None) ,
(16392, 10, None, None) , ], 1 , 1 , 4 , 0 , 100 , (3, 0, None,
None) , 0 , )),
(( 'GetAccessPaths' , 'ItemID' , 'AccessPaths' , ), 1610743827,
(1610743827, (), [ (8, 1, None, None) ,
(16396, 10, None, None) , ], 1 , 1 , 4 , 0 , 104 , (3, 0, None,
None) , 0 , )),
]

OPCItem_vtables_dispatch_ =3D 1
OPCItem_vtables_ =3D [
(( 'Parent' , 'Parent' , ), 1610743808, (1610743808, (), [ (16397,
10, None, "IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')") , ], 1 ,
2 , 4 , 0 , 28 , (3, 0, None, None) , 0 , )),
(( 'ClientHandle' , 'ClientHandle' , ), 1610743809, (1610743809, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None,
None) , 0 , )),
(( 'ClientHandle' , 'ClientHandle' , ), 1610743809, (1610743809, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 36 , (3, 0, None, None) ,
0 , )),
(( 'ServerHandle' , 'ServerHandle' , ), 1610743811, (1610743811, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'AccessPath' , 'AccessPath' , ), 1610743812, (1610743812, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 44 , (3, 0, None,
None) , 0 , )),
(( 'AccessRights' , 'AccessRights' , ), 1610743813, (1610743813, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 , (3, 0, None,
None) , 0 , )),
(( 'ItemID' , 'ItemID' , ), 1610743814, (1610743814, (), [ (16392,
10, None, None) , ], 1 , 2 , 4 , 0 , 52 , (3, 0, None, None) , 0 , )),
(( 'IsActive' , 'IsActive' , ), 1610743815, (1610743815, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 , (3, 0, None,
None) , 0 , )),
(( 'IsActive' , 'IsActive' , ), 1610743815, (1610743815, (), [ (11,
1, None, None) , ], 1 , 4 , 4 , 0 , 60 , (3, 0, None, None) , 0 , )),
(( 'RequestedDataType' , 'RequestedDataType' , ), 1610743817,
(1610743817, (), [ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 64 ,
(3, 0, None, None) , 0 , )),
(( 'RequestedDataType' , 'RequestedDataType' , ), 1610743817,
(1610743817, (), [ (2, 1, None, None) , ], 1 , 4

1 réponse

Avatar
getelectronic
On 9 mai, 17:01, wrote:
bonjour
Voici le fichier gégéré par makepy pour obtenir les méthodes afin
d'utilier l'interface COM pour développer unclientOPC

********************

# -*- coding: mbcs -*-
# Created by makepy.py version 0.4.95
# Bypythonversion 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310
32 bit (Intel)]
# From type library 'OPCDAAuto.dll'
# On Wed May 09 08:26:18 2007
"""MatrikonOPCAutomation 2.0"""
makepy_version = '0.4.95'
python_version = 0x20500f0

import win32com.client.CLSIDToClass, pythoncom
import win32com.client.util
from pywintypes import IID
from win32com.clientimport Dispatch

# The following 3 lines may need tweaking for the particular server
# Candidates are pythoncom.Missing, .Empty and .ArgNotFound
defaultNamedOptArg=pythoncom.Empty
defaultNamedNotOptArg=pythoncom.Empty
defaultUnnamedArg=pythoncom.Empty

CLSID = IID('{F8582D24-88FB-11D0-B850-00C0F0104305}')
MajorVersion = 1
MinorVersion = 0
LibraryFlags = 8
LCID = 0x0

class constants:
OPCReadable =0x1 # from enum OPCAccess Rights
OPCWritable =0x2 # from enum OPCAccess Rights
OPCCache =0x1 # from enum OPCDataSo urce
OPCDevice =0x2 # from enum OPCDataSo urce
OPCBadRights =-1073479674 # from enum OPCErrors
OPCBadType =-1073479676 # from enum OPCErrors
OPCClamp =0x4000e # from enum OPCErrors
OPCDuplicateName =-1073479668 # from enum OPCErrors
OPCInuse =0x4000f # from enum OPCErrors
OPCInvalidConfig =-1073479664 # from enum OPCErrors
OPCInvalidFilter =-1073479671 # from enum OPCErrors
OPCInvalidHandle =-1073479679 # from enum OPCErrors
OPCInvalidItemID =-1073479672 # from enum OPCErrors
OPCInvalidPID =-1073479165 # from enum OPCErrors
OPCNotFound =-1073479663 # from enum OPCErrors
OPCPublic =-1073479675 # from enum OPCErrors
OPCRange =-1073479669 # from enum OPCErrors
OPCUnknownItemID =-1073479673 # from enum OPCErrors
OPCUnknownPath =-1073479670 # from enum OPCErrors
OPCUnsupportedRate =0x4000d # from enum OPCErrors
OPCFlat =0x2 # from enum
OPCNamespaceTypes
OPCHierarchical =0x1 # from enum
OPCNamespaceTypes
OPCQualityBad =0x0 # from enum OPCQuality
OPCQualityGood =0xc0 # from enum OPCQuality
OPCQualityMask =0xc0 # from enum OPCQuality
OPCQualityUncertain =0x40 # from enum OPCQuality
OPCLimitConst =0x3 # from enum
OPCQualityLimits
OPCLimitHigh =0x2 # from enum
OPCQualityLimits
OPCLimitLow =0x1 # from enum
OPCQualityLimits
OPCLimitMask =0x3 # from enum
OPCQualityLimits
OPCLimitOk =0x0 # from enum
OPCQualityLimits
OPCStatusCommFailure =0x18 # from enum
OPCQualityStatus
OPCStatusConfigError =0x4 # from enum
OPCQualityStatus
OPCStatusDeviceFailure =0xc # from enum
OPCQualityStatus
OPCStatusEGUExceeded =0x54 # from enum
OPCQualityStatus
OPCStatusLastKnown =0x14 # from enum
OPCQualityStatus
OPCStatusLastUsable =0x44 # from enum
OPCQualityStatus
OPCStatusLocalOverride =0xd8 # from enum
OPCQualityStatus
OPCStatusMask =0xfc # from enum
OPCQualityStatus
OPCStatusNotConnected =0x8 # from enum
OPCQualityStatus
OPCStatusOutOfService =0x1c # from enum
OPCQualityStatus
OPCStatusSensorCal =0x50 # from enum
OPCQualityStatus
OPCStatusSensorFailure =0x10 # from enum
OPCQualityStatus
OPCStatusSubNormal =0x58 # from enum
OPCQualityStatus
OPCDisconnected =0x6 # from enum OPCServer State
OPCFailed =0x2 # from enum OPCServer State
OPCNoconfig =0x3 # from enum OPCServer State
OPCRunning =0x1 # from enum OPCServer State
OPCSuspended =0x4 # from enum OPCServer State
OPCTest =0x5 # from enum OPCServer State

class DIOPCGroupEvent:
"""OPCGroup Events"""
CLSID = CLSID_Sink = IID('{F8582D2B-88FB-11D0-B850-00C0F01043 05}')
coclass_clsid = IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')
_public_methods_ = [] # For COM Server support
_dispid_to_func_ = {
4 : "OnAsyncCancelComplete",
1 : "OnDataChange",
2 : "OnAsyncReadComplete",
3 : "OnAsyncWriteComplete",
}

def __init__(self, oobj = None):
if oobj is None:
self._olecp = None
else:
import win32com.server.util
from win32com.server.policy import EventHandlerPo licy

cpc=oobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContaine r)
cp=cpc.FindConnectionPoint(self.CLSID_Sink)
cookie=cp.Advise(win32com.server.util.wrap(self,
usePolicy=EventHandlerPolicy))
self._olecp,self._olecp_cookie = cp,cookie
def __del__(self):
try:
self.close()
except pythoncom.com_error:
pass
def close(self):
if self._olecp is not None:
cp,cookie,self._olecp,self._olecp_cookie =
self._olecp,self._olecp_cookie,None,None
cp.Unadvise(cookie)
def _query_interface_(self, iid):
import win32com.server.util
if iid==self.CLSID_Sink: return win32com.server.util. wrap(self)

# Event Handlers
# If you create handlers, they should have the following prototyp es:
# def OnAsyncCancelComplete(self, CancelIDÞfaultNamedNotOptArg):
# def OnDataChange(self, TransactionIDÞfaultNamedNotOptArg,
NumItemsÞfaultNamedNotOptArg, ClientHandlesÞfaultNamedNotOptArg,
ItemValuesÞfaultNamedNotOptArg
# , QualitiesÞfaultNamedNotOptArg,
TimeStampsÞfaultNamedNotOptArg):
# def OnAsyncReadComplete(self, TransactionIDÞfaultNamedNotOptA rg,
NumItemsÞfaultNamedNotOptArg, ClientHandlesÞfaultNamedNotOptArg,
ItemValuesÞfaultNamedNotOptArg
# , QualitiesÞfaultNamedNotOptArg,
TimeStampsÞfaultNamedNotOptArg, ErrorsÞfaultNamedNotOptArg):
# def OnAsyncWriteComplete(self, TransactionIDÞfaultNamedNotOpt Arg,
NumItemsÞfaultNamedNotOptArg, ClientHandlesÞfaultNamedNotOptArg,
ErrorsÞfaultNamedNotOptArg):

class DIOPCGroupsEvent:
"""OPCGroups Event"""
CLSID = CLSID_Sink = IID('{F8582D29-88FB-11D0-B850-00C0F01043 05}')
coclass_clsid = IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')
_public_methods_ = [] # For COM Server support
_dispid_to_func_ = {
1 : "OnGlobalDataChange",
}

def __init__(self, oobj = None):
if oobj is None:
self._olecp = None
else:
import win32com.server.util
from win32com.server.policy import EventHandlerPo licy

cpc=oobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContaine r)
cp=cpc.FindConnectionPoint(self.CLSID_Sink)
cookie=cp.Advise(win32com.server.util.wrap(self,
usePolicy=EventHandlerPolicy))
self._olecp,self._olecp_cookie = cp,cookie
def __del__(self):
try:
self.close()
except pythoncom.com_error:
pass
def close(self):
if self._olecp is not None:
cp,cookie,self._olecp,self._olecp_cookie =
self._olecp,self._olecp_cookie,None,None
cp.Unadvise(cookie)
def _query_interface_(self, iid):
import win32com.server.util
if iid==self.CLSID_Sink: return win32com.server.util. wrap(self)

# Event Handlers
# If you create handlers, they should have the following prototyp es:
# def OnGlobalDataChange(self, TransactionIDÞfaultNamedNotOptAr g,
GroupHandleÞfaultNamedNotOptArg, NumItemsÞfaultNamedNotOptArg,
ClientHandlesÞfaultNamedNotOptArg
# , ItemValuesÞfaultNamedNotOptArg,
QualitiesÞfaultNamedNotOptArg, TimeStampsÞfaultNamedNotOptArg):

class DIOPCServerEvent:
"""OPCServer Event"""
CLSID = CLSID_Sink = IID('{F8582D26-88FB-11D0-B850-00C0F01043 05}')
coclass_clsid = IID('{F8582D2E-88FB-11D0-B850-00C0F0104305}')
_public_methods_ = [] # For COM Server support
_dispid_to_func_ = {
1 : "OnServerShutDown",
}

def __init__(self, oobj = None):
if oobj is None:
self._olecp = None
else:
import win32com.server.util
from win32com.server.policy import EventHandlerPo licy

cpc=oobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContaine r)
cp=cpc.FindConnectionPoint(self.CLSID_Sink)
cookie=cp.Advise(win32com.server.util.wrap(self,
usePolicy=EventHandlerPolicy))
self._olecp,self._olecp_cookie = cp,cookie
def __del__(self):
try:
self.close()
except pythoncom.com_error:
pass
def close(self):
if self._olecp is not None:
cp,cookie,self._olecp,self._olecp_cookie =
self._olecp,self._olecp_cookie,None,None
cp.Unadvise(cookie)
def _query_interface_(self, iid):
import win32com.server.util
if iid==self.CLSID_Sink: return win32com.server.util. wrap(self)

# Event Handlers
# If you create handlers, they should have the following prototyp es:
# def OnServerShutDown(self, ReasonÞfaultNamedNotOptArg):

from win32com.clientimport DispatchBaseClass
class IOPCAutoServer(DispatchBaseClass):
"""OPCServer Object"""
CLSID = IID('{F8582D25-88FB-11D0-B850-00C0F0104305}')
coclass_clsid = IID('{F8582D2E-88FB-11D0-B850-00C0F0104305}')

def Connect(self, ProgIDÞfaultNamedNotOptArg,
NodeÞfaultNamedOptArg):
"""Connect to a namedOPCServer"""
return self._oleobj_.InvokeTypes(1610743826, LCID, 1, (24 , 0), ((8,
1), (12, 17)),ProgID
, Node)

# Result is of type OPCBrowser
def CreateBrowser(self):
"""Create a new OPCBrowser Object"""
ret = self._oleobj_.InvokeTypes(1610743828, LCID, 1, (9 , 0), (),)
if ret is not None:
ret = Dispatch(ret, 'CreateBrowser', '{F8582D27 -88FB-11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

def DecodeSubseconds(self, TimeStampÞfaultNamedNotOptArg,
Subseconds=pythoncom.Missing):
return self._ApplyTypes_(1610743834, 1, (7, 0), ((7, 1), (16396,
18)), 'DecodeSubseconds', None,TimeStamp
, Subseconds)

def Disconnect(self):
"""End Connection withOPCServer"""
return self._oleobj_.InvokeTypes(1610743827, LCID, 1, (24 , 0), (),)

def GetErrorString(self, ErrorCodeÞfaultNamedNotOptArg):
"""Convert an error code to a descriptive string"""
# Result is a Unicode object - return as-is for this vers ion ofPython
return self._oleobj_.InvokeTypes(1610743829, LCID, 1, (8, 0), ((3,
1),),ErrorCode
)

def GetItemProperties(self, ItemIDÞfaultNamedNotOptArg,
CountÞfaultNamedNotOptArg, PropertyIDsÞfaultNamedNotOptArg,
PropertyValues=pythoncom.Missing
, Errors=pythoncom.Missing):
return self._ApplyTypes_(1610743832, 1, (24, 0), ((8, 1), (3, 1),
(24579, 1), (24588, 2), (24579, 2)), 'GetItemProperties', None,ItemID
, Count, PropertyIDs, PropertyValues, Errors) #pa ge 41

def GetOPCServers(self, NodeÞfaultNamedOptArg):
"""Returns an array of Server names, optionally on anothe r node"""
return self._ApplyTypes_(1610743825, 1, (12, 0), ((12, 17 ),),
'GetOPCServers', None,Node
)

def LookupItemIDs(self, ItemIDÞfaultNamedNotOptArg,
CountÞfaultNamedNotOptArg, PropertyIDsÞfaultNamedNotOptArg,
NewItemIDs=pythoncom.Missing
, Errors=pythoncom.Missing):
return self._ApplyTypes_(1610743833, 1, (24, 0), ((8, 1), (3, 1),
(24579, 1), (24584, 2), (24579, 2)), 'LookupItemIDs', None,ItemID
, Count, PropertyIDs, NewItemIDs, Errors)

def QueryAvailableLocaleIDs(self):
"""The LocaleIDs supported by this server"""
return self._ApplyTypes_(1610743830, 1, (12, 0), (),
'QueryAvailableLocaleIDs', None,)

def QueryAvailableProperties(self, ItemIDÞfaultNamedNotOptArg,
Count=pythoncom.Missing, PropertyIDs=pythoncom.Missing,
Descriptions=pythoncom.Missing
, DataTypes=pythoncom.Missing):
return self._ApplyTypes_(1610743831, 1, (24, 0), ((8, 1), (16387,
2), (24579, 2), (24584, 2), (24578, 2)), 'QueryAvailableProperties',
None,ItemID
, Count, PropertyIDs, Descriptions, DataTypes)

_prop_map_get_ = {
"Bandwidth": (1610743822, 2, (3, 0), (), "Bandwidth", Non e),
"BuildNumber": (1610743813, 2, (2, 0), (), "BuildNumber", None),
"ClientName": (1610743818, 2, (8, 0), (), "ClientName", N one),
"CurrentTime": (1610743809, 2, (7, 0), (), "CurrentTime", None),
"LastUpdateTime": (1610743810, 2, (7, 0), (), "LastUpdate Time",
None),
"LocaleID": (1610743820, 2, (3, 0), (), "LocaleID", None),
"MajorVersion": (1610743811, 2, (2, 0), (), "MajorVersion ", None),
"MinorVersion": (1610743812, 2, (2, 0), (), "MinorVersion ", None),
# Method 'OPCGroups' returns object of type 'OPCGroups'
"OPCGroups": (0, 2, (13, 0), (), "OPCGroups", '{F8582D2F- 88FB-11D0-
B850-00C0F0104305}'),
"PublicGroupNames": (1610743824, 2, (12, 0), (), "PublicG roupNames",
None),
"ServerName": (1610743816, 2, (8, 0), (), "ServerName", N one),
"ServerNode": (1610743817, 2, (8, 0), (), "ServerNode", N one),
"ServerState": (1610743815, 2, (3, 0), (), "ServerState", None),
"StartTime": (1610743808, 2, (7, 0), (), "StartTime", Non e),
"VendorInfo": (1610743814, 2, (8, 0), (), "VendorInfo", N one),
}
_prop_map_put_ = {
"ClientName": ((1610743818, LCID, 4, 0),()),
"LocaleID": ((1610743820, LCID, 4, 0),()),
}
# Default property for this class is 'OPCGroups'
def __call__(self):
return self._ApplyTypes_(*(0, 2, (13, 0), (), "OPCGroups",
'{F8582D2F-88FB-11D0-B850-00C0F0104305}'))
# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))

class IOPCGroup(DispatchBaseClass):
"""OPCGroup Object"""
CLSID = IID('{F8582D2A-88FB-11D0-B850-00C0F0104305}')
coclass_clsid = IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')

def AsyncCancel(self, CancelIDÞfaultNamedNotOptArg):
return self._oleobj_.InvokeTypes(1610743833, LCID, 1, (24 , 0), ((3,
1),),CancelID
)

def AsyncRead(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg, Errors=pythoncom.Missing,
TransactionIDÞfaultNamedNotOptArg
, CancelID=pythoncom.Missing):
return self._ApplyTypes_(1610743830, 1, (24, 0), ((3, 1), (24579,
1), (24579, 2), (3, 1), (16387, 2)), 'AsyncRead', None,NumItems
, ServerHandles, Errors, TransactionID, CancelID)

def AsyncRefresh(self, SourceÞfaultNamedNotOptArg,
TransactionIDÞfaultNamedNotOptArg, CancelID=pythoncom.Missing):
return self._ApplyTypes_(1610743832, 1, (24, 0), ((2, 1), (3, 1),
(16387, 2)), 'AsyncRefresh', None,Source
, TransactionID, CancelID)

def AsyncWrite(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg, ValuesÞfaultNamedNotOptArg,
Errors=pythoncom.Missing
, TransactionIDÞfaultNamedNotOptArg, CancelID =pythoncom.Missing):
return self._ApplyTypes_(1610743831, 1, (24, 0), ((3, 1), (24579,
1), (24588, 1), (24579, 2), (3, 1), (16387, 2)), 'AsyncWrite',
None,NumItems
, ServerHandles, Values, Errors, TransactionID, C ancelID
)

def SyncRead(self, SourceÞfaultNamedNotOptArg,
NumItemsÞfaultNamedNotOptArg, ServerHandlesÞfaultNamedNotOptArg,
Values=pythoncom.Missing
, Errors=pythoncom.Missing, Qualities=pythonc om.Missing,
TimeStamps=pythoncom.Missing):
return self._ApplyTypes_(1610743828, 1, (24, 0), ((2, 1), (3, 1),
(24579, 1), (24588, 2), (24579, 2), (16396, 18), (16396, 18)),
'SyncRead', None,Source
, NumItems, ServerHandles, Values, Errors, Qualit ies
, TimeStamps)

def SyncWrite(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg, ValuesÞfaultNamedNotOptArg,
Errors=pythoncom.Missing):
return self._ApplyTypes_(1610743829, 1, (24, 0), ((3, 1), (24579,
1), (24588, 1), (24579, 2)), 'SyncWrite', None,NumItems
, ServerHandles, Values, Errors)

_prop_map_get_ = {
"ClientHandle": (1610743816, 2, (3, 0), (), "ClientHandle ", None),
"DeadBand": (1610743823, 2, (4, 0), (), "DeadBand", None),
"IsActive": (1610743812, 2, (11, 0), (), "IsActive", None ),
"IsPublic": (1610743811, 2, (11, 0), (), "IsPublic", None ),
"IsSubscribed": (1610743814, 2, (11, 0), (), "IsSubscribe d", None),
"LocaleID": (1610743819, 2, (3, 0), (), "LocaleID", None),
"Name": (1610743809, 2, (8, 0), (), "Name", None),
# Method 'OPCItems' returns object of type 'OPCItems'
"OPCItems": (0, 2, (9, 0), (), "OPCItems", '{F8582D2C-88F B-11D0-
B850-00C0F0104305}'),
# Method 'Parent' returns object of type 'IOPCAutoServer'
"Parent": (1610743808, 2, (9, 0), (), "Parent", '{F8582D2 5-88FB-11D0-
B850-00C0F0104305}'),
"ServerHandle": (1610743818, 2, (3, 0), (), "ServerHandle ", None),
"TimeBias": (1610743821, 2, (3, 0), (), "TimeBias", None),
"UpdateRate": (1610743825, 2, (3, 0), (), "UpdateRate", N one),
}
_prop_map_put_ = {
"ClientHandle": ((1610743816, LCID, 4, 0),()),
"DeadBand": ((1610743823, LCID, 4, 0),()),
"IsActive": ((1610743812, LCID, 4, 0),()),
"IsSubscribed": ((1610743814, LCID, 4, 0),()),
"LocaleID": ((1610743819, LCID, 4, 0),()),
"Name": ((1610743809, LCID, 4, 0),()),
"TimeBias": ((1610743821, LCID, 4, 0),()),
"UpdateRate": ((1610743825, LCID, 4, 0),()),
}
# Default property for this class is 'OPCItems'
def __call__(self):
return self._ApplyTypes_(*(0, 2, (9, 0), (), "OPCItems",
'{F8582D2C-88FB-11D0-B850-00C0F0104305}'))
# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))

class IOPCGroups(DispatchBaseClass):
"""Collection ofOPCGroup objects"""
CLSID = IID('{F8582D28-88FB-11D0-B850-00C0F0104305}')
coclass_clsid = IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')

# Result is of type OPCGroup
def Add(self, NameÞfaultNamedOptArg):
"""Adds an OPCGroup to the collection"""
ret = self._oleobj_.InvokeTypes(1610743822, LCID, 1, (1 3, 0), ((12,
17),),Name
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret = ret.QueryInterface(pythoncom.IID_ IDispatch)
except pythoncom.error:
return ret
ret = Dispatch(ret, 'Add', '{F8582D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

# Result is of type OPCGroup
def ConnectPublicGroup(self, NameÞfaultNamedNotOptArg):
"""Adds an existing public OPCGroup to the collection"""
ret = self._oleobj_.InvokeTypes(1610743826, LCID, 1, (1 3, 0), ((8,
1),),Name
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret = ret.QueryInterface(pythoncom.IID_ IDispatch)
except pythoncom.error:
return ret
ret = Dispatch(ret, 'ConnectPublicGroup', '{F85 82D30-88FB-11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

# Result is of type OPCGroup
def GetOPCGroup(self, ItemSpecifierÞfaultNamedNotOptArg):
"""Returns an OPCGroup specified by server handle or name """
ret = self._oleobj_.InvokeTypes(1610743823, LCID, 1, (1 3, 0), ((12,
1),),ItemSpecifier
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret = ret.QueryInterface(pythoncom.IID_ IDispatch)
except pythoncom.error:
return ret
ret = Dispatch(ret, 'GetOPCGroup', '{F8582D30-8 8FB-11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

# Result is of type OPCGroup
def Item(self, ItemSpecifierÞfaultNamedNotOptArg):
"""Returns an OPCGroup by index (starts at 1) or name"""
ret = self._oleobj_.InvokeTypes(0, LCID, 1, (13, 0), (( 12,
1),),ItemSpecifier
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret = ret.QueryInterface(pythoncom.IID_ IDispatch)
except pythoncom.error:
return ret
ret = Dispatch(ret, 'Item', '{F8582D30-88FB-11D 0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

def Remove(self, ItemSpecifierÞfaultNamedNotOptArg):
"""Removes an OPCGroup specified by server handle or name """
return self._oleobj_.InvokeTypes(1610743825, LCID, 1, (24 , 0), ((12,
1),),ItemSpecifier
)

def RemoveAll(self):
"""Remove all groups and their items"""
return self._oleobj_.InvokeTypes(1610743824, LCID, 1, (24 , 0), (),)

def RemovePublicGroup(self, ItemSpecifierÞfaultNamedNotOptArg ):
"""Removes a public OPCGroup specified by server handle o r name"""
return self._oleobj_.InvokeTypes(1610743827, LCID, 1, (24 , 0), ((12,
1),),ItemSpecifier
)

_prop_map_get_ = {
"Count": (1610743819, 2, (3, 0), (), "Count", None),
"DefaultGroupDeadband": (1610743813, 2, (4, 0), (),
"DefaultGroupDeadband", None),
"DefaultGroupIsActive": (1610743809, 2, (11, 0), (),
"DefaultGroupIsActive", None),
"DefaultGroupLocaleID": (1610743815, 2, (3, 0), (),
"DefaultGroupLocaleID", None),
"DefaultGroupTimeBias": (1610743817, 2, (3, 0), (),
"DefaultGroupTimeBias", None),
"DefaultGroupUpdateRate": (1610743811, 2, (3, 0), (),
"DefaultGroupUpdateRate", None),
# Method 'Parent' returns object of type 'IOPCAutoServer'
"Parent": (1610743808, 2, (9, 0), (), "Parent", '{F8582D2 5-88FB-11D0-
B850-00C0F0104305}'),
}
_prop_map_put_ = {
"DefaultGroupDeadband": ((1610743813, LCID, 4, 0),()),
"DefaultGroupIsActive": ((1610743809, LCID, 4, 0),()),
"DefaultGroupLocaleID": ((1610743815, LCID, 4, 0),()),
"DefaultGroupTimeBias": ((1610743817, LCID, 4, 0),()),
"DefaultGroupUpdateRate": ((1610743811, LCID, 4, 0),()),
}
# Default method for this class is 'Item'
def __call__(self, ItemSpecifierÞfaultNamedNotOptArg):
"""Returns an OPCGroup by index (starts at 1) or name"""
ret = self._oleobj_.InvokeTypes(0, LCID, 1, (13, 0), (( 12,
1),),ItemSpecifier
)
if ret is not None:
# See if this IUnknown is really an IDispatch
try:
ret = ret.QueryInterface(pythoncom.IID_ IDispatch)
except pythoncom.error:
return ret
ret = Dispatch(ret, '__call__', '{F8582D30-88FB -11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))
def __iter__(self):
"Return aPythoniterator for this object"
ob = self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),())
return win32com.client.util.Iterator(ob)
def _NewEnum(self):
"Create an enumerator from this object"
return
win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13,
10),()),'{F8582D30-88FB-11D0-B850-00C0F0104305}')
def __getitem__(self, index):
"Allow this class to be accessed as a collection"
if not self.__dict__.has_key('_enum_'):
self.__dict__['_enum_'] = self._NewEnum()
return self._enum_.__getitem__(index)
#This class has Count() property - allow len(ob) to provide this
def __len__(self):
return self._ApplyTypes_(*(1610743819, 2, (3, 0), (), "Co unt",
None))
#This class has a __len__ - this is needed so 'if object:' always
returns TRUE.
def __nonzero__(self):
return True

class OPCBrowser(DispatchBaseClass):
"""OPCBrowser"""
CLSID = IID('{F8582D27-88FB-11D0-B850-00C0F0104305}')
coclass_clsid = None

def GetAccessPaths(self, ItemIDÞfaultNamedNotOptArg):
"""Returns an array of Access Paths for an ItemID"""
return self._ApplyTypes_(1610743827, 1, (12, 0), ((8, 1), ),
'GetAccessPaths', None,ItemID
)

def GetItemID(self, LeafÞfaultNamedNotOptArg):
"""Converts a leaf name to an ItemID"""
# Result is a Unicode object - return as-is for this vers ion ofPython
return self._oleobj_.InvokeTypes(1610743826, LCID, 1, (8, 0), ((8,
1),),Leaf
)

def Item(self, ItemSpecifierÞfaultNamedNotOptArg):
# Result is a Unicode object - return as-is for this vers ion ofPython
return self._oleobj_.InvokeTypes(1610743819, LCID, 1, (8, 0), ((12,
1),),ItemSpecifier
)

def MoveDown(self, BranchÞfaultNamedNotOptArg):
"""Move down into this branch"""
return self._oleobj_.InvokeTypes(1610743824, LCID, 1, (24 , 0), ((8,
1),),Branch
)

def MoveTo(self, BranchesÞfaultNamedNotOptArg):
"""Move to this absolute position"""
return self._oleobj_.InvokeTypes(1610743825, LCID, 1, (24 , 0),
((24584, 1),),Branches
)

def MoveToRoot(self):
"""Move up to the top (root) of the tree"""
return self._oleobj_.InvokeTypes(1610743823, LCID, 1, (24 , 0), (),)

def MoveUp(self):
"""Move up a level in the tree"""
return self._oleobj_.InvokeTypes(1610743822, LCID, 1, (24 , 0), (),)

def ShowBranches(self):
"""Get all of the branch names that match the filter"""
return self._oleobj_.InvokeTypes(1610743820, LCID, 1, (24 , 0), (),)

def ShowLeafs(self, FlatÞfaultNamedOptArg):
"""Get all of the leaf names that match the filter"""
return self._oleobj_.InvokeTypes(1610743821, LCID, 1, (24 , 0), ((12,
17),),Flat
)

_prop_map_get_ = {
"AccessRights": (1610743813, 2, (3, 0), (), "AccessRights ", None),
"Count": (1610743817, 2, (3, 0), (), "Count", None),
"CurrentPosition": (1610743815, 2, (8, 0), (), "CurrentPo sition",
None),
"DataType": (1610743811, 2, (2, 0), (), "DataType", None),
"Filter": (1610743809, 2, (8, 0), (), "Filter", None),
"Organization": (1610743808, 2, (3, 0), (), "Organization ", None),
}
_prop_map_put_ = {
"AccessRights": ((1610743813, LCID, 4, 0),()),
"CurrentPosition": ((1610743815, LCID, 4, 0),()),
"DataType": ((1610743811, LCID, 4, 0),()),
"Filter": ((1610743809, LCID, 4, 0),()),
}
def __iter__(self):
"Return aPythoniterator for this object"
ob = self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),())
return win32com.client.util.Iterator(ob)
def _NewEnum(self):
"Create an enumerator from this object"
return
win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13,
10),()),None)
def __getitem__(self, index):
"Allow this class to be accessed as a collection"
if not self.__dict__.has_key('_enum_'):
self.__dict__['_enum_'] = self._NewEnum()
return self._enum_.__getitem__(index)
#This class has Count() property - allow len(ob) to provide this
def __len__(self):
return self._ApplyTypes_(*(1610743817, 2, (3, 0), (), "Co unt",
None))
#This class has a __len__ - this is needed so 'if object:' always
returns TRUE.
def __nonzero__(self):
return True

class OPCItem(DispatchBaseClass):
"""OPCItem object"""
CLSID = IID('{F8582D2D-88FB-11D0-B850-00C0F0104305}')
coclass_clsid = None

def Read(self, SourceÞfaultNamedNotOptArg, Value=pythoncom. Missing,
Quality=pythoncom.Missing, TimeStamp=pythoncom.Missing):
return self._ApplyTypes_(1610743826, 1, (24, 0), ((2, 1), (16396,
18), (16396, 18), (16396, 18)), 'Read', None,Source
, Value, Quality, TimeStamp)

def Write(self, ValueÞfaultNamedNotOptArg):
return self._oleobj_.InvokeTypes(1610743827, LCID, 1, (24 , 0), ((12,
1),),Value
)

_prop_map_get_ = {
"AccessPath": (1610743812, 2, (8, 0), (), "AccessPath", N one),
"AccessRights": (1610743813, 2, (3, 0), (), "AccessRights ", None),
"CanonicalDataType": (1610743822, 2, (2, 0), (),
"CanonicalDataType", None),
"ClientHandle": (1610743809, 2, (3, 0), (), "ClientHandle ", None),
"EUInfo": (1610743824, 2, (12, 0), (), "EUInfo", None),
"EUType": (1610743823, 2, (2, 0), (), "EUType", None),
"IsActive": (1610743815, 2, (11, 0), (), "IsActive", None ),
"ItemID": (1610743814, 2, (8, 0), (), "ItemID", None),
# Method 'Parent' returns object of type 'OPCGroup'
"Parent": (1610743808, 2, (13, 0), (), "Parent",
'{F8582D30-88FB-11D0-B850-00C0F0104305}'),
"Quality": (1610743820, 2, (3, 0), (), "Quality", None),
"RequestedDataType": (1610743817, 2, (2, 0), (),
"RequestedDataType", None),
"ServerHandle": (1610743811, 2, (3, 0), (), "ServerHandle ", None),
"TimeStamp": (1610743821, 2, (7, 0), (), "TimeStamp", Non e),
"Updated": (1610743825, 2, (11, 0), (), "Updated", None),
"Value": (0, 2, (12, 0), (), "Value", None),
}
_prop_map_put_ = {
"ClientHandle": ((1610743809, LCID, 4, 0),()),
"IsActive": ((1610743815, LCID, 4, 0),()),
"RequestedDataType": ((1610743817, LCID, 4, 0),()),
}
# Default property for this class is 'Value'
def __call__(self):
return self._ApplyTypes_(*(0, 2, (12, 0), (), "Value", No ne))
# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))

class OPCItems(DispatchBaseClass):
"""Collection ofOPCItem objects"""
CLSID = IID('{F8582D2C-88FB-11D0-B850-00C0F0104305}')
coclass_clsid = None

# Result is of type OPCItem
def AddItem(self, ItemIDÞfaultNamedNotOptArg,
ClientHandleÞfaultNamedNotOptArg):
"""Adds an OPCItem object to the collection"""
ret = self._oleobj_.InvokeTypes(1610743819, LCID, 1, (9 , 0), ((8,
1), (3, 1)),ItemID
, ClientHandle)
if ret is not None:
ret = Dispatch(ret, 'AddItem', '{F8582D2D-88FB- 11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

def AddItems(self, NumItemsÞfaultNamedNotOptArg,
ItemIDsÞfaultNamedNotOptArg, ClientHandlesÞfaultNamedNotOptArg,
ServerHandles=pythoncom.Missing
, Errors=pythoncom.Missing, RequestedDataTypes ÞfaultNamedOptArg,
AccessPathsÞfaultNamedOptArg):
"""Adds OPCItem objects to the collection"""
return self._ApplyTypes_(1610743820, 1, (24, 0), ((3, 1), (24584,
1), (24579, 1), (24579, 2), (24579, 2), (12, 17), (12, 17)),
'AddItems', None,NumItems
, ItemIDs, ClientHandles, ServerHandles, Errors, RequestedDataTypes
, AccessPaths)

# Result is of type OPCItem
def GetOPCItem(self, ServerHandleÞfaultNamedNotOptArg):
"""Returns an OPCItem specified by server handle"""
ret = self._oleobj_.InvokeTypes(1610743818, LCID, 1, (9 , 0), ((3,
1),),ServerHandle
)
if ret is not None:
ret = Dispatch(ret, 'GetOPCItem', '{F8582D2D-88 FB-11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

# Result is of type OPCItem
def Item(self, ItemSpecifierÞfaultNamedNotOptArg):
"""Returns an OPCItem by index (starts at 1)"""
ret = self._oleobj_.InvokeTypes(0, LCID, 1, (9, 0), ((1 2,
1),),ItemSpecifier
)
if ret is not None:
ret = Dispatch(ret, 'Item', '{F8582D2D-88FB-11D 0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

def Remove(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg, Errors=pythoncom.Missing):
"""Removes OPCItem objects from the collection"""
return self._ApplyTypes_(1610743821, 1, (24, 0), ((3, 1), (24579,
1), (24579, 2)), 'Remove', None,NumItems
, ServerHandles, Errors)

def SetActive(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg,
ActiveStateÞfaultNamedNotOptArg, Errors=pythoncom.Missing):
"""Set the active state of OPCItem objects"""
return self._ApplyTypes_(1610743823, 1, (24, 0), ((3, 1), (24579,
1), (11, 1), (24579, 2)), 'SetActive', None,NumItems
, ServerHandles, ActiveState, Errors)

def SetClientHandles(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg,
ClientHandlesÞfaultNamedNotOptArg, Errors=pythoncom.Missing):
"""Set theClienthandles of OPCItem objects"""
return self._ApplyTypes_(1610743824, 1, (24, 0), ((3, 1), (24579,
1), (24579, 1), (24579, 2)), 'SetClientHandles', None,NumItems
, ServerHandles, ClientHandles, Errors)

def SetDataTypes(self, NumItemsÞfaultNamedNotOptArg,
ServerHandlesÞfaultNamedNotOptArg,
RequestedDataTypesÞfaultNamedNotOptArg, Errors=pythoncom.Missing):
"""Set the Data Types of OPCItem objects"""
return self._ApplyTypes_(1610743825, 1, (24, 0), ((3, 1), (24579,
1), (24579, 1), (24579, 2)), 'SetDataTypes', None,NumItems
, ServerHandles, RequestedDataTypes, Errors)

def Validate(self, NumItemsÞfaultNamedNotOptArg,
ItemIDsÞfaultNamedNotOptArg, Errors=pythoncom.Missing,
RequestedDataTypesÞfaultNamedOptArg
, AccessPathsÞfaultNamedOptArg):
"""?"""
return self._ApplyTypes_(1610743822, 1, (24, 0), ((3, 1), (24584,
1), (24579, 2), (12, 17), (12, 17)), 'Validate', None,NumItems
, ItemIDs, Errors, RequestedDataTypes, AccessPath s)

_prop_map_get_ = {
"Count": (1610743815, 2, (3, 0), (), "Count", None),
"DefaultAccessPath": (1610743811, 2, (8, 0), (),
"DefaultAccessPath", None),
"DefaultIsActive": (1610743813, 2, (11, 0), (), "DefaultI sActive",
None),
"DefaultRequestedDataType": (1610743809, 2, (2, 0), (),
"DefaultRequestedDataType", None),
# Method 'Parent' returns object of type 'OPCGroup'
"Parent": (1610743808, 2, (13, 0), (), "Parent",
'{F8582D30-88FB-11D0-B850-00C0F0104305}'),
}
_prop_map_put_ = {
"DefaultAccessPath": ((1610743811, LCID, 4, 0),()),
"DefaultIsActive": ((1610743813, LCID, 4, 0),()),
"DefaultRequestedDataType": ((1610743809, LCID, 4, 0),()),
}
# Default method for this class is 'Item'
def __call__(self, ItemSpecifierÞfaultNamedNotOptArg):
"""Returns an OPCItem by index (starts at 1)"""
ret = self._oleobj_.InvokeTypes(0, LCID, 1, (9, 0), ((1 2,
1),),ItemSpecifier
)
if ret is not None:
ret = Dispatch(ret, '__call__', '{F8582D2D-88FB -11D0-
B850-00C0F0104305}', UnicodeToString=0)
return ret

# str(ob) and int(ob) will use __call__
def __unicode__(self, *args):
try:
return unicode(self.__call__(*args))
except pythoncom.com_error:
return repr(self)
def __str__(self, *args):
return str(self.__unicode__(*args))
def __int__(self, *args):
return int(self.__call__(*args))
def __iter__(self):
"Return aPythoniterator for this object"
ob = self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),())
return win32com.client.util.Iterator(ob)
def _NewEnum(self):
"Create an enumerator from this object"
return
win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13,
10),()),'{F8582D2D-88FB-11D0-B850-00C0F0104305}')
def __getitem__(self, index):
"Allow this class to be accessed as a collection"
if not self.__dict__.has_key('_enum_'):
self.__dict__['_enum_'] = self._NewEnum()
return self._enum_.__getitem__(index)
#This class has Count() property - allow len(ob) to provide this
def __len__(self):
return self._ApplyTypes_(*(1610743815, 2, (3, 0), (), "Co unt",
None))
#This class has a __len__ - this is needed so 'if object:' always
returns TRUE.
def __nonzero__(self):
return True

from win32com.clientimport CoClassBaseClass
class OPCGroup(CoClassBaseClass): # A CoClass
#OPCAutomation Group
CLSID = IID('{F8582D30-88FB-11D0-B850-00C0F0104305}')
coclass_sources = [
DIOPCGroupEvent,
]
default_source = DIOPCGroupEvent
coclass_interfaces = [
IOPCGroup,
]
default_interface = IOPCGroup

class OPCGroups(CoClassBaseClass): # A CoClass
#OPCAutomation Groups Collection
CLSID = IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')
coclass_sources = [
DIOPCGroupsEvent,
]
default_source = DIOPCGroupsEvent
coclass_interfaces = [
IOPCGroups,
]
default_interface = IOPCGroups

# This CoClass is known by the name 'Matrikon.OPC.Automation.1'
class OPCServer(CoClassBaseClass): # A CoClass
#OPCAutomation Server
CLSID = IID('{F8582D2E-88FB-11D0-B850-00C0F0104305}')
coclass_sources = [
DIOPCServerEvent,
]
default_source = DIOPCServerEvent
coclass_interfaces = [
IOPCAutoServer,
]
default_interface = IOPCAutoServer

IOPCAutoServer_vtables_dispatch_ = 1
IOPCAutoServer_vtables_ = [
(( 'StartTime' , 'StartTime' , ), 1610743808, (1610743808, (),
[ (16391, 10, None, None) , ], 1 , 2 , 4 , 0 , 28 , (3, 0, None,
None) , 0 , )),
(( 'CurrentTime' , 'CurrentTime' , ), 1610743809, (1610743809, (),
[ (16391, 10, None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None,
None) , 0 , )),
(( 'LastUpdateTime' , 'LastUpdateTime' , ), 1610743810, (16107438 10,
(), [ (16391, 10, None, None) , ], 1 , 2 , 4 , 0 , 36 , (3, 0, None,
None) , 0 , )),
(( 'MajorVersion' , 'MajorVersion' , ), 1610743811, (1610743811, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'MinorVersion' , 'MinorVersion' , ), 1610743812, (1610743812, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 44 , (3, 0, None,
None) , 0 , )),
(( 'BuildNumber' , 'BuildNumber' , ), 1610743813, (1610743813, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 , (3, 0, None,
None) , 0 , )),
(( 'VendorInfo' , 'VendorInfo' , ), 1610743814, (1610743814, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 52 , (3, 0, None,
None) , 0 , )),
(( 'ServerState' , 'ServerState' , ), 1610743815, (1610743815, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 , (3, 0, None,
None) , 0 , )),
(( 'ServerName' , 'ServerName' , ), 1610743816, (1610743816, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 60 , (3, 0, None,
None) , 0 , )),
(( 'ServerNode' , 'ServerNode' , ), 1610743817, (1610743817, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 64 , (3, 0, None,
None) , 0 , )),
(( 'ClientName' , 'ClientName' , ), 1610743818, (1610743818, (),
[ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 68 , (3, 0, None,
None) , 0 , )),
(( 'ClientName' , 'ClientName' , ), 1610743818, (1610743818, (),
[ (8, 1, None, None) , ], 1 , 4 , 4 , 0 , 72 , (3, 0, None, None) ,
0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743820, (1610743820, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 76 , (3, 0, None,
None) , 0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743820, (1610743820, (), [ (3 , 1,
None, None) , ], 1 , 4 , 4 , 0 , 80 , (3, 0, None, None) , 0 , )),
(( 'Bandwidth' , 'Bandwidth' , ), 1610743822, (1610743822, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 84 , (3, 0, None,
None) , 0 , )),
(( 'OPCGroups' , 'ppGroups' , ), 0, (0, (), [ (16397, 10, None,
"IID('{F8582D2F-88FB-11D0-B850-00C0F0104305}')") , ], 1 , 2 , 4 , 0 ,
88 , (3, 0, None, None) , 0 , )),
(( 'PublicGroupNames' , 'PublicGroups' , ), 1610743824, (16107438 24,
(), [ (16396, 10, None, None) , ], 1 , 2 , 4 , 0 , 92 , (3, 0, None,
None) , 0 , )),
(( 'GetOPCServers' , 'Node' , 'OPCServers' , ), 1610743825,
(1610743825, (), [ (12, 17, None, None) ,
(16396, 10, None, None) , ], 1 , 1 , 4 , 1 , 96 , (3, 0, None,
None) , 0 , )),
(( 'Connect' , 'ProgID' , 'Node' , ), 1610743826, (1610743826, (),
[ (8, 1, None, None) ,
(12, 17, None, None) , ], 1 , 1 , 4 , 1 , 100 , ( 3, 0, None,
None) , 0 , )),
(( 'Disconnect' , ), 1610743827, (1610743827, (), [ ], 1 , 1 , 4 ,
0 , 104 , (3, 0, None, None) , 0 , )),
(( 'CreateBrowser' , 'ppBrowser' , ), 1610743828, (1610743828, (),
[ (16393, 10, None, "IID('{F8582D27-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 108 , (3, 0, None, None) ,
0 , )),
(( 'GetErrorString' , 'ErrorCode' , 'ErrorString' , ), 1610743829,
(1610743829, (), [ (3, 1, None, None) ,
(16392, 10, None, None) , ], 1 , 1 , 4 , 0 , 112 , (3, 0, None,
None) , 0 , )),
(( 'QueryAvailableLocaleIDs' , 'LocaleIDs' , ), 1610743830,
(1610743830, (), [ (16396, 10, None, None) , ], 1 , 1 , 4 , 0 , 116 ,
(3, 0, None, None) , 0 , )),
(( 'QueryAvailableProperties' , 'ItemID' , 'Count' , 'PropertyIDs ' ,
'Descriptions' ,
'DataTypes' , ), 1610743831, (1610743831, (), [ ( 8, 1, None,
None) , (16387, 2, None, None) , (24579, 2, None, None) ,
(24584, 2, None, None) , (24578, 2, None, None) , ], 1 , 1 , 4 ,
0 , 120 , (3, 0, None, None) , 0 , )),
(( 'GetItemProperties' , 'ItemID' , 'Count' , 'PropertyIDs' ,
'PropertyValues' ,
'Errors' , ), 1610743832, (1610743832, (), [ (8, 1, None, None) ,
(3, 1, None, None) , (24579, 1, None, None) ,
(24588, 2, None, None) , (24579, 2, None, None) , ], 1 , 1 , 4 ,
0 , 124 , (3, 0, None, None) , 0 , )),
(( 'LookupItemIDs' , 'ItemID' , 'Count' , 'PropertyIDs' ,
'NewItemIDs' ,
'Errors' , ), 1610743833, (1610743833, (), [ (8, 1, None, None) ,
(3, 1, None, None) , (24579, 1, None, None) ,
(24584, 2, None, None) , (24579, 2, None, None) , ], 1 , 1 , 4 ,
0 , 128 , (3, 0, None, None) , 0 , )),
(( 'DecodeSubseconds' , 'TimeStamp' , 'Subseconds' ,
'TimestampWithoutSubseconds' , ), 1610743834, (1610743834, (), [
(7, 1, None, None) , (16396, 18, None, None) , (1 6391, 10, None,
None) , ], 1 , 1 , 4 , 1 , 132 , (3, 0, None, None) , 0 , )),
]

IOPCGroup_vtables_dispatch_ = 1
IOPCGroup_vtables_ = [
(( 'Parent' , 'ppParent' , ), 1610743808, (1610743808, (), [ (163 93,
10, None, "IID('{F8582D25-88FB-11D0-B850-00C0F0104305}')") , ], 1 ,
2 , 4 , 0 , 28 , (3, 0, None, None) , 0 , )),
(( 'Name' , 'Name' , ), 1610743809, (1610743809, (), [ (16392, 10,
None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None, None) , 0 , )),
(( 'Name' , 'Name' , ), 1610743809, (1610743809, (), [ (8, 1, Non e,
None) , ], 1 , 4 , 4 , 0 , 36 , (3, 0, None, None) , 0 , )),
(( 'IsPublic' , 'IsPublic' , ), 1610743811, (1610743811, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'IsActive' , 'IsActive' , ), 1610743812, (1610743812, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 44 , (3, 0, None,
None) , 0 , )),
(( 'IsActive' , 'IsActive' , ), 1610743812, (1610743812, (), [ (1 1,
1, None, None) , ], 1 , 4 , 4 , 0 , 48 , (3, 0, None, None) , 0 , )),
(( 'IsSubscribed' , 'IsSubscribed' , ), 1610743814, (1610743814, (),
[ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 52 , (3, 0, None,
None) , 0 , )),
(( 'IsSubscribed' , 'IsSubscribed' , ), 1610743814, (1610743814, (),
[ (11, 1, None, None) , ], 1 , 4 , 4 , 0 , 56 , (3, 0, None, None) ,
0 , )),
(( 'ClientHandle' , 'ClientHandle' , ), 1610743816, (1610743816, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 60 , (3, 0, None,
None) , 0 , )),
(( 'ClientHandle' , 'ClientHandle' , ), 1610743816, (1610743816, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 64 , (3, 0, None, None) ,
0 , )),
(( 'ServerHandle' , 'ServerHandle' , ), 1610743818, (1610743818, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 68 , (3, 0, None,
None) , 0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743819, (1610743819, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 72 , (3, 0, None,
None) , 0 , )),
(( 'LocaleID' , 'LocaleID' , ), 1610743819, (1610743819, (), [ (3 , 1,
None, None) , ], 1 , 4 , 4 , 0 , 76 , (3, 0, None, None) , 0 , )),
(( 'TimeBias' , 'TimeBias' , ), 1610743821, (1610743821, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 80 , (3, 0, None,
None) , 0 , )),
(( 'TimeBias' , 'TimeBias' , ), 1610743821, (1610743821, (), [ (3 , 1,
None, None) , ], 1 , 4 , 4 , 0 , 84 , (3, 0, None, None) , 0 , )),
(( 'DeadBand' , 'DeadBand' , ), 1610743823, (1610743823, (),
[ (16388, 10, None, None) , ], 1 , 2 , 4 , 0 , 88 , (3, 0, None,
None) , 0 , )),
(( 'DeadBand' , 'DeadBand' , ), 1610743823, (1610743823, (), [ (4 , 1,
None, None) , ], 1 , 4 , 4 , 0 , 92 , (3, 0, None, None) , 0 , )),
(( 'UpdateRate' , 'UpdateRate' , ), 1610743825, (1610743825, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 96 , (3, 0, None,
None) , 0 , )),
(( 'UpdateRate' , 'UpdateRate' , ), 1610743825, (1610743825, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 100 , (3, 0, None, None) ,
0 , )),
(( 'OPCItems' , 'ppItems' , ), 0, (0, (), [ (16393, 10, None,
"IID('{F8582D2C-88FB-11D0-B850-00C0F0104305}')") , ], 1 , 2 , 4 , 0 ,
104 , (3, 0, None, None) , 0 , )),
(( 'SyncRead' , 'Source' , 'NumItems' , 'ServerHandles' , 'Values ' ,
'Errors' , 'Qualities' , 'TimeStamps' , ), 161074 3828, (1610743828,
(), [ (2, 1, None, None) ,
(3, 1, None, None) , (24579, 1, None, None) , (24 588, 2, None,
None) , (24579, 2, None, None) , (16396, 18, None, None) ,
(16396, 18, None, None) , ], 1 , 1 , 4 , 2 , 108 , (3, 0, None,
None) , 0 , )),
(( 'SyncWrite' , 'NumItems' , 'ServerHandles' , 'Values' ,
'Errors' ,
), 1610743829, (1610743829, (), [ (3, 1, None, No ne) , (24579, 1,
None, None) , (24588, 1, None, None) , (24579, 2, None, None) , ], 1 ,
1 , 4 , 0 , 112 , (3, 0, None, None) , 0 , )),
(( 'AsyncRead' , 'NumItems' , 'ServerHandles' , 'Errors' ,
'TransactionID' ,
'CancelID' , ), 1610743830, (1610743830, (), [ (3 , 1, None, None) ,
(24579, 1, None, None) , (24579, 2, None, None) ,
(3, 1, None, None) , (16387, 2, None, None) , ], 1 , 1 , 4 , 0 ,
116 , (3, 0, None, None) , 0 , )),
(( 'AsyncWrite' , 'NumItems' , 'ServerHandles' , 'Values' ,
'Errors' ,
'TransactionID' , 'CancelID' , ), 1610743831, (16 10743831, (),
[ (3, 1, None, None) , (24579, 1, None, None) ,
(24588, 1, None, None) , (24579, 2, None, None) , (3, 1, None,
None) , (16387, 2, None, None) , ], 1 , 1 , 4 , 0 , 120 , (3, 0, None,
None) , 0 , )),
(( 'AsyncRefresh' , 'Source' , 'TransactionID' , 'CancelID' , ),
1610743832, (1610743832, (), [
(2, 1, None, None) , (3, 1, None, None) , (16387, 2, None,
None) , ], 1 , 1 , 4 , 0 , 124 , (3, 0, None, None) , 0 , )),
(( 'AsyncCancel' , 'CancelID' , ), 1610743833, (1610743833, (), [ (3,
1, None, None) , ], 1 , 1 , 4 , 0 , 128 , (3, 0, None, None) , 0 , )),
]

IOPCGroups_vtables_dispatch_ = 1
IOPCGroups_vtables_ = [
(( 'Parent' , 'ppParent' , ), 1610743808, (1610743808, (), [ (163 93,
10, None, "IID('{F8582D25-88FB-11D0-B850-00C0F0104305}')") , ], 1 ,
2 , 4 , 0 , 28 , (3, 0, None, None) , 0 , )),
(( 'DefaultGroupIsActive' , 'DefaultGroupIsActive' , ), 161074380 9,
(1610743809, (), [ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 32 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupIsActive' , 'DefaultGroupIsActive' , ), 161074380 9,
(1610743809, (), [ (11, 1, None, None) , ], 1 , 4 , 4 , 0 , 36 , (3,
0, None, None) , 0 , )),
(( 'DefaultGroupUpdateRate' , 'DefaultGroupUpdateRate' , ),
1610743811, (1610743811, (), [ (16387, 10, None, None) , ], 1 , 2 ,
4 , 0 , 40 , (3, 0, None, None) , 0 , )),
(( 'DefaultGroupUpdateRate' , 'DefaultGroupUpdateRate' , ),
1610743811, (1610743811, (), [ (3, 1, None, None) , ], 1 , 4 , 4 , 0 ,
44 , (3, 0, None, None) , 0 , )),
(( 'DefaultGroupDeadband' , 'DefaultGroupDeadband' , ), 161074381 3,
(1610743813, (), [ (16388, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupDeadband' , 'DefaultGroupDeadband' , ), 161074381 3,
(1610743813, (), [ (4, 1, None, None) , ], 1 , 4 , 4 , 0 , 52 , (3, 0,
None, None) , 0 , )),
(( 'DefaultGroupLocaleID' , 'DefaultGroupLocaleID' , ), 161074381 5,
(1610743815, (), [ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupLocaleID' , 'DefaultGroupLocaleID' , ), 161074381 5,
(1610743815, (), [ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 60 , (3, 0,
None, None) , 0 , )),
(( 'DefaultGroupTimeBias' , 'DefaultGroupTimeBias' , ), 161074381 7,
(1610743817, (), [ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 64 ,
(3, 0, None, None) , 0 , )),
(( 'DefaultGroupTimeBias' , 'DefaultGroupTimeBias' , ), 161074381 7,
(1610743817, (), [ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 68 , (3, 0,
None, None) , 0 , )),
(( 'Count' , 'Count' , ), 1610743819, (1610743819, (), [ (16387, 10,
None, None) , ], 1 , 2 , 4 , 0 , 72 , (3, 0, None, None) , 0 , )),
(( '_NewEnum' , 'ppUnk' , ), -4, (-4, (), [ (16397, 10, None,
None) , ], 1 , 2 , 4 , 0 , 76 , (3, 0, None, None) , 1 , )),
(( 'Item' , 'ItemSpecifier' , 'ppGroup' , ), 0, (0, (), [ (12, 1,
None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 80 , (3, 0, None, None) ,
0 , )),
(( 'Add' , 'Name' , 'ppGroup' , ), 1610743822, (1610743822, (),
[ (12, 17, None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 1 , 84 , (3, 0, None, None) ,
0 , )),
(( 'GetOPCGroup' , 'ItemSpecifier' , 'ppGroup' , ), 1610743823,
(1610743823, (), [ (12, 1, None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 88 , (3, 0, None, None) ,
0 , )),
(( 'RemoveAll' , ), 1610743824, (1610743824, (), [ ], 1 , 1 , 4 , 0 ,
92 , (3, 0, None, None) , 0 , )),
(( 'Remove' , 'ItemSpecifier' , ), 1610743825, (1610743825, (),
[ (12, 1, None, None) , ], 1 , 1 , 4 , 0 , 96 , (3, 0, None, None) ,
0 , )),
(( 'ConnectPublicGroup' , 'Name' , 'ppGroup' , ), 1610743826,
(1610743826, (), [ (8, 1, None, None) ,
(16397, 10, None, "IID('{F8582D30-88FB-11D0-
B850-00C0F0104305}')") , ], 1 , 1 , 4 , 0 , 100 , (3, 0, None, None) ,
0 , )),
(( 'RemovePublicGroup' , 'ItemSpecifier' , ), 1610743827,
(1610743827, (), [ (12, 1, None, None) , ], 1 , 1 , 4 , 0 , 104 , (3,
0, None, None) , 0 , )),
]

OPCBrowser_vtables_dispatch_ = 1
OPCBrowser_vtables_ = [
(( 'Organization' , 'Organization' , ), 1610743808, (1610743808, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 28 , (3, 0, None,
None) , 0 , )),
(( 'Filter' , 'Filter' , ), 1610743809, (1610743809, (), [ (16392,
10, None, None) , ], 1 , 2 , 4 , 0 , 32 , (3, 0, None, None) , 0 , )),
(( 'Filter' , 'Filter' , ), 1610743809, (1610743809, (), [ (8, 1,
None, None) , ], 1 , 4 , 4 , 0 , 36 , (3, 0, None, None) , 0 , )),
(( 'DataType' , 'DataType' , ), 1610743811, (1610743811, (),
[ (16386, 10, None, None) , ], 1 , 2 , 4 , 0 , 40 , (3, 0, None,
None) , 0 , )),
(( 'DataType' , 'DataType' , ), 1610743811, (1610743811, (), [ (2 , 1,
None, None) , ], 1 , 4 , 4 , 0 , 44 , (3, 0, None, None) , 0 , )),
(( 'AccessRights' , 'AccessRights' , ), 1610743813, (1610743813, (),
[ (16387, 10, None, None) , ], 1 , 2 , 4 , 0 , 48 , (3, 0, None,
None) , 0 , )),
(( 'AccessRights' , 'AccessRights' , ), 1610743813, (1610743813, (),
[ (3, 1, None, None) , ], 1 , 4 , 4 , 0 , 52 , (3, 0, None, None) ,
0 , )),
(( 'CurrentPosition' , 'CurrentPosition' , ), 1610743815,
(1610743815, (), [ (16392, 10, None, None) , ], 1 , 2 , 4 , 0 , 56 ,
(3, 0, None, None) , 0 , )),
(( 'CurrentPosition' , 'CurrentPosition' , ), 1610743815,
(1610743815, (), [ (8, 1, None, None) , ], 1 , 4 , 4 , 0 , 60 , (3, 0,
None, None) , 0 , )),
(( 'Count' , 'Count' , ), 1610743817, (1610743817, (), [ (16387, 10,
None, None) , ], 1 , 2 , 4 , 0 , 64 , (3, 0, None, None) , 0 , )),
(( '_NewEnum' , 'ppUnk' , ), -4, (-4, (), [ (16397, 10, None,
None) , ], 1 , 2 , 4 , 0 , 68 , (3, 0, None, None) , 1 , )),
(( 'Item' , 'ItemSpecifier' , 'Item' , ), 1610743819, (1610743819,
(), [ (12, 1, None, None) ,
(16392, 10, None, None) , ], 1 , 1 , 4 , 0 , 72 , (3, 0, None,
None) , 0 , )),
(( 'ShowBranches' , ), 1610743820, (1610743820, (), [ ], 1 , 1 , 4 ,
0 , 76 , (3, 0, None, None) , 0 , )),
(( 'ShowLeafs' , 'Flat' , ), 1610743821, (1610743821, (), [ (12, 17,
None, None) , ], 1 , 1 , 4 , 1 , 80 , (3, 0, None, None) , 0 , )),
(( 'MoveUp' , ), 1610743822, (1610743822, (), [ ], 1 , 1 , 4 , 0 ,
84 , (3, 0, None, None) , 0 , )),
(( 'MoveToRoot' , ), 1610743823, (1610743823, (), [ ], 1 , 1 , 4 ,
0 , 88 , (3, 0, None, None) , 0 , )),
(( 'MoveDown' , 'Branch' , ), 1610743824, (1610743824, (), [ (8, 1,
None, None) , ], 1 , 1 , 4 , 0 , 92 , (3, 0, None, None) , 0 , )),
(( 'MoveTo' , 'Branches' , ), 1610743825, (1610743825, (), [ (245 84,
1, None, None) , ], 1 , 1 , 4 , 0 , 96 , (3, 0, None, None) , 0 , )),
(( 'GetItemID' , 'Leaf' , 'ItemID' , ), 1610743826, (1610743826, (),
[ (8, 1, None, None) ,
(16392, 10, None, None) , ], 1 , 1 , 4 , 0 , 100 , (3, 0, None,
None) , 0 , )),