Hello again Ralph and Érico.
Thanks to the instructions given by Érico in his last message, I've managed to understand how the EPICS Modules and IOC Applications work.
First, I have started by making the sampleIOC and adding to sampleIOCApp/src/Makefile the next line:
sampleIOC_LIBS += opcua
Then, in sampleIOCApp/src/xxxSupport.dbd I have added:
include "opcua.dbd"
Finally, in configure/RELEASE.local I have included the next path:
OPCUA = /home/eusebio/binaryOpcuaIoc
However, with this first approach I'm having the next error when I try to compile with 'make'.
make[2]: Entering directory `/home/eusebio/IOCs/reccasterUAIOC/configure/O.linux-x86_64' perl -CSD /home/eusebio/base-7.0.7/bin/linux-x86_64/convertRelease.pl checkRelease
Definition of OPCUA conflicts with OPCUA support. In this application or module, a RELEASE file conflicts with OPCUA at /home/eusebio/binaryOpcuaIoc Here: OPCUA = /home/eusebio/binaryOpcuaIoc OPCUA: OPCUA = /home/eusebio/binaryOpcuaIoc/..
If I change the CHECK_RELEASE environment variable to NO in configure/CONFIG_SITE, then the error is the next one:/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -Werror-implicit-function-declaration -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/eusebio/base-7.0.7/include/compiler/gcc -I/home/eusebio/base-7.0.7/include/os/Linux -I/home/eusebio/base-7.0.7/include -MM -MF devreccasterUAIOCVersion.d ../devreccasterUAIOCVersion.c /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -Werror-implicit-function-declaration -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/eusebio/base-7.0.7/include/compiler/gcc -I/home/eusebio/base-7.0.7/include/os/Linux -I/home/eusebio/base-7.0.7/include -MM -MF dbSubExample.d ../dbSubExample.c /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -Werror-implicit-function-declaration -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/eusebio/base-7.0.7/include/compiler/gcc -I/home/eusebio/base-7.0.7/include/os/Linux -I/home/eusebio/base-7.0.7/include -MM -MF devXxxSoft.d ../devXxxSoft.c /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -Werror-implicit-function-declaration -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/eusebio/base-7.0.7/include/compiler/gcc -I/home/eusebio/base-7.0.7/include/os/Linux -I/home/eusebio/base-7.0.7/include -MM -MF xxxRecord.d ../xxxRecord.c /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -std=c++11 -mtune=generic -m64 -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/eusebio/base-7.0.7/include/compiler/gcc -I/home/eusebio/base-7.0.7/include/os/Linux -I/home/eusebio/base-7.0.7/include -MM -MF reccasterUAIOCMain.d ../reccasterUAIOCMain.cpp Creating dbd file reccasterUAIOC.dbd perl -CSD /home/eusebio/base-7.0.7/bin/linux-x86_64/dbdExpand.pl -I. -I.. -I../O.Common -I../../../dbd -I/home/eusebio/base-7.0.7/dbd -I/home/eusebio/recsync-1.5/client//dbd -I/home/eusebio/binaryOpcuaIoc/dbd -o reccasterUAIOC.dbd base.dbd xxxSupport.dbd dbSubExample.dbd devreccasterUAIOCVersion.dbd reccasterUAIOCHello.dbd initTrace.dbd PVAServerRegister.dbd qsrv.dbd dbdExpand.pl: Can't find file 'opcua.dbd' while reading 'xxxSupport.dbd' to create 'reccasterUAIOC.dbd' dbdExpand.pl: Exiting due to errors
Maybe, the problem is that I should use the OPC UA source code. So I have also tried to compile it from scratch with the 'open62541' libs. However, I'm having this error:
../../devOpcuaSup/open62541/SessionOpen62541.cpp: In function ‘std::ostream& DevOpcua::operator<<(std::ostream&, UA_SecureChannelState)’: ../../devOpcuaSup/open62541/SessionOpen62541.cpp:156:14: error: ‘UA_SECURECHANNELSTATE_FRESH’ was not declared in this scope case UA_SECURECHANNELSTATE_FRESH: return os << "Fresh"; ^ ../../devOpcuaSup/open62541/SessionOpen62541.cpp: In member function ‘void DevOpcua::SessionOpen62541::connectionStatusChanged(UA_SecureChannelState, UA_SessionState, UA_StatusCode)’: ../../devOpcuaSup/open62541/SessionOpen62541.cpp:1950:18: error: ‘UA_SECURECHANNELSTATE_FRESH’ was not declared in this scope case UA_SECURECHANNELSTATE_FRESH: ^
Thanks in advance and Happy Christmas to everyone.
Cheers, Eusebio.
---
Saludos/Best regards
University of Granada
Eusebio Naif Al-Soliman Fuentes MSc. Data Science and Computer Engineering
eunaif at correo.ugr.es
El 2023-12-20 15:04, Érico Nogueira Rolim escribió:
Hi Eusebio,
On 20/12/2023 10:44, Eusebio Naif Al-Soliman Fuentes via Tech-talk wrote:
Hello Ralph.
Sorry, I don't see the binary distribution in the 'Assets' folder of the releases in GitHub (https://github.com/epics-modules/opcua/releases [1]), all the releases need to be compiled, apparently.
IOC_opcua-0.9.4_Base-${BASE_VERSION}_${DISTRO}.tar.gz files are binary releases.
If I define the EPICS_BASE = /path/to/my/EPICS/Base/install inside the configure/RELEASE file of the EPICS Module, and I compile with 'make', I obtain a binary file inside bin/linux-x86_64/
However, I have found that the binaries that I obtain with the compilation of RecCaster and the OPC UA Module work only with Channel Access and not pvAccess. That's why I'm trying to "compile" or "use" in some way the "softIocPVA" binary. What should I have to do to in order to use pvAccess in that case?
You would create your own IOC, as explained in [1], which links to the two modules you want to use, RecCaster and OPC UA.
Then, in your App's src/Makefile, you would add the DBD and LIBS line documented in the "Adding QSRV to your IOC" section in [2]. This will make it so your PVs are available over PVA.
[1] https://docs.epics-controls.org/en/latest/getting-started/creating-ioc.html [2] [2] https://epics-base.github.io/pva2pva/ [3]
Also, I still don't know how to run at the same time two or more modules, for example, the RecCaster and the OPC UA module with the same PV like 'temperature:water'. In summary, what I want to do is to use at the same time the ChannelFinder service and the OPC UA Device Support for the same PVs (from an IOC db). Additionally better if we can use PVA.
I think you misunderstood how these modules interact with records. OPC UA is a device support module, which connects your records to a given device; this is the one you can only have one of per record. RecCaster, when built into an IOC, provides a list of all available records on that IOC, without requiring any sort of configuration in your record (it is not a device support support).
Sorry for being so annoying, I'm having big issues understanding how the EPICS Support Modules are used.
Thanks Eusebio.
--- Saludos/Best regards
University of Granada
Eusebio Naif Al-Soliman Fuentes MSc. Data Science and Computer Engineering
eunaif at correo.ugr.es
El 2023-12-20 10:12, Ralph Lange escribió: Hi Eusebio,
On Wed, 20 Dec 2023 at 08:53, Eusebio Naif Al-Soliman Fuentes < eunaif at correo.ugr.es> wrote:
In that case, I understand that I have to use the binaries of the EPICS Support Module instead of the ones from EPICS Base.
I'm not sure I understand what you mean.
If you are referring to the OPC UA Device Support, you can use the binary distribution if you don't want to or can't compile the low-level client library. When you use the binary distribution, you don't need to download/compile the Device Support module nor the low-level client library, as both are part of the binary distribution.
However, what happens if I want to use, with the same PVs, EPICS Base and the EPICS Support Module? Or, for instance, two different EPICS Modules with the same PVs?
That question does not really make sense.
EPICS Base contains some libraries and configuration files. Additional EPICS support modules contain more libraries and configuration files. To create an IOC that uses things from support modules, you need both EPICS Base and the support modules. The IOC binary needs to be linked against the libraries from the support modules and EPICS Base. Configuration files from the support modules and EPICS Base are used to create the configuration files for the IOC.
EPICS relies on PV names to be unique in the system. Running multiple IOCs with the same PVs is an error. Clients will connect to one or another quasi-randomly and spit out error messages.
I've to use a RELEASE.local file, but what do I have to write on it and in which location should reside in order to use EPICS Base and the modules together?
Any EPICS build (when you run "make" inside an EPICS module) will look for RELEASE.local files in different places, including in the directory above its TOP and inside the TOP/configure directory. If you don't want to repeat the configuration inside every support module, putting a single file one level above the modules is read by all of them.
RELEASE and RELEASE.local files contain (that's documented) the locations of all support modules as multiple lines of the form MODULE_NAME = /absolute/path/to/the/module with the EPICS_BASE definition usually last.
Cheers, ~Ralph
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.
Links: ------ [1] https://urldefense.com/v3/__https://github.com/epics-modules/opcua/releases__;!!D9dNQwwGXtA!QI32nlQl0XrheiQoUIZYKzzrJ8LN4SLRuo6elZLkLd5a50XuHMTuAgDyPN9BLFq-wZv57pX8GY4V-5bxL0lDLWSM$ [2] https://urldefense.com/v3/__https://docs.epics-controls.org/en/latest/getting-started/creating-ioc.html__;!!D9dNQwwGXtA!QI32nlQl0XrheiQoUIZYKzzrJ8LN4SLRuo6elZLkLd5a50XuHMTuAgDyPN9BLFq-wZv57pX8GY4V-5bxL6Ypevrn$ [3] https://urldefense.com/v3/__https://epics-base.github.io/pva2pva/__;!!D9dNQwwGXtA!QI32nlQl0XrheiQoUIZYKzzrJ8LN4SLRuo6elZLkLd5a50XuHMTuAgDyPN9BLFq-wZv57pX8GY4V-5bxL31aXjr0$
|