Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve addmethodnode #36

Merged
merged 50 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e7ff7b9
started adding high level JUA_Argument types
thomvet Nov 8, 2024
a51230c
bugfixes in consistency checking + docstring
thomvet Nov 8, 2024
46c81a8
add high level types for server side method calling
thomvet Nov 13, 2024
6a7d768
rename files; introduce client call method testfile
thomvet Nov 13, 2024
ff64960
started working on highlevel JUA_Client_call method; needs clean up etc.
thomvet Nov 13, 2024
7874e13
shut down worker processes
thomvet Nov 13, 2024
5b91b71
introduce test cases for client call with 1 and 2 in/output args.
thomvet Nov 15, 2024
223a05f
slight cleanup
thomvet Nov 17, 2024
4def625
start documentation for client_call and fix subscription tests
thomvet Nov 20, 2024
7a8fe7e
Merge branch 'main' of https://github.com/martinkosch/open62541.jl in…
thomvet Nov 20, 2024
ca12727
bugfix; tests passing
thomvet Nov 20, 2024
bc13b7e
bugfix mac os tests
thomvet Nov 20, 2024
88bbb0a
another try
thomvet Nov 20, 2024
2cf30f2
test
thomvet Nov 20, 2024
aaf0a58
..
thomvet Nov 20, 2024
19d32bc
pass mac os x tests now?
thomvet Nov 20, 2024
c55b38d
another restructure
thomvet Nov 20, 2024
86a5d7a
Jpointer corrected
thomvet Nov 20, 2024
dcb89ac
try100
thomvet Nov 20, 2024
70fe21a
...
thomvet Nov 20, 2024
4029a81
....
thomvet Nov 20, 2024
787720c
another try
thomvet Nov 20, 2024
7a9a033
a
thomvet Nov 20, 2024
319c613
maybe fix?
thomvet Nov 20, 2024
d633c01
more debug info
thomvet Nov 20, 2024
5bcdf58
make cb simpler
thomvet Nov 20, 2024
0de20aa
started adding high level JUA_Argument types
thomvet Nov 8, 2024
47c6229
bugfixes in consistency checking + docstring
thomvet Nov 8, 2024
4787ec4
add high level types for server side method calling
thomvet Nov 13, 2024
c998ffa
rename files; introduce client call method testfile
thomvet Nov 13, 2024
6e7a125
started working on highlevel JUA_Client_call method; needs clean up etc.
thomvet Nov 13, 2024
255750e
shut down worker processes
thomvet Nov 13, 2024
9ab5ecb
introduce test cases for client call with 1 and 2 in/output args.
thomvet Nov 15, 2024
7f5a9f4
slight cleanup
thomvet Nov 17, 2024
ad1600f
start documentation for client_call and fix subscription tests
thomvet Nov 20, 2024
a9ec4fd
bugfixes and simplifications; tests passing
thomvet Nov 20, 2024
24a4259
Merge branch 'improve-addmethodnode' of https://github.com/martinkosc…
thomvet Nov 20, 2024
0e6e741
docstring for JUA_CallMethodRequest
thomvet Nov 21, 2024
d6aa334
add JUA_Server_call and tests
thomvet Nov 21, 2024
a7c651b
format
thomvet Nov 25, 2024
6c6ea5f
better exception for array size and value rank.
thomvet Nov 25, 2024
d417268
bugfixing exceptions
thomvet Nov 26, 2024
53f185f
add tutorial explaining how to add and use method nodes
thomvet Nov 26, 2024
c429357
remove unnecessary copy
thomvet Nov 27, 2024
5eb4c71
more convenient specification of argument arrays, avoids UA_Array etc.
thomvet Dec 2, 2024
b88eb89
better docstring + some handling
thomvet Dec 2, 2024
ae0ea13
bugfix
thomvet Dec 3, 2024
a0da404
complete sentence in index.md
thomvet Dec 4, 2024
93ad299
add some docstrings and test for memory leaks
thomvet Dec 4, 2024
e7e97d9
bump version
thomvet Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Open62541"
uuid = "e9b70463-8ccb-4e30-a2e2-0d1ec8db6536"
authors = ["Martin Kosch <[email protected]> and contributors"]
version = "0.2.1"
version = "0.3.0"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ accidental breakage and evolutions of the API have to be expected.
Documentation is also a work in progress.

## How to contribute

There is many ways one can contribute to the development of Open62541.jl (in order of increasing complexity):
- Reporting bugs, issues and suggestions on the Github repository.
- Improving the clarity of the existing documentation.
- Adding new tutorials for more advanced functionality.
- Adding/Improving docstrings, especially in the main file of the library src/Open62541.jl. It would be best if these are added automatically in the right spot during the code generation using Clang.jl (see gen/generator.jl). But improvements are welcome also if they are directly done in the src/Open62541.jl (existing contributors can help keeping things aligned).
- Adding improvements to the high-level interface. It would be best to discuss ideas on this topic via the Github repository before embarking on larger changes.

