diff --git a/src/lib/ebus/result.cpp b/src/lib/ebus/result.cpp index c8a3cba3..5acd5676 100644 --- a/src/lib/ebus/result.cpp +++ b/src/lib/ebus/result.cpp @@ -49,6 +49,7 @@ const char* getResultCode(result_t resultCode) { case RESULT_ERR_NAK: return "ERR: NAK received"; case RESULT_ERR_NO_SIGNAL: return "ERR: no signal"; case RESULT_ERR_SYN: return "ERR: SYN received"; + case RESULT_ERR_NOTAUTHORIZED: return "ERR: not authorized"; default: if (resultCode >= 0) { diff --git a/src/lib/ebus/result.h b/src/lib/ebus/result.h index e99f5d37..de15b2a8 100644 --- a/src/lib/ebus/result.h +++ b/src/lib/ebus/result.h @@ -31,37 +31,39 @@ namespace ebusd { /** type for result code. */ enum result_t { - RESULT_OK = 0, //!< success + RESULT_OK = 0, //!< success - RESULT_CONTINUE = 1, //!< more input data is needed (e.g. start of escape sequence received) - RESULT_EMPTY = 2, //!< empty result + RESULT_CONTINUE = 1, //!< more input data is needed (e.g. start of escape sequence received) + RESULT_EMPTY = 2, //!< empty result - RESULT_ERR_GENERIC_IO = -1, //!< generic I/O error (usually fatal) - RESULT_ERR_DEVICE = -2, //!< generic device error (usually fatal) - RESULT_ERR_SEND = -3, //!< send error - RESULT_ERR_ESC = -4, //!< invalid escape sequence - RESULT_ERR_TIMEOUT = -5, //!< read timeout + RESULT_ERR_GENERIC_IO = -1, //!< generic I/O error (usually fatal) + RESULT_ERR_DEVICE = -2, //!< generic device error (usually fatal) + RESULT_ERR_SEND = -3, //!< send error + RESULT_ERR_ESC = -4, //!< invalid escape sequence + RESULT_ERR_TIMEOUT = -5, //!< read timeout - RESULT_ERR_NOTFOUND = -6, //!< file/element not found or not readable - RESULT_ERR_EOF = -7, //!< end of input reached - RESULT_ERR_INVALID_ARG = -8, //!< invalid argument - RESULT_ERR_INVALID_NUM = -9, //!< invalid numeric argument - RESULT_ERR_INVALID_ADDR = -10, //!< invalid address - RESULT_ERR_INVALID_POS = -11, //!< invalid position - RESULT_ERR_OUT_OF_RANGE = -12, //!< argument value out of valid range - RESULT_ERR_INVALID_PART = -13, //!< invalid part type value - RESULT_ERR_MISSING_TYPE = -14, //!< missing data type - RESULT_ERR_INVALID_LIST = -15, //!< invalid value list - RESULT_ERR_DUPLICATE = -16, //!< duplicate entry - RESULT_ERR_DUPLICATE_NAME = -17,//!< duplicate entry (name) + RESULT_ERR_NOTFOUND = -6, //!< file/element not found or not readable + RESULT_ERR_EOF = -7, //!< end of input reached + RESULT_ERR_INVALID_ARG = -8, //!< invalid argument + RESULT_ERR_INVALID_NUM = -9, //!< invalid numeric argument + RESULT_ERR_INVALID_ADDR = -10, //!< invalid address + RESULT_ERR_INVALID_POS = -11, //!< invalid position + RESULT_ERR_OUT_OF_RANGE = -12, //!< argument value out of valid range + RESULT_ERR_INVALID_PART = -13, //!< invalid part type value + RESULT_ERR_MISSING_TYPE = -14, //!< missing data type + RESULT_ERR_INVALID_LIST = -15, //!< invalid value list + RESULT_ERR_DUPLICATE = -16, //!< duplicate entry + RESULT_ERR_DUPLICATE_NAME = -17, //!< duplicate entry (name) - RESULT_ERR_BUS_LOST = -18, //!< arbitration lost - RESULT_ERR_CRC = -19, //!< CRC error - RESULT_ERR_ACK = -20, //!< ACK error - RESULT_ERR_NAK = -21, //!< NAK received + RESULT_ERR_BUS_LOST = -18, //!< arbitration lost + RESULT_ERR_CRC = -19, //!< CRC error + RESULT_ERR_ACK = -20, //!< ACK error + RESULT_ERR_NAK = -21, //!< NAK received - RESULT_ERR_NO_SIGNAL = -22, //!< no signal found on the bus - RESULT_ERR_SYN = -23, //!< SYN received instead of answer + RESULT_ERR_NO_SIGNAL = -22, //!< no signal found on the bus + RESULT_ERR_SYN = -23, //!< SYN received instead of answer + + RESULT_ERR_NOTAUTHORIZED = -24 //!< not authorized for this action };