Here we parse the [`ServerSettings.xml` file](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/a7a78842b8d27ee4233c1f6648f2fc2b44e93f39/cs-module/ServerSettings.xml) for our server settings.
This file was part of the original example.
This file was part of the original example and as there are settings for some image stuff I ued it as base.
After the initial parsing we get the `PORT` environment variable or set it to 4000 if it doesn't exist.
The list of endpoints in the `ServerSettings.xml` will then be replaced by just our endpoint.
We need a registry client to register and unregister our AAS at the remote registry.
The client also needs settings to know where to connect to.
We need a registry client to register and unregister our AAS descriptor at the remote registry.
The client also needs settings to know where to connect to, so we get the `REGISTRYPATH` environment variable or set another default value.
The settings could also be placed in an XML file and an [example is provided](https://github.com/eclipse-basyx/basyx-dotnet-components/blob/main/BaSyx.Registry.Client.Http/RegistryClientSettings.xml) when installing the `BaSyx.Registry.Client.Http` dependency (only shown in the project map, not uploaded to the repository).
These settings could also be placed in an XML file and an [example is provided](https://github.com/eclipse-basyx/basyx-dotnet-components/blob/main/BaSyx.Registry.Client.Http/RegistryClientSettings.xml) when installing the `BaSyx.Registry.Client.Http` dependency (only shown in the project map, not uploaded to the repository).
```cs
server.WebHostBuilder.UseNLog();
...
...
@@ -126,14 +132,32 @@ Similar to before we use and define some namespaces.
This basically is the same thing as above but for deactivating the light.
After that we will either call `raspi-gpio` but only if we have a `gpioPort` set or we will only log to the command line.
If something happens while calling `raspi-gpio` the result will be set to `false`.
In the end we return our operation result.
Basically the exact opposit is done in the function `LightDeactivateOperationHandler` so we will skip further explanation.
```cs
public override IAssetAdministrationShell BuildAssetAdministrationShell() {
...
...
@@ -213,7 +275,7 @@ Here we create all the assets, submodules, properties, operations, etc. we want
```cs
AssetAdministrationShell aas = new AssetAdministrationShell("greenLight_0", new Identifier("urn:de.olipar.basyx:cscomponent:greenLight_0", KeyType.IRI)) {