【功能完善】IOT: ThingModel 服务和事件

This commit is contained in:
puhui999
2024-12-25 23:53:14 +08:00
parent d7c33b454f
commit 5391720b8b
8 changed files with 331 additions and 86 deletions

View File

@ -38,59 +38,6 @@ export interface ThingModelService {
[key: string]: any
}
// IOT 产品物模型类型枚举类
export const ThingModelType = {
PROPERTY: 1, // 属性
SERVICE: 2, // 服务
EVENT: 3 // 事件
} as const
// IOT 产品物模型访问模式枚举类
export const ThingModelAccessMode = {
READ_WRITE: {
label: '读写',
value: 'rw'
},
READ_ONLY: {
label: '只读',
value: 'r'
}
} as const
// IOT 产品物模型服务调用方式枚举
export const ThingModelServiceCallType = {
ASYNC: {
label: '异步调用',
value: 'async'
},
SYNC: {
label: '同步调用',
value: 'sync'
}
} as const
// IOT 产品物模型事件类型枚举
export const ThingModelServiceEventType = {
INFO: {
label: '信息',
value: 'info'
},
ALERT: {
label: '告警',
value: 'alert'
},
ERROR: {
label: '故障',
value: 'error'
}
} as const
// IOT 产品物模型参数是输入参数还是输出参数
export const ThingModelParamDirection = {
INPUT: 'input', // 输入参数
OUTPUT: 'output' // 输出参数
} as const
// IoT 产品物模型 API
export const ThingModelApi = {
// 查询产品物模型分页