opcclient

package
v0.0.0-...-e7e2df9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(configurations OPCClient)

Types

type OPCClient

type OPCClient struct {
	Client    *opcua.Client
	Endpoint  string        `json:"endpoint"`
	Host      string        `json:"host"`
	Name      string        `json:"name"`
	Namespace uint16        `json:"namespace"`
	CertFile  string        `json:"certFile"`
	KeyFile   string        `json:"keyFile"`
	Timeout   time.Duration `json:"timeout"`
	Nodes     map[string]*opcua.Node
	SubGroups []SubGroup `json:"subgroups"`
	// contains filtered or unexported fields
}

func (*OPCClient) BrowseEndpoints

func (c *OPCClient) BrowseEndpoints() (*ua.GetEndpointsResponse, error)

func (*OPCClient) Connect

func (c *OPCClient) Connect()

func (*OPCClient) CreateClient

func (c *OPCClient) CreateClient() context.CancelFunc

func (*OPCClient) Disconnect

func (c *OPCClient) Disconnect()

func (*OPCClient) Subscribe

func (c *OPCClient) Subscribe(triggerTags []string, callback func(string, *ua.DataValue))

type OPCConfig

type OPCConfig struct {
	OPCClients []OPCClient `json:"opcclients"`
}

type SubGroup

type SubGroup struct {
	TriggerTags []string                    `json:"triggerTags"`
	ReportTags  []string                    `json:"reportTags"`
	Trigger     func(string, *ua.DataValue) `json:"trigger"`
	Report      func(string, *ua.DataValue) `json:"report"`
}

type Tag

type Tag struct {
	Name    string
	Address string
}

Jump to

Keyboard shortcuts

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