From 7c72ac938c22a9a39a30d6290d5ccae217137961 Mon Sep 17 00:00:00 2001 From: Johannes Albrecht Date: Tue, 8 Feb 2022 13:37:36 +0100 Subject: [PATCH] Release SDK 1.12.1 --- .../datalayer.client.sub/snap/snapcraft.yaml | 2 +- .../datalayer.client/snap/snapcraft.yaml | 2 +- .../datalayer.diagnosis/snap/snapcraft.yaml | 2 +- .../datalayer.ecat.io/snap/snapcraft.yaml | 2 +- .../snap/snapcraft.yaml | 2 +- .../datalayer.realtime/snap/snapcraft.yaml | 4 + .../snap/snapcraft.yaml | 2 +- samples-cpp/hello.plc/snap/snapcraft.yaml | 2 +- samples-go/appdata/README.md | 2 +- samples-net/README.md | 395 +----------------- samples-net/appdata/appdata.csproj | 2 +- .../datalayer.client.browse.csproj | 4 +- samples-net/datalayer.client/Program.cs | 2 +- .../datalayer.client/datalayer.client.csproj | 4 +- .../datalayer.mqtt/datalayer.mqtt.csproj | 4 +- .../datalayer.provider.alldata.csproj | 4 +- .../datalayer.provider.virtual.csproj | 4 +- .../datalayer.provider.csproj | 4 +- samples-net/hello.web.asp/README.md | 84 ++++ .../hello.web.asp/hello.web.asp.csproj | 2 +- .../services/DataLayerService.cs | 1 - .../datalayer.client/.vscode/tasks.json | 2 +- .../datalayer.provider/.vscode/tasks.json | 2 +- .../app/my_provider_node.py | 2 +- 24 files changed, 129 insertions(+), 407 deletions(-) create mode 100644 samples-net/hello.web.asp/README.md diff --git a/samples-cpp/datalayer.client.sub/snap/snapcraft.yaml b/samples-cpp/datalayer.client.sub/snap/snapcraft.yaml index cde73f84..5a73b75c 100644 --- a/samples-cpp/datalayer.client.sub/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.client.sub/snap/snapcraft.yaml @@ -34,7 +34,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-cpp/datalayer.client/snap/snapcraft.yaml b/samples-cpp/datalayer.client/snap/snapcraft.yaml index 135702ec..9efa3e49 100644 --- a/samples-cpp/datalayer.client/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.client/snap/snapcraft.yaml @@ -33,7 +33,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-cpp/datalayer.diagnosis/snap/snapcraft.yaml b/samples-cpp/datalayer.diagnosis/snap/snapcraft.yaml index ec13b2d7..22933d58 100644 --- a/samples-cpp/datalayer.diagnosis/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.diagnosis/snap/snapcraft.yaml @@ -35,7 +35,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-cpp/datalayer.ecat.io/snap/snapcraft.yaml b/samples-cpp/datalayer.ecat.io/snap/snapcraft.yaml index bf9b79bf..1f3d78f1 100644 --- a/samples-cpp/datalayer.ecat.io/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.ecat.io/snap/snapcraft.yaml @@ -33,7 +33,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-cpp/datalayer.provider.all-data/snap/snapcraft.yaml b/samples-cpp/datalayer.provider.all-data/snap/snapcraft.yaml index 2a56aff4..9cfba420 100644 --- a/samples-cpp/datalayer.provider.all-data/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.provider.all-data/snap/snapcraft.yaml @@ -40,7 +40,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-cpp/datalayer.realtime/snap/snapcraft.yaml b/samples-cpp/datalayer.realtime/snap/snapcraft.yaml index 1956da61..472bcaed 100644 --- a/samples-cpp/datalayer.realtime/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.realtime/snap/snapcraft.yaml @@ -45,6 +45,10 @@ parts: plugin: dump source: ./generated/build + deb: + plugin: dump + source: ../../deb/ctrlx-datalayer-1.7.5.deb + # describes which interface slots are supported by defining the plugs plugs: datalayer: diff --git a/samples-cpp/datalayer.register.node/snap/snapcraft.yaml b/samples-cpp/datalayer.register.node/snap/snapcraft.yaml index eb45c7c2..d3730624 100644 --- a/samples-cpp/datalayer.register.node/snap/snapcraft.yaml +++ b/samples-cpp/datalayer.register.node/snap/snapcraft.yaml @@ -36,7 +36,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-cpp/hello.plc/snap/snapcraft.yaml b/samples-cpp/hello.plc/snap/snapcraft.yaml index 44923bcb..78c1491a 100644 --- a/samples-cpp/hello.plc/snap/snapcraft.yaml +++ b/samples-cpp/hello.plc/snap/snapcraft.yaml @@ -35,7 +35,7 @@ parts: deb: plugin: dump - source: ../../deb/ctrlx-datalayer-1.7.4.deb + source: ../../deb/ctrlx-datalayer-1.7.5.deb # describes which interface slots are supported by defining the plugs plugs: diff --git a/samples-go/appdata/README.md b/samples-go/appdata/README.md index 2c6c421a..592fdd5a 100644 --- a/samples-go/appdata/README.md +++ b/samples-go/appdata/README.md @@ -92,7 +92,7 @@ If you've found an error in these sample, please [file an issue](https://github. MIT License -Copyright (c) 2021, Bosch Rexroth AG +Copyright (c) 2021 Bosch Rexroth AG Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/samples-net/README.md b/samples-net/README.md index 1fa30479..04525de3 100644 --- a/samples-net/README.md +++ b/samples-net/README.md @@ -1,382 +1,17 @@ -# README .NET 5.0 Apps @ ctrlX - -![.NET5](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/.NET_Logo.svg/120px-.NET_Logo.svg.png) - -## Introduction - -This document describes how to setup up your development environment on Windows for building __self-contained ctrlX Apps based on Microsoft .NET 5.0 (dotnet5) runtime__. - -__Self-contained__ means, your App contains an already matching and optimized .NET 5.0 runtime for your target architecture, so there's no need to install any additional .NET 5.0 runtime. - -All samples generate Apps (snaps) for the targets: - -+ ctrlXVirtual (amd64) -+ ctrlX (arm64) - -## Pre-requisites - -### Install/Update Microsoft Visual C++ Redistributable for Visual Studio -If you have latest Microsoft Visual Studio including C++ components installed, you can skip this step. - -Please install the latest __Microsoft Visual C++ Redistributable for Visual Studio__ from [here]( -https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0). - -### Install/Update Visual Studio Code (VS Code) - -The ctrlX App IDE is __Microsoft Visual Studio Code__. Please ensure having latest version installed on your system from [here](https://code.visualstudio.com/). - -### Install/Update the virtual machine for Ubuntu 18.04 - -The samples make use of the __virtual machine for Ubuntu 18.04__. Please read common SDK help to setup. Also ensure your __proxy settings__ if you're behind a corporate proxy (Settings -> Proxy). - -Following, please ensure to have the latest Linux environment, by updating your virtual machine: - -1. Open Visual Studio Code -2. Open the Remote Explorer from the menu -3. Connect to your virtual machine. -4. Select __Open Folder__ and navigate to any .NET sample e.g. _hello.world_ -5. Open a new __Terminal__ (Terminal -> New Terminal) -6. Run the following commands in your virtual machine console - - sudo apt update - sudo apt upgrade - -### Prepare the virtual machine - -First, we have to prepare your virtual machine to fetch packages of all supported platform architectures. -Please search for __Dependencies for Crossbuild (Multiarch)__ [here](./../setup_windows_wsl_ubuntu.md) or use the template file provided (please rename your existing to be restored on demand): - -1. Open your virtual machine - -2. Ensure the following content at the end of the file _/etc/apt/sources.list_ - - deb [arch=i386,amd64] http://security.ubuntu.com/ubuntu/ bionic-security main restricted - # deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted - deb [arch=i386,amd64] http://security.ubuntu.com/ubuntu/ bionic-security universe - # deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe - deb [arch=i386,amd64] http://security.ubuntu.com/ubuntu/ bionic-security multiverse - # deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse - - -Alternatively, you can use the provided template _sources.list_ file and copy it from - - ./samples.net/docs/files/sources.list - -to any directory e.g. _c:/temp/sources.list_ - -After that, copy the file from there into the virtual machine - - sudo cp /mnt/c/temp/sources.list /etc/apt - -Update the VS Code Server on the virtual machine: - - Run the following commands in your virtual machine console - - code - -## Installation of .NET 5 into the virtual machine -The following steps are based on [this](https://docs.microsoft.com/de-de/dotnet/core/install/linux-ubuntu#1804-) description - -1. Open the virtual machine -2. Add the Microsoft package signing key to your list of trusted keys - - Run the following commands in your virtual machine console - - wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb - - sudo dpkg -i packages-microsoft-prod.deb - -3. Install the .NET SDK - - Run the following commands in your virtual machine console - - sudo apt-get update; \ - sudo apt-get install -y apt-transport-https && \ - sudo apt-get update && \ - sudo apt-get install -y dotnet-sdk-5.0 - -If you're using __ASP.NET__, install the ASP.NET Runtime - - Run the following commands in your virtual machine console - - sudo apt-get install -y aspnetcore-runtime-5.0 - -1. Check your installed SDK's - - Run the following command in your virtual machine console - - dotnet --list-sdks - - The output should be something like - - 5.0.102 [/usr/share/dotnet/sdk] - -2. Check your Runtime - Run the following command in your virtual machine console - - dotnet --list-runtimes - - The output should be something like - - Microsoft.NETCore.App 5.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App] - -### Prepare NuGet - -If you're behind a corporate proxy, you have to configure the __NuGet Proxy__ in configuration file: - - /home/{USERNAME}/.nuget/NuGet/NuGet.Config - -Edit the NuGet configuration file with your preferred editor or with VS Code and add a _config_ section containing the __http_proxy__ and __https_proxy__ inside the _configuration_ section like shown below. -Alternatively you can copy the provided file - -1. Open the virtual machine - -2. Copy the provided file from - - ./samples.net/docs/files/NuGet.Config - - to folder - - /home/{USERNAME}/.nuget/NuGet - -You can copy it to a temp directory e.g. _c:/temp/NuGet.Config_ - -After that copy the file from there into the virtual machine - - sudo cp /mnt/c/temp/NuGet.Config /home/{USERNAME}/.nuget/NuGet - -__Example:__ - -The following sample uses the [Px Proxy](https://pypi.org/project/px-proxy) at address http://127.0.0.1:3128. -for example: - - - - - - - ... - - -## Install the VS Code extensions from Marketplace -Finally, we have to install some extensions for .NET to be ready for coding. - -![C# extension](./../images/csharpextension.png) - -+ Click on the __Remote Explorer__ from the menu. -+ Choose __Open Folder in the virtual machine. -+ Open any __.NET sample directory (e.g. hello.world).__ - -![.NET Sample](./../images/wsl-helloworld.png) - -+ Open __Extensions__ from the menu. -+ Install the C# Extension and press __Install on Windows Subsystem for Linux__. - -## Building -Each sample provides a rich set of tasks for your convenience. - -![Tasks](./../images/tasks.png) - -+ Click on Terminal -> __Run Task__. -+ Choose your preferred task to run. - -### Build (compile) your code - -+ Click on Terminal -> __Run Task__. -+ Choose Task __build__. - -### Clean your code - -+ Click on Terminal -> __Run Task__. -+ Choose Task __clean__. - -### Publish your (self-contained) application - -+ Click on Terminal -> __Run Task__. -+ Choose any Task __publish *__ matching your architecture and mode. - -### make snap - -+ Click on Terminal -> __Run Task__. -+ Choose any Task __make snap *__ matching your architecture and mode. - -## Debugging - -### Debug on the virtual machine - -Just press __F5__ or - -+ Click on the __Run__ from the menu. -+ Choose Run -> __.NET Core Launch (console)__. -+ Press the green __Play__ button. - -### Debug snap on ctrlXVirtual - -+ Click on Terminal -> __Run Task__. -+ Choose any Task __make snap amd64__. -+ Install snap on ctrlXVirtual via ctrlX web interface -+ For debugging snaps see [here](https://snapcraft.io/docs/debug-snaps) - -### Debug snap on ctrlX - -+ Click on Terminal -> __Run Task__. -+ Choose any Task __make snap arm64__. -+ Install snap on ctrlX via ctrlX web interface -+ For debugging snaps see [here](https://snapcraft.io/docs/debug-snaps) - -Now you're ready to code .NET on ctrlX! Please open any sample directory in the virtual machine using the Remote Explorer and see documentations how to - -## Best Practice - -### Provider Concepts - -There different concepts to write a Data Layer provider: - -#### Create and register nodes with individual node handlers - -Create a provider, which creates and registers _all_ nodes with an _individual_ node handler - - n x CreateNode - n x Register - Node : Handler = 1:1 - -__Recommendation:__ - -+ Use for a _small/medium_ of nodes with _individual_ node handling. -+ Use for a logical grouping and managing of nodes. - -__Pros:__ - -+ The Data Layer is managing your node hierarchy: No implementation of _OnBrowse()_ required (return DL_UNSUPPORTED or DL_OK with an empty list). - -__Contras:__ - -+ Not efficient for a large/very large set of nodes to handle. - -__Samples:__ - -+ datalayer.provider - -#### Create and register nodes with same node handler - -Create a provider, which creates _individual_ nodes and registers all nodes individually with _same_ node handler. - - n x CreateNode - n x Register - Node : Handler = n:1 - -__Recommendation:__ - -+ Use for a _small/medium_ of nodes with _common_ node handling -+ Use for a logical grouping and managing of nodes. - -__Pros:__ - -+ The Data Layer is managing your node hierarchy: No Implementation of _OnBrowse()_ required (return DL_UNSUPPORTED or DL_OK with an empty list). - -__Contras:__ - -+ Not efficent for a large/very large set of nodes to handle. - -__Samples:__ - -+ datalayer.mqtt -+ datalayer.provider.alldata - -#### Virtual provider (lightweight): Register on wildcard and manage virtual nodes - -Create just _one_ node with a single node handler, registered to a _wildcard_ address (e.g. myroot/**) and managing the nodes for your own. This _lightweight_ handler returns _virtual_ nodes in _OnBrowse()_ method. -See Data Layer documentation for details. - - 1 x CreateNode - 1 x Register - Node : Handler = n:1 - -__Recommendation:__ - -+ Use for a _large/very large_ or _dynamic_ set of nodes (big data provider). -+ Use if you want to manage the nodes in your application code. - -__Pros:__ - -+ Very efficient. - -__Contras:__ - -+ The Data Layer is _not_ managaging your node hierarchy: You have to return the valid data in _OnBrowse()_. - -__Samples:__ - -+ datalayer.provider.virtual - -## Pitfalls - -### Arithmetic operators of different integral or floating point types - -The following operators perform arithmetic operations with operands of numeric types: - -+ __Unary__: ++ (increment), -- (decrement), + (plus), and - (minus) operators -+ __Binary__: * (multiplication), / (division), % (remainder), + (addition), and - (subtraction) operators - -Those operators are supported by all integral and floating-point numeric types. - -In the case of integral types, those operators (except the ++ and -- operators) are defined for the __int__, __uint__, __long__, and __ulong__ types. - -When operands are of other integral types (__sbyte__, __byte__, __short__, __ushort__, or __char__), their values are __converted to the int type__, which is also the __result type__ of an operation. - -When operands are of __different integral or floating-point__ types, their values are __converted to the closest containing type__, if such a type exists. For more information, see the Numeric promotions section of the C# language specification. - -The ++ and -- operators are defined for all integral and floating-point numeric types and the char type. - -__Example__: - -Let' say we just wan't to increment a __sbyte__ Variant value by keeping the data type, we have cast the result after performing the arithmetic operation: - - sbyte value = 42; - var oldVariant = new Variant(value) - var newVariant = new Variant((sbyte)(oldVariant.ToSByte() + 1)); - -+ Please see [here](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators) for more information. - - -## Support -### Developer Community - -Please join the [Developer Community](https://developer.community.boschrexroth.com/) - -### SDK Forum - -Please visit the [SDK Forum](https://developer.community.boschrexroth.com/t5/ctrlX-AUTOMATION/ct-p/dcdev_community-bunit-dcae/) - -### Issues - -If you've found an error in these sample, please [file an issue](https://github.com/boschrexroth) - - - -## License - -MIT License - -Copyright (c) 2021 Bosch Rexroth AG - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - +# .NET Samples +![.NET](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/.NET_Logo.svg/120px-.NET_Logo.svg.png) + +## Find out the supported samples + +* [Hello World](./hello.world/README.md) +* [Application Data](./appdata/README.md) +* [ctrlX Data Layer Client](./datalayer.client/README.md) +* [ctrlX Data Layer Client: Browser](./datalayer.client.browse/README.md) +* [ctrlX Data Layer Provider](./datalayer.provider/README.md) +* [ctrlX Data Layer Provider: MQTT 5 Publish / Subscribe / Mirror](./datalayer.mqtt/README.md) +* [ctrlX Data Layer Provider: All Data Types](./datalayer.provider.alldata/README.md) +* [ctrlX Data Layer Provider: Managing Virtual Nodes](./datalayer.provider.virtual/README.md) +* [Diagnostics Logbook](./diagnostics.logbook/README.md) +* [Hello ASP.NET](./hello.web.asp/README.md) diff --git a/samples-net/appdata/appdata.csproj b/samples-net/appdata/appdata.csproj index 6136a311..9d081b49 100644 --- a/samples-net/appdata/appdata.csproj +++ b/samples-net/appdata/appdata.csproj @@ -14,7 +14,7 @@ - + diff --git a/samples-net/datalayer.client.browse/datalayer.client.browse.csproj b/samples-net/datalayer.client.browse/datalayer.client.browse.csproj index f689cb9e..625a551c 100644 --- a/samples-net/datalayer.client.browse/datalayer.client.browse.csproj +++ b/samples-net/datalayer.client.browse/datalayer.client.browse.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples-net/datalayer.client/Program.cs b/samples-net/datalayer.client/Program.cs index 9129737f..cfb2fc3a 100644 --- a/samples-net/datalayer.client/Program.cs +++ b/samples-net/datalayer.client/Program.cs @@ -123,7 +123,7 @@ static void Main(string[] args) var (readResultMemUsed, valueMemUsed) = client.Read(address: memUsed); if (readResultMemUsed.IsGood()) { - Console.WriteLine($"{valueMemUsed.Timestamp}, {memUsed}: {valueMemUsed.ToFloat()} (single read)"); + Console.WriteLine($"{memUsed}: {valueMemUsed.ToFloat()} (single read)"); } } else diff --git a/samples-net/datalayer.client/datalayer.client.csproj b/samples-net/datalayer.client/datalayer.client.csproj index 1f345819..b4765ea3 100644 --- a/samples-net/datalayer.client/datalayer.client.csproj +++ b/samples-net/datalayer.client/datalayer.client.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples-net/datalayer.mqtt/datalayer.mqtt.csproj b/samples-net/datalayer.mqtt/datalayer.mqtt.csproj index 923cb97f..cf93b558 100644 --- a/samples-net/datalayer.mqtt/datalayer.mqtt.csproj +++ b/samples-net/datalayer.mqtt/datalayer.mqtt.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples-net/datalayer.provider.alldata/datalayer.provider.alldata.csproj b/samples-net/datalayer.provider.alldata/datalayer.provider.alldata.csproj index 0c475cf8..3d3b4dcd 100644 --- a/samples-net/datalayer.provider.alldata/datalayer.provider.alldata.csproj +++ b/samples-net/datalayer.provider.alldata/datalayer.provider.alldata.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples-net/datalayer.provider.virtual/datalayer.provider.virtual.csproj b/samples-net/datalayer.provider.virtual/datalayer.provider.virtual.csproj index 6f580b58..85cac1bb 100644 --- a/samples-net/datalayer.provider.virtual/datalayer.provider.virtual.csproj +++ b/samples-net/datalayer.provider.virtual/datalayer.provider.virtual.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/samples-net/datalayer.provider/datalayer.provider.csproj b/samples-net/datalayer.provider/datalayer.provider.csproj index cc5be115..b87846b3 100644 --- a/samples-net/datalayer.provider/datalayer.provider.csproj +++ b/samples-net/datalayer.provider/datalayer.provider.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples-net/hello.web.asp/README.md b/samples-net/hello.web.asp/README.md new file mode 100644 index 00000000..edf52f5b --- /dev/null +++ b/samples-net/hello.web.asp/README.md @@ -0,0 +1,84 @@ +# README .NET hello asp.net + +This .NET sample is a simple ASP.NET application. + +## Introduction + +Programm shows how to write a ASP.NET application running on ctrlX. + +## Description + +The following code shows the main method with inline documentation: + +[Program.cs](https://github.com/boschrexroth/ctrlx-automation-sdk/blob/main/samples-net/hello.web.asp/Program.cs) + +## Prerequisites + +Please read the common .NET docs [here](./../README.md), first. + +## Getting Started + +1. Launch Visual Studio Code +2. Click on the __Remote Explorer__ from the menu. +3. Choose __Open Folder__. +4. Open the directory __hello.web.asp__. +5. Build and install snap as described [here](./../README.md). +6. Check the output using __Diagnostics__: + + + Login into your ctrlX + + Navigate to __Diagnostics -> Logbook__ + + Click __Settings__ on the right top corner + + Enable __Show system messages__ + + Navigate to __Filter -> Units__ and check your __snap.ctrlx-dotnet-hello-web-asp.app.service__ + + Now you should the see the app output diagnostics. + + Press __Refresh__ to update. + +7. If you have root permissions, you can also watch the output on any ssh console with the command: + + ```bash + sudo snap logs ctrlx-dotnet-hello-web-asp.app -f | more + ``` + +## Install the App + +Login into ctrlX and install the App (Apps). + +## Gratulations - We're finished - Let's start coding! + + +## Support +### Developer Community + +Please join the [Developer Community](https://developer.community.boschrexroth.com/) + +### SDK Forum + +Please visit the [SDK Forum](https://developer.community.boschrexroth.com/t5/ctrlX-AUTOMATION/ct-p/dcdev_community-bunit-dcae/) + +### Issues + +If you've found an error in these sample, please [file an issue](https://github.com/boschrexroth) + +## License + +MIT License + +Copyright (c) 2021 Bosch Rexroth AG + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/samples-net/hello.web.asp/hello.web.asp.csproj b/samples-net/hello.web.asp/hello.web.asp.csproj index f4afdb69..30524c08 100644 --- a/samples-net/hello.web.asp/hello.web.asp.csproj +++ b/samples-net/hello.web.asp/hello.web.asp.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples-net/hello.web.asp/services/DataLayerService.cs b/samples-net/hello.web.asp/services/DataLayerService.cs index 7c9a162a..b2fcee1a 100644 --- a/samples-net/hello.web.asp/services/DataLayerService.cs +++ b/samples-net/hello.web.asp/services/DataLayerService.cs @@ -74,7 +74,6 @@ public NodeValue ReadNodeValue(string address) Address = address, Value = string.Format(CultureInfo.InvariantCulture, "{0}", variant.Value), Type = variant.JsonDataType, - Timestamp = variant.Timestamp, Result = result.ToString() }; diff --git a/samples-node/datalayer.client/.vscode/tasks.json b/samples-node/datalayer.client/.vscode/tasks.json index 0b0eb973..f18c467e 100644 --- a/samples-node/datalayer.client/.vscode/tasks.json +++ b/samples-node/datalayer.client/.vscode/tasks.json @@ -9,7 +9,7 @@ }, "type": "shell", "problemMatcher": [], - "command": "ln -s -v -f ${workspaceFolder}/../../nodejs/ctrlx-datalayer-nodejs-1.0.1.tgz ctrlx-datalayer-nodejs.tgz", + "command": "ln -s -v -f ${workspaceFolder}/../../nodejs/ctrlx-datalayer-nodejs-1.0.2.tgz ctrlx-datalayer-nodejs.tgz", "options": { "cwd": "${workspaceFolder}/src" } diff --git a/samples-node/datalayer.provider/.vscode/tasks.json b/samples-node/datalayer.provider/.vscode/tasks.json index 2216a83c..faa77e91 100644 --- a/samples-node/datalayer.provider/.vscode/tasks.json +++ b/samples-node/datalayer.provider/.vscode/tasks.json @@ -9,7 +9,7 @@ }, "type": "shell", "problemMatcher": [], - "command": "ln -s -v -f ${workspaceFolder}/../../nodejs/ctrlx-datalayer-nodejs-1.0.1.tgz ctrlx-datalayer-nodejs.tgz", + "command": "ln -s -v -f ${workspaceFolder}/../../nodejs/ctrlx-datalayer-nodejs-1.0.2.tgz ctrlx-datalayer-nodejs.tgz", "options": { "cwd": "${workspaceFolder}/src" } diff --git a/samples-python/datalayer.provider/app/my_provider_node.py b/samples-python/datalayer.provider/app/my_provider_node.py index f14d0c2a..d1d6ba43 100644 --- a/samples-python/datalayer.provider/app/my_provider_node.py +++ b/samples-python/datalayer.provider/app/my_provider_node.py @@ -1,6 +1,6 @@ # MIT License # -# Copyright (c) 2021, Bosch Rexroth AG +# Copyright (c) 2021 Bosch Rexroth AG # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal