- 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);
}
推薦閱讀
- Oracle從入門到精通(第3版)
- Spring Cloud Alibaba核心技術與實戰案例
- PostgreSQL for Data Architects
- 算法零基礎一本通(Python版)
- MySQL 8 DBA基礎教程
- Magento 2 Development Cookbook
- 新手學Visual C# 2008程序設計
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- Mastering C# Concurrency
- 信息技術應用基礎
- Getting Started with Polymer
- 交互式程序設計(第2版)
- OpenCV Android開發實戰
- Web前端開發最佳實踐
- 自己動手構建編程語言:如何設計編譯器、解釋器和DSL