Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and cliffamzn committed Jul 21, 2023
1 parent 53c50eb commit f9ed8b9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ class HepaFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitor
class StaticReplacementProductListManager : public chip::app::Clusters::ResourceMonitoring::ReplacementProductListManager
{
public:
CHIP_ERROR Next(chip::app::Clusters::ResourceMonitoring::Attributes::GenericReplacementProductStruct::GenericType & item) override;
CHIP_ERROR
Next(chip::app::Clusters::ResourceMonitoring::Attributes::GenericReplacementProductStruct::GenericType & item) override;

~StaticReplacementProductListManager() {}
StaticReplacementProductListManager(
chip::app::Clusters::ResourceMonitoring::Attributes::GenericReplacementProductStruct::GenericType * aReplacementProductsList,
chip::app::Clusters::ResourceMonitoring::Attributes::GenericReplacementProductStruct::GenericType *
aReplacementProductsList,
uint8_t aReplacementProductListSize)
{
mReplacementProductsList = aReplacementProductsList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ using namespace chip::app::Clusters::ResourceMonitoring;
using namespace ResourceMonitoring::Attributes::GenericReplacementProductStruct;
using chip::Protocols::InteractionModel::Status;

static ResourceMonitoring::Attributes::GenericReplacementProductStruct::GenericType sActivatedCarbonFilterReplacementProductsList[] = {
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kUpc, CharSpan::fromCharString("111112222233")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8, CharSpan::fromCharString("gtin8xca")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kEan, CharSpan::fromCharString("4444455555666")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14, CharSpan::fromCharString("gtin14xcarbonx")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kOem, CharSpan::fromCharString("oem20xcarbonxxxxxxxx")),
};
static ResourceMonitoring::Attributes::GenericReplacementProductStruct::GenericType
sActivatedCarbonFilterReplacementProductsList[] = {
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kUpc, CharSpan::fromCharString("111112222233")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8, CharSpan::fromCharString("gtin8xca")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kEan, CharSpan::fromCharString("4444455555666")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14, CharSpan::fromCharString("gtin14xcarbonx")),
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum::kOem, CharSpan::fromCharString("oem20xcarbonxxxxxxxx")),
};
StaticReplacementProductListManager
sActivatedCarbonFilterReplacementProductListManager(&sActivatedCarbonFilterReplacementProductsList[0],
ArraySize(sActivatedCarbonFilterReplacementProductsList));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,20 @@ enum class Fields : uint8_t

class GenericType : protected app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::Type
{
private:
ResourceMonitoring::ProductIdentifierTypeEnum productIdentifierType;
chip::CharSpan productIdentifierValue;

public:
GenericType() {}
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum aProductIdentifierType, chip::CharSpan aProductIdentifierValue)
{
productIdentifierType = aProductIdentifierType;
productIdentifierValue = aProductIdentifierValue;
}
virtual ~GenericType() = default;
static constexpr bool kIsFabricScoped = false;
CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
private:
ResourceMonitoring::ProductIdentifierTypeEnum productIdentifierType;
chip::CharSpan productIdentifierValue;

public:
GenericType() {}
GenericType(ResourceMonitoring::ProductIdentifierTypeEnum aProductIdentifierType, chip::CharSpan aProductIdentifierValue)
{
productIdentifierType = aProductIdentifierType;
productIdentifierValue = aProductIdentifierValue;
}
virtual ~GenericType() = default;
static constexpr bool kIsFabricScoped = false;
CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const;
};
} // namespace GenericReplacementProductStruct

Expand Down

0 comments on commit f9ed8b9

Please sign in to comment.