From c2de0bec0eb2278bf0ea30c8ecd3e17321398fad Mon Sep 17 00:00:00 2001 From: turboproc Date: Thu, 18 Jul 2024 20:11:58 +0200 Subject: [PATCH] feat: Add `serialNumber` to `genBasic` cluster (#1117) * Update cluster.ts * Update controller.test.ts * Update controller.test.ts * Update controller.test.ts --- src/zspec/zcl/definition/cluster.ts | 1 + test/controller.test.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/zspec/zcl/definition/cluster.ts b/src/zspec/zcl/definition/cluster.ts index a97258afe4..efedbf91a8 100644 --- a/src/zspec/zcl/definition/cluster.ts +++ b/src/zspec/zcl/definition/cluster.ts @@ -18,6 +18,7 @@ export const Clusters: Readonly> powerSource: {ID: 7, type: DataType.ENUM8}, appProfileVersion: {ID: 8, type: DataType.ENUM8}, swBuildId: {ID: 16384, type: DataType.CHAR_STR}, + serialNumber: {ID: 13, type: DataType.CHAR_STR}, locationDesc: {ID: 16, type: DataType.CHAR_STR}, physicalEnv: {ID: 17, type: DataType.ENUM8}, deviceEnabled: {ID: 18, type: DataType.BOOLEAN}, diff --git a/test/controller.test.ts b/test/controller.test.ts index d7477c6216..bfdc8f1063 100755 --- a/test/controller.test.ts +++ b/test/controller.test.ts @@ -4301,6 +4301,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -5762,6 +5763,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -5867,6 +5869,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -5959,6 +5962,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -6066,6 +6070,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -6144,6 +6149,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -6239,6 +6245,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -6291,6 +6298,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'}, @@ -8409,6 +8417,7 @@ describe('Controller', () => { powerSource: {ID: 7, type: 48, name: 'powerSource'}, appProfileVersion: {ID: 8, type: 48, name: 'appProfileVersion'}, swBuildId: {ID: 16384, type: 66, name: 'swBuildId'}, + serialNumber: {ID: 13, type: 66, name: 'serialNumber'}, locationDesc: {ID: 16, type: 66, name: 'locationDesc'}, physicalEnv: {ID: 17, type: 48, name: 'physicalEnv'}, deviceEnabled: {ID: 18, type: 16, name: 'deviceEnabled'},