Reference: High level interface

Lists higher level functions that have been introduced to Open62541.jl for convenience reasons.

Open62541.JUA_ArgumentType
JUA_Argument

A mutable struct that defines a JUA_Argument object - the equivalent of a UA_Argument, but with memory managed by Julia rather than C (exceptions below).

The following constructor methods are defined:

JUA_Argument()

creates an empty JUA_Argument, equivalent to calling UA_Argument_new().

JUA_Argument(examplearg::Union{Nothing, AbstractArray{<: ARG_TYPEUNION}, ARG_TYPEUNION} = nothing; 
        name::Union{Nothing, AbstractString} = nothing, 
        description::Union{AbstractString, Nothing} = nothing, 
        localization::AbstractString = "en-US",
        datatype::Union{Nothing, ARG_TYPEUNION} = nothing,
        valuerank::Union{Integer, Nothing} = nothing, 
        arraydimensions::Union{Integer, AbstractArray{<: Integer}, Nothing} = nothing)

creates a JUA_Argument based on the properties of examplearg. Specifically, the datatype, valuerank, and arraydimensions are automatically determined from examplearg. The name, description and localization keyword arguments can be used to describe the JUA_Argument further.

The valuerank and arraydimensions properties are explained here: OPC Foundation Website

JUA_Argument(argumentptr::Ptr{UA_Argument})

