Documentation
¶
Index ¶
- Constants
- Variables
- func DataAddRef(this unsafe.Pointer) uintptr
- func DataOnCancelComplete(this unsafe.Pointer, dwTransid uint32, hGroup uint32) uintptr
- func DataOnDataChange(this unsafe.Pointer, dwTransid uint32, hGroup uint32, hrMasterquality int32, ...) uintptr
- func DataOnReadComplete(this unsafe.Pointer, dwTransid uint32, hGroup uint32, hrMasterquality int32, ...) uintptr
- func DataOnWriteComplete(this unsafe.Pointer, dwTransid uint32, hGroup uint32, hrMastererr int32, ...) uintptr
- func DataQueryInterface(this unsafe.Pointer, iid *windows.GUID, punk *unsafe.Pointer) uintptr
- func DataRelease(this unsafe.Pointer) uintptr
- func NewOPCWrapperError(info string, err error) error
- func ShutdownAddRef(this unsafe.Pointer) uintptr
- func ShutdownQueryInterface(this unsafe.Pointer, iid *windows.GUID, punk *unsafe.Pointer) uintptr
- func ShutdownRelease(this unsafe.Pointer) uintptr
- func ShutdownRequest(this *com.IUnknown, pReason *uint16) uintptr
- type CCancelCompleteCallBackData
- type CDataChangeCallBackData
- type CReadCompleteCallBackData
- type CWriteCompleteCallBackData
- type CancelCompleteCallBackData
- type DataChangeCallBackData
- type DataEventReceiver
- type DataEventReceiverVtbl
- type OPCBrowser
- func (b *OPCBrowser) GetAccessRights() uint32
- func (b *OPCBrowser) GetCount() int
- func (b *OPCBrowser) GetCurrentPosition() (string, error)
- func (b *OPCBrowser) GetDataType() uint16
- func (b *OPCBrowser) GetFilter() string
- func (b *OPCBrowser) GetItemID(leaf string) (string, error)
- func (b *OPCBrowser) GetOrganization() (com.OPCNAMESPACETYPE, error)
- func (b *OPCBrowser) Item(index int) (string, error)
- func (b *OPCBrowser) MoveDown(name string) error
- func (b *OPCBrowser) MoveTo(branches []string) error
- func (b *OPCBrowser) MoveToRoot()
- func (b *OPCBrowser) MoveUp() error
- func (b *OPCBrowser) Release()
- func (b *OPCBrowser) SetAccessRights(accessRights uint32) error
- func (b *OPCBrowser) SetDataType(dataType uint16)
- func (b *OPCBrowser) SetFilter(filter string)
- func (b *OPCBrowser) ShowBranches() error
- func (b *OPCBrowser) ShowLeafs(flat bool) error
- type OPCError
- type OPCGroup
- func (g *OPCGroup) AsyncCancel(cancelID uint32) error
- func (g *OPCGroup) AsyncRead(serverHandles []uint32, clientTransactionID uint32) (cancelID uint32, errs []error, err error)
- func (g *OPCGroup) AsyncRefresh(source com.OPCDATASOURCE, clientTransactionID uint32) (cancelID uint32, err error)
- func (g *OPCGroup) AsyncWrite(serverHandles []uint32, values []interface{}, clientTransactionID uint32) (cancelID uint32, errs []error, err error)
- func (g *OPCGroup) GetClientHandle() uint32
- func (g *OPCGroup) GetDeadband() (float32, error)
- func (g *OPCGroup) GetIsActive() bool
- func (g *OPCGroup) GetLocaleID() (uint32, error)
- func (g *OPCGroup) GetName() string
- func (g *OPCGroup) GetParent() *OPCGroups
- func (g *OPCGroup) GetServerHandle() uint32
- func (g *OPCGroup) GetTimeBias() (int32, error)
- func (g *OPCGroup) GetUpdateRate() (uint32, error)
- func (g *OPCGroup) OPCItems() *OPCItems
- func (g *OPCGroup) RegisterCancelComplete(ch chan *CancelCompleteCallBackData) error
- func (g *OPCGroup) RegisterDataChange(ch chan *DataChangeCallBackData) error
- func (g *OPCGroup) RegisterReadComplete(ch chan *ReadCompleteCallBackData) error
- func (g *OPCGroup) RegisterWriteComplete(ch chan *WriteCompleteCallBackData) error
- func (g *OPCGroup) Release()
- func (g *OPCGroup) SetClientHandle(clientHandle uint32) error
- func (g *OPCGroup) SetDeadband(deadband float32) error
- func (g *OPCGroup) SetIsActive(isActive bool) error
- func (g *OPCGroup) SetLocaleID(id uint32) error
- func (g *OPCGroup) SetName(name string) error
- func (g *OPCGroup) SetTimeBias(timeBias int32) error
- func (g *OPCGroup) SetUpdateRate(updateRate uint32) error
- func (g *OPCGroup) SyncRead(source com.OPCDATASOURCE, serverHandles []uint32) ([]*com.ItemState, error)
- func (g *OPCGroup) SyncWrite(serverHandles []uint32, values []interface{}) ([]error, error)
- type OPCGroups
- func (gs *OPCGroups) Add(szName string) (*OPCGroup, error)
- func (gs *OPCGroups) GetCount() int
- func (gs *OPCGroups) GetDefaultGroupDeadband() float32
- func (gs *OPCGroups) GetDefaultGroupIsActive() bool
- func (gs *OPCGroups) GetDefaultGroupLocaleID() uint32
- func (gs *OPCGroups) GetDefaultGroupTimeBias() int32
- func (gs *OPCGroups) GetDefaultGroupUpdateRate() uint32
- func (gs *OPCGroups) GetOPCGroup(serverHandle uint32) (*OPCGroup, error)
- func (gs *OPCGroups) GetOPCGroupByName(name string) (*OPCGroup, error)
- func (gs *OPCGroups) GetParent() *OPCServer
- func (gs *OPCGroups) Item(index int32) (*OPCGroup, error)
- func (gs *OPCGroups) ItemByName(name string) (*OPCGroup, error)
- func (gs *OPCGroups) Release() error
- func (gs *OPCGroups) Remove(serverHandle uint32) error
- func (gs *OPCGroups) RemoveAll() error
- func (gs *OPCGroups) RemoveByName(name string) error
- func (gs *OPCGroups) SetDefaultGroupDeadband(defaultDeadband float32)
- func (gs *OPCGroups) SetDefaultGroupIsActive(defaultActive bool)
- func (gs *OPCGroups) SetDefaultGroupLocaleID(defaultLocaleID uint32)
- func (gs *OPCGroups) SetDefaultGroupTimeBias(defaultGroupTimeBias int32)
- func (gs *OPCGroups) SetDefaultGroupUpdateRate(defaultGroupUpdateRate uint32)
- type OPCItem
- func (i *OPCItem) GetAccessPath() string
- func (i *OPCItem) GetAccessRights() uint32
- func (i *OPCItem) GetCanonicalDataType() com.VT
- func (i *OPCItem) GetClientHandle() uint32
- func (i *OPCItem) GetEUInfo() (interface{}, error)
- func (i *OPCItem) GetEUType() (int, error)
- func (i *OPCItem) GetIsActive() bool
- func (i *OPCItem) GetItemID() string
- func (i *OPCItem) GetParent() *OPCItems
- func (i *OPCItem) GetQuality() uint16
- func (i *OPCItem) GetRequestedDataType() com.VT
- func (i *OPCItem) GetServerHandle() uint32
- func (i *OPCItem) GetTimestamp() time.Time
- func (i *OPCItem) GetValue() interface{}
- func (i *OPCItem) Read(source com.OPCDATASOURCE) (value interface{}, quality uint16, timestamp time.Time, err error)
- func (i *OPCItem) Release()
- func (i *OPCItem) SetClientHandle(clientHandle uint32) error
- func (i *OPCItem) SetIsActive(isActive bool) error
- func (i *OPCItem) SetRequestedDataType(requestedDataType com.VT) error
- func (i *OPCItem) Write(value interface{}) error
- type OPCItems
- func (is *OPCItems) AddItem(tag string) (*OPCItem, error)
- func (is *OPCItems) AddItems(tags []string) ([]*OPCItem, []error, error)
- func (is *OPCItems) GetCount() int
- func (is *OPCItems) GetDefaultAccessPath() string
- func (is *OPCItems) GetDefaultActive() bool
- func (is *OPCItems) GetDefaultRequestedDataType() com.VT
- func (is *OPCItems) GetOPCItem(serverHandle uint32) (*OPCItem, error)
- func (is *OPCItems) GetParent() *OPCGroup
- func (is *OPCItems) Item(index int32) (*OPCItem, error)
- func (is *OPCItems) ItemByName(name string) (*OPCItem, error)
- func (is *OPCItems) Release()
- func (is *OPCItems) Remove(serverHandles []uint32)
- func (is *OPCItems) SetActive(serverHandles []uint32, active bool) []error
- func (is *OPCItems) SetClientHandles(serverHandles []uint32, clientHandles []uint32) []error
- func (is *OPCItems) SetDataTypes(serverHandles []uint32, requestedDataTypes []com.VT) []error
- func (is *OPCItems) SetDefaultAccessPath(defaultAccessPath string)
- func (is *OPCItems) SetDefaultActive(defaultActive bool)
- func (is *OPCItems) SetDefaultRequestedDataType(defaultRequestedDataType com.VT)
- func (is *OPCItems) Validate(tags []string, requestedDataTypes *[]com.VT, accessPaths *[]string) ([]error, error)
- type OPCServer
- func (s *OPCServer) CreateBrowser() (*OPCBrowser, error)
- func (s *OPCServer) Disconnect() error
- func (s *OPCServer) GetBandwidth() (uint32, error)
- func (s *OPCServer) GetBuildNumber() (uint16, error)
- func (s *OPCServer) GetClientName() string
- func (s *OPCServer) GetCurrentTime() (time.Time, error)
- func (s *OPCServer) GetErrorString(errorCode int32) (string, error)
- func (s *OPCServer) GetItemProperties(itemID string, propertyIDs []uint32) (data []interface{}, errors []error, err error)
- func (s *OPCServer) GetLastUpdateTime() (time.Time, error)
- func (s *OPCServer) GetLocaleID() (uint32, error)
- func (s *OPCServer) GetMajorVersion() (uint16, error)
- func (s *OPCServer) GetMinorVersion() (uint16, error)
- func (s *OPCServer) GetOPCGroups() *OPCGroups
- func (s *OPCServer) GetServerName() string
- func (s *OPCServer) GetServerNode() string
- func (s *OPCServer) GetServerState() (com.OPCServerState, error)
- func (s *OPCServer) GetStartTime() (time.Time, error)
- func (s *OPCServer) GetVendorInfo() (string, error)
- func (s *OPCServer) LookupItemIDs(itemID string, propertyIDs []uint32) ([]string, []error, error)
- func (s *OPCServer) QueryAvailableLocaleIDs() ([]uint32, error)
- func (s *OPCServer) QueryAvailableProperties(itemID string) (pPropertyIDs []uint32, ppDescriptions []string, ppvtDataTypes []uint16, ...)
- func (s *OPCServer) RegisterServerShutDown(ch chan string) error
- func (s *OPCServer) SetClientName(clientName string) error
- func (s *OPCServer) SetLocaleID(localeID uint32) error
- type OPCWrapperError
- type PropertyDescription
- type ReadCompleteCallBackData
- type ServerInfo
- type ShutdownEventReceiver
- type ShutdownEventReceiverVtbl
- type WriteCompleteCallBackData
Constants ¶
const ( OPC_READABLE uint32 = 0x1 OPC_WRITEABLE = 0x2 )
const ( OPC_DS_CACHE com.OPCDATASOURCE = 1 OPC_DS_DEVICE com.OPCDATASOURCE = OPC_DS_CACHE + 1 )
const ( OPC_NS_HIERARCHIAL com.OPCNAMESPACETYPE = 1 OPC_NS_FLAT com.OPCNAMESPACETYPE = OPC_NS_HIERARCHIAL + 1 )
const ( OPC_STATUS_RUNNING com.OPCServerState = 1 OPC_STATUS_FAILED = OPC_STATUS_RUNNING + 1 OPC_STATUS_NOCONFIG = OPC_STATUS_FAILED + 1 OPC_STATUS_SUSPENDED = OPC_STATUS_NOCONFIG + 1 OPC_STATUS_TEST = OPC_STATUS_SUSPENDED + 1 OPC_STATUS_COMM_FAULT = OPC_STATUS_TEST + 1 )
const ( OPC_BROWSE_UP com.OPCBROWSEDIRECTION = 1 OPC_BROWSE_DOWN com.OPCBROWSEDIRECTION = OPC_BROWSE_UP + 1 OPC_BROWSE_TO com.OPCBROWSEDIRECTION = OPC_BROWSE_DOWN + 1 )
const ( OPC_BRANCH com.OPCBROWSETYPE = 1 OPC_LEAF com.OPCBROWSETYPE = OPC_BRANCH + 1 OPC_FLAT com.OPCBROWSETYPE = OPC_LEAF + 1 )
const ( OPC_ENUM_PRIVATE_CONNECTIONS = 1 OPC_ENUM_PUBLIC_CONNECTIONS = OPC_ENUM_PRIVATE_CONNECTIONS + 1 OPC_ENUM_ALL_CONNECTIONS = OPC_ENUM_PUBLIC_CONNECTIONS + 1 OPC_ENUM_PRIVATE = OPC_ENUM_ALL_CONNECTIONS + 1 OPC_ENUM_PUBLIC = OPC_ENUM_PRIVATE + 1 OPC_ENUM_ALL = OPC_ENUM_PUBLIC + 1 )
Variables ¶
var ( OPCInvalidHandle = uint32(0xC0040001) OPCBadType = uint32(0xC0040004) OPCPublic = uint32(0xC0040005) OPCBadRights = uint32(0xC0040006) OPCUnknownItemID = uint32(0xC0040007) OPCInvalidItemID = uint32(0xC0040008) OPCInvalidFilter = uint32(0xC0040009) OPCUnknownPath = uint32(0xC004000A) OPCRange = uint32(0xC004000B) OPCDuplicateName = uint32(0xC004000C) OPCUnsupportedRate = uint32(0x0004000D) OPCClamp = uint32(0x0004000E) OPCInuse = uint32(0x0004000F) OPCInvalidConfig = uint32(0xC0040010) OPCNotFound = uint32(0xC0040011) OPCInvalidPID = uint32(0xC0040203) )
var IID_CATID_OPCDAServer10 = windows.GUID{ Data1: 0x63D5F430, Data2: 0xCFE4, Data3: 0x11d1, Data4: [8]byte{0xB2, 0xC8, 0x00, 0x60, 0x08, 0x3B, 0xA1, 0xFB}, }
var IID_CATID_OPCDAServer20 = windows.GUID{ Data1: 0x63D5F432, Data2: 0xCFE4, Data3: 0x11d1, Data4: [8]byte{0xB2, 0xC8, 0x00, 0x60, 0x08, 0x3B, 0xA1, 0xFB}, }
var IID_IOPCDataCallback = windows.GUID{ Data1: 0x39c13a70, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
var IID_IOPCShutdown = windows.GUID{ Data1: 0xF31DFDE1, Data2: 0x07B6, Data3: 0x11d2, Data4: [8]byte{0xB2, 0xD8, 0x00, 0x60, 0x08, 0x3B, 0xA1, 0xFB}, }
Functions ¶
func DataAddRef ¶
func DataOnCancelComplete ¶
func DataOnDataChange ¶
func DataOnReadComplete ¶
func DataOnWriteComplete ¶
func DataQueryInterface ¶
func DataRelease ¶
func NewOPCWrapperError ¶ added in v0.3.0
func ShutdownAddRef ¶
func ShutdownQueryInterface ¶
func ShutdownRelease ¶
Types ¶
type CDataChangeCallBackData ¶
type DataChangeCallBackData ¶
type DataEventReceiver ¶
type DataEventReceiver struct {
// contains filtered or unexported fields
}
func NewDataEventReceiver ¶
func NewDataEventReceiver( dataChangeReceiver chan *CDataChangeCallBackData, readCompleteReceiver chan *CReadCompleteCallBackData, writeCompleteReceiver chan *CWriteCompleteCallBackData, cancelCompleteReceiver chan *CCancelCompleteCallBackData, ) *DataEventReceiver
type DataEventReceiverVtbl ¶
type DataEventReceiverVtbl struct {
// contains filtered or unexported fields
}
type OPCBrowser ¶
type OPCBrowser struct {
// contains filtered or unexported fields
}
func NewOPCBrowser ¶
func NewOPCBrowser(parent *OPCServer) (*OPCBrowser, error)
func (*OPCBrowser) GetAccessRights ¶
func (b *OPCBrowser) GetAccessRights() uint32
GetAccessRights get the requested access rights that apply to the ShowLeafs methods
func (*OPCBrowser) GetCount ¶
func (b *OPCBrowser) GetCount() int
GetCount Required property for collections
func (*OPCBrowser) GetCurrentPosition ¶
func (b *OPCBrowser) GetCurrentPosition() (string, error)
GetCurrentPosition Returns the current position in the tree
func (*OPCBrowser) GetDataType ¶
func (b *OPCBrowser) GetDataType() uint16
GetDataType get the requested data type that applies to ShowLeafs methods. This property defaults to com.VT_EMPTY, which means that any data type is acceptable.
func (*OPCBrowser) GetFilter ¶
func (b *OPCBrowser) GetFilter() string
GetFilter get the filter that applies to ShowBranches and ShowLeafs methods
func (*OPCBrowser) GetItemID ¶
func (b *OPCBrowser) GetItemID(leaf string) (string, error)
GetItemID Given a name, returns a valid ItemID that can be passed to OPCItems Add method.
func (*OPCBrowser) GetOrganization ¶
func (b *OPCBrowser) GetOrganization() (com.OPCNAMESPACETYPE, error)
GetOrganization Returns either OPCHierarchical or OPCFlat.
func (*OPCBrowser) Item ¶
func (b *OPCBrowser) Item(index int) (string, error)
Item returns the name of the item at the specified index. index is 0-based.
func (*OPCBrowser) MoveDown ¶
func (b *OPCBrowser) MoveDown(name string) error
MoveDown Move down into this branch.
func (*OPCBrowser) MoveTo ¶
func (b *OPCBrowser) MoveTo(branches []string) error
MoveTo Move to an absolute position.
func (*OPCBrowser) MoveToRoot ¶
func (b *OPCBrowser) MoveToRoot()
MoveToRoot Move up to the first level in the tree.
func (*OPCBrowser) MoveUp ¶
func (b *OPCBrowser) MoveUp() error
MoveUp Move up one level in the tree.
func (*OPCBrowser) SetAccessRights ¶
func (b *OPCBrowser) SetAccessRights(accessRights uint32) error
SetAccessRights set the requested access rights that apply to the ShowLeafs methods
func (*OPCBrowser) SetDataType ¶
func (b *OPCBrowser) SetDataType(dataType uint16)
SetDataType set the requested data type that applies to ShowLeafs methods.
func (*OPCBrowser) SetFilter ¶
func (b *OPCBrowser) SetFilter(filter string)
SetFilter set the filter that applies to ShowBranches and ShowLeafs methods
func (*OPCBrowser) ShowBranches ¶
func (b *OPCBrowser) ShowBranches() error
ShowBranches Fills the collection with names of the branches at the current browse position.
func (*OPCBrowser) ShowLeafs ¶
func (b *OPCBrowser) ShowLeafs(flat bool) error
ShowLeafs Fills the collection with the names of the leafs at the current browse position
type OPCGroup ¶
type OPCGroup struct {
// contains filtered or unexported fields
}
func NewOPCGroup ¶
func (*OPCGroup) AsyncCancel ¶
AsyncCancel Request that the server cancel an outstanding transaction. An AsyncCancelComplete event will occur indicating whether or not the cancel succeeded.
func (*OPCGroup) AsyncRead ¶
func (g *OPCGroup) AsyncRead( serverHandles []uint32, clientTransactionID uint32, ) (cancelID uint32, errs []error, err error)
AsyncRead Read one or more items in a group. The results are returned via the AsyncReadComplete event associated with the OPCGroup object.
func (*OPCGroup) AsyncRefresh ¶
func (g *OPCGroup) AsyncRefresh( source com.OPCDATASOURCE, clientTransactionID uint32, ) (cancelID uint32, err error)
AsyncRefresh Generate an event for all active items in the group (whether they have changed or not). Inactive items are not included in the callback. The results are returned via the DataChange event associated with the OPCGroup object.
func (*OPCGroup) AsyncWrite ¶
func (g *OPCGroup) AsyncWrite( serverHandles []uint32, values []interface{}, clientTransactionID uint32, ) (cancelID uint32, errs []error, err error)
AsyncWrite Write one or more items in a group. The results are returned via the AsyncWriteComplete event associated with the OPCGroup object.
func (*OPCGroup) GetClientHandle ¶
GetClientHandle get a Long value associated with the group
func (*OPCGroup) GetDeadband ¶
GetDeadband A deadband is expressed as percent of full scale (legal values 0 to 100).
func (*OPCGroup) GetIsActive ¶
GetIsActive Returns whether the group is active
func (*OPCGroup) GetLocaleID ¶
GetLocaleID get the locale identifier for the group
func (*OPCGroup) GetServerHandle ¶
GetServerHandle get the server assigned handle for the group
func (*OPCGroup) GetTimeBias ¶
GetTimeBias This property provides the information needed to convert the time stamp on the data back to the local time of the device
func (*OPCGroup) GetUpdateRate ¶
GetUpdateRate The fastest rate at which data change events may be fired. A slow process might cause data changes to fire at less than this rate, but they will never exceed this rate. Rate is in milliseconds. This property’s default depends on the value set in the OPCGroups Collection. Assigning a value to this property is a “request” for a new update rate. The server may not support that rate, so reading the property may result in a different rate (the server will use the closest rate it does support).
func (*OPCGroup) RegisterCancelComplete ¶
func (g *OPCGroup) RegisterCancelComplete(ch chan *CancelCompleteCallBackData) error
RegisterCancelComplete Register to receive cancel complete events
func (*OPCGroup) RegisterDataChange ¶
func (g *OPCGroup) RegisterDataChange(ch chan *DataChangeCallBackData) error
RegisterDataChange Register to receive data change events
func (*OPCGroup) RegisterReadComplete ¶
func (g *OPCGroup) RegisterReadComplete(ch chan *ReadCompleteCallBackData) error
RegisterReadComplete Register to receive read complete events
func (*OPCGroup) RegisterWriteComplete ¶
func (g *OPCGroup) RegisterWriteComplete(ch chan *WriteCompleteCallBackData) error
RegisterWriteComplete Register to receive write complete events
func (*OPCGroup) Release ¶
func (g *OPCGroup) Release()
Release Releases the resources used by the group
func (*OPCGroup) SetClientHandle ¶
SetClientHandle set a Long value associated with the group
func (*OPCGroup) SetDeadband ¶
SetDeadband A deadband is expressed as percent of full scale (legal values 0 to 100).
func (*OPCGroup) SetIsActive ¶
SetIsActive set whether the group is active
func (*OPCGroup) SetLocaleID ¶
SetLocaleID set the locale identifier for the group
func (*OPCGroup) SetTimeBias ¶
SetTimeBias This property provides the information needed to convert the time stamp on the data back to the local time of the device
func (*OPCGroup) SetUpdateRate ¶
SetUpdateRate set the update rate
type OPCGroups ¶
func NewOPCGroups ¶
func (*OPCGroups) GetDefaultGroupDeadband ¶
GetDefaultGroupDeadband get the default deadband for OPCGroups created using Groups.Add
func (*OPCGroups) GetDefaultGroupIsActive ¶
GetDefaultGroupIsActive get the default active state for OPCGroups created using Groups.Add
func (*OPCGroups) GetDefaultGroupLocaleID ¶
GetDefaultGroupLocaleID get the default locale for OPCGroups created using Groups.Add.
func (*OPCGroups) GetDefaultGroupTimeBias ¶
GetDefaultGroupTimeBias get the default time bias for OPCGroups created using Groups.Add.
func (*OPCGroups) GetDefaultGroupUpdateRate ¶
GetDefaultGroupUpdateRate get the default update rate (in milliseconds) for OPCGroups created using Groups.Add
func (*OPCGroups) GetOPCGroup ¶
GetOPCGroup Returns an OPCGroup by server handle
func (*OPCGroups) GetOPCGroupByName ¶
GetOPCGroupByName Returns an OPCGroup by name
func (*OPCGroups) Item ¶
Item Returns an OPCGroup by ItemSpecifier. ItemSpecifier is the name or 0-based index into the collection
func (*OPCGroups) ItemByName ¶
ItemByName Returns an OPCGroup by name
func (*OPCGroups) Release ¶
Release Releases the resources used by the collection and the items it contains.
func (*OPCGroups) RemoveByName ¶
RemoveByName Removes an OPCGroup from the collection by name
func (*OPCGroups) SetDefaultGroupDeadband ¶
SetDefaultGroupDeadband set the default deadband for OPCGroups created using Groups.Add
func (*OPCGroups) SetDefaultGroupIsActive ¶
SetDefaultGroupIsActive set the default active state for OPCGroups created using Groups.Add
func (*OPCGroups) SetDefaultGroupLocaleID ¶
SetDefaultGroupLocaleID set the default locale for OPCGroups created using Groups.Add.
func (*OPCGroups) SetDefaultGroupTimeBias ¶
SetDefaultGroupTimeBias set the default time bias for OPCGroups created using Groups.Add.
func (*OPCGroups) SetDefaultGroupUpdateRate ¶
SetDefaultGroupUpdateRate set the default update rate (in milliseconds) for OPCGroups created using Groups.Add
type OPCItem ¶
type OPCItem struct {
// contains filtered or unexported fields
}
func NewOPCItem ¶
func (*OPCItem) GetAccessPath ¶
GetAccessPath get the access path for the item.
func (*OPCItem) GetAccessRights ¶
GetAccessRights get the access rights for the item.
func (*OPCItem) GetCanonicalDataType ¶
GetCanonicalDataType Returns the canonical data type for the item.
func (*OPCItem) GetClientHandle ¶
GetClientHandle get the client handle for the item.
func (*OPCItem) GetIsActive ¶
GetIsActive get the active state for the item.
func (*OPCItem) GetQuality ¶
GetQuality Returns the latest quality read from the server
func (*OPCItem) GetRequestedDataType ¶
GetRequestedDataType get the requested data type for the item.
func (*OPCItem) GetServerHandle ¶
GetServerHandle get the server handle for the item.
func (*OPCItem) GetTimestamp ¶
GetTimestamp Returns the latest timestamp read from the server
func (*OPCItem) GetValue ¶
func (i *OPCItem) GetValue() interface{}
GetValue Returns the latest value read from the server
func (*OPCItem) Read ¶
func (i *OPCItem) Read(source com.OPCDATASOURCE) (value interface{}, quality uint16, timestamp time.Time, err error)
Read makes a blocking call to read this item from the server.
func (*OPCItem) SetClientHandle ¶
SetClientHandle set the client handle for the item.
func (*OPCItem) SetIsActive ¶
SetIsActive set the active state for the item.
func (*OPCItem) SetRequestedDataType ¶
SetRequestedDataType set the requested data type for the item.
type OPCItems ¶
func NewOPCItems ¶
func NewOPCItems( parent *OPCGroup, itemMgt *com.IOPCItemMgt, iCommon *com.IOPCCommon, ) *OPCItems
func (*OPCItems) GetDefaultAccessPath ¶
GetDefaultAccessPath get the default AccessPath that will be used in calls to Add
func (*OPCItems) GetDefaultActive ¶
GetDefaultActive get the default active state for OPCItems created using Items.Add
func (*OPCItems) GetDefaultRequestedDataType ¶
GetDefaultRequestedDataType get the requested data type that will be used in calls to Add
func (*OPCItems) GetOPCItem ¶
GetOPCItem returns the OPCItem by serverHandle
func (*OPCItems) ItemByName ¶
ItemByName get the item by name
func (*OPCItems) Release ¶
func (is *OPCItems) Release()
Release Releases the OPCItems collection and all associated resources.
func (*OPCItems) SetActive ¶
SetActive Allows Activation and deactivation of individual OPCItem’s in the OPCItems Collection
func (*OPCItems) SetClientHandles ¶
SetClientHandles Changes the client handles or one or more Items in a Group.
func (*OPCItems) SetDataTypes ¶
SetDataTypes Changes the requested data type for one or more Items
func (*OPCItems) SetDefaultAccessPath ¶
SetDefaultAccessPath set the default AccessPath that will be used in calls to Add
func (*OPCItems) SetDefaultActive ¶
SetDefaultActive set the default active state for OPCItems created using Items.Add
func (*OPCItems) SetDefaultRequestedDataType ¶
SetDefaultRequestedDataType set the requested data type that will be used in calls to Add
type OPCServer ¶
func (*OPCServer) CreateBrowser ¶
func (s *OPCServer) CreateBrowser() (*OPCBrowser, error)
CreateBrowser Creates an OPCBrowser object
func (*OPCServer) GetBandwidth ¶
GetBandwidth Returns the bandwidth of the server
func (*OPCServer) GetBuildNumber ¶
GetBuildNumber Returns the build number of the server
func (*OPCServer) GetClientName ¶
GetClientName Returns the client name of the client
func (*OPCServer) GetCurrentTime ¶
GetCurrentTime Returns the current time from the server
func (*OPCServer) GetErrorString ¶
GetErrorString Converts an error number to a readable string
func (*OPCServer) GetItemProperties ¶
func (s *OPCServer) GetItemProperties(itemID string, propertyIDs []uint32) (data []interface{}, errors []error, err error)
GetItemProperties Return a list of the current data values for the passed ID codes.
func (*OPCServer) GetLastUpdateTime ¶
GetLastUpdateTime Returns the last update time from the server
func (*OPCServer) GetLocaleID ¶
GetLocaleID get locale ID
func (*OPCServer) GetMajorVersion ¶
GetMajorVersion Returns the major part of the server version number
func (*OPCServer) GetMinorVersion ¶
GetMinorVersion Returns the minor part of the server version number
func (*OPCServer) GetOPCGroups ¶
GetOPCGroups get a collection of OPCGroup objects
func (*OPCServer) GetServerName ¶
GetServerName Returns the server name of the server that the client connected to via Connect().
func (*OPCServer) GetServerNode ¶
GetServerNode Returns the node name of the server that the client connected to via Connect().
func (*OPCServer) GetServerState ¶
func (s *OPCServer) GetServerState() (com.OPCServerState, error)
GetServerState Returns the server’s state
func (*OPCServer) GetStartTime ¶
GetStartTime Returns the time the server started running
func (*OPCServer) GetVendorInfo ¶
GetVendorInfo Returns the vendor information string for the server
func (*OPCServer) LookupItemIDs ¶
LookupItemIDs Return a list of ItemIDs (if available) for each of the passed ID codes. have not tested because simulator return error
func (*OPCServer) QueryAvailableLocaleIDs ¶
QueryAvailableLocaleIDs Return the available LocaleIDs for this server/client session
func (*OPCServer) QueryAvailableProperties ¶
func (s *OPCServer) QueryAvailableProperties(itemID string) (pPropertyIDs []uint32, ppDescriptions []string, ppvtDataTypes []uint16, err error)
QueryAvailableProperties Return a list of ID codes and Descriptions for the available properties for this ItemID
func (*OPCServer) RegisterServerShutDown ¶
RegisterServerShutDown register server shut down event
func (*OPCServer) SetClientName ¶
SetClientName Sets the client name of the client
func (*OPCServer) SetLocaleID ¶
SetLocaleID set locale ID
type OPCWrapperError ¶ added in v0.3.0
func (*OPCWrapperError) Error ¶ added in v0.3.0
func (e *OPCWrapperError) Error() string
func (*OPCWrapperError) Unwrap ¶ added in v0.3.0
func (e *OPCWrapperError) Unwrap() error
type PropertyDescription ¶
type ServerInfo ¶
func GetOPCServers ¶
func GetOPCServers(node string) ([]*ServerInfo, error)
GetOPCServers get OPC servers from node
type ShutdownEventReceiver ¶
type ShutdownEventReceiver struct {
// contains filtered or unexported fields
}
func NewShutdownEventReceiver ¶
func NewShutdownEventReceiver() *ShutdownEventReceiver
func (*ShutdownEventReceiver) AddReceiver ¶
func (er *ShutdownEventReceiver) AddReceiver(ch chan string)
type ShutdownEventReceiverVtbl ¶
type ShutdownEventReceiverVtbl struct {
// contains filtered or unexported fields
}