NAME
OPCUA::Open62541 - Perl XS wrapper for open62541 OPC UA library
SYNOPSIS
use OPCUA::Open62541;
my $server = OPCUA::Open62541::Server->new();
my $client = OPCUA::Open62541::Client->new();
DESCRIPTION
The open62541 is a library implementing an OPC UA client and server. This module provides access to the C functionality from Perl programs.
EXPORT
- :all
-
Everything of the exports below.
- :accesslevelmask
-
ACCESSLEVELMASK_READ ACCESSLEVELMASK_WRITE ... ACCESSLEVELMASK_TIMESTAMPWRITE
- :browseresultmask
-
BROWSERESULTMASK_NONE BROWSERESULTMASK_REFERENCETYPEID ... BROWSERESULTMASK_TARGETINFO
- :clientstate
-
CLIENTSTATE_DISCONNECTED CLIENTSTATE_WAITING_FOR_ACK ... CLIENTSTATE_SESSION_RENEWED
- :limit
-
Symbol names of minimum and maximum limits for the OPC UA data types.
TRUE FALSE SBYTE_MIN ... UINT64_MAX
- :nodeidtype
-
Symbolic names for the OPC UA node id types.
NODEIDTYPE_NUMERIC NODEIDTYPE_STRING ... NODEIDTYPE_BYTESTRING
- :statuscode
-
Symbolic names for the OPC UA status codes.
STATUSCODE_GOOD STATUSCODE_INFOTYPE_DATAVALUE ... STATUSCODE_BADMAXCONNECTIONSREACHED
- :type
-
Symbolic names for the OPC UA types.
TYPES_BOOLEAN TYPES_SBYTE ... TYPES_EVENTNOTIFICATIONLIST
METHODS
Refer to the open62541 documentation for the semantic of classes and methods.
Variant
- $variant = OPCUA::Open62541::Variant->new()
- $variant->isEmpty()
- $variant->isScalar()
- $variant->hasScalarType($data_type)
- $variant->hasArrayType($data_type)
- $variant->setScalar($p, $data_type)
VariableAttributes
This type is converted automatically from a hash. The key that are recognized are:
- VariableAttributes_value
Server
- $server = OPCUA::Open62541::Server->new()
- $server = OPCUA::Open62541::Server->newWithConfig($server_config)
- $server_config = $server->getConfig()
- $status_code = $server->run($server, $running)
-
$running should be TRUE at statup. When set to FALSE during method invocation, the server stops magically.
- $status_code = $server->run_startup($server)
- $wait_ms = $server->run_iterate($server, $wait_internal)
- $status_code = $server->run_shutdown($server)
ServerConfig
- $status_code = $server_config->setDefault()
- $status_code = $server_config->setMinimal($port, $certificate)
- $server_config->clean()
- $server_config->setCustomHostname($custom_hostname)
Client
- $client = OPCUA::Open62541::Client->new()
- $client_config = $client->getConfig()
- $status_code = $client->connect($url)
- $status_code = $client->connect_async($endpointUrl, $callback, $userdata)
- $status_code = $client->run_iterate($timeout)
- $client_state = $client->getState()
- $status_code = $client->disconnect()
ClientConfig
SEE ALSO
OPC UA library, https://open62541.org/
OPC Foundation, https://opcfoundation.org/
AUTHORS
Alexander Bluhm <bluhm@genua.de>, Anton Borowka, Marvin Knoblauch <mknob@genua.de>,
CAVEATS
This interface is far from complete.
COPYRIGHT AND LICENSE
Copyright (c) 2020 Alexander Bluhm <bluhm@genua.de>
Copyright (c) 2020 Anton Borowka
Copyright (c) 2020 Marvin Knoblauch <mknob@genua.de>
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Thanks to genua GmbH, https://www.genua.de/ for sponsoring this work.