reworked result codes, added new base type VTI (vaillant specific time), added support for replacement value for time types

This commit is contained in:
john30
2014-12-06 12:46:15 +01:00
parent 9cea334407
commit 15249302fb
6 changed files with 142 additions and 104 deletions
+24 -21
View File
@@ -20,29 +20,32 @@
#ifndef LIBEBUS_RESULT_H_
#define LIBEBUS_RESULT_H_
static const int RESULT_OK = 0;
static const int RESULT_OK = 0; // success
static const int RESULT_BUS_ACQUIRED = 1; // bus successfully acquired
static const int RESULT_DATA = 2; // some data received
static const int RESULT_SYN = 3; // regular SYN after message received
static const int RESULT_BUS_LOCKED = 4; // bus is locked for access
static const int RESULT_BUS_PRIOR_RETRY = 5; // retry to access bus
static const int RESULT_IN_ESC = 6; // start of escape sequence received
static const int RESULT_IN_ESC = 1; // start of escape sequence received
static const int RESULT_SYN = 2; // regular SYN after message received
static const int RESULT_ERR_SEND = -1; // send error
static const int RESULT_ERR_EXTRA_DATA = -2; // received bytes > sent bytes
static const int RESULT_ERR_NAK = -3; // NAK received
static const int RESULT_ERR_CRC = -4; // CRC error
static const int RESULT_ERR_ACK = -5; // ACK error
static const int RESULT_ERR_TIMEOUT = -6; // read timeout
static const int RESULT_ERR_SYN = -7; // SYN received
static const int RESULT_ERR_BUS_LOST = -8; // arbitration lost
static const int RESULT_ERR_ESC = -9; // invalid escape sequence received
static const int RESULT_ERR_INVALID_ARG = -10; // invalid argument
static const int RESULT_ERR_DEVICE = -11; // generic device error (usually fatal)
static const int RESULT_ERR_EOF = -12; // end of input reached
static const int RESULT_ERR_FILENOTFOUND = -13;// file not found or not readable
static const int RESULT_ERR_DUPLICATE = -14; // duplicate entry
static const int RESULT_ERR_GENERIC_IO = -1; // generic I/O error (usually fatal)
static const int RESULT_ERR_DEVICE = -2; // generic device error (usually fatal)
static const int RESULT_ERR_SEND = -3; // send error
static const int RESULT_ERR_ESC = -4; // invalid escape sequence
static const int RESULT_ERR_TIMEOUT = -5; // read timeout
static const int RESULT_ERR_NOTFOUND = -6; // file/element not found or not readable
static const int RESULT_ERR_EOF = -7; // end of input reached
static const int RESULT_ERR_INVALID_ARG = -8; // invalid argument
static const int RESULT_ERR_INVALID_NUM = -9; // invalid numeric argument
static const int RESULT_ERR_INVALID_POS = -10; // invalid position
static const int RESULT_ERR_OUT_OF_RANGE = -11; // argument value out of valid range
static const int RESULT_ERR_INVALID_PART = -12; // invalid part type value
static const int RESULT_ERR_MISSING_TYPE = -13; // missing data type
static const int RESULT_ERR_INVALID_LIST = -14; // invalid value list
static const int RESULT_ERR_DUPLICATE = -15; // duplicate entry
static const int RESULT_ERR_BUS_LOST = -16; // arbitration lost
static const int RESULT_ERR_CRC = -17; // CRC error
static const int RESULT_ERR_ACK = -18; // ACK error
static const int RESULT_ERR_NAK = -19; // NAK received
/** type for result code. */
typedef int result_t;