diff --git a/src/TIMIQTypesAndConsts.h b/src/TIMIQTypesAndConsts.h index eecdadddd28b12887f40af540387a930451c1229..b73ce8ddef9477a744fd0dc01c69f0bf8a8c6280 100644 --- a/src/TIMIQTypesAndConsts.h +++ b/src/TIMIQTypesAndConsts.h @@ -90,15 +90,79 @@ typedef enum Error = 0, OK, Busy, - Warning + Warning, + Undefined } E_timiq_code_t; //- TimIQsSystem commands typedef enum { RESET_SYSTEM = 1, - RECALIBRATE_PLL + RECALIBRATE_PLL, + ACKNOWLEDGE_ERRORS } E_timiq_cmd_t; + +//------------------------------ +//- timIQ struct config +//------------------------------ +typedef enum +{ + Undef = 0, + TI_IVAL, + TI_QVAL, + TI_BTEMP, + TI_DATA +} E_ti_t; + +typedef struct timIQConfig +{ + E_ti_t id; + float value; + E_timiq_errno_t ti_err; + + //- default constructor ----------------------- + timIQConfig() + : id(Undef), + value(0.0), + ti_err(timiq_NO_ERROR) + { + }; + + //- destructor ----------------------- + ~timIQConfig () + { + } + + //- copy constructor ------------------ + timIQConfig (const timIQConfig& src) + { + *this = src; + } + + //- operator= ------------------ + const timIQConfig & operator= (const timIQConfig& src) + { + if (this == & src) + return *this; + + this->id = src.id; + this->value = src.value; + this->ti_err = src.ti_err; + + return *this; + } + + //- dump ----------------------- + void dump () const + { + std::cout << "timIQConfig::id........." + << this->id + << std::endl; + std::cout << "timIQConfig::value........." + << this->value + << std::endl; + } +}timIQConfig_t; } //- namespace timiqlib