IotHubModuleClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains methods that a module can use to send messages to and receive from the service and interact with module twins.
public class IotHubModuleClient : Microsoft.Azure.Devices.Client.IotHubBaseClient
type IotHubModuleClient = class
inherit IotHubBaseClient
Public Class IotHubModuleClient
Inherits IotHubBaseClient
- Inheritance
Constructors
IotHubModuleClient(String, IAuthenticationMethod, IotHubClientOptions) |
Creates a disposable |
IotHubModuleClient(String, IotHubClientOptions) |
Creates a disposable |
Properties
ConnectionStatusChangeCallback |
The callback to be executed each time connection status change notification is received. (Inherited from IotHubBaseClient) |
ConnectionStatusInfo |
The latest connection status information since the last status change. (Inherited from IotHubBaseClient) |
Methods
CloseAsync(CancellationToken) |
Close the client instance. (Inherited from IotHubBaseClient) |
CreateFromEnvironmentAsync(IotHubClientOptions) |
Creates a disposable |
Dispose() |
Releases the unmanaged resources used by the client and optionally disposes of the managed resources. (Inherited from IotHubBaseClient) |
Dispose(Boolean) |
Releases the unmanaged resources used by the client and allows for any derived class to override and provide custom implementation. |
GetTwinPropertiesAsync(CancellationToken) |
Retrieve the twin properties for the current client. (Inherited from IotHubBaseClient) |
InvokeMethodAsync(String, DirectMethodRequest, CancellationToken) |
Interactively invokes a method from an edge module to an edge device. Both the edge module and the edge device need to be connected to the same edge hub. IotHubModuleClient instance must be opened already. |
InvokeMethodAsync(String, String, DirectMethodRequest, CancellationToken) |
Interactively invokes a method from an edge module to a different edge module. Both of the edge modules need to be connected to the same edge hub. IotHubModuleClient instance must be opened already. |
OpenAsync(CancellationToken) |
Open the client instance. Must be done before any operation can begin. (Inherited from IotHubBaseClient) |
SendTelemetryAsync(String, TelemetryMessage, CancellationToken) |
Sends an event to IoT hub. IotHubModuleClient instance must be opened already. |
SendTelemetryAsync(TelemetryMessage, CancellationToken) |
Sends a telemetry message to IoT hub. (Inherited from IotHubBaseClient) |
SendTelemetryBatchAsync(IEnumerable<TelemetryMessage>, CancellationToken) |
Sends a batch of telemetry message to IoT hub. (Inherited from IotHubBaseClient) |
SendTelemetryBatchAsync(String, IEnumerable<TelemetryMessage>, CancellationToken) |
Sends a batch of events to IoT hub. Use AMQP or HTTPs for a true batch operation. MQTT will just send the messages one after the other. IotHubModuleClient instance must be opened already. |
SetDesiredPropertyUpdateCallbackAsync(Func<DesiredProperties,Task>, CancellationToken) |
Set a callback that will be called whenever the client receives a desired state update from the service. The client instance must be opened already. (Inherited from IotHubBaseClient) |
SetDirectMethodCallbackAsync(Func<DirectMethodRequest,Task<DirectMethodResponse>>, CancellationToken) |
Sets the callback for all direct method calls from the service. This instance must be opened already. (Inherited from IotHubBaseClient) |
SetIncomingMessageCallbackAsync(Func<IncomingMessage,Task<MessageAcknowledgement>>, CancellationToken) |
Sets a callback for receiving a message from the device or module queue using a cancellation token. This instance must be opened already. (Inherited from IotHubBaseClient) |
UpdateReportedPropertiesAsync(ReportedProperties, CancellationToken) |
Push reported property changes up to the service. (Inherited from IotHubBaseClient) |