Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionState ¶
const ( Closed ConnectionState = ConnectionState(opcua.Closed) Connected ConnectionState = ConnectionState(opcua.Connected) Connecting ConnectionState = ConnectionState(opcua.Connecting) Disconnected ConnectionState = ConnectionState(opcua.Disconnected) Reconnecting ConnectionState = ConnectionState(opcua.Reconnecting) )
func (ConnectionState) String ¶ added in v1.27.2
func (c ConnectionState) String() string
type DebugLogger ¶ added in v1.29.3
DebugLogger logs messages from opcua at the debug level.
type OpcUAClient ¶
type OpcUAClient struct { Config *OpcUAClientConfig Log telegraf.Logger Client *opcua.Client // contains filtered or unexported fields }
func (*OpcUAClient) Connect ¶
func (o *OpcUAClient) Connect(ctx context.Context) error
Connect to an OPC UA device
func (*OpcUAClient) Disconnect ¶
func (o *OpcUAClient) Disconnect(ctx context.Context) error
func (*OpcUAClient) SetupOptions ¶ added in v1.25.1
func (o *OpcUAClient) SetupOptions() error
/ setupOptions read the endpoints from the specified server and setup all authentication
func (*OpcUAClient) State ¶
func (o *OpcUAClient) State() ConnectionState
func (*OpcUAClient) StatusCodeOK ¶
func (o *OpcUAClient) StatusCodeOK(code ua.StatusCode) bool
type OpcUAClientConfig ¶
type OpcUAClientConfig struct { Endpoint string `toml:"endpoint"` SecurityPolicy string `toml:"security_policy"` SecurityMode string `toml:"security_mode"` Certificate string `toml:"certificate"` PrivateKey string `toml:"private_key"` Username config.Secret `toml:"username"` Password config.Secret `toml:"password"` AuthMethod string `toml:"auth_method"` ConnectTimeout config.Duration `toml:"connect_timeout"` RequestTimeout config.Duration `toml:"request_timeout"` ClientTrace bool `toml:"client_trace"` OptionalFields []string `toml:"optional_fields"` Workarounds OpcUAWorkarounds `toml:"workarounds"` SessionTimeout config.Duration `toml:"session_timeout"` }
func (*OpcUAClientConfig) CreateClient ¶
func (o *OpcUAClientConfig) CreateClient(telegrafLogger telegraf.Logger) (*OpcUAClient, error)
func (*OpcUAClientConfig) Validate ¶
func (o *OpcUAClientConfig) Validate() error
type OpcUAWorkarounds ¶
type OpcUAWorkarounds struct {
AdditionalValidStatusCodes []string `toml:"additional_valid_status_codes"`
}
Click to show internal directories.
Click to hide internal directories.