你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PnpConvention.CreateDpsPayload(String) 方法

定义

创建 DPS 有效负载,将设备预配为即插即用。

public static string CreateDpsPayload (string modelId);
static member CreateDpsPayload : string -> string
Public Shared Function CreateDpsPayload (modelId As String) As String

参数

modelId
String

设备为属性、遥测和命令遵循的模型 ID。

返回

将设备预配为即插即用的 DPS 有效负载。

注解

有关设备预配服务和即插即用兼容性以及 PnP 设备认证的详细信息,请参阅 https://docs.microsoft.com/azure/iot-pnp/howto-certify-device。 DPS 有效负载的格式应为:

{
  "modelId": "dtmi:com:example:modelName;1"
}

有关 DTDL 的信息,请参阅 https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md

适用于