gopcua

package module
v0.0.0-...-7e7b345 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 0 Imported by: 0

README

gopcua

gopcua provides easy and painless handling of OPC UA Binary Protocol in pure Golang.

CircleCI GoDoc Go Report Card GitHub

Table of Contents

Quickstart

See example directory for sample codes. Currently simple client, server implementation and sender, which lets user to manipulate any parts including connection setup sequence, are available.

Installing

Simply use go get.

The following command will send Hello, OpenSecureChannel, CreateSession, CloseSecureChannel to the destination specified in command-line arguments.

go get -u github.com/pkg/errors
go get -u github.com/google/go-cmp
go get -u github.com/wmnsk/gopcua
Running Examples

client opens the SecureChannel with the endpoint specified in command-line arguments.

If --payload is given, it sends any data on top of UASC headers.

cd examples/client
go run client.go --endpoint "opc.tcp://endpoint.example/gopcua/server" --payload <payload in hex stream format>

server listens and accepts the SecureChannel opening request from the client on specified network.

cd examples/client
go run server.go --endpoint "opc.tcp://endpoint.example/gopcua/server"

NOTE: Automatic session activation has not been implemented at this time.

Supported Features

Protocol Stack
Categories Features Supported Notes
Encoding OPC UA Binary Yes
OPC UA JSON
OPC UA XML
Transport UA-TCP UA-SC UA Binary Yes
OPC UA HTTPS
SOAP-HTTP WS-SC UA Binary
SOAP-HTTP WS-SC UA XML
SOAP-HTTP WS-SC UA XML-UA Binary
Encryption None Yes
Basic128Rsa15
Basic256
Basic256Sha256
Authentication Anonymous
User Name Password
X509 Certificate
Services
Service Set Service Supported Notes
Discovery Service Set FindServers Yes
FindServersOnNetwork Yes
GetEndpoints Yes
RegisterServer
RegisterServer2
Secure Channel Service Set OpenSecureChannel Yes
CloseSecureChannel Yes
Session Service Set CreateSession Yes
CloseSession Yes
ActivateSession Yes
Cancel Yes
Node Management Service Set AddNodes
AddReferences
DeleteNodes
DeleteReferences
View Service Set Browse
BrowseNext
TranslateBrowsePathsToNodeIds
RegisterNodes
UnregisterNodes
Query Service Set QueryFirst
QueryNext
Attribute Service Set Read Yes
Write Yes
HistoryRead
HistoryUpdate
Method Service Set Call
MonitoredItems Service Set CreateMonitoredItems
DeleteMonitoredItems
ModifyMonitoredItems
SetMonitoringMode
SetTriggering
Subscription Service Set CreateSubscription Partial Request-only
ModifySubscription
SetPublishingMode
Publish
Republish
DeleteSubscriptions
TransferSubscriptions

Tables here are generated by Markdown Tables Generator

Disclaimer

This is still experimental project. Any part of the exported API may be changed before first release.

Author

Yoshiyuki Kurauchi (GitHub / Twitter)

License

MIT

Documentation

Overview

Package gopcua provides easy and painless encoding/decoding of OPC UA protocol in pure Golang.

Directories

Path Synopsis
cmd
id
Package datatypes defines the structures, decoders and encoder for built-in data types described in Part 6 Section 5 Data encoding.
Package datatypes defines the structures, decoders and encoder for built-in data types described in Part 6 Section 5 Data encoding.
Package errors defines the errors used in multiple packages in common.
Package errors defines the errors used in multiple packages in common.
examples
client
Command client provides a connection establishment of OPC UA Secure Conversation.
Command client provides a connection establishment of OPC UA Secure Conversation.
sender
Command sender provides a "manual establishment" of OPC UA Secure Conversation.
Command sender provides a "manual establishment" of OPC UA Secure Conversation.
server
Command server provides a connection establishment of OPC UA Secure Conversation as a server.
Command server provides a connection establishment of OPC UA Secure Conversation as a server.
Package securitypolicy implements the encryption, decryption, signing, and signature verifying algorithms for Security Policy profiles as defined in Part 7 of the OPC-UA specifications (version 1.04)
Package securitypolicy implements the encryption, decryption, signing, and signature verifying algorithms for Security Policy profiles as defined in Part 7 of the OPC-UA specifications (version 1.04)
Package services provides encoding/decoding feature for Services in OPC UA Binary Protocol.
Package services provides encoding/decoding feature for Services in OPC UA Binary Protocol.
Package uacp provides encoding/decoding and automated connection handling for OPC UA Connection Protocol.
Package uacp provides encoding/decoding and automated connection handling for OPC UA Connection Protocol.
Package uasc provides encoding/decoding and automated secure channel and session handling for OPC UA Secure Conversation.
Package uasc provides encoding/decoding and automated secure channel and session handling for OPC UA Secure Conversation.
Package utils defines the utilities used in multiple packages in common.
Package utils defines the utilities used in multiple packages in common.

Jump to

Keyboard shortcuts

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