- Reporting bugs, issues and suggestions on the Github repository.
- Improving the clarity of the existing documentation.
- Adding new tutorials for more advanced functionality.
- Adding/Improving docstrings, especially in the main file of the library src/Open62541.jl. It would be best if these are added automatically in the right spot during the code generation using Clang.jl (see gen/generator.jl). But improvements are welcome also if they are directly done in the src/Open62541.jl (existing contributors can help keeping things aligned).
- Adding improvements to the high-level interface. It would be best to discuss ideas on this topic via the Github repository before embarking on larger changes.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Open62541 = "e9b70463-8ccb-4e30-a2e2-0d1ec8db6536"

[compat]
Documenter = "1"
Open62541 = "0.1, 0.2"
Open62541 = "0.1, 0.2, 0.3"
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ makedocs(;
"tutorials/combined_variables.md",
"tutorials/combined_username_password_login.md",
"tutorials/combined_encrypted_un_pw_login.md",
"tutorials/combined_methodnode.md",
"tutorials/further_resources.md"
],
"Manual" => [
Expand All @@ -33,7 +34,7 @@ makedocs(;
"manual/client.md"
],
"Reference" => ["Low level interface" => "reference_lowlevel.md",
"High level interface" => "reference_highlevel.md"]
"High level interface" => "reference_highlevel.md"]
],
warnonly = Documenter.except(
:autodocs_block,
Expand Down
46 changes: 26 additions & 20 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Open62541.jl
Welcome to the documentation of Open62541.jl.

Welcome to the documentation of Open62541.jl.

Open62541.jl is a [Julia](https://julialang.org) package that interfaces with the [open62541](https://www.open62541.org/)
library written in C ([source](https://github.com/open62541/open62541)).
Expand All @@ -20,13 +21,13 @@ At its current development stage the high level interface is implemented for a
level interface that wraps all functionality of open62541 is, however, available.

!!! warning

Note that Open62541.jl is still under active development and has not reached a maturity
that would make it safe to use in a production environment.

The developers aim to observe [semantic versioning](https://semver.org/), but
accidental breakage and evolutions of the API have to be expected.


## Installation

Open62541.jl is registered in Julia's General registry.
Expand All @@ -40,29 +41,34 @@ Pkg.add("Open62541")
```

## Structure of the documentation
The documentation has the following structure:

- Tutorials: Provides a few brief instructions that showcase basic functionality.
- Manual: Currently only slightly more than a reference, but intended to be more explanatory than the reference.
- Reference: Low level interface: Contains a list of functions and types that ship with open62541.
- Reference: High level interface: Contains a list of functions and types that constitute the higher level interface generated for Open62541.jl.
The documentation has the following structure:

!!! note
The documentation is still a work in progress. To be concrete, many functions
within src/Open62541.jl are still without docstrings. These are thin wrappers
to functions in open62541 generated through Clang.jl. Therefore, users who
are familiar with open62541 should be aware of the functions; users unfamilar
with open62541 will have to resort to the source code for the time being.
- Tutorials: Provides a few brief instructions that showcase basic functionality.
- Manual: Currently only slightly more than a reference, but intended to be more explanatory than the reference.
- Reference: Low level interface: Contains a list of functions and types that ship with open62541.
- Reference: High level interface: Contains a list of functions and types that constitute the higher level interface generated for Open62541.jl.

Docstrings will be added (pull requests welcome!).
!!! note


The documentation is still a work in progress. To be concrete, many functions
within src/Open62541.jl are still without docstrings. These are thin wrappers
to functions in open62541 generated through Clang.jl. Therefore, users who
are familiar with open62541 should be aware of the functions; users unfamilar
with open62541 will have to resort to the source code for the time being.

Docstrings will be added over time (pull requests welcome!).

The docstring situation is better on the handwritten functions contained in
the other source files.

## How to contribute

There is many ways one can contribute to the development of Open62541.jl (in order of increasing complexity):
- Reporting bugs, issues and suggestions on the Github repository.
- Improving the clarity of the existing documentation.
- Adding new tutorials for more advanced functionality.
- Adding/Improving docstrings, especially in the main file of the library src/Open62541.jl. It would be best if these are added automatically in the right spot during the code generation using Clang.jl (see gen/generator.jl). But improvements are welcome also if they are directly done in the src/Open62541.jl (existing contributors can help keeping things aligned).
- Adding improvements to the high-level interface. It would be best to discuss ideas on this topic via the Github repository before embarking on larger changes.

- Reporting bugs, issues and suggestions on the Github repository.
- Improving the clarity of the existing documentation.
- Adding new tutorials for more advanced functionality.
- Adding/Improving docstrings, especially in the main file of the library src/Open62541.jl. It would be best if these are added automatically in the right spot during the code generation using Clang.jl (see gen/generator.jl). But improvements are welcome also if they are directly done in the src/Open62541.jl (existing contributors can help keeping things aligned).
- Adding improvements to the high-level interface. It would be best to discuss ideas on this topic via the Github repository before embarking on larger changes.
5 changes: 3 additions & 2 deletions docs/src/manual/attributegeneration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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
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`](@ref)) or the server API (see [`JUA_Server_addNode`](@ref)).

## Convenience functions that allow generating values for specific attributes:
Expand All @@ -16,6 +16,7 @@ UA_EVENTNOTIFIER
```

## High level generators for attribute blocks:

```@docs; canonical = false
JUA_DataTypeAttributes
JUA_MethodAttributes
Expand Down
3 changes: 2 additions & 1 deletion docs/src/manual/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ UA_Client_writeWriteMaskAttribute
```

## Asynchronous Client API

```@autodocs; canonical = false
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_ClientAsync") && !endswith(string(t), "_generate")
```
```
27 changes: 15 additions & 12 deletions docs/src/manual/numbertypes.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Supported number types
It is noteworthy that the open62541 library does not support all number types

It is noteworthy that the open62541 library does not support all number types
included within Julia natively. Open62541.jl supports the same number types as its
C counterpart. Julia types that are not supported will throw an exception, rather
C counterpart. Julia types that are not supported will throw an exception, rather
than silently performing an automated conversion for you.

If you want to store a Julia type that is not on the list below (for example:
`Float32`, `Complex{Int64}` or `Rational{Bool}`) in an OPC UA server, you should
consciously convert it to a supported number type beforehand.
If you want to store a Julia type that is not on the list below (for example:
`Float32`, `Complex{Int64}` or `Rational{Bool}`) in an OPC UA server, you should
consciously convert it to a supported number type beforehand.

Furthermore `JUA_Client_readValueAttribute(client, nodeid)` will return numbers
in one of the supported formats below. You can specify the conversion to be used
via its typed equivalent if you know a `Float16` value should be returned, you
can call `JUA_Client_readValueAttribute(client, nodeid, Float16)`. This conversion
obviously only works if implemented in Julia.
Furthermore `JUA_Client_readValueAttribute(client, nodeid)` will return numbers
in one of the supported formats below. You can specify the conversion to be used
via its typed equivalent if you know a `Float16` value should be returned, you
can call `JUA_Client_readValueAttribute(client, nodeid, Float16)`. This conversion
obviously only works if implemented in Julia.

Adding other number types is possible, but relies on introducing a custom
datatype. See the [open62541 documentation](https://github.com/open62541/open62541/tree/master/examples/custom_datatype)
Adding other number types is possible, but relies on introducing a custom
datatype. See the [open62541 documentation](https://github.com/open62541/open62541/tree/master/examples/custom_datatype)
for details about this.

## Real numbers:

- Boolean: Bool
- Integers: Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64
- Float: Float32, Float64
- Rational: Rational{Int32}, Rational{UInt32}

## Complex numbers:

- Complex{Float32}
- Complex{Float64}
8 changes: 4 additions & 4 deletions docs/src/reference_highlevel.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Reference: High level interface
# Reference: High level interface

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

```@autodocs
Modules = [Open62541]
Filter = t -> startswith(string(t), "JUA_")
```
```
30 changes: 17 additions & 13 deletions docs/src/reference_lowlevel.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# Reference: Low level interface
# Reference: Low level interface

Lists types and functions that are part of the open62541 standard interface.

## open62541 types

```@autodocs
Modules = [Open62541]
Order = [:type]
Filter = t -> startswith(string(t), "UA_")
```
```

## Memory allocation and management for open62541 types
These are low level functions allowing to allocate and free (etc.) memory for

These are low level functions allowing to allocate and free (etc.) memory for
open62541 types ("UA_...") on the C-side.

```@autodocs
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_") && any(endswith.(string(t), ["_new", "_init", "_delete", "_clear", "_copy", "_deleteMembers"]))
```
```

## Convenience functions for generating strings/bytestrings & associated functions

Expand All @@ -33,26 +35,27 @@ UA_ByteString_equal
```

## Generation of (Expanded)NodeIds & associated functions

```@autodocs
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_NODEID")
```
```

```@autodocs
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_EXPANDEDNODEID")
```
```

```@docs
UA_NodeId_equal
```
```

## Attribute generation

Functions that allow generating attributes (used in node creation) in a convenient
fashion:
fashion:

```@docs
UA_DataTypeAttributes_generate
Expand All @@ -66,6 +69,7 @@ UA_ViewAttributes_generate
```

Helper functions for readmasks, valueranks, etc.:

```@docs
UA_ACCESSLEVEL
UA_EVENTNOTIFIER
Expand All @@ -81,34 +85,34 @@ UA_WRITEMASK
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_Server_") || startswith(string(t), "UA_ServerConfig")
```
```

## Client API

```@autodocs
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_Client_")
```
```

## Asynchronous Client API

```@autodocs
Modules = [Open62541]
Order = [:function]
Filter = t -> startswith(string(t), "UA_ClientAsync") && !endswith(string(t), "_generate")
```
```

## Callback generation

```@autodocs
Modules = [Open62541]
Pages = ["callbacks.jl"]
```
```

## Miscellaneous

```@docs
UA_CreateSubscriptionRequest_default
UA_MonitoredItemCreateRequest_default
```
```
Loading
Loading