From 1f8e253f69cbb55ed376336e6ff3c6775daae1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=81=92?= <2390904403@qq.com> Date: Wed, 25 Feb 2026 14:48:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=8F=82=E6=95=B0=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/rpc/type.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/rpc/type.go b/pkg/rpc/type.go index 50fe8b8..2ff651f 100644 --- a/pkg/rpc/type.go +++ b/pkg/rpc/type.go @@ -56,14 +56,14 @@ type DeviceAttributeOption struct { Type uint8 `json:"type"` // 设备类型 ConnectType uint8 `json:"connect_type"` // 连接类型 Attribute []struct { - Type uint8 `json:"type"` // 属性类型 - Name string `json:"name"` // 属性名称 - Flag uint8 `json:"flag"` // 属性标识 - Field string `json:"field"` // 属性字段名 - Readonly bool `json:"readonly"` // 是否只读 - AllowItem *[]uint8 `json:"allow_item,omitempty"` // 可用选项列表 - Min *uint32 `json:"min,omitempty"` // 最小值 - Max *uint32 `json:"max,omitempty"` // 最大值 + Type uint8 `json:"type"` // 属性类型 + Name string `json:"name"` // 属性名称 + Flag uint8 `json:"flag"` // 属性标识 + Field string `json:"field"` // 属性字段名 + Readonly bool `json:"readonly"` // 是否只读 + AllowItem *map[int]string `json:"allow_item,omitempty"` // 可用选项列表 + Min *uint32 `json:"min,omitempty"` // 最小值 + Max *uint32 `json:"max,omitempty"` // 最大值 } `json:"attribute"` // 设备属性列表 }