From 7ead7cad8a1f2f436e67601bbe4c84bc38ea5075 Mon Sep 17 00:00:00 2001
From: Jacques Gouno <jacques.gouno@synchrotron-soleil.fr>
Date: Thu, 9 Mar 2017 09:54:32 +0000
Subject: [PATCH] TANGODEVIC-1647: point1 & 2, fixed

---
 src/TIMIQTypesAndConsts.h | 68 +++++++++++++++++++++++++++++++++++++--
 1 file changed, 66 insertions(+), 2 deletions(-)

diff --git a/src/TIMIQTypesAndConsts.h b/src/TIMIQTypesAndConsts.h
index eecdadd..b73ce8d 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
 
-- 
GitLab