opcuaClient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

opcua test server

run

docker compose up

to connect to the server: endpoint: opc.tcp://localhost:4840

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToDevice

func ConnectToDevice(ctx context.Context, endpoint string, enableDebug bool) (*opcua.Client, error)

func GetNodeByNodeId

func GetNodeByNodeId(nodeID string, c *opcua.Client) (*opcua.Node, error)

func GetNodeChildren

func GetNodeChildren(node *opcua.Node, ctx context.Context) ([]*opcua.Node, error)

func GetNodeDescripe

func GetNodeDescripe(node *opcua.Node, ctx context.Context) (string, error)

func GetNodeDisplayName

func GetNodeDisplayName(node *opcua.Node, ctx context.Context) (string, error)

func GetRootNode

func GetRootNode(c *opcua.Client) (*opcua.Node, error)

func ReadMultiValueByNodeIds

func ReadMultiValueByNodeIds(nodeIDs []string, nodesReadValueIds []*ua.ReadValueID, ctx context.Context, c *opcua.Client) ([]interface{}, error)

func ReadValueByNodeId

func ReadValueByNodeId(nodeID string, ctx context.Context, c *opcua.Client) (interface{}, error)

func WriteMultiValueByNodeIds

func WriteMultiValueByNodeIds(nodeIDsWithValue []map[string]interface{}, ctx context.Context, c *opcua.Client) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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