remove old value accessor of group objecs

This commit is contained in:
Thomas Kunze 2019-06-02 00:14:50 +02:00
parent c898f824b8
commit 3563f9d15e
2 changed files with 0 additions and 133 deletions

View File

@ -154,23 +154,6 @@ void GroupObject::commFlag(ComFlag value)
_commFlag = value;
}
int32_t GroupObject::objectReadFloatDpt9()
{
uint16_t dptValue = getWord(_data);
return dptFromFloat(dptValue);
}
bool GroupObject::objectReadBool()
{
return _data[0] > 0;
}
uint8_t GroupObject::objectReadByte()
{
return _data[0];
}
void GroupObject::requestObjectRead()
{
_commFlag = ReadRequest;
@ -181,22 +164,6 @@ void GroupObject::objectWritten()
_commFlag = WriteRequest;
}
void GroupObject::objectWriteFloatDpt9(int32_t value)
{
uint16_t dptValue = dptToFloat(value);
pushWord(dptValue, _data);
objectWritten();
}
void GroupObject::objectUpdateFloatDpt9(int32_t value)
{
uint16_t dptValue = dptToFloat(value);
pushWord(dptValue, _data);
_commFlag = cfUpdate;
}
size_t GroupObject::valueSize()
{
return _dataLength;
@ -208,59 +175,6 @@ size_t GroupObject::sizeInTelegram()
return asapValueSize(code);
}
void GroupObject::objectWrite(bool value)
{
objectWrite((uint8_t)value);
}
void GroupObject::objectWrite(uint8_t value)
{
pushByte(value, _data);
objectWritten();
}
void GroupObject::objectWrite(uint16_t value)
{
pushWord(value, _data);
objectWritten();
}
void GroupObject::objectWrite(uint32_t value)
{
pushInt(value, _data);
objectWritten();
}
void GroupObject::objectWrite(int8_t value)
{
objectWrite((uint8_t)value);
}
void GroupObject::objectWrite(int16_t value)
{
objectWrite((uint16_t)value);
}
void GroupObject::objectWrite(int32_t value)
{
objectWrite((uint32_t)value);
}
void GroupObject::objectWrite(float value)
{
uint32_t tmp = value * 100;
objectWriteFloatDpt9(tmp);
}
void GroupObject::callback(GroupObjectUpdatedHandler handler)
{
_updateHandler = handler;

View File

@ -46,25 +46,12 @@ public:
ComFlag commFlag();
void commFlag(ComFlag value);
/**
* Get the float value from a communication object. Can be used for
* communication objects of type 2 uint8_t float (EIS5 / DPT9). The value is in
* 1/100 - a DPT9 value of 21.01 is returned as 2101.
*
* @return The value of the com-object in 1/100. INVALID_DPT_FLOAT is returned
* for the DPT9 "invalid data" value.
*/
int32_t objectReadFloatDpt9();
bool objectReadBool();
uint8_t objectReadByte();
/**
* Request the read of a communication object. Calling this function triggers the
* sending of a read-group-value telegram, to read the value of the communication
* object from the bus.
*
* When the answer is received, the communication object's value will be updated.
* You can cycle through all updated communication objects with nextUpdatedObject().
*
*
* @see objectWritten()
*/
@ -78,40 +65,6 @@ public:
*/
void objectWritten();
/**
* Set the value of a communication object. Calling this function triggers the
* sending of a write-group-value telegram.
*
* The communication object is a 2 uint8_t float (EIS5 / DPT9) object. The value is
* in 1/100, so a value of 2101 would set a DPT9 float value of 21.01. The valid
* range of the values is -671088.64 to 670760.96.
*
* @param value - the new value of the communication object in 1/100.
* Use INVALID_DPT_FLOAT for the DPT9 "invalid data" value.
*/
void objectWriteFloatDpt9(int32_t value);
void objectWrite(bool value);
void objectWrite(uint8_t value);
void objectWrite(uint16_t value);
void objectWrite(uint32_t value);
void objectWrite(int8_t value);
void objectWrite(int16_t value);
void objectWrite(int32_t value);
void objectWrite(float value);
/**
* Set the value of a communication object and mark the communication object
* as updated. This does not trigger a write-group-value telegram.
*
* The communication object is a 2 uint8_t float (EIS5 / DPT9) object. The value
* is in 1/100, so a value of 2101 would set a DPT9 float value of 21.01.
* The possible range of the values is -671088.64 to 670760.96.
*
* @param value - the new value of the communication object in 1/100.
* Use INVALID_DPT_FLOAT for the DPT9 "invalid data" value.
*/
void objectUpdateFloatDpt9(int32_t value);
size_t valueSize();
size_t asapValueSize(uint8_t code);
size_t sizeInTelegram();