feat(iot):【网关设备:80%】动态注册的初步实现(已测试)

This commit is contained in:
YunaiV
2026-01-25 18:50:26 +08:00
parent c55465a6c0
commit 1ce562601f
17 changed files with 507 additions and 173 deletions

View File

@@ -1,3 +1,5 @@
// TODO @AI感觉这块放到 biz-iot-enum 里好点。
/** 检查值是否为空 */
const isEmpty = (value: any): boolean => {
return value === null || value === undefined || value === '';
@@ -22,49 +24,6 @@ export const IoTThingModelTypeEnum = {
EVENT: 3, // 事件
};
/** IoT 设备消息的方法枚举 */
export const IotDeviceMessageMethodEnum = {
// ========== 设备状态 ==========
STATE_UPDATE: {
method: 'thing.state.update',
name: '设备状态变更',
upstream: true,
},
// ========== 设备属性 ==========
PROPERTY_POST: {
method: 'thing.property.post',
name: '属性上报',
upstream: true,
},
PROPERTY_SET: {
method: 'thing.property.set',
name: '属性设置',
upstream: false,
},
// ========== 设备事件 ==========
EVENT_POST: {
method: 'thing.event.post',
name: '事件上报',
upstream: true,
},
// ========== 服务调用 ==========
SERVICE_INVOKE: {
method: 'thing.service.invoke',
name: '服务调用',
upstream: false,
},
// ========== 设备配置 ==========
CONFIG_PUSH: {
method: 'thing.config.push',
name: '配置推送',
upstream: false,
},
};
// IoT 产品物模型服务调用方式枚举
export const IoTThingModelServiceCallTypeEnum = {
ASYNC: {