Attribute generation
This page lists docstrings of functions used for the convenient generation of node attribute structures. Their main use is when adding nodes to a server through client API (see JUA_Client_addNode
) or the server API (see JUA_Server_addNode
).
Convenience functions that allow generating values for specific attributes:
Open62541.UA_VALUERANK
— FunctionUA_VALUERANK(N::Integer)::Integer
returns the valuerank based on the dimensionality of an array N
. For special cases see here: Unified Automation website
Open62541.UA_ACCESSLEVEL
— FunctionUA_ACCESSLEVEL(; read = false, write = false, historyread = false,
historywrite = false, semanticchange = false, statuswrite = false,
timestampwrite = false)::UInt8
calculates a UInt8
number expressing how the value of a variable can be accessed. Default is to disallow all operations. The meaning of the keywords is explained here: OPC Foundation website
Open62541.UA_USERACCESSLEVEL
— FunctionUA_USERACCESSLEVEL(; read = false, write = false, historyread = false,
historywrite = false, semanticchange = false, statuswrite = false,
timestampwrite = false)::UInt8
calculates a UInt8
number expressing how the value of a variable can be accessed. Default is to disallow all operations. The meaning of the keywords is explained here: OPC Foundation website
Open62541.UA_WRITEMASK
— FunctionUA_WRITEMASK(; accesslevel = false, arraydimensions = false,
browsename = false, containsnoloops = false, datatype = false,
description = false, displayname = false, eventnotifier = false,
executable = false, historizing = false, inversename = false,
isabstract = false, minimumsamplinginterval = false, nodeclass = false,
nodeid = false, symmetric = false, useraccesslevel = false,
userexecutable = false, userwritemask = false, valuerank = false,
writemask = false, valueforvariabletype = false)::UInt32
calculates a UInt32
number expressing which attributes of a node are writeable. The meaning of the keywords is explained here: OPC Foundation website
If the specific node type does not support an attribute, the corresponding keyword must be set to false. This is currently not enforced automatically.
Open62541.UA_USERWRITEMASK
— FunctionUA_USERWRITEMASK(; accesslevel = false, arraydimensions = false,
browsename = false, containsnoloops = false, datatype = false,
description = false, displayname = false, eventnotifier = false,
executable = false, historizing = false, inversename = false,
isabstract = false, minimumsamplinginterval = false, nodeclass = false,
nodeid = false, symmetric = false, useraccesslevel = false,
userexecutable = false, userwritemask = false, valuerank = false,
writemask = false, valueforvariabletype = false)::UInt32
calculates a UInt32
number expressing which attributes of a node are writeable. The meaning of the keywords is explained here: OPC Foundation website
If the specific node type does not support an attribute, the corresponding keyword must be set to false. This is currently not enforced automatically.
Open62541.UA_EVENTNOTIFIER
— FunctionUA_EVENTNOTIFIER(; subscribetoevent = false, historyread = false,
historywrite = false)::UInt8
calculates a UInt8
number expressing whether a node can be used to subscribe to events and/or read/write historic events.
Meaning of keywords is explained here: OPC Foundation website
High level generators for attribute blocks:
Open62541.JUA_DataTypeAttributes
— TypeJUA_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_VariableAttributes
s 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.
Open62541.JUA_MethodAttributes
— TypeJUA_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_MethodAttributes
s 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.
Open62541.JUA_ObjectAttributes
— TypeJUA_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_ObjectAttributes
s 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.
Open62541.JUA_ObjectTypeAttributes
— TypeJUA_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_ObjectTypeAttributes
s 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.
Open62541.JUA_ReferenceTypeAttributes
— TypeJUA_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_ReferenceTypeAttributes
s 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.
Open62541.JUA_VariableAttributes
— TypeJUA_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_VariableAttributes
s 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.
Open62541.JUA_VariableTypeAttributes
— TypeJUA_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_VariableAttributes
s 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.
Open62541.JUA_ViewAttributes
— TypeJUA_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_VariableAttributes
s 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.
Lower level generators for attribute blocks:
Open62541.UA_DataTypeAttributes_generate
— FunctionUA_DataTypeAttributes_generate(; displayname::AbstractString,
description::AbstractString, localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
isabstract::Union{Nothing, Bool} = nothing)::Ptr{UA_DataTypeAttributes}
generates a UA_DataTypeAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_DataTypeAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_DataTypeAttributes_default[]
See also UA_WRITEMASK
and UA_USERWRITEMASK
for information on how to generate the respective keyword inputs.
Open62541.UA_MethodAttributes_generate
— FunctionUA_MethodAttributes_generate(; displayname::AbstractString,
description::AbstractString, localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
executable::Union{Nothing, Bool} = nothing,
userexecutable::Union{Nothing, Bool} = nothing)::Ptr{UA_MethodAttributes}
generates a UA_MethodAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_MethodAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_MethodAttributes_default[]
See also UA_WRITEMASK
and UA_USERWRITEMASK
for information on how to generate the respective keyword inputs.
Open62541.UA_ObjectAttributes_generate
— FunctionUA_ObjectAttributes_generate(; displayname::AbstractString,
description::AbstractString, localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
eventnotifier::Union{Nothing, UInt8} = nothing)::Ptr{UA_ObjectAttributes}
generates a UA_ObjectAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_ObjectAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_ObjectAttributes_default[]
See also UA_WRITEMASK
, UA_USERWRITEMASK
, UA_EVENTNOTIFIER
for information on how to generate the respective keyword inputs.
Open62541.UA_ObjectTypeAttributes_generate
— FunctionUA_ObjectTypeAttributes_generate(; displayname::AbstractString,
description::AbstractString, localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
isabstract::Union{Nothing, Bool} = nothing)::Ptr{UA_ObjectTypeAttributes}
generates a UA_ObjectTypeAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_ObjectTypeAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_ObjectTypeAttributes_default[]
See also UA_WRITEMASK
and UA_USERWRITEMASK
for information on how to generate the respective keyword inputs.
Open62541.UA_ReferenceTypeAttributes_generate
— FunctionUA_ReferenceTypeAttributes_generate(; displayname::AbstractString,
description::AbstractString, localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
isabstract::Union{Nothing, Bool} = nothing
symmetric::Union{Nothing, Bool} = nothing,
inversename::Union{Nothing, AbstractString} = nothing)::Ptr{UA_ReferenceTypeAttributes}
generates a UA_ReferenceTypeAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_ReferenceTypeAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_ReferenceTypeAttributes_default[]
See also UA_WRITEMASK
and UA_USERWRITEMASK
for information on how to generate the respective keyword inputs.
Open62541.UA_VariableAttributes_generate
— FunctionUA_VariableAttributes_generate(; value::Union{AbstractArray{T}, T},
displayname::AbstractString, description::AbstractString,
localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
accesslevel::Union{Nothing, UInt8} = nothing,
useraccesslevel::Union{Nothing, UInt8} = nothing,
minimumsamplinginterval::Union{Nothing, Float64} = nothing,
historizing::Union{Nothing, Bool} = nothing,
valuerank::Union{Integer, Nothing} = nothing)::Ptr{UA_VariableAttributes} where {T <: Union{UA_NUMBER_TYPES, Complex{Float32}, Complex{Float64}, Rational{Int32}, Rational{UInt32}, AbstractString}}
generates a UA_VariableAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_VariableAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_VariableAttributes_default[]
. If nothing is given for keyword valuerank
, then it is either set to UA_VALUERANK_SCALAR
(if value
is a scalar), or to the dimensionality of the supplied array (i.e., N
for an AbstractArray{T,N}).
See also UA_WRITEMASK
, UA_USERWRITEMASK
, UA_ACCESSLEVEL
, and UA_USERACCESSLEVEL
for information on how to generate the respective keyword inputs.
Open62541.UA_VariableTypeAttributes_generate
— FunctionUA_VariableTypeAttributes_generate(; value::Union{Nothing, AbstractArray{T}, T} = nothing,
displayname::AbstractString, description::AbstractString,
localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
valuerank::Union{Nothing, Integer} = nothing,
isabstract::Union{Nothing, Bool})::Ptr{UA_VariableTypeAttributes} where {T <: Union{Nothing, UA_NUMBER_TYPES, Complex{Float32}, Complex{Float64}, Rational{Int32}, Rational{UInt32}, AbstractString}}
generates a UA_VariableTypeAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_VariableTypeAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_VariableTypeAttributes_default[]
. If a default value
is specified for the variabletype and nothing is given for keyword valuerank
, then it is either set to UA_VALUERANK_SCALAR
(if value
is a scalar), or to the dimensionality of the supplied array (i.e., N
for an AbstractArray{T,N}).
See also UA_WRITEMASK
, UA_USERWRITEMASK
for information on how to generate the respective keyword inputs.
Open62541.UA_ViewAttributes_generate
— FunctionUA_ViewAttributes_generate(; displayname::AbstractString,
description::AbstractString, localization::AbstractString = "en-US",
writemask::Union{Nothing, UInt32} = nothing,
userwritemask::Union{Nothing, UInt32} = nothing,
containsnoloops::Union{Nothing, Bool} = nothing,
eventnotifier::Union{Nothing, UInt8} = nothing)::Ptr{UA_ViewAttributes}
generates a UA_ViewAttributes
object. Memory for the object is allocated by C and needs to be cleaned up by calling UA_ViewAttributes_delete(x)
after usage.
For keywords given as nothing
, the respective default value is used, see UA_ViewAttributes_default[]
See also UA_WRITEMASK
, UA_USERWRITEMASK
and UA_EVENTNOTIFIER
for information on how to generate the respective keyword inputs.