Versions in this module Expand all Collapse all v0 v0.1.13 May 10, 2021 Changes in this version + const DefaultSubscriptionInterval + const DefaultSubscriptionLifetimeCount + const DefaultSubscriptionMaxKeepAliveCount + const DefaultSubscriptionMaxNotificationsPerPublish + const DefaultSubscriptionPriority + func ApplyConfig(opts ...Option) (*uasc.Config, *uasc.SessionConfig) + func DefaultClientConfig() *uasc.Config + func DefaultSessionConfig() *uasc.SessionConfig + func GetEndpoints(ctx context.Context, endpoint string) ([]*ua.EndpointDescription, error) + func NewMonitoredItemCreateRequestWithDefaults(nodeID *ua.NodeID, attributeID ua.AttributeID, clientHandle uint32) *ua.MonitoredItemCreateRequest + func SelectEndpoint(endpoints []*ua.EndpointDescription, policy string, ...) *ua.EndpointDescription + type Client struct + func NewClient(endpoint string, opts ...Option) *Client + func (c *Client) ActivateSession(s *Session) error + func (c *Client) Browse(req *ua.BrowseRequest) (*ua.BrowseResponse, error) + func (c *Client) BrowseNext(req *ua.BrowseNextRequest) (*ua.BrowseNextResponse, error) + func (c *Client) Call(req *ua.CallMethodRequest) (*ua.CallMethodResult, error) + func (c *Client) Close() error + func (c *Client) CloseSession() error + func (c *Client) Connect(ctx context.Context) (err error) + func (c *Client) CreateSession(cfg *uasc.SessionConfig) (*Session, error) + func (c *Client) DetachSession() (*Session, error) + func (c *Client) Dial(ctx context.Context) error + func (c *Client) GetEndpoints() (*ua.GetEndpointsResponse, error) + func (c *Client) HistoryReadRawModified(nodes []*ua.HistoryReadValueID, details *ua.ReadRawModifiedDetails) (*ua.HistoryReadResponse, error) + func (c *Client) Node(id *ua.NodeID) *Node + func (c *Client) Read(req *ua.ReadRequest) (*ua.ReadResponse, error) + func (c *Client) RegisterNodes(req *ua.RegisterNodesRequest) (*ua.RegisterNodesResponse, error) + func (c *Client) Send(req ua.Request, h func(interface{}) error) error + func (c *Client) Session() *Session + func (c *Client) State() ConnState + func (c *Client) Subscribe(params *SubscriptionParameters, notifyCh chan *PublishNotificationData) (*Subscription, error) + func (c *Client) SubscriptionIDs() []uint32 + func (c *Client) UnregisterNodes(req *ua.UnregisterNodesRequest) (*ua.UnregisterNodesResponse, error) + func (c *Client) Write(req *ua.WriteRequest) (*ua.WriteResponse, error) + type ConnState uint8 + const Closed + const Connected + const Connecting + const Disconnected + const Reconnecting + type InvalidResponseTypeError struct + func (e InvalidResponseTypeError) Error() string + type Node struct + ID *ua.NodeID + func (n *Node) AccessLevel() (ua.AccessLevelType, error) + func (n *Node) Attribute(attrID ua.AttributeID) (*ua.Variant, error) + func (n *Node) Attributes(attrID ...ua.AttributeID) ([]*ua.DataValue, error) + func (n *Node) BrowseName() (*ua.QualifiedName, error) + func (n *Node) Children(refs uint32, mask ua.NodeClass) ([]*Node, error) + func (n *Node) Description() (*ua.LocalizedText, error) + func (n *Node) DisplayName() (*ua.LocalizedText, error) + func (n *Node) HasAccessLevel(mask ua.AccessLevelType) (bool, error) + func (n *Node) HasUserAccessLevel(mask ua.AccessLevelType) (bool, error) + func (n *Node) NodeClass() (ua.NodeClass, error) + func (n *Node) ReferencedNodes(refs uint32, dir ua.BrowseDirection, mask ua.NodeClass, includeSubtypes bool) ([]*Node, error) + func (n *Node) References(refType uint32, dir ua.BrowseDirection, mask ua.NodeClass, ...) ([]*ua.ReferenceDescription, error) + func (n *Node) String() string + func (n *Node) TranslateBrowsePathInNamespaceToNodeID(ns uint16, browsePath string) (*ua.NodeID, error) + func (n *Node) TranslateBrowsePathsToNodeIDs(pathNames []*ua.QualifiedName) (*ua.NodeID, error) + func (n *Node) UserAccessLevel() (ua.AccessLevelType, error) + func (n *Node) Value() (*ua.Variant, error) + type Option func(*uasc.Config, *uasc.SessionConfig) + func ApplicationName(s string) Option + func ApplicationURI(s string) Option + func AuthAnonymous() Option + func AuthCertificate(cert []byte) Option + func AuthIssuedToken(tokenData []byte) Option + func AuthPolicyID(policy string) Option + func AuthUsername(user, pass string) Option + func AutoReconnect(b bool) Option + func Certificate(cert []byte) Option + func CertificateFile(filename string) Option + func Lifetime(d time.Duration) Option + func Locales(locale ...string) Option + func PrivateKey(key *rsa.PrivateKey) Option + func PrivateKeyFile(filename string) Option + func ProductURI(s string) Option + func RandomRequestID() Option + func ReconnectInterval(d time.Duration) Option + func RemoteCertificate(cert []byte) Option + func RemoteCertificateFile(filename string) Option + func RequestTimeout(t time.Duration) Option + func SecurityFromEndpoint(ep *ua.EndpointDescription, authType ua.UserTokenType) Option + func SecurityMode(m ua.MessageSecurityMode) Option + func SecurityModeString(s string) Option + func SecurityPolicy(s string) Option + func SessionName(s string) Option + func SessionTimeout(d time.Duration) Option + type PublishNotificationData struct + Error error + SubscriptionID uint32 + Value interface{} + type Server struct + EndpointURL string + func (a *Server) Close() error + func (a *Server) Open() error + type Session struct + type Subscription struct + Notifs chan *PublishNotificationData + RevisedLifetimeCount uint32 + RevisedMaxKeepAliveCount uint32 + RevisedPublishingInterval time.Duration + SubscriptionID uint32 + func (s *Subscription) Cancel() error + func (s *Subscription) Monitor(ts ua.TimestampsToReturn, items ...*ua.MonitoredItemCreateRequest) (*ua.CreateMonitoredItemsResponse, error) + func (s *Subscription) SetTriggering(triggeringItemID uint32, add, remove []uint32) (*ua.SetTriggeringResponse, error) + func (s *Subscription) Stats() (*ua.SubscriptionDiagnosticsDataType, error) + func (s *Subscription) Unmonitor(monitoredItemIDs ...uint32) (*ua.DeleteMonitoredItemsResponse, error) + type SubscriptionParameters struct + Interval time.Duration + LifetimeCount uint32 + MaxKeepAliveCount uint32 + MaxNotificationsPerPublish uint32 + Priority uint8