azure-iot-device package
Classes
Message |
The Message object is used for telemetry (device-to-cloud) and commands (cloud-to-device) asynchronous messaging between the device and the IoT Hub service. It is transport-agnostic, meaning it works the same way over AMQP, MQTT and HTTP. |
Client |
IoT Hub device client used to connect a device with an Azure IoT hub. Users of the SDK should call one of the factory methods, fromConnectionString or fromSharedAccessSignature to create an IoT Hub device client. |
DeviceMethodRequest |
Represents the data passed in from the service to the device when a device method is called from the cloud. An instance of this class is passed to the callback registered via onDeviceMethod(string, (request: DeviceMethodRequest, response: DeviceMethodResponse) => void). |
DeviceMethodResponse |
a DeviceMethodResponse object is provided to the user with each DeviceMethodRequest allowing the user to construct and send a well-formatted response back to the service for each device method call. An instance of this class is passed as the second parameter to the callback registered via onDeviceMethod(string, (request: DeviceMethodRequest, response: DeviceMethodResponse) => void). |
IotEdgeAuthenticationProvider |
Provides an This type inherits from |
ModuleClient |
IoT Hub device client used to connect a device with an Azure IoT hub. Users of the SDK should call one of the factory methods, fromConnectionString or fromSharedAccessSignature to create an IoT Hub device client. |
SharedAccessKeyAuthenticationProvider |
Provides an The |
SharedAccessSignatureAuthenticationProvider |
Provides an The |
Twin |
A Device Twin is document describing the state of a device that is stored by an Azure IoT hub and is available even if the device is offline. It is built around 3 sections:
Note that although it is a possibility, desired and reported properties do not have to match and that the logic to sync these two collections, if necessary, is left to the user of the SDK. For more information see Understanding Device Twins. |
X509AuthenticationProvider |
Provides an Unlike the |
Interfaces
AmqpTransportOptions |
Options which are specific to the AMQP transport. This is passed into setOptions as a property named See |
DeviceClientOptions |
Options for the Client object. Passed into the setOptions function. Example
|
DeviceTransport | |
HttpReceiverOptions |
Options structure used to configure how often the HTTP receiver polls for messages.
Each of these options is mutually exclusive, except for the This is configured by calling setOptions with this as a property named See |
HttpTransportOptions |
Options structure for passing optional configuration parameters into the Http Transport. This is passed into setOptions as a property named See |
MqttTransportOptions |
Options which are specific to the MQTT transport This is passed into setOptions as a property named |
TwinProperties |
Contains the desired and reported properties for the Twin. |
Type Aliases
BufferConvertible |
Functions
get |
|
get |
|
get |
|
get |
Function Details
getUserAgentString(NoErrorCallback<string>)
function getUserAgentString(done: NoErrorCallback<string>)
Parameters
- done
-
NoErrorCallback<string>
getUserAgentString()
function getUserAgentString(): Promise<string>
Returns
Promise<string>
getUserAgentString(string, NoErrorCallback<string>)
function getUserAgentString(productInfo: string, done: NoErrorCallback<string>)
Parameters
- productInfo
-
string
- done
-
NoErrorCallback<string>
getUserAgentString(string)
function getUserAgentString(productInfo: string): Promise<string>
Parameters
- productInfo
-
string
Returns
Promise<string>