commit bbc704fe6ba8edba5b6b1b6f59cd9f324b31acef Author: Szakáts Alpár Zsolt Date: Wed Aug 6 15:37:24 2025 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..add57be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ \ No newline at end of file diff --git a/Automatic Parking.sln b/Automatic Parking.sln new file mode 100644 index 0000000..a55ff74 --- /dev/null +++ b/Automatic Parking.sln @@ -0,0 +1,8 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..500d73a --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Automatic Parking diff --git a/Source/.dockerignore b/Source/.dockerignore new file mode 100644 index 0000000..cd967fc --- /dev/null +++ b/Source/.dockerignore @@ -0,0 +1,25 @@ +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/.idea +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/Source/ProofOfConcept/Dockerfile b/Source/ProofOfConcept/Dockerfile new file mode 100644 index 0000000..b944092 --- /dev/null +++ b/Source/ProofOfConcept/Dockerfile @@ -0,0 +1,23 @@ +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +USER $APP_UID +WORKDIR /app +EXPOSE 8080 +EXPOSE 8081 + +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["ProofOfConcept/ProofOfConcept.csproj", "ProofOfConcept/"] +RUN dotnet restore "ProofOfConcept/ProofOfConcept.csproj" +COPY . . +WORKDIR "/src/ProofOfConcept" +RUN dotnet build "./ProofOfConcept.csproj" -c $BUILD_CONFIGURATION -o /app/build + +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./ProofOfConcept.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "ProofOfConcept.dll"] diff --git a/Source/ProofOfConcept/Resources/Signature/private-key.pem b/Source/ProofOfConcept/Resources/Signature/private-key.pem new file mode 100644 index 0000000..93c7298 --- /dev/null +++ b/Source/ProofOfConcept/Resources/Signature/private-key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEILhLK/yU2FhrSsxvKbclNq8bRkV1fLb3qIHGfNOWwEyZoAoGCCqGSM49 +AwEHoUQDQgAE/2+0ZNUwcsa7C2kkQa6J4egse3+NTnFd7DKlLOcEZGrCBn/mfxsZ +UpQoVCeoh4j6w5ue471Ott70qpsRuOtjbQ== +-----END EC PRIVATE KEY----- diff --git a/Source/ProofOfConcept/Resources/Signature/public-key.pem b/Source/ProofOfConcept/Resources/Signature/public-key.pem new file mode 100644 index 0000000..77a8f36 --- /dev/null +++ b/Source/ProofOfConcept/Resources/Signature/public-key.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/2+0ZNUwcsa7C2kkQa6J4egse3+N +TnFd7DKlLOcEZGrCBn/mfxsZUpQoVCeoh4j6w5ue471Ott70qpsRuOtjbQ== +-----END PUBLIC KEY----- diff --git a/Source/ProofOfConcept/Services/MQTTClient.cs b/Source/ProofOfConcept/Services/MQTTClient.cs new file mode 100644 index 0000000..b4b6913 --- /dev/null +++ b/Source/ProofOfConcept/Services/MQTTClient.cs @@ -0,0 +1,24 @@ +namespace ProofOfConcept.Services; + +public class MQTTClient +{ + private ILogger logger; + private MQTTClientConfiguration configuration; + + public MQTTClient(ILogger logger, IOptionsMonitor options) + { + this.logger = logger; + this.configuration = options.CurrentValue; + + options.OnChange(newValue => + { + this.configuration = newValue; + logger.LogInformation("Configuration of {ClassName} changed", nameof(MQTTClient)); + }); + } +} + +public class MQTTClientConfiguration +{ + +} \ No newline at end of file diff --git a/Source/ProofOfConcept/Services/MQTTServer.cs b/Source/ProofOfConcept/Services/MQTTServer.cs new file mode 100644 index 0000000..02102d7 --- /dev/null +++ b/Source/ProofOfConcept/Services/MQTTServer.cs @@ -0,0 +1,24 @@ +namespace ProofOfConcept.Services; + +public class MQTTServer +{ + private ILogger logger; + private MQTTServerConfiguration configuration; + + public MQTTServer(ILogger logger, IOptionsMonitor options) + { + this.logger = logger; + this.configuration = options.CurrentValue; + + options.OnChange(newValue => + { + this.configuration = newValue; + logger.LogInformation("Configuration of {ClassName} changed", nameof(MQTTServer)); + }); + } +} + +public class MQTTServerConfiguration +{ + +} \ No newline at end of file diff --git a/Source/ProofOfConcept/Services/MessageProcessor.cs b/Source/ProofOfConcept/Services/MessageProcessor.cs new file mode 100644 index 0000000..adc6587 --- /dev/null +++ b/Source/ProofOfConcept/Services/MessageProcessor.cs @@ -0,0 +1,24 @@ +namespace ProofOfConcept.Services; + +public class MessageProcessor +{ + private ILogger logger; + private MessageProcessorConfiguration configuration; + + public MessageProcessor(ILogger logger, IOptionsMonitor options) + { + this.logger = logger; + this.configuration = options.CurrentValue; + + options.OnChange(newValue => + { + this.configuration = newValue; + logger.LogInformation("Configuration of {ClassName} changed", nameof(MessageProcessor)); + }); + } +} + +public class MessageProcessorConfiguration +{ + +} \ No newline at end of file