IotHubDeviceClient Class

Definition

Contains methods that a device can use to send messages to and receive from the service.

public class IotHubDeviceClient : Microsoft.Azure.Devices.Client.IotHubBaseClient
type IotHubDeviceClient = class
    inherit IotHubBaseClient
Public Class IotHubDeviceClient
Inherits IotHubBaseClient
Inheritance
IotHubDeviceClient

Constructors

IotHubDeviceClient(String, IAuthenticationMethod, IotHubClientOptions)

Creates a disposable IotHubDeviceClient from the specified parameters.

IotHubDeviceClient(String, IotHubClientOptions)

Creates a disposable IotHubDeviceClient from the specified connection string.

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)
CompleteFileUploadAsync(FileUploadCompletionNotification, CancellationToken)

Notify IoT hub that a device's file upload has finished.

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.

GetFileUploadSasUriAsync(FileUploadSasUriRequest, CancellationToken)

Get a file upload SAS URI which the Azure Storage SDK can use to upload a file to blob for this device

GetTwinPropertiesAsync(CancellationToken)

Retrieve the twin properties for the current client.

(Inherited from IotHubBaseClient)
OpenAsync(CancellationToken)

Open the client instance. Must be done before any operation can begin.

(Inherited from IotHubBaseClient)
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)
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)

Applies to