Skip to content

Commit 2eb57a7

Browse files
committedNov 17, 2016
IoT Hub: terminology update
1 parent 12ceb36 commit 2eb57a7

4 files changed

+14
-14
lines changed
 

‎articles/iot-hub/iot-hub-csharp-csharp-direct-methods.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ To complete this tutorial you need the following:
3939
[!INCLUDE [iot-hub-get-started-create-hub-pp](../../includes/iot-hub-get-started-create-hub-pp.md)]
4040

4141
## Create a simulated device app
42-
In this section, you create a Node.js console app that responds to a method called by the cloud.
42+
In this section, you create a Node.js console app that responds to a method called by the back end.
4343

4444
1. Create a new empty folder called **simulateddevice**. In the **simulateddevice** folder, create a package.json file using the following command at your command-prompt. Accept all the defaults:
4545

4646
```
4747
npm init
4848
```
49-
2. At your command-prompt in the **simulateddevice** folder, run the following command to install the **azure-iot-device** Device SDK package and **azure-iot-device-mqtt** package:
49+
2. At your command-prompt in the **simulateddevice** folder, run the following command to install the **azure-iot-device** and **azure-iot-device-mqtt** packages:
5050
5151
```
5252
npm install azure-iot-device azure-iot-device-mqtt --save
@@ -66,7 +66,7 @@ In this section, you create a Node.js console app that responds to a method call
6666
var connectionString = '{device connection string}';
6767
var client = DeviceClient.fromConnectionString(connectionString, Mqtt);
6868
```
69-
6. Add the following function to implement the method on the device:
69+
6. Add the following function to implement the direct method on the device:
7070
7171
```
7272
function onWriteLine(request, response) {
@@ -81,7 +81,7 @@ In this section, you create a Node.js console app that responds to a method call
8181
});
8282
}
8383
```
84-
7. Open the connection to your IoT hub and start initialize the method listener:
84+
7. Open the connection to your IoT hub and initialize the method listener:
8585
8686
```
8787
client.open(function(err) {
@@ -100,8 +100,8 @@ In this section, you create a Node.js console app that responds to a method call
100100
>
101101
>
102102
103-
## Call a method on a device
104-
In this section, you create a Node.js console app that calls a method on the simulated device and then displays the response.
103+
## Call a direct method on a device
104+
In this section, you create a .NET console app that calls a method on the simulated device and then displays the response.
105105
106106
1. In Visual Studio, add a Visual C# Windows Classic Desktop project to the current solution by using the **Console Application** project template. Make sure the .NET Framework version is 4.5.1 or later. Name the project **CallMethodOnDevice**.
107107

‎articles/iot-hub/iot-hub-devguide-direct-methods.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ ms.author: nberdy
1919
---
2020
# Invoke a direct method on a device
2121
## Overview
22-
IoT Hub gives you ability to invoke methods on devices from the cloud. Methods represent a request-reply interaction with a device similar to an HTTP call in that they succeed or fail immediately (after a user-specified timeout). This is useful for scenarios where the course of immediate action is different depending on whether the device was able to respond, such as sending an SMS wake-up to a device if a device is offline (SMS being more expensive than a method call).
22+
IoT Hub gives you ability to invoke direct methods on devices from the cloud. Direct methods represent a request-reply interaction with a device similar to an HTTP call in that they succeed or fail immediately (after a user-specified timeout). This is useful for scenarios where the course of immediate action is different depending on whether the device was able to respond, such as sending an SMS wake-up to a device if a device is offline (SMS being more expensive than a method call).
2323

24-
Each device method targets a single device. [Jobs][lnk-devguide-jobs] provide a way to invoke methods on multiple devices, and schedule method invocation for disconnected devices.
24+
Each device method targets a single device. [Jobs][lnk-devguide-jobs] provide a way to invoke direct methods on multiple devices, and schedule method invocation for disconnected devices.
2525

2626
Anyone with **service connect** permissions on IoT Hub may invoke a method on a device.
2727

2828
### When to use
29-
Methods follow a request-response pattern and are meant for communications that require immediate confirmation of their result, usually interactive control of the device, e.g. turn on a fan.
29+
Direct methods follow a request-response pattern and are meant for communications that require immediate confirmation of their result, usually interactive control of the device, for example to turn on a fan.
3030

3131
Refer to [Cloud-to-device communication guidance][lnk-c2d-guidance] if in doubt between using desired properties, direct methods, or cloud-to-device messages.
3232

3333
## Method lifecycle
34-
Methods are implemented on the device and may require zero or more inputs in the method payload to correctly instantiate. You invoke a direct method through a service-facing URI (`{iot hub}/twins/{device id}/methods/`). A device receives direct methods through a device-specific MQTT topic (`$iothub/methods/POST/{method name}/`). We may support methods on additional device-side networking protocols in the future.
34+
Direct methods are implemented on the device and may require zero or more inputs in the method payload to correctly instantiate. You invoke a direct method through a service-facing URI (`{iot hub}/twins/{device id}/methods/`). A device receives direct methods through a device-specific MQTT topic (`$iothub/methods/POST/{method name}/`). We may support direct methods on additional device-side networking protocols in the future.
3535

3636
> [!NOTE]
3737
> When you invoke a direct method on a device, property names and values can only contain US-ASCII printable alphanumeric, except any in the following set: ``{'$', '(', ')', '<', '>', '@', ',', ';', ':', '\', '"', '/', '[', ']', '?', '=', '{', '}', SP, HT}``.
3838
>
3939
>
4040
41-
Methods are synchronous and either succeed or fail after the timeout period (default: 30 seconds, settable up to 3600 seconds). Methods are useful in interactive scenarios where you want a device to act if and only if the device is online and receiving commands, such as turning on a light from a phone. In these scenarios, you want to see an immediate success or failure so the cloud service can act on the result as soon as possible. The device may return some message body as a result of the method, but it isn't required for the method to do so. There is no guarantee on ordering or any concurrency semantics on method calls.
41+
Direct methods are synchronous and either succeed or fail after the timeout period (default: 30 seconds, settable up to 3600 seconds). Direct methods are useful in interactive scenarios where you want a device to act if and only if the device is online and receiving commands, such as turning on a light from a phone. In these scenarios, you want to see an immediate success or failure so the cloud service can act on the result as soon as possible. The device may return some message body as a result of the method, but it isn't required for the method to do so. There is no guarantee on ordering or any concurrency semantics on method calls.
4242

4343
Device method calls are HTTP-only from the cloud side, and MQTT-only from the device side.
4444

‎articles/iot-hub/iot-hub-devguide-query-language.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Note how the **query** object is instantiated with a page size (up to 1000), and
167167
It is important to note that the query object exposes multiple **next\***, depending on the deserialization option required by the query, such as device twin or job objects, or plain Json to be used when using projections.
168168

169169
### Limitations
170-
Currently, comparisons are supported only between primitive types (i.e. no objects), for instance `... WHERE properties.desired.config = properties.reported.config` is supported only if those properties have primitive values.
170+
Currently, comparisons are supported only between primitive types (no objects), for instance `... WHERE properties.desired.config = properties.reported.config` is supported only if those properties have primitive values.
171171

172172
## Getting started with jobs queries
173173
[Jobs][lnk-jobs] provide a way to execute operations on sets of devices. Each device twin contains the information of the jobs of which it is part in a collection called **jobs**.
@@ -200,7 +200,7 @@ Logically,
200200
]
201201
}
202202

203-
Currently, this collection is queriable as **devices.jobs** in the IoT Hub query language.
203+
Currently, this collection is queryable as **devices.jobs** in the IoT Hub query language.
204204

205205
> [!IMPORTANT]
206206
> Currently, the jobs property is never returned when querying device twins (i.e. queries that contains 'FROM devices'). It can only be accessed directly with queries using `FROM devices.jobs`.

‎articles/iot-hub/iot-hub-devguide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Azure IoT Hub provides you with:
2424

2525
* Secure communications by using per-device security credentials and access control.
2626
* Multiple device-to-cloud and cloud-to-device hyper-scale communication options.
27-
* A queriable storage of per-device state information and meta-data.
27+
* A queryable storage of per-device state information and meta-data.
2828
* Easy device connectivity with device libraries for the most popular languages and platforms.
2929

3030
This IoT Hub developer guide includes the following articles:

0 commit comments

Comments
 (0)