書名: Azure IoT Development Cookbook作者名: Yatish Patil本章字數: 88字更新時間: 2021-07-02 20:50:38
How to do it...
In this section, we will create a device job to update the device twin properties:
- We will create a job to update device twin properties:
var twin = new Twin();
twin.Properties.Desired["HighTemperature"] = "44";
twin.Properties.Desired["City"] = "Mumbai";
twin.ETag = "*";
return await jobClient.ScheduleTwinUpdateAsync(jobId,
"deviceId='"+ deviceId + "'",
twin,
DateTime.Now,
10);
- We will use following code to get the device job status, which was initiated in step 1:
JobClient jobClient;
JobClient jobClient;jobClient = JobClient.CreateFromConnectionString(abc.GetConnectionString());
public async Task<JobResponse> MonitorJob(string jobId, JobClient jobClient)
{
return await jobClient.GetJobAsync(jobId);
}
推薦閱讀
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- Spring Cloud Alibaba核心技術與實戰案例
- The Supervised Learning Workshop
- Three.js開發指南:基于WebGL和HTML5在網頁上渲染3D圖形和動畫(原書第3版)
- Elastic Stack應用寶典
- Backbone.js Blueprints
- Bootstrap 4:Responsive Web Design
- Learning Apache Mahout Classification
- 小程序開發原理與實戰
- Java:High-Performance Apps with Java 9
- Practical Microservices
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- Java程序設計教程
- Sitecore Cookbook for Developers
- Developing Java Applications with Spring and Spring Boot