Skip to content

Commit

Permalink
Revert "Add ProductAppearance attribute support. (#24415)" (#25740)
Browse files Browse the repository at this point in the history
This reverts commit 7f8dfe8.

This attribute is not in the spec yet, and the PR should not have been merged.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jul 20, 2023
1 parent 8f19a9c commit 2708820
Show file tree
Hide file tree
Showing 78 changed files with 22 additions and 3,906 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,49 +659,11 @@ server cluster Actions = 37 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

struct CapabilityMinimaStruct {
int16u caseSessionsPerFabric = 0;
int16u subscriptionsPerFabric = 1;
}

struct ProductAppearanceStruct {
ProductFinishEnum finish = 0;
nullable ColorEnum primaryColor = 1;
}

critical event StartUp = 0 {
INT32U softwareVersion = 0;
}
Expand Down Expand Up @@ -737,7 +699,6 @@ server cluster BasicInformation = 40 {
readonly attribute boolean reachable = 17;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute ProductAppearanceStruct productAppearance = 20;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -4509,9 +4470,8 @@ endpoint 0 {
ram attribute reachable default = 1;
callback attribute uniqueID;
callback attribute capabilityMinima;
callback attribute productAppearance;
ram attribute featureMap;
ram attribute clusterRevision default = 2;
ram attribute clusterRevision default = 1;
}

server cluster OtaSoftwareUpdateRequestor {
Expand Down
21 changes: 2 additions & 19 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1508,22 +1508,6 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ProductAppearance",
"code": 20,
"mfgCode": null,
"side": "server",
"type": "ProductAppearanceStruct",
"included": 1,
"storageOption": "External",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand All @@ -1550,7 +1534,7 @@
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "2",
"defaultValue": "1",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -25514,6 +25498,5 @@
"endpointVersion": 1,
"deviceIdentifier": 61442
}
],
"log": []
]
}
63 changes: 0 additions & 63 deletions examples/all-clusters-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <app/util/af.h>
#include <lib/support/CHIPMem.h>
#include <new>
#include <platform/DeviceInstanceInfoProvider.h>
#include <platform/DiagnosticDataProvider.h>
#include <platform/PlatformManager.h>
#include <system/SystemPacketBuffer.h>
Expand Down Expand Up @@ -139,61 +138,6 @@ Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(kNetw
#endif

Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver);

class ExampleDeviceInstanceInfoProvider : public DeviceInstanceInfoProvider
{
public:
void Init(DeviceInstanceInfoProvider * defaultProvider) { mDefaultProvider = defaultProvider; }

CHIP_ERROR GetVendorName(char * buf, size_t bufSize) override { return mDefaultProvider->GetVendorName(buf, bufSize); }
CHIP_ERROR GetVendorId(uint16_t & vendorId) override { return mDefaultProvider->GetVendorId(vendorId); }
CHIP_ERROR GetProductName(char * buf, size_t bufSize) override { return mDefaultProvider->GetProductName(buf, bufSize); }
CHIP_ERROR GetProductId(uint16_t & productId) override { return mDefaultProvider->GetProductId(productId); }
CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override { return mDefaultProvider->GetPartNumber(buf, bufSize); }
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override { return mDefaultProvider->GetPartNumber(buf, bufSize); }
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override { return mDefaultProvider->GetProductLabel(buf, bufSize); }
CHIP_ERROR GetSerialNumber(char * buf, size_t bufSize) override { return mDefaultProvider->GetSerialNumber(buf, bufSize); }
CHIP_ERROR GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) override
{
return mDefaultProvider->GetManufacturingDate(year, month, day);
}
CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override
{
return mDefaultProvider->GetHardwareVersion(hardwareVersion);
}
CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override
{
return mDefaultProvider->GetHardwareVersionString(buf, bufSize);
}
CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override
{
return mDefaultProvider->GetRotatingDeviceIdUniqueId(uniqueIdSpan);
}
CHIP_ERROR GetProductFinish(Clusters::BasicInformation::ProductFinishEnum * finish) override;
CHIP_ERROR GetProductPrimaryColor(Clusters::BasicInformation::ColorEnum * primaryColor) override;

private:
DeviceInstanceInfoProvider * mDefaultProvider;
};

CHIP_ERROR ExampleDeviceInstanceInfoProvider::GetProductFinish(Clusters::BasicInformation::ProductFinishEnum * finish)
{
// Our example device claims to have a Satin finish for now. We can make
// this configurable as needed.
*finish = Clusters::BasicInformation::ProductFinishEnum::kSatin;
return CHIP_NO_ERROR;
}

CHIP_ERROR ExampleDeviceInstanceInfoProvider::GetProductPrimaryColor(Clusters::BasicInformation::ColorEnum * primaryColor)
{
// Our example device claims to have a nice purple color for now. We can
// make this configurable as needed.
*primaryColor = Clusters::BasicInformation::ColorEnum::kPurple;
return CHIP_NO_ERROR;
}

ExampleDeviceInstanceInfoProvider gExampleDeviceInstanceInfoProvider;

} // namespace

void ApplicationInit()
Expand Down Expand Up @@ -257,13 +201,6 @@ void ApplicationInit()
ChipLogError(NotSpecified, "Failed to start CHIP NamedPipeCommands");
sChipNamedPipeCommands.Stop();
}

auto * defaultProvider = GetDeviceInstanceInfoProvider();
if (defaultProvider != &gExampleDeviceInstanceInfoProvider)
{
gExampleDeviceInstanceInfoProvider.Init(defaultProvider);
SetDeviceInstanceInfoProvider(&gExampleDeviceInstanceInfoProvider);
}
}

void ApplicationExit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,39 +552,6 @@ server cluster Actions = 37 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

struct CapabilityMinimaStruct {
int16u caseSessionsPerFabric = 0;
int16u subscriptionsPerFabric = 1;
Expand Down
33 changes: 0 additions & 33 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -462,39 +462,6 @@ server cluster Actions = 37 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

struct CapabilityMinimaStruct {
int16u caseSessionsPerFabric = 0;
int16u subscriptionsPerFabric = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,39 +354,6 @@ server cluster AccessControl = 31 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

critical event StartUp = 0 {
INT32U softwareVersion = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,39 +357,6 @@ server cluster AccessControl = 31 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

struct CapabilityMinimaStruct {
int16u caseSessionsPerFabric = 0;
int16u subscriptionsPerFabric = 1;
Expand Down
33 changes: 0 additions & 33 deletions examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter
Original file line number Diff line number Diff line change
Expand Up @@ -207,39 +207,6 @@ server cluster AccessControl = 31 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

critical event StartUp = 0 {
INT32U softwareVersion = 0;
}
Expand Down

0 comments on commit 2708820

Please sign in to comment.