OPCUA

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserTokenAnonymous   = "Anonymous"
	UserTokenUserName    = "UserName"
	UserTokenCertificate = "Certificate"
	UserTokenIssuedToken = "IssuedToken"
)

Variables

This section is empty.

Functions

func ListEndpoints

func ListEndpoints(address string) error

ListEndpoints is a helper function intended for development in case there is uncertainty about the server and its endpoints.

func NewOPCUAClient

func NewOPCUAClient(address string, securityPolicy string,
	messageSecurityMode string, userTokenType string, opts ...opcua.Option) (*client, error)

NewOPCUAClient creates and returns a new client for opc ua. It does not yet create the connection and calling ConnectToServer is required. The security policies are defined under constants at https://godoc.org/github.com/gopcua/opcua/ua#pkg-variables . The message security mode is either "Invalid", "None", "Sign" or "SignAndEncrypt".

Types

type Client

type Client interface {
	ConnectToServer() error
	Disconnect() error
	SubscribeNodes(nodePaths []string, opts ClientSubscribeOptions) error
	ListenData(targetChannel chan DataPackage)
}

type ClientSubscribeOptions

type ClientSubscribeOptions struct {
	Interval  time.Duration
	Namespace uint16
}

type DataPackage

type DataPackage struct {
	Timestamp time.Time
	Value     interface{}
	Path      string
	Status    ua.StatusCode
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL