Skip to content

Commit b8f6448

Browse files
Removed attribute-type.h from attribute-metadata and moved definitions inside of .cpp file
1 parent 8750c55 commit b8f6448

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/app/util/attribute-metadata.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818

1919
#include <app-common/zap-generated/attribute-type.h>
2020

21+
bool EmberAfAttributeMetadata::IsBoolean() const
22+
{
23+
return attributeType == ZCL_BOOLEAN_ATTRIBUTE_TYPE;
24+
}
25+
26+
bool EmberAfAttributeMetadata::IsSignedIntegerAttribute() const
27+
{
28+
return chip::app::IsSignedAttributeType(attributeType);
29+
}
30+
2131
bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType)
2232
{
2333
return (attributeType == ZCL_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_CHAR_STRING_ATTRIBUTE_TYPE);

src/app/util/attribute-metadata.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#pragma once
1919

20-
#include <app-common/zap-generated/attribute-type.h>
2120
#include <app/util/basic-types.h>
2221
#include <cstdint>
2322

@@ -161,12 +160,12 @@ struct EmberAfAttributeMetadata
161160
/**
162161
* Check wether this attribute is a boolean based on its type according to the spec.
163162
*/
164-
bool IsBoolean() const { return attributeType == ZCL_BOOLEAN_ATTRIBUTE_TYPE; }
163+
bool IsBoolean() const;
165164

166165
/**
167166
* Check wether this attribute is signed based on its type according to the spec.
168167
*/
169-
bool IsSignedIntegerAttribute() const { return chip::app::IsSignedAttributeType(attributeType); }
168+
bool IsSignedIntegerAttribute();
170169

171170
/**
172171
* Check whether this attribute has a define min and max.

0 commit comments

Comments
 (0)