diff --git a/.gitignore b/.gitignore index 6b849ec..95c2dc8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ core.* *PVs.list *-loc/*.Makefile ecmc_plugin_fft/*.Makefile -*__* \ No newline at end of file +*__* +O.* \ No newline at end of file diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..cf4c1e7 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,47 @@ +include /ioc/tools/driver.makefile + +MODULE = ecmc_plugin_socketcan + +# "Transfer" module name to plugin +USR_CFLAGS +=-DECMC_PLUGIN_MODULE_NAME=${MODULE} + +BUILDCLASSES = Linux +ARCH_FILTER = deb10% + +# Run 7.0.6 for now +EXCLUDE_VERSIONS+=3 7.0.5 7.0.7 + +IGNORE_MODULES += asynMotor +IGNORE_MODULES += motorBase + +USR_CXXFLAGS += -std=c++17 +OPT_CXXFLAGS_YES = -O3 + +# dependencies +# ECmasterECMC_VERSION = v1.1.0 +# motorECMC_VERSION = 7.0.7-ESS +ecmc_VERSION = sandst_a + +APPDB:=db +APPSRC:=src + +USR_CFLAGS += -shared -fPIC -Wall -Wextra +USR_CPPFLAGS += -std=c++11 +USR_LDFLAGS += -lstdc++ +USR_INCLUDES += -I$(where_am_I)$(APPSRC) + +TEMPLATES += $(wildcard $(APPDB)/*.db) +TEMPLATES += $(wildcard $(APPDB)/*.template) +TEMPLATES += $(wildcard $(APPDB)/*.substitutions) +SOURCES += $(APPSRC)/ecmcPluginSocketCAN.c +SOURCES += $(APPSRC)/ecmcSocketCAN.cpp +SOURCES += $(APPSRC)/ecmcSocketCANWrap.cpp +SOURCES += $(APPSRC)/ecmcSocketCANWriteBuffer.cpp +SOURCES += $(APPSRC)/ecmcCANOpenSDO.cpp +SOURCES += $(APPSRC)/ecmcCANOpenPDO.cpp +SOURCES += $(APPSRC)/ecmcCANOpenDevice.cpp +SOURCES += $(APPSRC)/ecmcCANOpenMaster.cpp +SOURCES += $(APPSRC)/ecmcByteToArrayAsub.cpp + +DBDS += $(APPSRC)/ecmcSocketCAN.dbd + diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/.keep b/db/.keep similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/.keep rename to db/.keep diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_Com.template b/db/ecmcPluginSocketCAN_Com.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_Com.template rename to db/ecmcPluginSocketCAN_Com.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_Dev.template b/db/ecmcPluginSocketCAN_Dev.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_Dev.template rename to db/ecmcPluginSocketCAN_Dev.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_PDO_error.template b/db/ecmcPluginSocketCAN_PDO_error.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_PDO_error.template rename to db/ecmcPluginSocketCAN_PDO_error.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_PDO_input.template b/db/ecmcPluginSocketCAN_PDO_input.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_PDO_input.template rename to db/ecmcPluginSocketCAN_PDO_input.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_PDO_output.template b/db/ecmcPluginSocketCAN_PDO_output.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_PDO_output.template rename to db/ecmcPluginSocketCAN_PDO_output.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_SDO_error.template b/db/ecmcPluginSocketCAN_SDO_error.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_SDO_error.template rename to db/ecmcPluginSocketCAN_SDO_error.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_SDO_input.template b/db/ecmcPluginSocketCAN_SDO_input.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_SDO_input.template rename to db/ecmcPluginSocketCAN_SDO_input.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_SDO_output.template b/db/ecmcPluginSocketCAN_SDO_output.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/ecmcPluginSocketCAN_SDO_output.template rename to db/ecmcPluginSocketCAN_SDO_output.template diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/test.template b/db/test.template similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/Db/test.template rename to db/test.template diff --git a/ecmc_plugin_socketcan.Makefile b/ecmc_plugin_socketcan.Makefile deleted file mode 100644 index 06cf550..0000000 --- a/ecmc_plugin_socketcan.Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) 2019 European Spallation Source ERIC -# -# The program is free software: you can redistribute -# it and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation, either version 2 of the -# License, or any newer version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# this program. If not, see https://www.gnu.org/licenses/gpl-2.0.txt -# -# -# Author : anderssandstrom -# email : anderssandstrom@esss.se -# Date : 2020Mar22-1607-33CET -# version : 0.0.0 -# -# template file is generated by ./e3TemplateGenerator.bash with bf03d40 -# Please look at many other _module_.Makefile in e3-* repository -# - -## The following lines are mandatory, please don't change them. -where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) -include $(E3_REQUIRE_TOOLS)/driver.makefile -include $(E3_REQUIRE_CONFIG)/DECOUPLE_FLAGS - -ifneq ($(strip $(ASYN_DEP_VERSION)),) -asyn_VERSION=$(ASYN_DEP_VERSION) -endif - -ifneq ($(strip $(ECMC_DEP_VERSION)),) -ecmc_VERSION=$(ECMC_DEP_VERSION) -endif - -APP:=ecmc_plugin_socketcanApp -APPDB:=$(APP)/Db -APPSRC:=$(APP)/src - -USR_CFLAGS += -shared -fPIC -Wall -Wextra -USR_CPPFLAGS += -std=c++11 -USR_LDFLAGS += -lstdc++ -USR_INCLUDES += -I$(where_am_I)$(APPSRC) - -TEMPLATES += $(wildcard $(APPDB)/*.db) -TEMPLATES += $(wildcard $(APPDB)/*.template) -TEMPLATES += $(wildcard $(APPDB)/*.substitutions) -SOURCES += $(APPSRC)/ecmcPluginSocketCAN.c -SOURCES += $(APPSRC)/ecmcSocketCAN.cpp -SOURCES += $(APPSRC)/ecmcSocketCANWrap.cpp -SOURCES += $(APPSRC)/ecmcSocketCANWriteBuffer.cpp -SOURCES += $(APPSRC)/ecmcCANOpenSDO.cpp -SOURCES += $(APPSRC)/ecmcCANOpenPDO.cpp -SOURCES += $(APPSRC)/ecmcCANOpenDevice.cpp -SOURCES += $(APPSRC)/ecmcCANOpenMaster.cpp -SOURCES += $(APPSRC)/ecmcByteToArrayAsub.cpp - -DBDS += $(APPSRC)/ecmcSocketCAN.dbd - -db: - -.PHONY: db - -vlibs: - -.PHONY: vlibs - -### diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcan.Makefile b/ecmc_plugin_socketcan/ecmc_plugin_socketcan.Makefile deleted file mode 100644 index 06cf550..0000000 --- a/ecmc_plugin_socketcan/ecmc_plugin_socketcan.Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) 2019 European Spallation Source ERIC -# -# The program is free software: you can redistribute -# it and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation, either version 2 of the -# License, or any newer version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# this program. If not, see https://www.gnu.org/licenses/gpl-2.0.txt -# -# -# Author : anderssandstrom -# email : anderssandstrom@esss.se -# Date : 2020Mar22-1607-33CET -# version : 0.0.0 -# -# template file is generated by ./e3TemplateGenerator.bash with bf03d40 -# Please look at many other _module_.Makefile in e3-* repository -# - -## The following lines are mandatory, please don't change them. -where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) -include $(E3_REQUIRE_TOOLS)/driver.makefile -include $(E3_REQUIRE_CONFIG)/DECOUPLE_FLAGS - -ifneq ($(strip $(ASYN_DEP_VERSION)),) -asyn_VERSION=$(ASYN_DEP_VERSION) -endif - -ifneq ($(strip $(ECMC_DEP_VERSION)),) -ecmc_VERSION=$(ECMC_DEP_VERSION) -endif - -APP:=ecmc_plugin_socketcanApp -APPDB:=$(APP)/Db -APPSRC:=$(APP)/src - -USR_CFLAGS += -shared -fPIC -Wall -Wextra -USR_CPPFLAGS += -std=c++11 -USR_LDFLAGS += -lstdc++ -USR_INCLUDES += -I$(where_am_I)$(APPSRC) - -TEMPLATES += $(wildcard $(APPDB)/*.db) -TEMPLATES += $(wildcard $(APPDB)/*.template) -TEMPLATES += $(wildcard $(APPDB)/*.substitutions) -SOURCES += $(APPSRC)/ecmcPluginSocketCAN.c -SOURCES += $(APPSRC)/ecmcSocketCAN.cpp -SOURCES += $(APPSRC)/ecmcSocketCANWrap.cpp -SOURCES += $(APPSRC)/ecmcSocketCANWriteBuffer.cpp -SOURCES += $(APPSRC)/ecmcCANOpenSDO.cpp -SOURCES += $(APPSRC)/ecmcCANOpenPDO.cpp -SOURCES += $(APPSRC)/ecmcCANOpenDevice.cpp -SOURCES += $(APPSRC)/ecmcCANOpenMaster.cpp -SOURCES += $(APPSRC)/ecmcByteToArrayAsub.cpp - -DBDS += $(APPSRC)/ecmcSocketCAN.dbd - -db: - -.PHONY: db - -vlibs: - -.PHONY: vlibs - -### diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/.keep b/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/.vscode/settings.json b/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/.vscode/settings.json deleted file mode 100644 index 3beec43..0000000 --- a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/.vscode/settings.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "files.associations": { - "typeindex": "cpp", - "typeinfo": "cpp", - "stdexcept": "cpp", - "cctype": "cpp", - "clocale": "cpp", - "cmath": "cpp", - "csetjmp": "cpp", - "csignal": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdio": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "array": "cpp", - "atomic": "cpp", - "strstream": "cpp", - "*.tcc": "cpp", - "bitset": "cpp", - "cfenv": "cpp", - "chrono": "cpp", - "cinttypes": "cpp", - "complex": "cpp", - "condition_variable": "cpp", - "cstdint": "cpp", - "deque": "cpp", - "forward_list": "cpp", - "list": "cpp", - "unordered_map": "cpp", - "unordered_set": "cpp", - "vector": "cpp", - "exception": "cpp", - "fstream": "cpp", - "functional": "cpp", - "future": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "mutex": "cpp", - "new": "cpp", - "ostream": "cpp", - "numeric": "cpp", - "ratio": "cpp", - "scoped_allocator": "cpp", - "sstream": "cpp", - "streambuf": "cpp", - "system_error": "cpp", - "thread": "cpp", - "regex": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "utility": "cpp", - "valarray": "cpp" - } -} \ No newline at end of file diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcByteToArrayAsub.cpp b/src/ecmcByteToArrayAsub.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcByteToArrayAsub.cpp rename to src/ecmcByteToArrayAsub.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenDevice.cpp b/src/ecmcCANOpenDevice.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenDevice.cpp rename to src/ecmcCANOpenDevice.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenDevice.h b/src/ecmcCANOpenDevice.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenDevice.h rename to src/ecmcCANOpenDevice.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenMaster.cpp b/src/ecmcCANOpenMaster.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenMaster.cpp rename to src/ecmcCANOpenMaster.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenMaster.h b/src/ecmcCANOpenMaster.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenMaster.h rename to src/ecmcCANOpenMaster.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenPDO.cpp b/src/ecmcCANOpenPDO.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenPDO.cpp rename to src/ecmcCANOpenPDO.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenPDO.h b/src/ecmcCANOpenPDO.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenPDO.h rename to src/ecmcCANOpenPDO.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenSDO.cpp b/src/ecmcCANOpenSDO.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenSDO.cpp rename to src/ecmcCANOpenSDO.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenSDO.h b/src/ecmcCANOpenSDO.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcCANOpenSDO.h rename to src/ecmcCANOpenSDO.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcPluginSocketCAN.c b/src/ecmcPluginSocketCAN.c similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcPluginSocketCAN.c rename to src/ecmcPluginSocketCAN.c diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCAN.cpp b/src/ecmcSocketCAN.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCAN.cpp rename to src/ecmcSocketCAN.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCAN.dbd b/src/ecmcSocketCAN.dbd similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCAN.dbd rename to src/ecmcSocketCAN.dbd diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCAN.h b/src/ecmcSocketCAN.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCAN.h rename to src/ecmcSocketCAN.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANDefs.h b/src/ecmcSocketCANDefs.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANDefs.h rename to src/ecmcSocketCANDefs.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWrap.cpp b/src/ecmcSocketCANWrap.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWrap.cpp rename to src/ecmcSocketCANWrap.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWrap.h b/src/ecmcSocketCANWrap.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWrap.h rename to src/ecmcSocketCANWrap.h diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp b/src/ecmcSocketCANWriteBuffer.cpp similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp rename to src/ecmcSocketCANWriteBuffer.cpp diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.h b/src/ecmcSocketCANWriteBuffer.h similarity index 100% rename from ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.h rename to src/ecmcSocketCANWriteBuffer.h