added option to read only a single field

This commit is contained in:
john30
2014-12-14 12:08:35 +01:00
parent ad52a84833
commit 2c2ab1c031
7 changed files with 42 additions and 24 deletions
+4 -2
View File
@@ -293,7 +293,9 @@ result_t Message::prepareSlave(SymbolString& slaveData)
}
result_t Message::decode(const PartType partType, SymbolString& data,
ostringstream& output, bool leadingSeparator, bool verbose, char separator)
ostringstream& output, bool leadingSeparator,
bool verbose, const char* filterName,
char separator)
{
unsigned char offset;
if (partType == pt_masterData)
@@ -301,7 +303,7 @@ result_t Message::decode(const PartType partType, SymbolString& data,
else
offset = 0;
int startPos = output.str().length();
result_t result = m_data->read(partType, data, offset, output, leadingSeparator, verbose, separator);
result_t result = m_data->read(partType, data, offset, output, leadingSeparator, verbose, filterName, separator);
time(&m_lastUpdateTime);
if (result != RESULT_OK) {
m_lastValue.clear();