This provides opcua protocol stack library
-
You must install basic prerequisites for build
$ sudo apt-get install build-essential
-
cmake
- Version : Upper 3.10
- Where to download
- How to install
-
SCons
- Version : 2.3.0 or above
- How to install
-
Python
- Version : 2.7.X
-
pip
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py $ python get-pip.py
$ ./build.sh
$ ./build_arm.sh : for arm architecture
-
--build_mode = [release/debug]
If you want to build to debug mode, then please make this option [debug/DEBUG]. Default value is [release].
- opcua protocol stack library : build/libopcua-adapter.so
- Build script will download open62541 library automatically from github.
- After download, it will be built for 'single file distribution' mode which combines all header files into a single header file(open62541.h) and all source files into a single source file(open62541.c).
- After building, all library files and folders except open62541.h and open62541.c will be deleted.
- Final location of open62541.h and open62541.c: extlibs/open62541/open62541/
- These two files will be directly included and built along with OPC-UA protocol stack.
-
Go to 'example/out' folder.
-
Export 'libopcua-adapter.so' library path for executables:
Run command :
export LD_LIBRARY_PATH=../../build
-
Run the server and client :
1. server : `./server` 2. client : `./client`
-
'start' : Connection establishment.
-
'set_max_ref' : Set the maximum references per node to be returned. [ex 10]
-
'browse' : Performs browse with '10' as maximum references per node.
...
<browse callback may come with 1 or more continuation points. Callback in sample stores all of them in a list>
...
- 'browse_next' : Perform browse next with stroed continuation points
...
<browse callback may come with 1 or more continuation points again. Callback in sample stores all of them in a list>
...
- go to Step 4. Step 4 can be continued until continuation point list becomes empty.
$vi /etc/hosts'
[IP Address] [Host Name]
# e.g) 100.101.102.103 linux-abcd