Created
March 10, 2020 02:15
-
-
Save chrismckelt/9b1a3923f31a657fa3a6ff9f1a9e417a to your computer and use it in GitHub Desktop.
Azure IoT Edge Demo DataRecorder.cs
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
ModuleClient ioTHubModuleClient; | |
var connectionSettings = new MqttTransportSettings(TransportType.Mqtt_Tcp_Only); | |
ITransportSettings[] settings = { connectionSettings }; | |
ioTHubModuleClient = await ModuleClient.CreateFromEnvironmentAsync(); | |
await ioTHubModuleClient.OpenAsync(); // Open a connection to the Edge runtime | |
// Register callback to be called when a message is received by the module | |
await ioTHubModuleClient.SetInputMessageHandlerAsync("input1", PipeMessage, ioTHubModuleClient); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment