IOT
IOT模块,提供物联网行业支持
iot.createObjectIOT-创建交互对象创建物联网交互对象
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
url | string | 是 | — | — |
调用
typescript
piclient.emit("iot.createObject",{
url: "",
})
iot.objectStatusUpdateIOT-交互对象状态更新交互对象的状态更新
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
url | string | 是 | — | — |
调用
typescript
piclient.emit("iot.objectStatusUpdate",{
url: "",
})
iot.objectEventBindingIOT-交互对象事件绑定交互对象事件绑定
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
url | string | 是 | — | — |
调用
typescript
piclient.emit("iot.objectEventBinding",{
url: "",
})
iot.objectPropertyChangeIOT-交互对象属性变更交互对象属性变更
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
iotId | string | 是 | — | 原生模型和孪生体自定义的iotid |
propName | string | 是 | — | 原生模型和孪生体属性名称 |
propValue | string | 是 | — | 原生模型和孪生体属性值 |
调用
typescript
piclient.emit("iot.objectPropertyChange",{
iotId: "",//原生模型和孪生体自定义的iotid
propName: "",//原生模型和孪生体属性名称
propValue: "",//原生模型和孪生体属性值
})
iot.objectEventIOT-对象事件交互对象事件绑定
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
iotId | string | 是 | — | 原生模型和孪生体自定义的iotid |
eventName | string | 是 | — | 原生模型和孪生体属性名称 |
props | string | 是 | — | 原生模型和孪生体属性值 |
调用
typescript
piclient.emit("iot.objectEvent",{
iotId: "",//原生模型和孪生体自定义的iotid
eventName: "",//原生模型和孪生体属性名称
props: "",//原生模型和孪生体属性值
})
iot.objectActionIOT-交互对象动作交互对象动作触发
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
iotId | string | 是 | — | 原生模型和孪生体自定义的iotid |
actionName | string | 是 | — | 动作名 |
props | string | 是 | — | 参数 |
调用
typescript
piclient.emit("iot.objectAction",{
iotId: "",//原生模型和孪生体自定义的iotid
actionName: "",//动作名
props: "",//参数
})
iot.offsetTransformIOT-位置偏移IOT对象位置偏移
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
iotId | string | 是 | — | — |
location | string | 是 | — | x,y,z |
rotation | string | 是 | — | x,y,z |
scale | string | 是 | — | x,y,z |
duration | number | 是 | 0.0 | — |
rate | number | 是 | 0.0 | — |
调用
typescript
piclient.emit("iot.offsetTransform",{
iotId: "",
location: "", //x,y,z
rotation: "", //x,y,z
scale: "", //x,y,z
duration: 0.0,
rate: 0.0,
})
iot.attachToIOT-附加IOT对象附加
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
iotId | string | 是 | — | — |
iotAttachToId | string | 是 | — | — |
调用
typescript
piclient.emit("iot.attachTo",{
iotId: "",
iotAttachToId: "",
})
iot.moveByPathIOT-路径移动IOT沿路径移动
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
iotId | string | 是 | — | — |
path | string | 是 | ObjectName | — |
duration | number | 是 | 0.0 | — |
rate | number | 是 | 0.0 | — |
调用
typescript
piclient.emit("iot.moveByPath",{
iotId: "",
path: "ObjectName",
duration: 0.0,
rate: 0.0,
})