MCPcopy Index your code
hub / github.com/awcullen/opcua

github.com/awcullen/opcua @v1.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.0 ↗ · + Follow
1,478 symbols 4,266 edges 86 files 1,180 documented · 80%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

robot

opcua - Godoc License

Browse, read, write and subscribe to the live data published by the OPC UA servers on your network.

This package supports OPC UA TCP transport protocol with secure channel and binary encoding. For more information, visit https://reference.opcfoundation.org/v104/.

Includes Client and Server

To connect to an OPC UA server, start here Godoc

To create your own OPC UA server, start here Godoc

Recent News

Encodes variables of 2D/3D slices.

Benchmark shows this package 10X faster than Gopcua/opcua to encode a typical payload to the network.

pkg: github.com/awcullen/opcua/cmd/benchmark
cpu: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
BenchmarkGopcuaEncode
BenchmarkGopcuaEncode-4           120178          9332 ns/op        2536 B/op         97 allocs/op
BenchmarkAwcullenEncode
BenchmarkAwcullenEncode-4        1728259           859.3 ns/op       154 B/op          4 allocs/op
PASS

Extension points exported contracts — how you extend this code

SecurityPolicy (Interface)
SecurityPolicy is a mapping of PolicyURI to security settings [6 implementers]
ua/security_policy.go
Node (Interface)
Node ... [8 implementers]
server/node.go
ResponseWriter (Interface)
ResponseWriter is used to write a response to the client. [5 implementers]
ua/service_request.go
NodeID (Interface)
NodeID identifies a Node. [4 implementers]
ua/nodeid.go
EncodingContext (Interface)
EncodingContext provides a table of NamespaceURIs for encoders/decoders. [3 implementers]
ua/encoding_context.go
Event (Interface)
(no doc) [4 implementers]
ua/base_event.go
MonitoredItem (Interface)
MonitoredItem specifies a node that is monitored [2 implementers]
server/monitored_item.go
RolesProvider (Interface)
RolesProvider looks up the roles for the given user identity and connection information. Roles are identified by a NodeI [2 …
server/roles_provider.go

Core symbols most depended-on inside this repo

NewDataValue
called by 562
ua/data_value.go
NewExpandedNodeID
called by 473
ua/expanded_nodeid.go
RegisterBinaryEncodingID
called by 286
ua/binary_registry.go
Write
called by 283
ua/service_request.go
NewReference
called by 187
ua/reference.go
NewLocalizedText
called by 181
ua/localized_text.go
WriteByte
called by 133
ua/binary_encoder.go
ParseNodeID
called by 121
ua/nodeid.go

Shape

Method 729
Struct 399
Function 271
TypeAlias 51
Interface 19
FuncType 9

Languages

Go100%

Modules by API surface

ua/structs.generated.go285 symbols
ua/security_policy.go91 symbols
ua/enums.generated.go90 symbols
ua/binary_encoder.go88 symbols
ua/binary_decoder.go82 symbols
server/namespace_manager.go41 symbols
ua/ua_node_set.go39 symbols
server/server_service_set.go35 symbols
client/client_service_set.go34 symbols
server/server.go30 symbols
server/session.go28 symbols
server/datachange_monitored_item.go28 symbols

For agents

$ claude mcp add opcua \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page