-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clean samples * add sample, force chain validator * update sample * docker mqtt-connection * ci samples * force samples build * add puback to mqtt-connection log * fix grpc topics * chiesield * Feat/dotnet7 (#93) * upd memmon to don7 * upd samples to dotnet7 * clean warnings * change trace erros in x509 chain Co-authored-by: ridomin <[email protected]> * upd pi docker * fix grpc build * grpc log warning * ref AI, upd pkgs * add test to validate extra chars in DPS client * check version when serializing shadow (#96) * upd devcontainer to dotnet7 * skip aws tests * deserialize birth * Add support for EdgeModules (#98) * support edge modules * adding tests --------- Co-authored-by: rido-min <[email protected]> * RequestResponse Binder (#97) * add requestResponseBinder * new RR Binder (wip) * green --------- Co-authored-by: ridomin <[email protected]> * TelemetryClient and controlApp * cleanup * added consumers * move WithHubCredentials (#99) Co-authored-by: ridomin <[email protected]> * add cmd invoker * add generic commands * add v5 and RequestResponse * mv debug sln --------- Co-authored-by: rido-min <[email protected]>
- Loading branch information
Showing
111 changed files
with
1,302 additions
and
742 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
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,25 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Worker"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<UserSecretsId>dotnet-ControlApp-8834a165-c677-427f-a11c-bc8d11a84a46</UserSecretsId> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\MQTTnet.Extensions.MultiCloud.BrokerIoTClient\MQTTnet.Extensions.MultiCloud.BrokerIoTClient.csproj" /> | ||
</ItemGroup> | ||
</Project> |
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,10 @@ | ||
using ControlApp; | ||
|
||
IHost host = Host.CreateDefaultBuilder(args) | ||
.ConfigureServices(services => | ||
{ | ||
services.AddHostedService<Worker>(); | ||
}) | ||
.Build(); | ||
|
||
host.Run(); |
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,34 @@ | ||
using MQTTnet.Extensions.MultiCloud.BrokerIoTClient; | ||
|
||
namespace ControlApp | ||
{ | ||
public class Worker : BackgroundService | ||
{ | ||
private readonly ILogger<Worker> _logger; | ||
private readonly IConfiguration _configuration; | ||
|
||
public Worker(ILogger<Worker> logger, IConfiguration configuration) | ||
{ | ||
_logger = logger; | ||
_configuration = configuration; | ||
} | ||
|
||
protected override async Task ExecuteAsync(CancellationToken stoppingToken) | ||
{ | ||
var mqttClient = await BrokerClientFactory.CreateFromConnectionSettingsAsync(_configuration.GetConnectionString("cs")!, false, stoppingToken); | ||
TelemetryClient<double> telClient = new(mqttClient, "workingSet"); | ||
CommandClient<string, string> cmdClient = new(mqttClient, "echo"); | ||
|
||
var res = await cmdClient.InvokeAsync("mqtt-command-device", "hello3", stoppingToken); | ||
|
||
_logger.LogInformation("Command response {r}", res); | ||
|
||
await telClient.StartAsync("+"); | ||
|
||
telClient.OnTelemetry = (id,m) => | ||
{ | ||
_logger.LogInformation("Telemetry from {id} workingSet {m}", id, m); | ||
}; | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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,37 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.33516.290 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlApp", "ControlApp\ControlApp.csproj", "{DA9074C9-219F-464D-8A1D-622EC206CFFA}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Extensions.MultiCloud.BrokerIoTClient", "..\src\MQTTnet.Extensions.MultiCloud.BrokerIoTClient\MQTTnet.Extensions.MultiCloud.BrokerIoTClient.csproj", "{9A7F4B31-58B1-4D16-9C62-37136F716F6A}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Extensions.MultiCloud", "..\src\MQTTnet.Extensions.MultiCloud\MQTTnet.Extensions.MultiCloud.csproj", "{E0725F33-BA7C-4407-AF96-4EACF9AAB9CA}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{DA9074C9-219F-464D-8A1D-622EC206CFFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{DA9074C9-219F-464D-8A1D-622EC206CFFA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{DA9074C9-219F-464D-8A1D-622EC206CFFA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{DA9074C9-219F-464D-8A1D-622EC206CFFA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{9A7F4B31-58B1-4D16-9C62-37136F716F6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9A7F4B31-58B1-4D16-9C62-37136F716F6A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9A7F4B31-58B1-4D16-9C62-37136F716F6A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9A7F4B31-58B1-4D16-9C62-37136F716F6A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{E0725F33-BA7C-4407-AF96-4EACF9AAB9CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E0725F33-BA7C-4407-AF96-4EACF9AAB9CA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E0725F33-BA7C-4407-AF96-4EACF9AAB9CA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E0725F33-BA7C-4407-AF96-4EACF9AAB9CA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {BF1136C9-5DC3-499F-91BA-7C9549764A11} | ||
EndGlobalSection | ||
EndGlobal |
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
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
Oops, something went wrong.