From b3a96cc2c0e25a6ad7c8793a83eb976854feda97 Mon Sep 17 00:00:00 2001 From: john30 Date: Thu, 20 Nov 2014 22:29:44 +0100 Subject: [PATCH] made parseInt public --- src/lib/ebus/data.cpp | 8 -------- src/lib/ebus/data.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index df57a4c1..411dd540 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -100,14 +100,6 @@ static const char* dayNames[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" #define NULL_VALUE "-" #define MAX_POS 16 -/** - * @brief Parse an unsigned int value. - * @param str the string to parse. - * @param base the numerical base. - * @param minValue the minimum resulting value. - * @param maxValue the maximum resulting value. - * @param result the variable in which to store an error code when parsing failed or the value is out of bounds. - */ unsigned int parseInt(const char* str, int base, const unsigned int minValue, const unsigned int maxValue, result_t& result) { char* strEnd = NULL; diff --git a/src/lib/ebus/data.h b/src/lib/ebus/data.h index c47585c7..daa56d65 100644 --- a/src/lib/ebus/data.h +++ b/src/lib/ebus/data.h @@ -64,6 +64,17 @@ typedef struct { } dataType_t; +/** + * @brief Parse an unsigned int value. + * @param str the string to parse. + * @param base the numerical base. + * @param minValue the minimum resulting value. + * @param maxValue the maximum resulting value. + * @param result the variable in which to store an error code when parsing failed or the value is out of bounds. + */ +unsigned int parseInt(const char* str, int base, const unsigned int minValue, const unsigned int maxValue, result_t& result); + + class SingleDataField; /**