Commit aee64ab6 authored by Ivan Tyagov's avatar Ivan Tyagov

Docs.

parent 4a81d037
# Usage of OPC UA server with Beremiz # rPLC coupler server which controls MOD-IO's relays' state over OPC-UA protocol.
## Prerequisites [Link](rPLC coupler server which controls MOD-IO's relays' state over OPC-UA protocol.)
### Installing Beremiz ## Build and run
Request a Beremiz IDE instance via SlapOS ### Compile and install open62541 library (required)
release="https://lab.nexedi.com/nexedi/slapos/raw/beremiz/software/beremiz-ide/software.cfg" ivan@k2-osie:~/open62541/build$ cmake -DBUILD_SHARED_LIBS=ON \
supply(release, "COMP-XXXX")
partition_parameter_kw = {}
filter_kw = {"computer_guid": "COMP-XXXX"}
request(
software_release = release,
partition_reference = 'OSIE.k2-osie.Beremiz.IDE-1',
partition_parameter_kw = partition_parameter_kw,
filter_kw = filter_kw)
### Compile and install open62541
ivan@k2-osie:~/open62541/build$ cmake -DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DUA_ENABLE_PUBSUB=ON \ -DUA_ENABLE_PUBSUB=ON \
-DUA_ENABLE_PUBSUB_MONITORING=ON \ -DUA_ENABLE_PUBSUB_MONITORING=ON \
-DUA_ENABLE_PUBSUB_ETH_UADP=ON \ -DUA_ENABLE_PUBSUB_ETH_UADP=ON \
-DUA_NAMESPACE_ZERO=REDUCED \ -DUA_NAMESPACE_ZERO=REDUCED \
-DUA_ENABLE_ENCRYPTION=MBEDTLS \ -DUA_ENABLE_ENCRYPTION=MBEDTLS \
-DUA_ENABLE_ENCRYPTION_MBEDTLS=ON \ -DUA_ENABLE_ENCRYPTION_MBEDTLS=ON ..
..
ivan@k2-osie:~/open62541/build$ make ivan@k2-osie:~/open62541/build$ make
ivan@k2-osie:~/open62541/build$ sudo make install
ivan@k2-osie:~/open62541/build$ sudo ldconfig
# install system wide in /usr/local/lib
ivan@k2-osie:~/open62541/build$ sudo make install
# update system wide libraries ### Build
ivan@k2-osie:~/open62541/build$ sudo ldconfig
ivan@k2-osie:~/open62541/build$ gcc -I /usr/local/include/ -std=c99 ~/osie/coupler/server.c -o server -l:libopen62541.so -L/usr/local/lib -lmbedcrypto -lmbedx509
### Building your OPC UA server (Cross compilation to ARM architecture from Ubuntu) ### Run
# compile coupler application with a shared library and UA_ENABLE_AMALGAMATION=OFF $ ./server
ivan@k2-osie:~/open62541/build$ gcc -I /usr/local/include/ -std=c99 ~/osie/coupler/server.c -o server -l:libopen62541.so -L/usr/local/lib -lmbedcrypto -lmbedx509
### If one wants to run coupler on a x86 platform then one needs to run server in virtual environment ### Run in virtual environment (on any x86_64 platform for testing purposes)
$ ./server -m 1 $ ./server -m 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment