From 9b441d57aba71156369e61b8e939b4adcc4add43 Mon Sep 17 00:00:00 2001 From: Ricardo Olsen Date: Thu, 18 Jul 2024 18:24:31 -0300 Subject: [PATCH] PLC4X added to various scripts. --- platform-linux/build.sh | 11 +++++------ platform-mac/build.sh | 5 +++++ platform-windows/build.bat | 13 ++++++------- platform-windows/buildupd.bat | 11 +++++------ platform-windows/create_services.bat | 8 +++++++- platform-windows/start_services.bat | 1 + platform-windows/stop_services.bat | 1 + .../src/components/ProtocolConnections.vue | 5 ++++- 8 files changed, 34 insertions(+), 21 deletions(-) diff --git a/platform-linux/build.sh b/platform-linux/build.sh index 62d03f40..be2cf2f6 100755 --- a/platform-linux/build.sh +++ b/platform-linux/build.sh @@ -42,17 +42,16 @@ go mod tidy go build cp calculations ../../bin/ -# cd ../plc4x-client -# go get "github.com/icza/bitio" -# go mod tidy -# go build -# cp plc4x-client ../../bin/ - cd ../i104m go mod tidy go build cp i104m ../../bin/ +cd ../plc4x-client +go mod tidy +go build +cp plc4x-client ../../bin/ + cd ../cs_data_processor npm install cd ../cs_custom_processor diff --git a/platform-mac/build.sh b/platform-mac/build.sh index 75046946..e28d6dec 100755 --- a/platform-mac/build.sh +++ b/platform-mac/build.sh @@ -45,6 +45,11 @@ go mod tidy go build cp i104m ../../bin/ +cd ../plc4x-client +go mod tidy +go build +cp plc4x-client ../../bin/ + cd ../cs_data_processor npm install cd ../cs_custom_processor diff --git a/platform-windows/build.bat b/platform-windows/build.bat index 709d4a49..966fd71b 100644 --- a/platform-windows/build.bat +++ b/platform-windows/build.bat @@ -24,7 +24,7 @@ dotnet publish --self-contained --runtime win-x64 -p:PublishReadyToRun=true -c R cd %SRCPATH%\libiec61850\build rem set VCTargetsPath=C:\ProgramFiles\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\ rem set VCTargetsPath=D:\ProgramFiles\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\ -rem set VCToolsInstallDir=D:\ProgramFiles\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ +rem set VCToolsInstallDir=D:\ProgramFiles\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\ rem dotnet clean -c Release libiec61850.sln dotnet publish --no-self-contained --runtime win-x64 -c Release libiec61850.sln @@ -67,17 +67,16 @@ go mod tidy go build copy /Y calculations.exe %BINPATH% -rem cd %SRCPATH%\plc4x-client -rem go get "github.com/icza/bitio" -rem go mod tidy -rem go build -rem copy /Y plc4x-client.exe %BINPATH% - cd %SRCPATH%\i104m go mod tidy go build copy /Y i104m.exe %BINPATH% +cd %SRCPATH%\plc4x-client +go mod tidy +go build +copy /Y plc4x-client.exe %BINPATH% + cd %SRCPATH%\cs_data_processor call %NPM% install diff --git a/platform-windows/buildupd.bat b/platform-windows/buildupd.bat index 9e1c8515..b81e9d4c 100644 --- a/platform-windows/buildupd.bat +++ b/platform-windows/buildupd.bat @@ -67,17 +67,16 @@ go mod tidy go build copy /Y calculations.exe %BINPATH% -rem cd %SRCPATH%\plc4x-client -rem go get "github.com/icza/bitio" -rem go mod tidy -rem go build -rem copy /Y plc4x-client.exe %BINPATH% - cd %SRCPATH%\i104m go mod tidy go build copy /Y i104m.exe %BINPATH% +cd %SRCPATH%\plc4x-client +go mod tidy +go build +copy /Y plc4x-client.exe %BINPATH% + cd %SRCPATH%\cs_data_processor call %NPM% i --package-lock-only call %NPM% update diff --git a/platform-windows/create_services.bat b/platform-windows/create_services.bat index 7b3fafc1..7632cb51 100644 --- a/platform-windows/create_services.bat +++ b/platform-windows/create_services.bat @@ -104,7 +104,7 @@ nssm set JSON_SCADA_alarm_beep AppDirectory "C:\json-scada\src\alarm_beep" nssm set JSON_SCADA_alarm_beep_auth AppStdout C:\json-scada\log\alarm_beep.log nssm set JSON_SCADA_alarm_beep AppRotateOnline 1 nssm set JSON_SCADA_alarm_beep AppRotateBytes 10000000 -nssm set JSON_SCADA_alarm_beep Start SERVICE_AUTO_START +nssm set JSON_SCADA_alarm_beep Start SERVICE_DEMAND_START REM WARNING! This service has no security access control, use with care. nssm install JSON_SCADA_config_server_excel "C:\json-scada\platform-windows\nodejs-runtime\node.exe" "C:\json-scada\src\config_server_for_excel\index.js" @@ -193,6 +193,12 @@ nssm set JSON_SCADA_i104m AppRotateOnline 1 nssm set JSON_SCADA_i104m AppRotateBytes 10000000 nssm set JSON_SCADA_i104m Start SERVICE_DEMAND_START +nssm install JSON_SCADA_plc4xclient "C:\json-scada\bin\plc4x-client.exe" 1 1 +nssm set JSON_SCADA_plc4xclient AppStdout C:\json-scada\log\plc4xclient.log +nssm set JSON_SCADA_plc4xclient AppRotateOnline 1 +nssm set JSON_SCADA_plc4xclient AppRotateBytes 10000000 +nssm set JSON_SCADA_plc4xclient Start SERVICE_DEMAND_START + nssm install JSON_SCADA_plctags "C:\json-scada\bin\PLCTagsClient.exe" 1 1 nssm set JSON_SCADA_plctags AppStdout C:\json-scada\log\plctags.log nssm set JSON_SCADA_plctags AppRotateOnline 1 diff --git a/platform-windows/start_services.bat b/platform-windows/start_services.bat index 9cdc7b7b..7327855b 100644 --- a/platform-windows/start_services.bat +++ b/platform-windows/start_services.bat @@ -32,6 +32,7 @@ REM nssm start JSON_SCADA_mongowr REM SELECT PROTOCOLS TO START nssm start JSON_SCADA_iec104client nssm start JSON_SCADA_mqttsparkplugclient +nssm start JSON_SCADA_plc4xclient nssm start JSON_SCADA_telegraf_listener net start JSON_SCADA_telegraf_runtime REM nssm start JSON_SCADA_iec104server diff --git a/platform-windows/stop_services.bat b/platform-windows/stop_services.bat index 100603b0..19110ad3 100644 --- a/platform-windows/stop_services.bat +++ b/platform-windows/stop_services.bat @@ -33,6 +33,7 @@ nssm stop JSON_SCADA_plctags net stop JSON_SCADA_telegraf_runtime nssm stop JSON_SCADA_telegraf_listener nssm stop JSON_SCADA_mqttsparkplugclient +nssm stop JSON_SCADA_plc4xclient ping -n 3 REM STOP PROTOCOL SERVERS diff --git a/src/htdocs-admin/src/components/ProtocolConnections.vue b/src/htdocs-admin/src/components/ProtocolConnections.vue index 248a67f6..d3c9bd9d 100644 --- a/src/htdocs-admin/src/components/ProtocolConnections.vue +++ b/src/htdocs-admin/src/components/ProtocolConnections.vue @@ -312,7 +312,7 @@ @@ -731,6 +732,7 @@ 'I104M', 'PI_DATA_ARCHIVE_INJECTOR', 'PI_DATA_ARCHIVE_CLIENT', + 'PLC4X', ].includes(selected.protocolDriver) " > @@ -2250,6 +2252,7 @@ 'IEC61850', 'PI_DATA_ARCHIVE_INJECTOR', 'PI_DATA_ARCHIVE_CLIENT', + 'PLC4X', ].includes( selected.protocolDriver )