creates a JUA_Argument based on the pointer argumentptr. This is a fallback method that can be used to pass UA_Arguments generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., argumentptr needs to be manually cleaned up with UA_Argument_delete(argumentptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_Argument()
j = JUA_Argument(1.0) #will accept a Float64 scalar
j = JUA_Argument(zeros(Float32, 2, 2)) #will exclusively accept Float32 arrays of size 2x2
j = JUA_Argument(zeros(Float32, 2, 2), arraydimensions = [0, 0]) #will accept any 2D Float32 array.
j = JUA_Argument(datatype = Int8, valuerank = 1, arraydimensions = [2, 2]) #will accept a Int8 array of size 2 x 2.
j = JUA_Argument(datatype = Float64, valuerank = 1, arraydimensions = 4) #will accept a Float64 vector with 4 elements.
j = JUA_Argument(datatype = Float64, valuerank = 1, arraydimensions = 0) #will accept a Float64 vector of any length.
source
Open62541.JUA_CallMethodRequestType
JUA_CallMethodRequest

A mutable struct that defines a JUA_CallMethodRequest object - the equivalent of a UA_CallMethodRequest, but with memory managed by Julia rather than C (exceptions below).

The following constructor methods are defined:

JUA_CallMethodRequest()

creates an empty JUA_CallMethodRequest, equivalent to calling UA_CallMethodRequest_new().

JUA_CallMethodRequest(objectid::JUA_NodeId, methodid::JUA_NodeId, inputarg::Union{Any, Tuple{Any, ...}})

creates a JUA_CallMethodRequest taking the context nodeid (objectid), the nodeid of the method to be called (methodid), as well as theinputarg` that the method is called with.

inputarg can be any type that is compatible within Open62541.jl, particularly builtin number types, strings, as well as UA_XXX types. Input arguments can also be arrays (for example a Vector{Float64}). Multiple arguments should be provided as a tuple.

JUA_CallMethodRequest(methodrequestptr::Ptr{UA_CallMethodRequest})

creates a JUA_CallMethodRequest based on the pointer methodrequestptr. This is a fallback method that can be used to pass UA_CallMethodRequests generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., methodrequestptr needs to be manually cleaned up with UA_CallMethodRequest_delete(methodrequestptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_CallMethodRequest()
j = JUA_CallMethodRequest(JUA_NodeId(0, UA_NS0ID_OBJECTSFOLDER), JUA_NodeId(1, 1234), ["Peter", "Julia"]) #one vector of strings inputarg
j = JUA_CallMethodRequest(JUA_NodeId(0, UA_NS0ID_OBJECTSFOLDER), JUA_NodeId(1, 1234), ("Claudia", 1234)]) #two input args

See also:

source
Open62541.JUA_DataTypeAttributesType
JUA_DataTypeAttributes

A mutable struct that defines a JUA_DataTypeAttributes object - the equivalent of a UA_DataTypeAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_DataTypeAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_DataTypeAttributes_generate.

JUA_DataTypeAttributes(ptr::Ptr{UA_DataTypeAttributes})

creates a JUA_DataTypeAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_VariableAttributess generated via the low level interface to the higher level functions. See also UA_VariableAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_DataTypeAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_ExpandedNodeIdType
JUA_NodeId

creates a JUA_ExpandedNodeId object - the equivalent of a UA_ExpandedNodeId, but with memory managed by Julia rather than C.

See also: OPC Foundation Website

The following methods are defined:

JUA_ExpandedNodeId()

creates a JUA_ExpandedNodeId with all fields equal to null.

JUA_ExpandedNodeId(s::Union{AbstractString, JUA_String, Ptr{UA_String}})

creates a JUA_ExpandedNodeId based on String s that is parsed into the relevant properties.

JUA_ExpandedNodeId(nsIndex::Integer, identifier::Integer)

creates a JUA_ExpandedNodeId with namespace index nsIndex, numeric NodeId identifier identifier, serverIndex = 0 and empty nameSpaceUri.

JUA_ExpandedNodeId(nsIndex::Integer, identifier::Union{AbstractString, JUA_String, Ptr{UA_String}})

creates a JUA_ExpandedNodeId with namespace index nsIndex, string NodeId identifier identifier, serverIndex = 0 and empty nameSpaceUri.

JUA_ExpandedNodeId(nodeId::Union{Ptr{UA_NodeId}, JUA_NodeId})

creates a JUA_ExpandedNodeId with empty namespaceUri, serverIndex = 0 and the content of nodeId in the nodeId field.

JUA_ExpandedNodeId(identifier::Integer, ns_uri::AbstractString, server_ind::Integer) 

creates a JUA_ExpandedNodeId with namespace index nsIndex and global unique id identifier identifier for the Nodeid, as well as serverIndex = 0 and empty namespaceUri.

JUA_ExpandedNodeId(identifier::Union{Ptr{UA_String}, AbstractString, JUA_String}, ns_uri::AbstractString, server_ind::Integer) 

creates a JUA_ExpandedNodeId with a string identifier for the nodeid, namespacUri ns_uri and server index server_ind.

JUA_ExpandedNodeId(guid::Union{Ptr{UA_Guid}, JUA_Guid}, ns_uri::AbstractString, server_ind::Integer) 

creates a JUA_ExpandedNodeId with its nodeid having the global unique identifier guid, namespaceUri ns_uri and server index server_ind.

JUA_ExpandedNodeId(nodeid::Union{Ptr{UA_NodeId}, JUA_NodeId}, ns_uri::AbstractString, server_ind::Integer)

creates a JUA_ExpandedNodeId from the JUANodeId nodeid, namespaceUri `nsuriand server indexserver_ind`.

JUA_ExpandedNodeId(nptr::Ptr{UA_ExpandedNodeId})

creates a JUA_ExpandedNodeId based on the pointer nptr. This is a fallback method that can be used to pass UA_NodeIds generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., nptr needs to be manually cleaned up with UA_ExpandedNodeId_delete(nptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_ExpandedNodeId()
j = JUA_ExpandedNodeId("ns=1;i=1234")
j = JUA_ExpandedNodeId("ns=1;s=example")
j = JUA_ExpandedNodeId(1, 1234)
j = JUA_ExpandedNodeId(1, "example")
j = JUA_ExpandedNodeId(1, JUA_Guid("C496578A-0DFE-4B8F-870A-745238C6AEAE"))
source
Open62541.JUA_GuidType
JUA_Guid

a mutable struct that defines a globally unique identifier. It is the equivalent of a UA_Guid, but with memory managed by Julia rather than C.

The following constructor methods are defined:

JUA_Guid()

creates an empty JUA_Guid, equivalent to calling UA_Guid_new().

JUA_Guid(guidstring::AbstractString)

creates a JUA_Guid by parsing the string guidstring. The string should be formatted according to the OPC standard defined in Part 6, 5.1.3.

JUA_Guid(ptr::Ptr{UA_Guid})

creates a JUA_Guid based on the pointer ptr. This is a fallback method that can be used to pass UA_Guids generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_Guid_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_LocalizedTextType
JUA_LocalizedText

A mutable struct that defines a localized text comprised of a locale specifier and a text portion. It is the equivalent of a UA_QualifiedName, but with memory managed by Julia rather than C.

The following constructor methods are defined:

JUA_LocalizedText()

creates an empty JUA_LocalizedText, equivalent to calling UA_LocalizedText_new().

JUA_LocalizedText(locale::Union{AbstractString, JUA_String, Ptr{UA_String}}, text::Union{AbstractString, JUA_String, Ptr{UA_String}})

creates a JUA_LocalizedText with localization locale and text text.

JUA_LocalizedText(ptr::Ptr{UA_LocalizedText})

creates a JUA_LocalizedText based on the pointer ptr. This is a fallback method that can be used to pass UA_LocalizedTexts generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_LocalizedText_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_MethodAttributesType
JUA_MethodAttributes

A mutable struct that defines a JUA_MethodAttributes object - the equivalent of a UA_MethodAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_MethodAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_MethodAttributes_generate.

JUA_MethodAttributes(ptr::Ptr{UA_MethodAttributes})

creates a JUA_MethodAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_MethodAttributess generated via the low level interface to the higher level functions. See also UA_MethodAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_MethodAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_NodeIdType
JUA_NodeId

creates a JUA_NodeId object - the equivalent of a UA_NodeId, but with memory managed by Julia rather than C.

The following methods are defined:

JUA_NodeId()

creates a JUA_NodeId with namespaceIndex = 0, numeric identifierType and identifier = 0

JUA_NodeId(s::AbstractString)

creates a JUA_NodeId based on String s that is parsed into the relevant properties.

JUA_NodeId(nsIndex::Integer, identifier::Integer)

creates a JUA_NodeId with namespace index nsIndex and numerical identifier identifier.

JUA_NodeId(nsIndex::Integer, identifier::AbstractString)

creates a JUA_NodeId with namespace index nsIndex and string identifier identifier.

JUA_NodeId(nsIndex::Integer, identifier::JUA_Guid)

creates a JUA_NodeId with namespace index nsIndex and global unique id identifier identifier.

JUA_NodeId(nptr::Ptr{UA_NodeId})

creates a JUA_NodeId based on the pointer nptr. This is a fallback method that can be used to pass UA_NodeIds generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., nptr needs to be manually cleaned up with UA_NodeId_delete(nptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_NodeId()
j = JUA_NodeId("ns=1;i=1234")
j = JUA_NodeId("ns=1;s=example")
j = JUA_NodeId(1, 1234)
j = JUA_NodeId(1, "example")
j = JUA_NodeId(1, JUA_Guid("C496578A-0DFE-4B8F-870A-745238C6AEAE"))
source
Open62541.JUA_ObjectAttributesType
JUA_ObjectAttributes

A mutable struct that defines a JUA_ObjectAttributes object - the equivalent of a UA_ObjectAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_ObjectAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_ObjectAttributes_generate.

JUA_ObjectAttributes(ptr::Ptr{UA_ObjectAttributes})

creates a JUA_ObjectAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_ObjectAttributess generated via the low level interface to the higher level functions. See also UA_ObjectAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_ObjectAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_ObjectTypeAttributesType
JUA_ObjectTypeAttributes

A mutable struct that defines a JUA_ObjectTypeAttributes object - the equivalent of a UA_ObjectTypeAttributes, but with memory managed by Julia rather than C (see below for exceptions).

The following constructor methods are defined:

JUA_ObjectTypeAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_ObjectTypeAttributes_generate.

JUA_ObjectTypeAttributes(ptr::Ptr{UA_ObjectTypeAttributes})

creates a JUA_ObjectTypeAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_ObjectTypeAttributess generated via the low level interface to the higher level functions. See also UA_ObjectTypeAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_ObjectTypeAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_QualifiedNameType
JUA_QualifiedName

A mutable struct that defines a qualified name comprised of a namespace index and a text portion (a name). It is the equivalent of a UA_QualifiedName, but with memory managed by Julia rather than C.

The following constructor methods are defined:

JUA_QualifiedName()

creates an empty JUA_QualifiedName, equivalent to calling UA_QualifiedName_new().

JUA_QualifiedName(nsIndex::Integer, identifier::AbstractString)

creates a JUA_QualifiedName with namespace index nsIndex and text identifier identifier.

JUA_QualifiedName(ptr::Ptr{UA_QualifiedName})

creates a JUA_QualifiedName based on the pointer ptr. This is a fallback method that can be used to pass UA_QualifiedNames generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_QualifiedName_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_ReferenceTypeAttributesType
JUA_ReferenceTypeAttributes

A mutable struct that defines a JUA_ReferenceTypeAttributes object - the equivalent of a UA_ReferenceTypeAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_ReferenceTypeAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_ReferenceTypeAttributes_generate.

JUA_ReferenceTypeAttributes(ptr::Ptr{UA_ReferenceTypeAttributes})

creates a JUA_ReferenceTypeAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_ReferenceTypeAttributess generated via the low level interface to the higher level functions. See also UA_ReferenceTypeAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_ReferenceTypeAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_StringType
JUA_String

a mutable struct that defines a string type usable with open62541. It is the equivalent of a UA_String, but with memory managed by Julia rather than C.

The following constructor methods are defined:

JUA_String()

creates an empty JUA_String, equivalent to calling UA_String_new().

JUA_String(s::AbstractString)

creates a JUA_String containing the string s.

JUA_String(ptr::Ptr{UA_String})

creates a JUA_String based on the pointer ptr. This is a fallback method that can be used to pass UA_Guids generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_String_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_UsernamePasswordLoginType
JUA_UsernamePasswordLogin 

creates a JUA_UsernamePasswordLogin object - the equivalent of a UA_UsernamePasswordLogin object, but with memory managed by Julia rather than C.

The following methods are defined:

JUA_UsernamePasswordLogin(username::AbstractString, password::AbstractString)

Example:

j = JUA_UsernamePasswordLogin("PeterParker", "IamSpiderman")
source
Open62541.JUA_VariableAttributesType
JUA_VariableAttributes

A mutable struct that defines a JUA_VariableAttributes object - the equivalent of a UA_VariableAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_VariableAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_VariableAttributes_generate.

JUA_VariableAttributes(ptr:Ptr{UA_VariableAttributes})

creates a JUA_VariableAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_VariableAttributess generated via the low level interface to the higher level functions. See also UA_VariableAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_VariableAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_VariableTypeAttributesType
JUA_VariableTypeAttributes

A mutable struct that defines a JUA_VariableTypeAttributes object - the equivalent of a UA_VariableTypeAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_VariableTypeAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_VariableTypeAttributes_generate.

JUA_VariableTypeAttributes(ptr::Ptr{UA_VariableTypeAttributes})

creates a JUA_VariableTypeAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_VariableAttributess generated via the low level interface to the higher level functions. See also UA_VariableAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_VariableTypeAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_VariantType
JUA_Variant

A mutable struct that defines a JUA_Variant object - the equivalent of a UA_Variant, but with memory managed by Julia rather than C (exceptions below). JUA_Variants can hold any datatype either as a scalar or in array form.

The following constructor methods are defined:

JUA_Variant()

creates an empty JUA_Variant, equivalent to calling UA_Variant_new().

JUA_Variant(value::Union{T, AbstractArray{T}}) where T <: Union{UA_NUMBER_TYPES, AbstractString, ComplexF32, ComplexF64, Rational{<:Integer}})

creates a JUA_Variant containing value. All properties of the variant are set automatically. For example, if value is an array, then the arrayDimensions and arrayDimensionsSize properties are set based on the number of dimensions and number of elements across each dimension contained in value.

JUA_Variant(variantptr::Ptr{UA_Variant})

creates a JUA_Variant based on the pointer variantptr. This is a fallback method that can be used to pass UA_Variants generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., variantptr needs to be manually cleaned up with UA_Variant_delete(variantptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_Variant()
j = JUA_Variant("I am a string value")
j = JUA_Variant(["String1", "String2"])
j = JUA_Variant(rand(Float32, 2, 3, 4))
j = JUA_Variant(rand(Int32, 2, 2))
j = JUA_Variant(rand(ComplexF64, 8))
source
Open62541.JUA_ViewAttributesType
JUA_ViewAttributes

A mutable struct that defines a JUA_ViewAttributes object - the equivalent of a UA_ViewAttributes, but with memory managed by Julia rather than C (see below for exceptions)

The following constructor methods are defined:

JUA_ViewAttributes(; kwargs...)

For valid keyword arguments kwargs see UA_ViewAttributes_generate.

JUA_ViewAttributes(ptr::Ptr{UA_ViewAttributes})

creates a JUA_ViewAttributes based on the pointer ptr. This is a fallback method that can be used to pass UA_VariableAttributess generated via the low level interface to the higher level functions. See also UA_VariableAttributes_generate.

Note that memory management remains on the C side when using this method, i.e., ptr needs to be manually cleaned up with UA_ViewAttributes_delete(ptr) after the object is not needed anymore. It is up to the user to ensure this.

source
Open62541.JUA_Client_addNodeFunction
JUA_Client_addNode(client::JUA_Client, requestedNewNodeId::JUA_NodeId,
        parentNodeId::JUA_NodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName, 
        attributes::Union{JUA_VariableAttributes, JUA_ObjectAttributes},
        outNewNodeId::JUA_NodeId, typeDefinition::JUA_NodeId)::UA_StatusCode

uses the client API to add a Variable or Object node to the server to which the client is connected to.

See JUA_VariableAttributes, JUA_VariableTypeAttributes, and JUA_ObjectAttributes on how to define valid attributes.

JUA_Client_addNode(client::JUA_Client, requestedNewNodeId::JUA_NodeId,
        parentNodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName,
        attributes::Union{JUA_VariableTypeAttributes, JUA_ObjectTypeAttributes, 
        JUA_ReferenceTypeAttributes, JUA_DataTypeAttributes, JUA_ViewAttributes},
        outNewNodeId::JUA_NodeId)::UA_StatusCode

uses the client API to add a ObjectType, ReferenceType, DataType or View node to the server to which the client is connected to.

See `JUA_VariableTypeAttributes, JUA_ObjectTypeAttributes, JUA_ReferenceTypeAttributes, JUA_DataTypeAttributes, and JUA_ViewAttributes on how to define valid attributes.

source
Open62541.JUA_Client_addNode_asyncFunction
JUA_Client_addNode_async(client::JUA_Client, requestedNewNodeId::JUA_NodeId,
        parentNodeId::JUA_NodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName, 
        attributes::Union{JUA_VariableAttributes, JUA_ObjectAttributes},
        outNewNodeId::JUA_NodeId, callback::UA_ClientAsyncAddNodesCallback, 
        userdata::Ptr{Cvoid}, requestId::UInt32, typeDefinition::JUA_NodeId)::UA_StatusCode

uses the asynchronous client API to add a Variable or Object node to the server to which the client is connected to.

See JUA_VariableAttributes or JUA_ObjectAttributes on how to define valid attributes.

JUA_Client_addNode_async(client::JUA_Client, requestedNewNodeId::JUA_NodeId,
        parentNodeId::JUA_NodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName, 
        attributes::Union{JUA_VariableTypeAttributes, JUA_ObjectTypeAttributes, 
        JUA_ViewAttributes, JUA_ReferenceTypeAttributes, JUA_DataTypeAttributes},
        outNewNodeId::JUA_NodeId, callback::UA_ClientAsyncAddNodesCallback, 
        userdata::Ptr{Cvoid}, requestId::UInt32, typeDefinition::JUA_NodeId)::UA_StatusCode

uses the asynchronous client API to add a VariableType, ObjectType, ReferenceType, DataType or View node to the server to which the client is connected to.

See JUA_VariableTypeAttributes, JUA_ObjectTypeAttributes, JUA_ReferenceTypeAttributes, JUA_DataTypeAttributes, and JUA_ViewAttributes on how to define valid attributes.

source
Open62541.JUA_Client_callMethod
output::Union{Any, Tuple{Any, ...}} = JUA_Client_call(client::JUA_Client, 
    parentnodeid::JUA_NodeId, methodid::JUA_NodeId, inputs::Union{Any, Tuple{Any, ...}})

uses the client API to call a method node (methodid) on the server the client is connected with. inputs can either be a single argument or a tuple of arguments. Depending on the method called an apporpriate output or tuple of output arguments is returned.

source
Open62541.JUA_Client_connectMethod
JUA_Client_connect(client::JUA_Client, endpointurl::AbstractString)::UA_StatusCode

connect the client to the server with endpointurl. This is an anonymous connection, i.e., no username or password are used (some servers do not allow this).

source
Open62541.JUA_Client_connectUsernameMethod
JUA_Client_connectUsername(client::JUA_Client, endpointurl::AbstractString, 
    username::AbstractString, password::AbstractString)::UA_StatusCode

connects the client to the server with endpoint URL endpointurl and supplies username and password as login credentials.

source
Open62541.JUA_Client_readValueAttributeMethod
value = JUA_Client_readValueAttribute(client::JUA_Client, nodeId::JUA_NodeId, type = Any)

uses the client API to read the value of nodeId from the server that the client is connected to.

The output value is automatically converted to a Julia type (such as Float64, String, Vector{String}, etc.) if possible. Otherwise, open62541 composite types are returned.

Note: Since it is unknown what type of value is stored within nodeId before reading it, this function is inherently type unstable.

Type stability is improved if the optional argument type is provided, for example, if you know that you have stored a Matrix{Float64} in nodeId, then you should specify this. If the wrong type is specified, the function will throw a TypeError.

source
Open62541.JUA_Client_writeValueAttributeMethod
JUA_Client_writeValueAttribute(server::JUA_Client, nodeId::JUA_NodeId, newvalue)::UA_StatusCode

uses the client API to write the value newvalue to nodeId to the server that the client is connected to.

new_value must either be a JUA_Variant or a Julia value/array compatible with any of its constructors.

See also JUA_Variant

source
Open62541.JUA_NodeId_equalMethod
JUA_NodeId_equal(j1::JUA_NodeId, n2::JUA_NodeId)::Bool

returns true if j1 and j2 are JUA_NodeIds with identical content.

source
Open62541.JUA_ServerConfig_setMinimalFunction
JUA_ServerConfig_setMinimal(config, portNumber[, certificate])

creates a new server config with one endpoint. The config will set the tcp network layer to the given port and adds a single endpoint with the security policy $SecurityPolicy#None$ to the server. A server certificate may be supplied but is optional.

source
Open62541.JUA_Server_addNodeMethod
JUA_Server_addNode(server::JUA_Server, requestedNewNodeId::JUA_NodeId,
        parentNodeId::JUA_NodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName, 
        attributes::Union{JUA_VariableAttributes, JUA_VariableTypeAttributes, JUA_ObjectAttributes},
        outNewNodeId::JUA_NodeId, nodeContext::JUA_NodeId, typeDefinition::JUA_NodeId)::UA_StatusCode

uses the server API to add a Variable, VariableType, or Object node to the server.

See JUA_VariableAttributes, JUA_VariableTypeAttributes, and JUA_ObjectAttributes on how to define valid attributes.

JUA_Server_addNode(server::JUA_Server, requestedNewNodeId::JUA_NodeId,
        parentNodeId::JUA_NodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName,
        attributes::Union{JUA_ObjectTypeAttributes, JUA_ReferenceTypeAttributes, JUA_DataTypeAttributes, JUA_ViewAttributes},
        outNewNodeId::JUA_NodeId, nodeContext::JUA_NodeId)::UA_StatusCode

uses the server API to add a ObjectType, ReferenceType, DataType, or View node to the server.

See JUA_ObjectTypeAttributes, JUA_ReferenceTypeAttributes, JUA_DataTypeAttributes, and JUA_ViewAttributes on how to define valid attributes.

JUA_Server_addNode(server::JUA_Server, requestedNewNodeId::JUA_NodeId,
        parentNodeId::JUA_NodeId, referenceTypeId::JUA_NodeId, browseName::JUA_QualifiedName,
        attributes::JUA_MethodAttributes, method::Union{Function, Ptr{Cvoid}, Base.CFunction},
        inputArguments::Union{AbstractArray{JUA_Argument}, JUA_Argument}, 
        outputArguments::Union{AbstractArray{JUA_Argument}, JUA_Argument}, 
        outNewNodeId::JUA_NodeId, nodeContext::JUA_NodeId)::UA_StatusCode

uses the server API to add a Method node to the server.

The method supplied can either be a Julia function that fulfills the requirements for UA_MethodCallback_wrap or UA_MethodCallback_generate.

See also:

source
Open62541.JUA_Server_callMethod
result::Union{Any, Tuple{Any, ...}} = JUA_Server_call(server::JUA_Server, request::JUA_CallMethodRequest)

uses the server API to process the method call request request on the server. result is the outputs generated by the method called. This is typically a number or a string (or an Array thereof). If the method produces multiple outputs, they are returned as a tuple.

result::Union{Any, Tuple{Any, ...}} = JUA_Server_call(server::JUA_Server, objectid::JUA_NodeId, 
    methodid::JUA_NodeId, inputarg)

An even higher level method that creates the JUA_CallMethodRequest internally. Equivalent to JUA_Client_call on the client side.

See also:

source
Open62541.JUA_Server_readValueMethod
value = JUA_Server_readValue(server::JUA_Server, nodeId::JUA_NodeId, type = Any)

uses the server API to read the value of nodeId from server. Output is automatically converted to a Julia type (such as Float64, String, Vector{String}, etc.) if possible. Otherwise, open62541 composite types are returned.

Note: Since it is unknown what type of value is stored within nodeId before reading it, this function is inherently type unstable.

Type stability is improved if the optional argument type is provided, for example, if you know that you have stored a Matrix{Float64} in nodeId, then you should specify this. If the wrong type is specified, the function will throw a TypeError.

source
Open62541.JUA_Server_writeValueMethod
JUA_Server_writeValue(server::JUA_Server, nodeId::JUA_NodeId, newvalue)::UA_StatusCode

uses the server API to write the value newvalue to nodeId on server. new_value must either be a JUA_Variant or a Julia value/array compatible with any of its constructors.

See also JUA_Variant

source