diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 1a58dbffd775ae..fee0d745f6d136 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -493,6 +493,7 @@ config("libfuzzer_fuzzing") { config("oss_fuzz") { cflags = string_split(getenv("CFLAGS")) + cflags_cc = string_split(getenv("CXXFLAGS")) ldflags = string_split(getenv("CXXFLAGS")) ldflags += [ getenv("LIB_FUZZING_ENGINE") ] } diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index c79eacc2037129..cb1c102b239f3e 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index d7667f228ef2e0..0566f91f67a953 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 795f470b88a6a8..76c150be26d933 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 223b572d025cb0..fcb987edb574aa 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index de25428864fbe4..1cc37299be6645 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 40e5bb05b9bb08..5edebd77931b80 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index 47399bbe07fedf..e4584f1ee4d086 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 159ab6e2a8b5b6..ed130f29318062 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 5c54416f886d68..e155c0bb946563 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 4a925bdf876f45..84f789e40a1110 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 7ce3ee0dc39630..961f40352b1052 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 66dd9f6c2cff51..d10dce747c4695 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 72ade2bfbabea7..eff62c6119120c 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 424388a3bc3369..8b8c2003f7bc29 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index d0a9913df155a1..0bf5f933e3d543 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 4fe29a645d9e6e..c8e41990993d27 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 90292d1ea06c4e..1369028c39df4f 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index d4cea1c3c63b8c..d9841f769a79dd 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 7ea73610feaa7b..05a176ee9ab710 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index ad880498571bc0..93eac702dcbc06 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 100ee17a1b84c7..8748b8cd13b81f 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 979b8046ce7901..4c8e67c11e7726 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 6ec3535eae0302..ec62d4504f8601 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 1918e417c2b725..adc500a4771045 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index e327a8eb68ae75..06e8ba84d349b6 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index c801a97df380ee..be3a039189a5ed 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 0a9039409289e1..c12fe40a360ea7 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 05bd1e0dc4552d..4627385f5a4c44 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index dfd0b1a07bf478..90131350b3ca47 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index e6b65b5f357f8a..cffe70d9aab388 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 95e0efdc1ce319..a5e0f5505dffd8 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index b447bcaf9fd30d..2b9b4036e638f5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index 905099c03e2b8d..cf42feded0cee8 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 9e13f678310b78..78ae33bc847e5d 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index b2e81d6229586e..7d8c54a3f41c4c 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 3b08c19cf02ed2..d53a594c514919 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index b01b11f56f8c58..95e0ba20d4adcb 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 8be645e41ddfea..3408fc64e6fc6f 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 400606024bbb02..bf55ae4be3bf03 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 3132bdb15686b3..b3178232de0291 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 751529c70dbb5c..6c27235c7d3ade 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 3851f1d0328f32..f49ed5824d5ce4 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index ee218d61684d4b..4baa8d22887c32 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index 44bf8425d7a88a..4a3e015ddedb5c 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index cf2bee67f6da02..d8d2734e60a98b 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index df35f214119b69..661a2e74de4f4e 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index 22b17a3b7dd58c..e7fba7e08e028f 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn b/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn index 3bc4c23b9e0f92..10cb48c31c584e 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn +++ b/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn @@ -29,11 +29,11 @@ source_set("fabric-bridge-lib") { public_configs = [ ":config" ] sources = [ + "include/BridgedDevice.h", + "include/BridgedDeviceManager.h", "include/CHIPProjectAppConfig.h", - "include/Device.h", - "include/DeviceManager.h", - "src/Device.cpp", - "src/DeviceManager.cpp", + "src/BridgedDevice.cpp", + "src/BridgedDeviceManager.cpp", "src/ZCLCallbacks.cpp", ] diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index 9294f0f069c57d..3fb7436adbfe5a 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/Device.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h similarity index 95% rename from examples/fabric-bridge-app/fabric-bridge-common/include/Device.h rename to examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h index c709af8cf0695b..a237d93d133eb7 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/Device.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h @@ -27,13 +27,13 @@ #include #include -class Device +class BridgedDevice { public: static const int kDeviceNameSize = 32; - Device(chip::NodeId nodeId); - virtual ~Device() {} + BridgedDevice(chip::NodeId nodeId); + virtual ~BridgedDevice() {} bool IsReachable(); void SetReachable(bool reachable); diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/DeviceManager.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h similarity index 76% rename from examples/fabric-bridge-app/fabric-bridge-common/include/DeviceManager.h rename to examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h index b1dd791033511f..8411ec656f9803 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/DeviceManager.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h @@ -20,17 +20,17 @@ #include -#include "Device.h" +#include "BridgedDevice.h" -class DeviceManager +class BridgedDeviceManager { public: - DeviceManager() = default; + BridgedDeviceManager() = default; /** - * @brief Initializes the DeviceManager. + * @brief Initializes the BridgedDeviceManager. * - * This function sets up the initial state of the DeviceManager, clearing + * This function sets up the initial state of the BridgedDeviceManager, clearing * any existing devices and setting the starting dynamic endpoint ID. */ void Init(); @@ -47,7 +47,7 @@ class DeviceManager * @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID. * @return int The index of the dynamic endpoint if successful, -1 otherwise. */ - int AddDeviceEndpoint(Device * dev, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); + int AddDeviceEndpoint(BridgedDevice * dev, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); /** * @brief Removes a device from a dynamic endpoint. @@ -60,7 +60,7 @@ class DeviceManager * @param dev A pointer to the device to be removed. * @return int The index of the removed dynamic endpoint if successful, -1 otherwise. */ - int RemoveDeviceEndpoint(Device * dev); + int RemoveDeviceEndpoint(BridgedDevice * dev); /** * @brief Gets a device from its endpoint ID. @@ -69,9 +69,9 @@ class DeviceManager * specified endpoint ID. If no device matches the endpoint ID, it returns nullptr. * * @param endpointId The endpoint ID of the device to be retrieved. - * @return Device* A pointer to the device if found, nullptr otherwise. + * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. */ - Device * GetDevice(chip::EndpointId endpointId) const; + BridgedDevice * GetDevice(chip::EndpointId endpointId) const; /** * @brief Gets a device from its NodeId. @@ -80,9 +80,9 @@ class DeviceManager * specified NodeId. If no device matches the NodeId, it returns nullptr. * * @param nodeId The NodeId of the device to be retrieved. - * @return Device* A pointer to the device if found, nullptr otherwise. + * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. */ - Device * GetDeviceByNodeId(chip::NodeId nodeId) const; + BridgedDevice * GetDeviceByNodeId(chip::NodeId nodeId) const; /** * @brief Removes a device from a dynamic endpoint by its NodeId. @@ -98,22 +98,22 @@ class DeviceManager int RemoveDeviceByNodeId(chip::NodeId nodeId); private: - friend DeviceManager & DeviceMgr(); + friend BridgedDeviceManager & BridgeDeviceMgr(); - static DeviceManager sInstance; + static BridgedDeviceManager sInstance; chip::EndpointId mCurrentEndpointId; chip::EndpointId mFirstDynamicEndpointId; - Device * mDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1]; + BridgedDevice * mDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1]; }; /** - * Returns the public interface of the DeviceManager singleton object. + * Returns the public interface of the BridgedDeviceManager singleton object. * - * Applications should use this to access features of the DeviceManager + * Applications should use this to access features of the BridgedDeviceManager * object. */ -inline DeviceManager & DeviceMgr() +inline BridgedDeviceManager & BridgeDeviceMgr() { - return DeviceManager::sInstance; + return BridgedDeviceManager::sInstance; } diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/Device.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp similarity index 70% rename from examples/fabric-bridge-app/fabric-bridge-common/src/Device.cpp rename to examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp index e72fd856513b5a..d641f3743d43f0 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/Device.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "Device.h" +#include "BridgedDevice.h" #include #include @@ -25,35 +25,35 @@ using namespace chip::app::Clusters::Actions; -Device::Device(chip::NodeId nodeId) +BridgedDevice::BridgedDevice(chip::NodeId nodeId) { mReachable = false; mNodeId = nodeId; mEndpointId = chip::kInvalidEndpointId; } -bool Device::IsReachable() +bool BridgedDevice::IsReachable() { return mReachable; } -void Device::SetReachable(bool reachable) +void BridgedDevice::SetReachable(bool reachable) { mReachable = reachable; if (reachable) { - ChipLogProgress(NotSpecified, "Device[%s]: ONLINE", mName); + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: ONLINE", mName); } else { - ChipLogProgress(NotSpecified, "Device[%s]: OFFLINE", mName); + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: OFFLINE", mName); } } -void Device::SetName(const char * name) +void BridgedDevice::SetName(const char * name) { - ChipLogProgress(NotSpecified, "Device[%s]: New Name=\"%s\"", mName, name); + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: New Name=\"%s\"", mName, name); chip::Platform::CopyString(mName, name); } diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/DeviceManager.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp similarity index 95% rename from examples/fabric-bridge-app/fabric-bridge-common/src/DeviceManager.cpp rename to examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp index bc70c0cb0fe609..170b39cd2c94e2 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/DeviceManager.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "DeviceManager.h" +#include "BridgedDeviceManager.h" #include #include @@ -121,9 +121,9 @@ const EmberAfDeviceType sBridgedDeviceTypes[] = { { DEVICE_TYPE_BRIDGED_NODE, DE } // namespace // Define the static member -DeviceManager DeviceManager::sInstance; +BridgedDeviceManager BridgedDeviceManager::sInstance; -void DeviceManager::Init() +void BridgedDeviceManager::Init() { memset(mDevices, 0, sizeof(mDevices)); mFirstDynamicEndpointId = static_cast( @@ -131,7 +131,7 @@ void DeviceManager::Init() mCurrentEndpointId = mFirstDynamicEndpointId; } -int DeviceManager::AddDeviceEndpoint(Device * dev, chip::EndpointId parentEndpointId) +int BridgedDeviceManager::AddDeviceEndpoint(BridgedDevice * dev, chip::EndpointId parentEndpointId) { uint8_t index = 0; EmberAfEndpointType * ep = &sBridgedNodeEndpoint; @@ -181,7 +181,7 @@ int DeviceManager::AddDeviceEndpoint(Device * dev, chip::EndpointId parentEndpoi return -1; } -int DeviceManager::RemoveDeviceEndpoint(Device * dev) +int BridgedDeviceManager::RemoveDeviceEndpoint(BridgedDevice * dev) { uint8_t index = 0; while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) @@ -201,7 +201,7 @@ int DeviceManager::RemoveDeviceEndpoint(Device * dev) return -1; } -Device * DeviceManager::GetDevice(chip::EndpointId endpointId) const +BridgedDevice * BridgedDeviceManager::GetDevice(chip::EndpointId endpointId) const { for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) { @@ -213,7 +213,7 @@ Device * DeviceManager::GetDevice(chip::EndpointId endpointId) const return nullptr; } -Device * DeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) const +BridgedDevice * BridgedDeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) const { for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) { @@ -225,7 +225,7 @@ Device * DeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) const return nullptr; } -int DeviceManager::RemoveDeviceByNodeId(chip::NodeId nodeId) +int BridgedDeviceManager::RemoveDeviceByNodeId(chip::NodeId nodeId) { for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) { diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp index 1655df4c2f1399..9a0467be4e27e8 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "DeviceManager.h" +#include "BridgedDeviceManager.h" #include #include @@ -36,7 +36,7 @@ Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(Endpoin { AttributeId attributeId = attributeMetadata->attributeId; - Device * dev = DeviceMgr().GetDevice(endpoint); + BridgedDevice * dev = BridgeDeviceMgr().GetDevice(endpoint); if (dev != nullptr && clusterId == app::Clusters::BridgedDeviceBasicInformation::Id) { using namespace app::Clusters::BridgedDeviceBasicInformation::Attributes; @@ -80,7 +80,7 @@ Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(Endpoi uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Failure; - Device * dev = DeviceMgr().GetDevice(endpointIndex); + BridgedDevice * dev = BridgeDeviceMgr().GetDevice(endpointIndex); if (dev != nullptr && dev->IsReachable()) { ChipLogProgress(NotSpecified, "emberAfExternalAttributeWriteCallback: ep=%d, clusterId=%d", endpoint, clusterId); diff --git a/examples/fabric-bridge-app/linux/RpcServer.cpp b/examples/fabric-bridge-app/linux/RpcServer.cpp index d4044f043468d3..76fe8f84653d39 100644 --- a/examples/fabric-bridge-app/linux/RpcServer.cpp +++ b/examples/fabric-bridge-app/linux/RpcServer.cpp @@ -29,8 +29,8 @@ #include "pigweed/rpc_services/FabricBridge.h" #endif -#include "Device.h" -#include "DeviceManager.h" +#include "BridgedDevice.h" +#include "BridgedDeviceManager.h" using namespace chip; using namespace chip::app; @@ -51,10 +51,10 @@ pw::Status FabricBridge::AddSynchronizedDevice(const chip_rpc_SynchronizedDevice NodeId nodeId = request.node_id; ChipLogProgress(NotSpecified, "Received AddSynchronizedDevice: " ChipLogFormatX64, ChipLogValueX64(nodeId)); - Device * device = new Device(nodeId); + BridgedDevice * device = new BridgedDevice(nodeId); device->SetReachable(true); - int result = DeviceMgr().AddDeviceEndpoint(device, 1); + int result = BridgeDeviceMgr().AddDeviceEndpoint(device, 1); if (result == -1) { delete device; @@ -70,7 +70,7 @@ pw::Status FabricBridge::RemoveSynchronizedDevice(const chip_rpc_SynchronizedDev NodeId nodeId = request.node_id; ChipLogProgress(NotSpecified, "Received RemoveSynchronizedDevice: " ChipLogFormatX64, ChipLogValueX64(nodeId)); - int removed_idx = DeviceMgr().RemoveDeviceByNodeId(nodeId); + int removed_idx = BridgeDeviceMgr().RemoveDeviceByNodeId(nodeId); if (removed_idx < 0) { ChipLogError(NotSpecified, "Failed to remove device with nodeId=0x" ChipLogFormatX64, ChipLogValueX64(nodeId)); diff --git a/examples/fabric-bridge-app/linux/main.cpp b/examples/fabric-bridge-app/linux/main.cpp index d8fb45dea08a02..c708b256727520 100644 --- a/examples/fabric-bridge-app/linux/main.cpp +++ b/examples/fabric-bridge-app/linux/main.cpp @@ -18,9 +18,9 @@ #include +#include "BridgedDevice.h" +#include "BridgedDeviceManager.h" #include "CommissionableInit.h" -#include "Device.h" -#include "DeviceManager.h" #include #include @@ -140,7 +140,7 @@ void AdministratorCommissioningCommandHandler::InvokeCommand(HandlerContext & ha Status status = Status::Failure; #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE - Device * device = DeviceMgr().GetDevice(endpointId); + BridgedDevice * device = BridgeDeviceMgr().GetDevice(endpointId); // TODO: issues:#33784, need to make OpenCommissioningWindow synchronous if (device != nullptr && @@ -185,7 +185,7 @@ void ApplicationInit() std::thread pollingThread(BridgePollingThread); pollingThread.detach(); - DeviceMgr().Init(); + BridgeDeviceMgr().Init(); } void ApplicationShutdown() diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index b993fe9100e101..7ecbd20a6e9d0f 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index d9aa1313f34c0b..8cd9c653a75bb5 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 002943282c94bd..6924e96503d0c6 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index 010ba4d1dc88a8..331f7e79cadfe9 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index ae6ed8acaef557..f6bb26ec689619 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 49f5f4f007adc9..9dee0bdcdb040d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 48650af7462729..8bdaaedaa68ce6 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 4da56bd6ddff25..1f88cfb7687610 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index b27ac3d90820da..6add567a134707 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 473d0c1efd44b9..d0e06e94f94dac 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 38091dbe0ccbe0..a9d48f8ae85b3c 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 5d2ede841e2fcd..e76ccb9372798d 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index aca989e2c43440..a925bf75f55255 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 528412e523b0a0..cb2cbcc52f3263 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index b38d2b96b27509..ee7a955db20f4b 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index c9af17203111cf..e9baa7757f53eb 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index 4c36a56025829e..cea8d411735738 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 89200240662d70..bbd20d46b43d94 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 6746a5ba516104..a066629c9f4ae1 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index da22094fd2e8c3..3412f30a29b1f9 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 83d5c9745f5e9a..87b61c8a45357c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 00b620e45fa55b..db46fa85d7e71d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 4482329a1245e4..c99a5c2f2c7782 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index ec9b0e09f0318d..4327438f220783 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index ec9b0e09f0318d..4327438f220783 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 74c2fbd6ca67ff..7365654ce9c65b 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index 73036faa89b9da..f028a3b31557c5 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 8342817b1321e9..596fde4138576a 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp index 977189032b3e27..e46d3eaa22dff7 100644 --- a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp @@ -54,7 +54,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init() DataModel::Nullable(-1), DataModel::Nullable(Globals::AreaTypeTag::kPlayRoom), DataModel::Nullable(Globals::LandmarkTag::kBackDoor), - DataModel::Nullable(Globals::PositionTag::kNextTo), + DataModel::Nullable(Globals::PositionTag::kLeft), DataModel::Nullable(Globals::FloorSurfaceTag::kConcrete)); // Location D has null values for all HomeLocationStruct fields, Map YY @@ -62,7 +62,7 @@ CHIP_ERROR RvcServiceAreaDelegate::Init() "My Location D"_span, DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(Globals::LandmarkTag::kCouch), - DataModel::Nullable(Globals::PositionTag::kNextTo), + DataModel::Nullable(Globals::PositionTag::kLeft), DataModel::Nullable(Globals::FloorSurfaceTag::kHardwood)); GetInstance()->SetCurrentArea(supportedAreaID_C); diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 71aa847401e521..21d1cebf065fb4 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 3b41b5a099ac0f..4ebc3dc672d48f 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/thermostat/linux/thermostat-manager.cpp b/examples/thermostat/linux/thermostat-manager.cpp index 90d4588a131ca6..ea1f4375c1649d 100644 --- a/examples/thermostat/linux/thermostat-manager.cpp +++ b/examples/thermostat/linux/thermostat-manager.cpp @@ -61,12 +61,6 @@ ThermostatManager ThermostatManager::sThermostatMgr; namespace { -CHIP_ERROR ChipErrorFromStatusCode(Status status) -{ - StatusIB statusIB(status); - return statusIB.ToChipError(); -} - template static void OnAttributeChangeReported(const ConcreteDataAttributePath & path, const DecodableAttributeType & value); @@ -332,7 +326,7 @@ CHIP_ERROR ThermostatManager::SetSystemMode(SystemModeEnum systemMode) } ChipLogError(AppServer, "Setting system mode: %u (%s)", systemModeValue, SystemModeString(systemMode)); - return ChipErrorFromStatusCode(SystemMode::Set(kThermostatEndpoint, systemMode)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(SystemMode::Set(kThermostatEndpoint, systemMode)); } CHIP_ERROR ThermostatManager::SetRunningMode(ThermostatRunningModeEnum runningMode) @@ -345,22 +339,22 @@ CHIP_ERROR ThermostatManager::SetRunningMode(ThermostatRunningModeEnum runningMo } ChipLogError(AppServer, "Setting running mode: %u (%s)", runningModeValue, RunningModeString(runningMode)); - return ChipErrorFromStatusCode(ThermostatRunningMode::Set(kThermostatEndpoint, runningMode)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(ThermostatRunningMode::Set(kThermostatEndpoint, runningMode)); } CHIP_ERROR ThermostatManager::SetCurrentTemperature(int16_t temperature) { - return ChipErrorFromStatusCode(LocalTemperature::Set(kThermostatEndpoint, temperature)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(LocalTemperature::Set(kThermostatEndpoint, temperature)); } CHIP_ERROR ThermostatManager::SetCurrentHeatingSetPoint(int16_t heatingSetpoint) { - return ChipErrorFromStatusCode(OccupiedHeatingSetpoint::Set(kThermostatEndpoint, heatingSetpoint)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(OccupiedHeatingSetpoint::Set(kThermostatEndpoint, heatingSetpoint)); } CHIP_ERROR ThermostatManager::SetCurrentCoolingSetPoint(int16_t coolingSetpoint) { - return ChipErrorFromStatusCode(OccupiedCoolingSetpoint::Set(kThermostatEndpoint, coolingSetpoint)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(OccupiedCoolingSetpoint::Set(kThermostatEndpoint, coolingSetpoint)); } void ThermostatManager::EvalThermostatState() diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index b85de2986ffd44..001e1b43ace09d 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 1cdce376d85543..066afc85509947 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 8da05509bed572..31e5775d88148f 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index dc4b0a886108ab..a53e3cdc692952 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 6401ae8dad4ba9..34aa4475c79677 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index f0e6fec3c429bb..02aadc0439b50a 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 319a66e0ba83ea..135846fd606d48 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 17a6bc61bcd3d3..f31a1917a5fd0e 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 9f538399a5cf06..c797fa2a19186b 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -67 : [ESP32] Update esp-idf to v5.3 +68 : [Bouffalo Lab] Update gcc toolchain and flash tool diff --git a/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile b/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile index ad099fc48b6ef3..be286425ae905a 100644 --- a/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile @@ -2,16 +2,15 @@ ARG VERSION=1 FROM ghcr.io/project-chip/chip-build:${VERSION} LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip -RUN apt update -y \ - && apt install vim -fy \ - && apt clean \ - && pip3 install --break-system-packages bflb-iot-tool==1.8.6 \ - && : # last line +RUN apt update + +RUN apt install picocom curl -y +RUN apt install netcat-traditional -y COPY setup.sh /tmp RUN cd /tmp \ - && bash setup.sh \ + && bash setup.sh /opt/bouffalolab_sdk \ && rm setup.sh \ && : # last line diff --git a/integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh b/integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh old mode 100644 new mode 100755 index 44e353432ccab8..1052d6c6d6774a --- a/integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh +++ b/integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh @@ -1,33 +1,40 @@ #!/usr/bin/env bash -set -x CURRENT_DIR=$( cd "$(dirname "$0")" pwd ) +user=$(stat -c %U "$0") + SDK_ROOT=/opt/bouffalolab_sdk -# Currently, only setup toolchain under $SDK_ROOT -TOOLCHAIN_SETUP_ROOT=$SDK_ROOT/toolchain -TOOLCHAIN_SYMBOLIC_LINK_PATH="" -git -C . rev-parse 2>/dev/null -if [[ "$?" == "0" ]]; then - # Examples in Bouffalo Lab IOT SDK repo expect toolchain under repo, - # let's create a symbolic link to Bouffalo Lab toolchain, - # if this script runs under repo - TOOLCHAIN_SYMBOLIC_LINK_PATH=$CURRENT_DIR/../toolchain +echo "Please input path to install toolchain, or type Enter to install under $SDK_ROOT" +read TOOLCHAIN_SETUP_ROOT +if [[ ${TOOLCHAIN_SETUP_ROOT} == "" ]]; then + TOOLCHAIN_SETUP_ROOT=$SDK_ROOT fi +echo "Toolchain will install under $TOOLCHAIN_SETUP_ROOT" +flash_tool_postfix= + +flash_tool=BouffaloLabDevCube-v1.9.0 +flash_tool_url=https://dev.bouffalolab.com/media/upload/download/$flash_tool.zip +thead_toolchain=gcc_t-head_v2.6.1 +thead_toolchain_url=https://codeload.github.com/bouffalolab/toolchain_gcc_t-head_linux/zip/c4afe91cbd01bf7dce525e0d23b4219c8691e8f0 +thead_toolchain_unzip=toolchain_gcc_t-head_linux-c4afe91cbd01bf7dce525e0d23b4219c8691e8f0 if [[ "$OSTYPE" == "linux-gnu"* ]]; then toolchains_url=( - "riscv/Thead_riscv/Linux_x86_64" "https://dev.bouffalolab.com/media/upload/download/toolchain_riscv_thead_linux64.zip" "toolchain_riscv_thead_linux_x86_64" - "riscv/Linux" "https://dev.bouffalolab.com/media/upload/download/toolchain_riscv_sifive_linux64.zip" "toolchain_riscv_sifive_linux" + "toolchain/riscv" "https://dev.bouffalolab.com/media/upload/download/toolchain_riscv_sifive_linux64.zip" Linux toolchain_riscv_sifive_linux + "toolchain/t-head-riscv" "$thead_toolchain_url" "$thead_toolchain" "$thead_toolchain_unzip" + "flashtool" "$flash_tool_url" "$flash_tool" "" ) + flash_tool_postfix=ubuntu elif [[ "$OSTYPE" == "darwin"* ]]; then toolchains_url=( - "riscv/Darwin" "https://dev.bouffalolab.com/media/upload/download/toolchain_riscv_sifive_macos.zip" "toolchain_riscv_sifive_macos" + "toolchain/riscv/Darwin" "https://dev.bouffalolab.com/media/upload/download/toolchain_riscv_sifive_macos.zip" ) + flash_tool_postfix=macos else echo "Not support for ""$OSTYPE" fi @@ -37,30 +44,44 @@ if [ ! -d "$TOOLCHAIN_SETUP_ROOT" ]; then fi rm -rf "$TOOLCHAIN_SETUP_ROOT"/*.zip -for ((i = 0; i < ${#toolchains_url[@]}; i += 3)); do +for ((i = 0; i < ${#toolchains_url[@]}; i += 4)); do path=${toolchains_url[i]} url=${toolchains_url[i + 1]} - output=${toolchains_url[i + 2]} + out=${toolchains_url[i + 2]} + unzip_name=${toolchains_url[i + 3]} + + if [ -d "$TOOLCHAIN_SETUP_ROOT/$path/$out" ]; then + continue + fi + rm -rf "$TOOLCHAIN_SETUP_ROOT/$path" + mkdir -p "$TOOLCHAIN_SETUP_ROOT/$path" wget -P "$TOOLCHAIN_SETUP_ROOT"/ "$url" toolchain_zip=$(basename "$url") + toolchain_zip=$(find "$TOOLCHAIN_SETUP_ROOT" -maxdepth 1 -name *"$toolchain_zip"*) + toolchain_zip=$(basename "$toolchain_zip") if [ ! -f "$TOOLCHAIN_SETUP_ROOT/$toolchain_zip" ]; then exit 1 fi - rm -rf "$TOOLCHAIN_SETUP_ROOT/$path" - mkdir -p "$TOOLCHAIN_SETUP_ROOT/$path" - unzip "$TOOLCHAIN_SETUP_ROOT/$toolchain_zip" -d "$TOOLCHAIN_SETUP_ROOT/$path" - mv "$TOOLCHAIN_SETUP_ROOT/$path/$output"/* "$TOOLCHAIN_SETUP_ROOT/$path" + + unzip -q "$TOOLCHAIN_SETUP_ROOT/$toolchain_zip" -d "$TOOLCHAIN_SETUP_ROOT/$path/tmp" + mv "$TOOLCHAIN_SETUP_ROOT/$path/tmp/$unzip_name" "$TOOLCHAIN_SETUP_ROOT/$path/$out" + + rm -rf "$TOOLCHAIN_SETUP_ROOT/$path"/tmp rm -rf "$TOOLCHAIN_SETUP_ROOT/$toolchain_zip" - if [ -f "$TOOLCHAIN_SETUP_ROOT/$path"/chmod755.sh ]; then - cd "$TOOLCHAIN_SETUP_ROOT/$path"/ + if [ -f "$TOOLCHAIN_SETUP_ROOT/$path"/"$out"/chmod755.sh ]; then + cd "$TOOLCHAIN_SETUP_ROOT/$path"/"$out" bash chmod755.sh cd "$CURRENT_DIR" fi done -if [[ "$TOOLCHAIN_SYMBOLIC_LINK_PATH" != "" ]]; then - rm -rf "$TOOLCHAIN_SYMBOLIC_LINK_PATH" - ln -s "$TOOLCHAIN_SETUP_ROOT" "$TOOLCHAIN_SYMBOLIC_LINK_PATH" +chmod +x "$TOOLCHAIN_SETUP_ROOT/flashtool/$flash_tool/BLDevCube-$flash_tool_postfix" +chmod +x "$TOOLCHAIN_SETUP_ROOT/flashtool/$flash_tool/bflb_iot_tool-$flash_tool_postfix" + +if [[ "$user" == "root" ]]; then + chmod a+wr "$TOOLCHAIN_SETUP_ROOT/flashtool/$flash_tool" -R +else + chown "$user" "$TOOLCHAIN_SETUP_ROOT/flashtool/$flash_tool"/ -R fi diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index df6018847acb59..6bde4b8cb8431f 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -107,11 +107,6 @@ RUN set -x \ && rm -rf /var/lib/apt/lists/ \ && : # last line -# Required for the Bouffalolab platform -RUN set -x \ - && pip3 install --break-system-packages bflb-iot-tool==1.8.6 \ - && : # last line - ENV PATH $PATH:/usr/lib/kotlinc/bin ENV AMEBA_PATH=/opt/ameba/ambd_sdk_with_chip_non_NDA ENV ANDROID_HOME=/opt/android/sdk diff --git a/scripts/flashing/bouffalolab_firmware_utils.py b/scripts/flashing/bouffalolab_firmware_utils.py old mode 100644 new mode 100755 diff --git a/src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml b/src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml index b79a5398d78bdb..be34b3c86f32ab 100644 --- a/src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml +++ b/src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml @@ -25,13 +25,16 @@ limitations under the License. - - - - - - - + + + + + + + + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 2954d22de36479..589f832c0ca39b 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -194,13 +194,16 @@ enum PositionTag : enum8 { kMiddle = 4; kRow = 5; kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; } enum TestGlobalEnum : enum8 { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index ec5928318d97e7..5f1ca74314b3a3 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -247,18 +247,25 @@ class PositionTag(MatterIntEnum): kMiddle = 0x04 kRow = 0x05 kColumn = 0x06 - kUnder = 0x07 - kNextTo = 0x08 - kAround = 0x09 - kOn = 0x0A - kAbove = 0x0B - kFrontOf = 0x0C - kBehind = 0x0D # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 14, + kUnknownEnumValue = 7, + + class RelativePositionTag(MatterIntEnum): + kUnder = 0x00 + kNextTo = 0x01 + kAround = 0x02 + kOn = 0x03 + kAbove = 0x04 + kFrontOf = 0x05 + kBehind = 0x06 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 7, class TestGlobalEnum(MatterIntEnum): kSomeValue = 0x00 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 21b7a81cb5746f..b8dfaa140e03e3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17381,13 +17381,16 @@ typedef NS_ENUM(uint8_t, MTRDataTypePositionTag) { MTRDataTypePositionTagMiddle MTR_PROVISIONALLY_AVAILABLE = 0x04, MTRDataTypePositionTagRow MTR_PROVISIONALLY_AVAILABLE = 0x05, MTRDataTypePositionTagColumn MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDataTypePositionTagUnder MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDataTypePositionTagNextTo MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDataTypePositionTagAround MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDataTypePositionTagOn MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRDataTypePositionTagAbove MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDataTypePositionTagFrontOf MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRDataTypePositionTagBehind MTR_PROVISIONALLY_AVAILABLE = 0x0D, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDataTypeRelativePositionTag) { + MTRDataTypeRelativePositionTagUnder MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeRelativePositionTagNextTo MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeRelativePositionTagAround MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypeRelativePositionTagOn MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypeRelativePositionTagAbove MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDataTypeRelativePositionTagFrontOf MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDataTypeRelativePositionTagBehind MTR_PROVISIONALLY_AVAILABLE = 0x06, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRDataTypeTestGlobalEnum) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index c32cf146b0da8b..8a951e2a54a575 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -377,13 +377,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::PositionTag va case EnumType::kMiddle: case EnumType::kRow: case EnumType::kColumn: - case EnumType::kUnder: - case EnumType::kNextTo: - case EnumType::kAround: - case EnumType::kOn: - case EnumType::kAbove: - case EnumType::kFrontOf: - case EnumType::kBehind: return val; default: return EnumType::kUnknownEnumValue; @@ -405,6 +398,24 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(detail::ProductIdentifi return EnumType::kUnknownEnumValue; } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::RelativePositionTag val) +{ + using EnumType = Globals::RelativePositionTag; + switch (val) + { + case EnumType::kUnder: + case EnumType::kNextTo: + case EnumType::kAround: + case EnumType::kOn: + case EnumType::kAbove: + case EnumType::kFrontOf: + case EnumType::kBehind: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::TestGlobalEnum val) { using EnumType = Globals::TestGlobalEnum; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index a66b926a9cacc6..a0407517696744 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -390,25 +390,35 @@ enum class LandmarkTag : uint8_t // Enum for PositionTag enum class PositionTag : uint8_t { - kLeft = 0x00, - kRight = 0x01, - kTop = 0x02, - kBottom = 0x03, - kMiddle = 0x04, - kRow = 0x05, - kColumn = 0x06, - kUnder = 0x07, - kNextTo = 0x08, - kAround = 0x09, - kOn = 0x0A, - kAbove = 0x0B, - kFrontOf = 0x0C, - kBehind = 0x0D, + kLeft = 0x00, + kRight = 0x01, + kTop = 0x02, + kBottom = 0x03, + kMiddle = 0x04, + kRow = 0x05, + kColumn = 0x06, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 14, + kUnknownEnumValue = 7, +}; + +// Enum for RelativePositionTag +enum class RelativePositionTag : uint8_t +{ + kUnder = 0x00, + kNextTo = 0x01, + kAround = 0x02, + kOn = 0x03, + kAbove = 0x04, + kFrontOf = 0x05, + kBehind = 0x06, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 7, }; // Enum for TestGlobalEnum