-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from vivienCEA/feat-add-opcua-support
Add opcua EPICS support module
- Loading branch information
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,4 +72,8 @@ See `<nixpkgs/maintainers/scripts/check-maintainer-github-handles.sh>` for an ex | |
github = "Synthetica9"; | ||
githubId = 7075751; | ||
}; | ||
vivien = { | ||
email = "[email protected]"; | ||
name = "Vivien Loriot"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
lib, | ||
epnixLib, | ||
mkEpicsPackage, | ||
fetchFromGitHub, | ||
local_config_site ? {}, | ||
local_release ? {}, | ||
}: | ||
mkEpicsPackage { | ||
pname = "gtest"; | ||
version = "1.0.1"; | ||
varname = "GTEST"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "epics-modules"; | ||
repo = "gtest"; | ||
rev = "v1.0.1"; | ||
hash = "sha256-cDZ4++AkUiOvsw4KkobyqKWLk2GzUSdDdWjLL7dr1ac="; | ||
}; | ||
|
||
inherit local_release local_config_site; | ||
|
||
meta = { | ||
description = "EPICS module to adds the Google Test and Google Mock frameworks to EPICS"; | ||
homepage = "https://github.com/epics-modules/gtest"; | ||
license = epnixLib.licenses.epics; | ||
maintainers = with epnixLib.maintainers; [vivien]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
lib, | ||
epnixLib, | ||
mkEpicsPackage, | ||
fetchFromGitHub, | ||
pkg-config, | ||
epnix, | ||
open62541, | ||
openssl, | ||
libxml2, | ||
local_config_site ? {}, | ||
local_release ? {}, | ||
}: | ||
mkEpicsPackage { | ||
pname = "opcua"; | ||
version = "0.10.0-dev"; | ||
varname = "OPCUA"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "epics-modules"; | ||
repo = "opcua"; | ||
rev = "3d10053"; | ||
hash = "sha256-EQra8PesO7Rlhj+pBlAfiqh5yjJwRkuh7gbGziY58iI="; | ||
}; | ||
|
||
inherit local_release; | ||
local_config_site = | ||
local_config_site | ||
// { | ||
OPEN62541 = "${open62541}"; | ||
OPEN62541_DEPLOY_MODE = "PROVIDED"; | ||
OPEN62541_LIB_DIR = "${open62541}/lib"; | ||
OPEN62541_SHRLIB_DIR = "${open62541}/lib"; | ||
#for the moment, we're not able to use the last version of openssl to manage a safety connection with the open62541 librairy | ||
OPEN62541_USE_CRYPTO = "NO"; | ||
OPEN62541_USE_XMLPARSER = "YES"; | ||
}; | ||
|
||
patches = [./dir_xml2.patch]; | ||
|
||
depsBuildBuild = [pkg-config]; | ||
nativeBuildInputs = [pkg-config open62541 openssl libxml2]; | ||
buildInputs = [open62541 openssl libxml2]; | ||
propagatedNativeBuildInputs = [pkg-config]; | ||
propagatedBuildInputs = [libxml2] ++ (with epnix.support; [gtest]); | ||
|
||
meta = { | ||
description = "EPICS support for communication with OPC UA protocol"; | ||
homepage = "https://github.com/epics-modules/opcua"; | ||
license = epnixLib.licenses.epics; | ||
maintainers = with epnixLib.maintainers; [vivien]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/devOpcuaSup/open62541/Makefile.config b/devOpcuaSup/open62541/Makefile.config | ||
index d1b82cb..5d81dc2 100644 | ||
--- a/devOpcuaSup/open62541/Makefile.config | ||
+++ b/devOpcuaSup/open62541/Makefile.config | ||
@@ -25,7 +25,7 @@ USR_CXXFLAGS += -DHAS_XMLPARSER | ||
ifneq ($(filter -D_MINGW,$(OP_SYS_CPPFLAGS)),) | ||
USR_INCLUDES += -I$(MSYSTEM_PREFIX)/include/libxml2 | ||
else | ||
-USR_INCLUDES += -I/usr/include/libxml2 | ||
+USR_INCLUDES += `pkg-config --cflags libxml-2.0` | ||
endif | ||
|
||
opcua_SRCS += Session.cpp | ||
diff --git a/unitTestApp/src/Makefile b/unitTestApp/src/Makefile | ||
index c52a727..8c2556b 100644 | ||
--- a/unitTestApp/src/Makefile | ||
+++ b/unitTestApp/src/Makefile | ||
@@ -28,9 +28,9 @@ USR_CXXFLAGS += -DHAS_SECURITY | ||
endif | ||
ifeq ($($(CLIENT)_USE_XMLPARSER),YES) | ||
USR_CXXFLAGS += -DHAS_XMLPARSER | ||
-USR_INCLUDES_Linux += -I/usr/include/libxml2 | ||
+USR_INCLUDES += `pkg-config --cflags libxml-2.0` | ||
ifneq ($(filter -D_MINGW,$(OP_SYS_CPPFLAGS)),) | ||
-USR_INCLUDES += -I$(MSYSTEM_PREFIX)/include/libxml2 | ||
+USR_INCLUDES += `pkg-config --cflags libxml-2.0` | ||
USR_SYS_LIBS += xml2 | ||
endif | ||
endif |