Skip to content

Commit 77e0164

Browse files
committed
sample finalized
1 parent e7023c5 commit 77e0164

File tree

1 file changed

+26
-56
lines changed

1 file changed

+26
-56
lines changed

articles/iot-operations/develop-edge-apps/quickstart-get-started-sdks.md

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Before you begin, prepare the following prerequisites:
2323

2424
* Azure access permissions. For more information, see [Deployment details > Required permissions](../deploy-iot-ops/overview-deploy.md#required-permissions).
2525

26+
<!-- TODO: Confirm it works for options VS Code Dev Containers and WSL -->
2627
## Setting up
2728

2829
Developing with the Azure IoT Operations SDKs requires a Kubernetes cluster with Azure IoT Operations deployed. Additional configuration will allow the MQTT broker to be accessed directly from the developer environment.
@@ -295,6 +296,7 @@ To test the setup is working correctly, use `mosquitto_pub` to connect to the MQ
295296
mosquitto_pub -L mqtts://localhost:8884/hello -m world --cafile $SESSION/broker-ca.crt -D CONNECT authentication-method K8S-SAT -D CONNECT authentication-data $(cat $SESSION/token.txt) --debug
296297
```
297298

299+
<!-- TODO: Add the Go and Rust samples -->
298300
## Run a Sample
299301

300302
This sample demonstrates a simple communication between a client and a server using [telemetry](https://github.com/Azure/iot-operations-sdks/blob/main/doc/reference/telemetry.md) and [remote procedure call (RPC)](https://github.com/Azure/iot-operations-sdks/blob/main/doc/reference/rpc-protocol.md). The server tracks the value of a counter and accepts RPC requests from the client to either read or increment that counter.
@@ -339,34 +341,31 @@ This sample demonstrates a simple communication between a client and a server us
339341
source `git rev-parse --show-toplevel`/.env; export AIO_MQTT_CLIENT_ID=counter-client; export COUNTER_SERVER_ID=counter-server; dotnet run
340342
```
341343

342-
1. You should see the client and server communicating, with the client sending requests to read and increment the counter value. This is an example of the output you might see:
343-
344+
1. You should see the client and server communicating, with the client sending requests to read and increment the counter value. This is an example of the output messages that you can see:
345+
346+
**CounterClient output:**
344347
```output
345-
info: CounterClient.CounterClient[0]
346-
Telemetry received from counter-server: CounterValue=1
347-
info: CounterClient.CounterClient[0]
348-
Telemetry received from counter-server: CounterValue=2
349-
info: CounterClient.CounterClient[0]
350-
Telemetry received from counter-server: CounterValue=3
351-
...
348+
CounterClient Information: 0 : Invoked command 'readCounter' with correlation ID 12345 to topic 'rpc/command-samples/counter-server/readCounter'
349+
CounterClient Information: 0 : Invoked command 'increment' with correlation ID 123456 to topic 'rpc/command-samples/counter-server/increment'
350+
info: CounterClient.RpcCommandRunner[0] called counter.incr 1 with id 12346
351+
info: CounterClient.CounterClient[0] Telemetry received from counter-server: CounterValue=1
352+
info: CounterClient.RpcCommandRunner[0] counter 32 with id 12345
353+
info: CounterClient.RpcCommandRunner[0] Current telemetry count: 32
352354
```
353-
354-
<!-- ## Shell configuration
355-
356-
The samples within [Azure IoT Operations SDKs github repository](https://github.com/Azure/iot-operations-sdks) read configuration from environment variables. We have provided an `.env` file in the repository root that exports the variables used by the samples to connect to the MQTT Broker. Edit the `.env` file to set the values for your environment, or use the default values provided in the file:
357-
358-
1. Navigate to the repository root directory:
359-
360-
```bash
361-
cd <REPOSITORY ROOT>
355+
356+
**CounterServer output:**
357+
```output
358+
CounterServer Information: 0 : Command executor for 'reset' started.
359+
CounterServer Information: 0 : Command executor for 'increment' started.
360+
CounterServer Information: 0 : Command executor for 'readCounter' started.
361+
CounterServer.CounterService[0] --> Executing Counter.ReadCounter with id 12345 for counter-client
362+
CounterServer.CounterService[0] --> Executed Counter.ReadCounter with id 12345 for counter-client
363+
CounterServer.CounterService[0] --> Executing Counter.Increment with id 12346 for counter-client
364+
CounterServer.CounterService[0] --> Executed Counter.Increment with id 12346 for counter-client
365+
CounterServer Information: 0 : Telemetry sent successfully to the topic 'telemetry/telemetry-samples/counterValue'
362366
```
363367

364-
1. Load the environment variables into your shell:
365-
366-
```bash
367-
source .env
368-
```
369-
-->
368+
1. The `CounterClient` sample will automatically exit when it is completed. You can also stop the `CounterServer` sample by pressing `Ctrl+C` in its terminal.
370369

371370

372371
## Configuration summary
@@ -410,40 +409,11 @@ As part of the deployment script, the following files are created in the local e
410409
| `client.key` | A x509 client private key for authenticating with the MQTT broker on port `8883` |
411410

412411

413-
<!-- 10. ## Troubleshooting -------------------------------------------------------------
414-
Optional: If you're aware that people commonly run into trouble, help them resolve those
415-
issues in this section.
416-
417-
- Describe common errors and exceptions. Help unpack them if necessary. Include guidance
418-
for graceful handling and recovery.
419-
- Provide information to help developers avoid throttling or other service-enforced
420-
errors. For example, provide guidance and examples for using retry or connection
421-
policies if the library supports it.
422-
- If the client library or a related library supports it, include tips for logging or
423-
enabling instrumentation to help debug code.
424-
425-
-->
426-
427412
## Troubleshooting
428-
TODO: Add troubleshooting section.
429-
430-
<!-- 11. ## Next steps ------------------------------------------------------------------
431-
Required: Provide a link to the next step for a developer, for instance, a tutorial.
432-
433-
- Summarize the tasks the developer completed in this Quickstart.
434-
- Provide a button for a suggested next step.
435-
436-
Use the `[!div class="nextstepaction"]` extension.
437413

438-
> [!div class="nextstepaction"]
439-
> [Link text](link)
414+
Check the troubleshooting guide for common issues in the Azure IoT Operations SDKs github repository: [Troubleshooting](https://github.com/Azure/iot-operations-sdks/blob/main/doc/troubleshooting.md).
440415

441-
442-
-->
443416
## Next steps
444-
TODO: Add summary and button.
445-
446-
<!--
447-
Remove all the comments in this template before you sign-off or merge to the main branch.
417+
In this Quickstart, you set up the Azure IoT Operations SDKs and ran a sample application. To learn more about developing with the SDKs, check out the following resources:
448418

449-
-->
419+
- [Azure IoT Operations SDKs documentation](https://github.com/Azure/iot-operations-sdks/blob/main/doc)

0 commit comments

Comments
 (0)