driver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEVSTOK        = "OK"
	DEVSTERR       = "ERROR"        /* Expected value is not equal as setting */
	DEVSTDISCONN   = "DISCONNECTED" /* Disconnected */
	DEVSTUNHEALTHY = "UNHEALTHY"    /* Unhealthy status from device */
	DEVSTUNKNOWN   = "UNKNOWN"
)

Device status definition.

Variables

This section is empty.

Functions

This section is empty.

Types

type OPCUAClient

type OPCUAClient struct {
	Client *opcua.Client
}

OPCUAClient is the client structure.

func NewClient

func NewClient(config OPCUAConfig) (client *OPCUAClient, err error)

NewClient new the OPCUA client.

func (*OPCUAClient) Get

func (c *OPCUAClient) Get(nodeID string) (results string, err error)

Get get register.

func (*OPCUAClient) GetStatus

func (c *OPCUAClient) GetStatus() string

GetStatus get device status. Please rewrite this function depending on your devices.

func (*OPCUAClient) Set

func (c *OPCUAClient) Set(nodeID string, value string) (results string, err error)

Set set register.

type OPCUAConfig

type OPCUAConfig struct {
	URL            string
	User           string
	Passwordfile   string
	SecurityPolicy string
	SecurityMode   string
	Certfile       string
	RemoteCertfile string
	Keyfile        string
}

OPCUAConfig configurations for OPCUA.

Jump to

Keyboard shortcuts

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