Skip to content

Commit de7e25c

Browse files
committed
Rename appendAttributeReal to appendAttribute
1 parent 8a99b90 commit de7e25c

18 files changed

+43
-43
lines changed

src/property/Property.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ CborError Property::append(CborEncoder *encoder, bool lightPayload) {
181181
return CborNoError;
182182
}
183183

184-
CborError Property::appendAttributeReal(bool value, String attributeName, CborEncoder *encoder) {
184+
CborError Property::appendAttribute(bool value, String attributeName, CborEncoder *encoder) {
185185
return appendAttributeName(attributeName, [value](CborEncoder & mapEncoder)
186186
{
187187
CHECK_CBOR(cbor_encode_int(&mapEncoder, static_cast<int>(CborIntegerMapKey::BooleanValue)));
@@ -190,7 +190,7 @@ CborError Property::appendAttributeReal(bool value, String attributeName, CborEn
190190
}, encoder);
191191
}
192192

193-
CborError Property::appendAttributeReal(int value, String attributeName, CborEncoder *encoder) {
193+
CborError Property::appendAttribute(int value, String attributeName, CborEncoder *encoder) {
194194
return appendAttributeName(attributeName, [value](CborEncoder & mapEncoder)
195195
{
196196
CHECK_CBOR(cbor_encode_int(&mapEncoder, static_cast<int>(CborIntegerMapKey::Value)));
@@ -199,7 +199,7 @@ CborError Property::appendAttributeReal(int value, String attributeName, CborEnc
199199
}, encoder);
200200
}
201201

202-
CborError Property::appendAttributeReal(unsigned int value, String attributeName, CborEncoder *encoder) {
202+
CborError Property::appendAttribute(unsigned int value, String attributeName, CborEncoder *encoder) {
203203
return appendAttributeName(attributeName, [value](CborEncoder & mapEncoder)
204204
{
205205
CHECK_CBOR(cbor_encode_int(&mapEncoder, static_cast<int>(CborIntegerMapKey::Value)));
@@ -208,7 +208,7 @@ CborError Property::appendAttributeReal(unsigned int value, String attributeName
208208
}, encoder);
209209
}
210210

211-
CborError Property::appendAttributeReal(float value, String attributeName, CborEncoder *encoder) {
211+
CborError Property::appendAttribute(float value, String attributeName, CborEncoder *encoder) {
212212
return appendAttributeName(attributeName, [value](CborEncoder & mapEncoder)
213213
{
214214
CHECK_CBOR(cbor_encode_int(&mapEncoder, static_cast<int>(CborIntegerMapKey::Value)));
@@ -217,7 +217,7 @@ CborError Property::appendAttributeReal(float value, String attributeName, CborE
217217
}, encoder);
218218
}
219219

220-
CborError Property::appendAttributeReal(String value, String attributeName, CborEncoder *encoder) {
220+
CborError Property::appendAttribute(String value, String attributeName, CborEncoder *encoder) {
221221
return appendAttributeName(attributeName, [value](CborEncoder & mapEncoder)
222222
{
223223
CHECK_CBOR(cbor_encode_int(&mapEncoder, static_cast<int>(CborIntegerMapKey::StringValue)));

src/property/Property.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ class Property
186186

187187
void updateLocalTimestamp();
188188
CborError append(CborEncoder * encoder, bool lightPayload);
189-
CborError appendAttributeReal(bool value, String attributeName = "", CborEncoder *encoder = nullptr);
190-
CborError appendAttributeReal(int value, String attributeName = "", CborEncoder *encoder = nullptr);
191-
CborError appendAttributeReal(unsigned int value, String attributeName = "", CborEncoder *encoder = nullptr);
192-
CborError appendAttributeReal(float value, String attributeName = "", CborEncoder *encoder = nullptr);
193-
CborError appendAttributeReal(String value, String attributeName = "", CborEncoder *encoder = nullptr);
189+
CborError appendAttribute(bool value, String attributeName = "", CborEncoder *encoder = nullptr);
190+
CborError appendAttribute(int value, String attributeName = "", CborEncoder *encoder = nullptr);
191+
CborError appendAttribute(unsigned int value, String attributeName = "", CborEncoder *encoder = nullptr);
192+
CborError appendAttribute(float value, String attributeName = "", CborEncoder *encoder = nullptr);
193+
CborError appendAttribute(String value, String attributeName = "", CborEncoder *encoder = nullptr);
194194
#ifndef __AVR__
195195
CborError appendAttributeName(String attributeName, std::function<CborError (CborEncoder& mapEncoder)>f, CborEncoder *encoder);
196196
void setAttributeReal(String attributeName, std::function<void (CborMapData & md)>setValue);

src/property/types/CloudBool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CloudBool : public Property {
5353
_cloud_value = _value;
5454
}
5555
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
56-
return appendAttributeReal(_value, "", encoder);
56+
return appendAttribute(_value, "", encoder);
5757
}
5858
virtual void setAttributesFromCloud() {
5959
setAttributeReal(_cloud_value, "");

src/property/types/CloudColor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ class CloudColor : public Property {
189189
_cloud_value = _value;
190190
}
191191
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
192-
CHECK_CBOR_MULTI(appendAttributeReal(_value.hue, "hue", encoder));
193-
CHECK_CBOR_MULTI(appendAttributeReal(_value.sat, "sat", encoder));
194-
CHECK_CBOR_MULTI(appendAttributeReal(_value.bri, "bri", encoder));
192+
CHECK_CBOR_MULTI(appendAttribute(_value.hue, "hue", encoder));
193+
CHECK_CBOR_MULTI(appendAttribute(_value.sat, "sat", encoder));
194+
CHECK_CBOR_MULTI(appendAttribute(_value.bri, "bri", encoder));
195195
return CborNoError;
196196
}
197197
virtual void setAttributesFromCloud() {

src/property/types/CloudFloat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CloudFloat : public Property {
5555
_cloud_value = _value;
5656
}
5757
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
58-
return appendAttributeReal(_value, "", encoder);
58+
return appendAttribute(_value, "", encoder);
5959
}
6060
virtual void setAttributesFromCloud() {
6161
setAttributeReal(_cloud_value, "");

src/property/types/CloudInt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CloudInt : public Property {
5353
_cloud_value = _value;
5454
}
5555
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
56-
return appendAttributeReal(_value, "", encoder);
56+
return appendAttribute(_value, "", encoder);
5757
}
5858
virtual void setAttributesFromCloud() {
5959
setAttributeReal(_cloud_value, "");

src/property/types/CloudLocation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class CloudLocation : public Property {
9090
_cloud_value = _value;
9191
}
9292
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
93-
CHECK_CBOR_MULTI(appendAttributeReal(_value.lat, "lat", encoder));
94-
CHECK_CBOR_MULTI(appendAttributeReal(_value.lon, "lon", encoder));
93+
CHECK_CBOR_MULTI(appendAttribute(_value.lat, "lat", encoder));
94+
CHECK_CBOR_MULTI(appendAttribute(_value.lon, "lon", encoder));
9595
return CborNoError;
9696
}
9797
virtual void setAttributesFromCloud() {

src/property/types/CloudSchedule.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,10 @@ class CloudSchedule : public Property {
418418
_cloud_value = _value;
419419
}
420420
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
421-
CHECK_CBOR_MULTI(appendAttributeReal(_value.frm, "frm", encoder));
422-
CHECK_CBOR_MULTI(appendAttributeReal(_value.to, "to", encoder));
423-
CHECK_CBOR_MULTI(appendAttributeReal(_value.len, "len", encoder));
424-
CHECK_CBOR_MULTI(appendAttributeReal(_value.msk, "msk", encoder));
421+
CHECK_CBOR_MULTI(appendAttribute(_value.frm, "frm", encoder));
422+
CHECK_CBOR_MULTI(appendAttribute(_value.to, "to", encoder));
423+
CHECK_CBOR_MULTI(appendAttribute(_value.len, "len", encoder));
424+
CHECK_CBOR_MULTI(appendAttribute(_value.msk, "msk", encoder));
425425
return CborNoError;
426426
}
427427
virtual void setAttributesFromCloud() {

src/property/types/CloudString.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CloudString : public Property {
5959
_cloud_value = _value;
6060
}
6161
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
62-
return appendAttributeReal(_value, "", encoder);
62+
return appendAttribute(_value, "", encoder);
6363
}
6464
virtual void setAttributesFromCloud() {
6565
setAttributeReal(_cloud_value, "");

src/property/types/CloudUnsignedInt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CloudUnsignedInt : public Property {
5353
_cloud_value = _value;
5454
}
5555
virtual CborError appendAttributesToCloud(CborEncoder *encoder) {
56-
return appendAttributeReal(_value, "", encoder);
56+
return appendAttribute(_value, "", encoder);
5757
}
5858
virtual void setAttributesFromCloud() {
5959
setAttributeReal(_cloud_value, "");

0 commit comments

Comments
 (0)