-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into lcantero/opcsdk114
- Loading branch information
Showing
9 changed files
with
127 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh -e | ||
|
||
trustedcertbase64="$(snapctl get trustedcertbase64)" | ||
|
||
cmd="\"$SNAP\"/opcplc --pn=50000 --sn=10 --sr=10 --st=uint --fn=10 --fr=1 --ft=uint --gn=10 \ | ||
--appcertstorepath=\"$SNAP_USER_DATA/pki/own\" \ | ||
--trustedcertstorepath=\"$SNAP_USER_DATA/pki/trusted\" \ | ||
--rejectedcertstorepath=\"$SNAP_USER_DATA/pki/rejected\" \ | ||
--issuercertstorepath=\"$SNAP_USER_DATA/pki/issuer\" \ | ||
--logfile=\"$SNAP_USER_DATA/hostname-port-plc.log\"" | ||
|
||
if [ -n "$trustedcertbase64" ]; then | ||
cmd="$cmd --addtrustedcertfile=\"$SNAP_DATA/config/pki/trusted/certs/cert_1.crt\"" | ||
fi | ||
|
||
eval "$cmd" |
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,15 @@ | ||
#!/bin/sh -e | ||
|
||
# Supported keys: | ||
# - trustedcertbase64 (string) | ||
# Certificate in base64 string format to be trusted by the server. | ||
|
||
handle_trustedcertbase64() | ||
{ | ||
trustedcertbase64="$(snapctl get trustedcertbase64)" | ||
if [ -n "$trustedcertbase64" ]; then | ||
echo "$trustedcertbase64" > "$SNAP_DATA/config/pki/trusted/certs/cert_1.crt" | ||
fi | ||
} | ||
|
||
handle_trustedcertbase64 |
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,3 @@ | ||
#!/bin/sh -e | ||
|
||
mkdir -p "$SNAP_DATA/config/pki/trusted/certs" |
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,36 @@ | ||
name: iot-edge-opc-plc | ||
base: core22 | ||
version: '0.1' | ||
summary: Sample OPC UA server | ||
description: | | ||
Sample OPC UA server with nodes that generate random | ||
and increasing data, anomalies and much more. | ||
grade: stable | ||
confinement: strict # use 'strict' once you have the right plugs and slots | ||
|
||
parts: | ||
opc-plc: | ||
plugin: dotnet | ||
dotnet-build-configuration: Release | ||
dotnet-self-contained-runtime-identifier: linux-x64 | ||
source: . | ||
build-packages: | ||
- dotnet-sdk-8.0 | ||
scripts: | ||
plugin: dump | ||
source: scripts/ | ||
organize: | ||
'*' : scripts/ | ||
appsettings: | ||
plugin: dump | ||
source: src/ | ||
prime: | ||
- appsettings.json | ||
|
||
apps: | ||
opc-plc: | ||
command: scripts/run | ||
plugs: | ||
- network | ||
- network-bind |
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
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
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