Index: trunk/lib/FlairCore/src/FrameworkManager.cpp
===================================================================
--- trunk/lib/FlairCore/src/FrameworkManager.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/FrameworkManager.cpp	(revision 213)
@@ -167,6 +167,6 @@
 }
 
-void FrameworkManager::SetupLogger(string log_path) {
-  pimpl_->SetupLogger(log_path);
+void FrameworkManager::SetupLogger(string log_path,uint32_t stackSize) {
+  pimpl_->SetupLogger(log_path,stackSize);
 }
 
Index: trunk/lib/FlairCore/src/FrameworkManager.h
===================================================================
--- trunk/lib/FlairCore/src/FrameworkManager.h	(revision 212)
+++ trunk/lib/FlairCore/src/FrameworkManager.h	(revision 213)
@@ -107,6 +107,7 @@
   *
   * \param log_path path to store logs
-  */
-  void SetupLogger(std::string log_path);
+  * \param stackSize stack size in bytes for logging thread
+  */
+  void SetupLogger(std::string log_path,uint32_t stackSize=1024*32);
 	
 	/*!
Index: trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/FrameworkManager_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/FrameworkManager_impl.cpp	(revision 213)
@@ -141,5 +141,5 @@
 void FrameworkManager_impl::ConnectionLost(void) {
   Err("connection lost\n");
-  gcs_watchdog->SafeStop();
+  if(gcs_watchdog!=NULL) gcs_watchdog->SafeStop();
   connection_lost = true;
 }
@@ -148,5 +148,4 @@
   // Printf("destruction FrameworkManager_impl\n");
   int status;
-	char errorMsg[256];
 	
   SafeStop();
@@ -162,8 +161,10 @@
     status = DeletePipe(&cmd_pipe);
     if (status != 0) {
+      char errorMsg[256];
       Err("Error deleting pipe (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     }
     status = DeletePipe(&data_pipe);
     if (status != 0) {
+      char errorMsg[256];
       Err("Error deleting pipe (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     }
@@ -172,4 +173,5 @@
     status = rt_heap_delete(&log_heap);
     if (status != 0) {
+      char errorMsg[256];
       Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     }
@@ -237,7 +239,5 @@
   // watchdog for connection with ground station
   connection_lost = false;
-  gcs_watchdog = new Watchdog(
-      this, std::bind(&FrameworkManager_impl::ConnectionLost, this),
-      watchdogTimeout);
+  gcs_watchdog = new Watchdog(this, std::bind(&FrameworkManager_impl::ConnectionLost, this),watchdogTimeout);
   gcs_watchdog->Start();
 }
@@ -340,5 +340,5 @@
       }
       case WATCHDOG_HEADER: {
-        gcs_watchdog->Touch();
+        if(gcs_watchdog!=NULL) gcs_watchdog->Touch();
         break;
       }
@@ -411,6 +411,5 @@
   Printf("sending %s, size: %i\n", filename.c_str(), size);
   // send file information
-  UDT::sendmsg(file_sock, buf, sizeof(uint8_t) + sizeof(int) + name.size(), -1,
-               true);
+  UDT::sendmsg(file_sock, buf, sizeof(uint8_t) + sizeof(int) + name.size(), -1,true);
 
   more_buf = (char *)realloc((void *)buf, size);
@@ -464,11 +463,11 @@
   }
 
-    //wait end ACK
-    int nb_read = UDT::recvmsg(file_sock,&buf,1);
-    if(nb_read<0) {
+  //wait end ACK
+  int nb_read = UDT::recvmsg(file_sock,&buf,1);
+  if(nb_read<0) {
     Err("UDT::recvmsg error (%s)\n",UDT::getlasterror().getErrorMessage());
-    } else if (nb_read != 1)  {
+  } else if (nb_read != 1)  {
     Err("UDT::recvmsg error, sent %i/%i\n",nb_read,1);
-    }
+  }
 }
 
@@ -567,6 +566,5 @@
 #endif
 
-void FrameworkManager_impl::SetupLogger(string log_path) {
-  char errorMsg[256];
+void FrameworkManager_impl::SetupLogger(string log_path,uint32_t stackSize) {
 	
 	if (logger_defined == true) {
@@ -579,4 +577,5 @@
   int status = CreatePipe(&cmd_pipe, "log_cmd");
   if (status != 0) {
+    char errorMsg[256];
     Err("Error creating pipe (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     return;
@@ -585,4 +584,5 @@
   status = CreatePipe(&data_pipe, "log_data");
   if (status != 0) {
+    char errorMsg[256];
     Err("Error creating pipe (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     return;
@@ -592,6 +592,7 @@
   string tmp_name;
   tmp_name = self->ObjectName() + "-log_heap";
-  status = rt_heap_create(&log_heap, tmp_name.c_str(), LOG_HEAP, H_FIFO);
+  status = rt_heap_create(&log_heap, tmp_name.c_str(), RT_LOG_HEAP, H_FIFO);
   if (status != 0) {
+    char errorMsg[256];
     Err("rt_heap_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     return;
@@ -601,31 +602,33 @@
   continuer = true;
 
-#ifdef NRT_STACK_SIZE
   // Initialize thread creation attributes
   pthread_attr_t attr;
-  if (pthread_attr_init(&attr) != 0) {
-    Err("pthread_attr_init error\n");
-    return;
-  }
-
-  if (pthread_attr_setstacksize(&attr, NRT_STACK_SIZE) != 0) {
-    Err("pthread_attr_setstacksize error\n");
-    return;
-  }
-
-  if (pthread_create(&log_th, &attr, write_log_user, (void *)this) < 0)
-#else
-  if (pthread_create(&log_th, NULL, write_log_user, (void *)this) < 0)
-#endif
-  {
-    Err("pthread_create error\n");
-    return;
-  }
-#ifdef NRT_STACK_SIZE
-  if (pthread_attr_destroy(&attr) != 0) {
-    Err("pthread_attr_destroy error\n");
-    return;
-  }
-#endif
+  status=pthread_attr_init(&attr);
+  if (status != 0) {
+    char errorMsg[256];
+    Err("pthread_attr_init error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+    return;
+  }
+
+  status=pthread_attr_setstacksize(&attr, stackSize);
+  if (status != 0) {
+    char errorMsg[256];
+    Err("pthread_attr_setstacksize error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+    return;
+  }
+
+  status=pthread_create(&log_th, &attr, write_log_user, (void *)this);
+  if (status < 0) {
+    char errorMsg[256];
+    Err("pthread_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+    return;
+  }
+
+  status=pthread_attr_destroy(&attr);
+  if (status != 0) {
+    char errorMsg[256];
+    Err("pthread_attr_destroy error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+    return;
+  }
 
   logger_defined = true;
@@ -781,5 +784,4 @@
   int cmd_pipe = -1;
   int data_pipe = -1;
-  string filename;
   fd_set set;
   struct timeval timeout;
@@ -790,17 +792,20 @@
 
 #ifdef __XENO__
-	char errorMsg[256];
-  filename = NRT_PIPE_PATH + caller->self->ObjectName() + "-log_cmd";
   while (cmd_pipe < 0) {
+    string filename = NRT_PIPE_PATH + caller->self->ObjectName() + "-log_cmd";
     cmd_pipe = open(filename.c_str(), O_RDWR);
-    if (cmd_pipe < 0 && errno != ENOENT)
+    if (cmd_pipe < 0 && errno != ENOENT) {
+      char errorMsg[256];
       caller->self->Err("open rt_pipe error: %s %s\n", filename.c_str(), strerror_r(errno, errorMsg, sizeof(errorMsg)));
+    }
     usleep(1000);
   }
-  filename = NRT_PIPE_PATH + caller->self->ObjectName() + "-log_data";
   while (data_pipe < 0) {
+    string filename = NRT_PIPE_PATH + caller->self->ObjectName() + "-log_data";
     data_pipe = open(filename.c_str(), O_RDWR);
-    if (data_pipe < 0 && errno != ENOENT)
+    if (data_pipe < 0 && errno != ENOENT) {
+      char errorMsg[256];
       caller->self->Err("open rt_pipe error: %s %s\n", filename.c_str(), strerror_r(errno, errorMsg, sizeof(errorMsg)));
+    }
     usleep(1000);
   }
@@ -829,7 +834,6 @@
         read(cmd_pipe, &tmp, sizeof(log_desc_t));
 
-        if (tmp.running == true) // start logging
-        {
-          filename = caller->log_path + "/" + caller->FileName(tmp.device) + ".dbt";
+        if (tmp.running == true) {// start logging
+          string filename = caller->log_path + "/" + caller->FileName(tmp.device) + ".dbt";
           printf("Creating log file %s (log size %i)\n", filename.c_str(), (int)tmp.size);
           tmp.dbtFile = inithdFile((char *)filename.c_str(), UAV, tmp.size);
@@ -840,20 +844,19 @@
             xmlSaveFile(filename.c_str(), caller->file_doc);
           }
-        } else // stop logging
-        {
-            //disable watchdog temporarly
-            //this is necessary because GCS is no longer sending the heartbeat when receiving files...
-            //TODO: add a thread in GCS for receiving file
-            //but be careful that with a xbee modem for exemple, sending files can saturate communication and
-            //avoid the heartbeat to be received... so disabling watchdog is not a so bad option...
-            if(caller->gcs_watchdog!=NULL) {
-                caller->gcs_watchdog->SafeStop();
-                caller->gcs_watchdog->Join();
-            }
+        } else {// stop logging
+          //disable watchdog temporarly
+          //this is necessary because GCS is no longer sending the heartbeat when receiving files...
+          //TODO: add a thread in GCS for receiving file
+          //but be careful that with a xbee modem for exemple, sending files can saturate communication and
+          //avoid the heartbeat to be received... so disabling watchdog is not a so bad option...
+          if(caller->gcs_watchdog!=NULL) {
+              caller->gcs_watchdog->SafeStop();
+              caller->gcs_watchdog->Join();
+          }
           for (size_t i = 0; i < logs.size(); i++) {
             if (logs.at(i).dbtFile != NULL) {
               close_hdfile(logs.at(i).dbtFile);
 
-              filename = caller->FileName(logs.at(i).device) + ".dbt";
+              string filename = caller->FileName(logs.at(i).device) + ".dbt";
               caller->SendFile(caller->log_path, filename);
 
@@ -875,8 +878,8 @@
 
           logs.clear();
-            //enable watchdog again
-            if(caller->gcs_watchdog!=NULL) {
-                caller->gcs_watchdog->Start();
-            }
+          //enable watchdog again
+          if(caller->gcs_watchdog!=NULL) {
+              caller->gcs_watchdog->Start();
+          }
         }
       }
Index: trunk/lib/FlairCore/src/Matrix.cpp
===================================================================
--- trunk/lib/FlairCore/src/Matrix.cpp	(revision 213)
+++ trunk/lib/FlairCore/src/Matrix.cpp	(revision 213)
@@ -0,0 +1,196 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2018/01/30
+//  filename:   Matrix.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    Class defining a matrix
+//
+/*********************************************************************/
+
+#include "Matrix.h"
+#include "Matrix_impl.h"
+#include <typeinfo>
+#include <string.h>
+
+//#include <iostream>
+
+using std::string;
+
+namespace flair {
+namespace core {
+/*! \class MatrixElement
+*/
+class MatrixElement : public IODataElement {
+public:
+  MatrixElement(const Matrix *matrix, string name, uint32_t row,
+                  uint32_t col)
+      : IODataElement(matrix, name) {
+    this->matrix = matrix;
+    this->row = row;
+    this->col = col;
+    if (row >= matrix->Rows() || col >= matrix->Cols()) {
+      matrix->Err("index (%i,%i) out of bound (%i,%i)\n", row, col,
+                  matrix->Rows() - 1, matrix->Cols() - 1);
+      size = 0;
+    } else {
+      try {
+        ScalarType const &scalarType = dynamic_cast<ScalarType const &>(
+            matrix->GetDataType().GetElementDataType());
+        size = scalarType.GetSize();
+      } catch (std::bad_cast e) {
+        matrix->Err("type not handled\n");
+        size = 0;
+      }
+    }
+  }
+
+  ~MatrixElement() {}
+
+  void CopyData(char *dst) const {
+    if (typeid(matrix->GetDataType().GetElementDataType()) ==
+        typeid(FloatType)) {
+      float value = matrix->Value(row, col);
+      memcpy(dst, &value, sizeof(value));
+    } else if (typeid(matrix->GetDataType().GetElementDataType()) ==
+               typeid(SignedIntegerType)) {
+      switch (matrix->GetDataType().GetElementDataType().GetSize()) {
+      case 1: {
+        int8_t int8Value = matrix->Value(row, col);
+        memcpy(dst, &int8Value, 1);
+      } break;
+      case 2: {
+        int16_t int16Value = matrix->Value(row, col);
+        memcpy(dst, &int16Value, 2);
+      } break;
+      }
+    }
+  }
+
+  DataType const &GetDataType(void) const {
+    return matrix->GetDataType().GetElementDataType();
+  }
+
+private:
+  const Matrix *matrix;
+  uint32_t row, col;
+};
+
+Matrix::Matrix(const Object *parent, uint32_t rows, uint32_t cols,
+                   ScalarType const &elementDataType, string name, uint32_t n)
+    : io_data(parent, name, n), dataType(rows, cols, elementDataType) {
+  pimpl_ = new Matrix_impl(this, rows, cols, elementDataType, n);
+
+  for (uint32_t i = 0; i < rows; i++) {
+    for (uint32_t j = 0; j < cols; j++) {
+      AppendLogDescription(pimpl_->descriptor->ElementName(i, j),
+                           elementDataType);
+      SetValue(i, j, 0);
+    }
+  }
+}
+
+Matrix::Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,
+                   ScalarType const &elementDataType, string name, uint32_t n)
+    : io_data(parent, name, n),
+      dataType(descriptor->Rows(), descriptor->Cols(), elementDataType) {
+  pimpl_ = new Matrix_impl(this, descriptor, elementDataType, n);
+
+  for (uint32_t i = 0; i < descriptor->Rows(); i++) {
+    for (uint32_t j = 0; j < descriptor->Cols(); j++) {
+      AppendLogDescription(descriptor->ElementName(i, j), elementDataType);
+      SetValue(i, j, 0);
+    }
+  }
+}
+
+Matrix::~Matrix() { delete pimpl_; }
+
+IODataElement *Matrix::Element(uint32_t row, uint32_t col) const {
+  return new MatrixElement(this, Name(row, col), row, col);
+}
+
+IODataElement *Matrix::Element(uint32_t index) const {
+  if (Rows() == 1) {
+    return new MatrixElement(this, Name(0, index), 0, index);
+  } else if (Cols() == 1) {
+    return new MatrixElement(this, Name(index, 0), index, 0);
+  } else {
+    Err("matrix is not 1D\n");
+    return nullptr;
+  }
+}
+
+float Matrix::Value(uint32_t row, uint32_t col) const {
+  float value;
+
+  if (row >= (uint32_t)pimpl_->descriptor->Rows() ||
+      col >= (uint32_t)pimpl_->descriptor->Cols()) {
+    Warn("index (%i,%i) out of bound (%i,%i)\n", row, col,
+         pimpl_->descriptor->Rows() - 1, pimpl_->descriptor->Cols() - 1);
+    return 0;
+  }
+
+  GetMutex();
+  value = pimpl_->datas[row][col];
+  ReleaseMutex();
+
+  return value;
+}
+
+float Matrix::ValueNoMutex(uint32_t row, uint32_t col) const {
+  if (row >= (uint32_t)pimpl_->descriptor->Rows() ||
+      col >= (uint32_t)pimpl_->descriptor->Cols()) {
+    Warn("index (%i,%i) out of bound (%i,%i)\n", row, col,
+         pimpl_->descriptor->Rows() - 1, pimpl_->descriptor->Cols() - 1);
+    return 0;
+  }
+
+  return pimpl_->datas[row][col];
+}
+
+void Matrix::SetValue(uint32_t row, uint32_t col, float value) {
+  if (row >= (uint32_t)pimpl_->descriptor->Rows() ||
+      col >= (uint32_t)pimpl_->descriptor->Cols()) {
+    Warn("index (%i,%i) out of bound (%i,%i)\n", row, col,
+         pimpl_->descriptor->Rows() - 1, pimpl_->descriptor->Cols() - 1);
+  } else {
+    GetMutex();
+    pimpl_->datas[row][col]=value;
+    ReleaseMutex();
+  }
+}
+
+void Matrix::SetValueNoMutex(uint32_t row, uint32_t col, float value) {
+  if (row >= (uint32_t)pimpl_->descriptor->Rows() ||
+      col >= (uint32_t)pimpl_->descriptor->Cols()) {
+    Warn("index (%i,%i) out of bound (%i,%i)\n", row, col,
+         pimpl_->descriptor->Rows() - 1, pimpl_->descriptor->Cols() - 1);
+  } else {
+    pimpl_->datas[row][col]=value;
+  }
+}
+
+void Matrix::CopyDatas(char *dst) const {
+  GetMutex();
+  // printf("%f %x %i\n",cvGetReal2D(pimpl_->mat,0,0),dst,Size());
+  memcpy(dst, pimpl_->datas, dataType.GetSize());
+  ReleaseMutex();
+}
+
+uint32_t Matrix::Rows(void) const { return pimpl_->descriptor->Rows(); }
+
+uint32_t Matrix::Cols(void) const { return pimpl_->descriptor->Cols(); }
+
+string Matrix::Name(uint32_t row, uint32_t col) const {
+  return pimpl_->descriptor->ElementName(row, col);
+}
+
+} // end namespace core
+} // end namespace flair
Index: trunk/lib/FlairCore/src/Matrix.h
===================================================================
--- trunk/lib/FlairCore/src/Matrix.h	(revision 213)
+++ trunk/lib/FlairCore/src/Matrix.h	(revision 213)
@@ -0,0 +1,217 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file Matrix.h
+ * \brief Class defining a matrix
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2018/01/30
+ * \version 4.0
+ */
+
+#ifndef MATRIX_H
+#define MATRIX_H
+
+#include <io_data.h>
+#include <IODataElement.h>
+#include <cvmatrix_descriptor.h>
+
+class Matrix_impl;
+
+namespace flair {
+namespace core {
+
+/*! \class Matrix
+*
+* \brief Class defining a matrix
+* 
+* Only supports float for the moment
+* TODO: write a template
+*
+*/
+class Matrix : public io_data {
+public:
+  class Type : public DataType {
+  public:
+    Type(size_t _nbRows, size_t _nbCols, ScalarType const &_elementDataType)
+        : nbRows(_nbRows), nbCols(_nbCols), elementDataType(_elementDataType) {}
+    size_t GetSize() const {
+      return nbRows * nbCols * elementDataType.GetSize();
+    }
+    std::string GetDescription() const { return "matrix"; }
+    size_t GetNbRows() const { return nbRows; }
+    size_t GetNbCols() const { return nbCols; }
+    ScalarType const &GetElementDataType() const { return elementDataType; }
+
+  private:
+    size_t nbRows, nbCols;
+    ScalarType const &elementDataType;
+  };
+
+  /*!
+  * \brief Constructor
+  *
+  * Construct an io_data representing a matrix. \n
+  * It uses a cvmatrix_descriptor to get size and elements' names. \n
+  * Names are used for graphs and logs. \n
+  * All values are initialized to 0.
+  *
+  * \param parent parent
+  * \param descriptor matrix description, it is safe to destroy it after calling this constructor
+  * \param type type of matrix elements
+  * \param name name
+  * \param n number of samples
+  */
+  Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,
+           ScalarType const &elementDataType, std::string name = "",
+           uint32_t n = 1);
+
+  /*!
+  * \brief Constructor
+  *
+  * Construct an io_data representing a matrix. \n
+  * Elements are unamed. \n
+  * All values are initialized to 0.
+  *
+  * \param parent parent
+  * \param rows matrix rows
+  * \param cols matrix cols
+  * \param type type of matrix elements
+  * \param name name
+  * \param n number of samples
+  */
+  Matrix(const Object *parent, uint32_t rows, uint32_t cols,
+           ScalarType const &elementDataType, std::string name = "",
+           uint32_t n = 1);
+
+  /*!
+  * \brief Destructor
+  *
+  */
+  ~Matrix();
+
+  /*!
+  * \brief Element value
+  *
+  * Element is accessed by locking and unlocking the io_data Mutex.
+  *
+  * \param row element row
+  * \param col element col
+  *
+  * \return element value
+  */
+  float Value(uint32_t row, uint32_t col) const;
+
+  /*!
+  * \brief Element value
+  *
+  * Element is not accessed by locking and unlocking the io_data Mutex. \n
+  * Thus, this function should be called with Mutex locked. \n
+  * This function is usefull when multiple successive access are done to the
+  * elments of the matrix. It avoids unnecessary locking and unlocking.
+  *
+  * \param row element row
+  * \param col element col
+  *
+  * \return element value
+  */
+  float ValueNoMutex(uint32_t row, uint32_t col) const;
+
+  /*!
+  * \brief Set element value
+  *
+  * Element is accessed by locking and unlocking the io_data Mutex.
+  *
+  * \param row element row
+  * \param col element col
+  * \param value element value
+  */
+  void SetValue(uint32_t row, uint32_t col, float value);
+
+  /*!
+  * \brief Set element value
+  *
+  * Element is not accessed by locking and unlocking the io_data Mutex. \n
+  * Thus, this function should be called with Mutex locked. \n
+  * This function is usefull when multiple successive access are done to the
+  * elments of the matrix. It avoids unnecessary locking and unlocking.
+  *
+  * \param row element row
+  * \param col element col
+  * \param value element value
+  */
+  void SetValueNoMutex(uint32_t row, uint32_t col, float value);
+
+  /*!
+  * \brief Element name
+  *
+  * If Matrix was created without cvmatrix_descriptor, element name is empty.
+  *
+  * \param row element row
+  * \param col element col
+  *
+  * \return element name
+  */
+  std::string Name(uint32_t row, uint32_t col) const;
+
+  /*!
+  * \brief Element
+  *
+  * Get a pointer to a specific element. This pointer can be used for plotting.
+  *
+  * \param row element row
+  * \param col element col
+  *
+  * \return pointer to the element
+  */
+  IODataElement *Element(uint32_t row, uint32_t col) const;
+
+  /*!
+  * \brief Element
+  *
+  * Get a pointer to a specific element. This pointer can be used for plotting.
+  *\n
+  * This function can be used for a 1D matrix.
+  *
+  * \param index element index
+  *
+  * \return pointer to the element
+  */
+  IODataElement *Element(uint32_t index) const;
+
+  /*!
+  * \brief Number of rows
+  *
+  * \return rows
+  */
+  uint32_t Rows(void) const;
+
+  /*!
+  * \brief Number of colomns
+  *
+  * \return colomns
+  */
+  uint32_t Cols(void) const;
+
+  Type const &GetDataType() const { return dataType; };
+
+private:
+  /*!
+  * \brief Copy datas
+  *
+  * Reimplemented from io_data. \n
+  * See io_data::CopyDatas.
+  *
+  * \param dst destination buffer
+  */
+  void CopyDatas(char *dst) const;
+
+  class Matrix_impl *pimpl_;
+  Type dataType;
+};
+
+} // end namespace core
+} // end namespace flair
+
+#endif // MATRIX_H
Index: trunk/lib/FlairCore/src/Matrix_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/Matrix_impl.cpp	(revision 213)
+++ trunk/lib/FlairCore/src/Matrix_impl.cpp	(revision 213)
@@ -0,0 +1,101 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2018/01/30
+//  filename:   Matrix_impl.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    classe definissant le type de données Matrix
+//
+/*********************************************************************/
+
+#include "Matrix.h"
+#include "Matrix_impl.h"
+#include <typeinfo>
+#include <sstream>
+
+using std::string;
+using namespace flair::core;
+
+Matrix_impl::Matrix_impl(Matrix *self, int rows, int cols,
+                             flair::core::ScalarType const &_elementDataType,
+                             int n)
+    : elementDataType(_elementDataType) {
+  descriptor = new cvmatrix_descriptor(rows, cols);
+  Init(self, n);
+}
+
+Matrix_impl::Matrix_impl(Matrix *self,
+                             const cvmatrix_descriptor *inDescriptor,
+                             flair::core::ScalarType const &_elementDataType,
+                             int n)
+    : elementDataType(_elementDataType) {
+  descriptor = new cvmatrix_descriptor(inDescriptor->Rows(), inDescriptor->Cols());
+
+  for (uint32_t i = 0; i < descriptor->Rows(); i++) {
+    for (uint32_t j = 0; j < descriptor->Cols(); j++) {
+      descriptor->SetElementName(i, j, inDescriptor->ElementName(i, j));
+    }
+  }
+  Init(self, n);
+}
+
+void Matrix_impl::Init(Matrix *self, int n) {
+  this->self = self;
+
+  datas = nullptr;
+  try {
+    ScalarType const &scalarType =
+        dynamic_cast<ScalarType const &>(elementDataType);
+    if (typeid(scalarType) == typeid(FloatType)) {
+      datas = (float **)malloc(descriptor->Rows() * sizeof(float*));
+      if(datas==NULL) {
+        self->Err("error allocating matrix\n");
+        return;
+      }
+      for(uint32_t i=0 ; i < descriptor->Rows() ; i++){
+        datas[i] = (float*)malloc(descriptor->Cols() * sizeof(float) ); 
+        if(datas[i]==NULL) {
+          self->Err("error allocating matrix\n");
+          for(uint32_t j = i-1 ; j >= 0 ; j--) free(datas[j]);
+          free(datas);
+          return;
+        }
+      }
+      /*
+    } else if (typeid(scalarType) == typeid(SignedIntegerType)) {
+      switch (elementDataType.GetSize()) {
+      case 1:
+        mat = cvCreateMat(descriptor->Rows(), descriptor->Cols(), CV_8SC1);
+        break;
+      case 2:
+        mat = cvCreateMat(descriptor->Rows(), descriptor->Cols(), CV_16SC1);
+        break;
+      default:
+        self->Err("unsupported integer scalar type\n");
+      }*/
+    } else {
+      self->Err("unsupported scalar type\n");
+    }
+  } catch (std::bad_cast e) {
+    self->Err("type is not a scalar\n");
+  }
+
+  if (datas == nullptr)
+    self->Err("allocating matrix failed\n");
+  if (n > 1)
+    self->Warn("n>1 not supported\n");
+}
+
+Matrix_impl::~Matrix_impl() {
+  for (uint32_t i = 0; i < descriptor->Rows();i++) {
+    free(datas[i]);
+  }
+  free(datas);
+  delete descriptor;
+}
Index: trunk/lib/FlairCore/src/Mutex_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/Mutex_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/Mutex_impl.cpp	(revision 213)
@@ -51,5 +51,4 @@
 Mutex_impl::~Mutex_impl() {
   int status;
-	char errorMsg[256];
 	
 #ifdef __XENO__
@@ -58,11 +57,12 @@
   status = pthread_mutex_destroy(&mutex);
 #endif
-  if (status != 0)
+  if (status != 0) {
+    char errorMsg[256];
     self->Err("error destroying mutex (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+  }
 }
 
 void Mutex_impl::GetMutex(void) {
   int status;
-	char errorMsg[256];
 	
 #ifdef __XENO__
@@ -72,6 +72,8 @@
   status = pthread_mutex_lock(&mutex);
 #endif
-  if (status != 0)
+  if (status != 0) {
+    char errorMsg[256];
     self->Err("error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+  }
 }
 
Index: trunk/lib/FlairCore/src/Semaphore_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/Semaphore_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/Semaphore_impl.cpp	(revision 213)
@@ -28,5 +28,4 @@
   this->self = self;
   int status;
-	char errorMsg[256];
 	
 #ifdef __XENO__
@@ -36,4 +35,5 @@
 #endif
   if (status != 0) {
+    char errorMsg[256];
     self->Err("error creating semaphore (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
   }
@@ -42,5 +42,4 @@
 Semaphore_impl::~Semaphore_impl() {
   int status;
-	char errorMsg[256];
 	
 #ifdef __XENO__
@@ -49,6 +48,8 @@
   status = sem_destroy(&semaphore);
 #endif
-  if (status != 0)
+  if (status != 0) {
+    char errorMsg[256];
     self->Err("error destroying semaphore (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+  }
 }
 
Index: trunk/lib/FlairCore/src/SharedMem_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/SharedMem_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/SharedMem_impl.cpp	(revision 213)
@@ -29,6 +29,4 @@
                                sem(self,1,"/" + name + "_mutex"), sem_producer(self,0,"/" + name + "_producer"),sem_consumer(self,0,"/" + name + "_consumer") {
 
-  char errorMsg[256];
-
 #ifdef __XENO__
   heap_binded = false;
@@ -40,4 +38,5 @@
   }
   if (status != 0) {
+    char errorMsg[256];
     self->Err("rt_heap_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     return;
@@ -47,4 +46,5 @@
   status = rt_heap_alloc(&heap, 0, TM_NONBLOCK, &ptr);
   if (status != 0) {
+    char errorMsg[256];
     self->Err("rt_heap_alloc error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
   }
@@ -68,5 +68,4 @@
 SharedMem_impl::~SharedMem_impl() {
   int status;
-	char errorMsg[256];
 	
 #ifdef __XENO__
@@ -75,4 +74,5 @@
     status = rt_heap_delete(&heap);
     if (status != 0) {
+      char errorMsg[256];
       self->Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     }
@@ -82,4 +82,5 @@
   status = munmap(mem_segment, size);
   if (status != 0) {
+    char errorMsg[256];
     self->Err("Failed to unmap memory (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
   }
@@ -87,4 +88,5 @@
   status = close(fd);
   if (status != 0) {
+    char errorMsg[256];
     self->Err("Failed to close file (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
   }
@@ -94,4 +96,5 @@
    if(status!=0)
    {
+      char errorMsg[256];
        self->Err("Failed to unlink memory (%s)\n",strerror_r(-status, errorMsg, sizeof(errorMsg)));
    }
Index: trunk/lib/FlairCore/src/TcpSocket.cpp
===================================================================
--- trunk/lib/FlairCore/src/TcpSocket.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/TcpSocket.cpp	(revision 213)
@@ -63,5 +63,4 @@
 
 TcpSocket *TcpSocket::Accept(Time timeout) {
-  char errorMsg[256];
   TcpSocket *acceptedSocket = nullptr;
 
@@ -77,4 +76,5 @@
                    (timeout == 0) ? nullptr : &tv); // man 2 accept
   if (ret < 0) {
+    char errorMsg[256];
     Err("select: %s\n", strerror_r(errno, errorMsg, sizeof(errorMsg)));
   } else {
@@ -90,4 +90,5 @@
       if ((acceptedSocket->socket =
                accept(socket, (sockaddr *)&their_addr, &namelen)) < 0) {
+        char errorMsg[256];
         Err("error: %s\n", strerror_r(errno, errorMsg, sizeof(errorMsg)));
         delete acceptedSocket;
@@ -103,5 +104,4 @@
                         const std::string distantAddress, Time timeout) {
   bool success = false;
-  char errorMsg[256];
 
   if (isConnected) {
@@ -132,4 +132,5 @@
   if (connect(socket, (sockaddr *)&serv_addr, sizeof(serv_addr)) == -1) {
     if ((errno != EINPROGRESS) && (errno != EAGAIN)) {
+      char errorMsg[256];
       Err("socket connect: %s\n",
           strerror_r(errno, errorMsg, sizeof(errorMsg)));
@@ -149,4 +150,5 @@
                  (timeout == 0) ? NULL : &tv); // man 2 connect EINPROGRESS
       if (ret < 0) {
+        char errorMsg[256];
         Err("select: %s\n", strerror_r(errno, errorMsg, sizeof(errorMsg)));
         success = false;
@@ -161,10 +163,10 @@
           socklen_t len = sizeof(error);
           if (getsockopt(socket, SOL_SOCKET, SO_ERROR, &error, &len) != 0) {
-            // Err("getsockopt:
-            // %s\n",strerror_r(errno,errorMsg,sizeof(errorMsg)));
+            //char errorMsg[256];
+            // Err("getsockopt: %s\n",strerror_r(errno,errorMsg,sizeof(errorMsg)));
             success = false;
           } else if (error != 0) {
-            // Err("socket error:
-            // %d(%s)\n",error,strerror_r(error,errorMsg,sizeof(errorMsg)));
+            //char errorMsg[256];
+            // Err("socket error: %d(%s)\n",error,strerror_r(error,errorMsg,sizeof(errorMsg)));
             success = false;
           } else {
Index: trunk/lib/FlairCore/src/Thread.cpp
===================================================================
--- trunk/lib/FlairCore/src/Thread.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/Thread.cpp	(revision 213)
@@ -30,7 +30,7 @@
 namespace core {
 
-Thread::Thread(const Object *parent, string name, uint8_t priority)
+Thread::Thread(const Object *parent, string name, uint8_t priority,uint32_t stackSize)
     : Object(parent, name, "Thread") {
-  pimpl_ = new Thread_impl(this, priority);
+  pimpl_ = new Thread_impl(this, priority,stackSize);
 }
 
Index: trunk/lib/FlairCore/src/Thread.h
===================================================================
--- trunk/lib/FlairCore/src/Thread.h	(revision 212)
+++ trunk/lib/FlairCore/src/Thread.h	(revision 213)
@@ -49,5 +49,5 @@
   */
   Thread(const Object *parent, std::string name,
-         uint8_t priority,uint32_t stackSize);
+         uint8_t priority,uint32_t stackSize=1024*128);
 
   /*!
Index: trunk/lib/FlairCore/src/Thread_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/Thread_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/Thread_impl.cpp	(revision 213)
@@ -36,9 +36,10 @@
 using namespace flair::core;
 
-Thread_impl::Thread_impl(Thread *self, uint8_t priority) {
+Thread_impl::Thread_impl(Thread *self, uint8_t priority,uint32_t stackSize) {
   isRunning = false;
   tobestopped = false;
   is_suspended = false;
   period_set = false;
+  this->stackSize = stackSize;
 
   this->self = self;
@@ -78,21 +79,17 @@
 void Thread_impl::Start(void) {
   int status;
-	char errorMsg[256];
-
   isRunning = true;
   tobestopped = false;
   is_suspended = false;
 
+ Printf("Starting thread %s (priority=%i, stack size=%i bytes)\n",self->ObjectName().c_str(), priority,stackSize);
 #ifdef __XENO__
   string th_name =TH_NAME;
 
-#ifdef RT_STACK_SIZE
-  status = rt_task_create(&task_rt, th_name.c_str(), RT_STACK_SIZE,
+  status = rt_task_create(&task_rt, th_name.c_str(), stackSize,
                           (int)priority, T_JOINABLE);
-#else
-  status =
-      rt_task_create(&task_rt, th_name.c_str(), 0, (int)priority, T_JOINABLE);
-#endif // RT_STACK_SIZE
-  if (status != 0) {
+
+  if (status != 0) {
+    char errorMsg[256];
     self->Err("rt_task_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
   } else {
@@ -102,4 +99,5 @@
   status = rt_task_start(&task_rt, &main_rt, (void *)this);
   if (status != 0) {
+    char errorMsg[256];
     self->Err("rt_task_start error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
   } else {
@@ -115,9 +113,7 @@
   }
 
-#ifdef NRT_STACK_SIZE
-  if (pthread_attr_setstacksize(&attr, NRT_STACK_SIZE) != 0) {
+  if (pthread_attr_setstacksize(&attr, stackSize) != 0) {
     self->Err("Error pthread_attr_setstacksize\n");
   }
-#endif // NRT_STACK_SIZE
 
   if (pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) != 0) {
@@ -320,4 +316,5 @@
 
 void Thread_impl::PrintStats(void) {
+  Printf("Stopping thread %s\n", self->ObjectName().c_str()); 
 #ifdef __XENO__
   RT_TASK_INFO info;
@@ -333,5 +330,5 @@
   if(last!=0)
 #endif
-    { Printf("Thread::%s :\n", self->ObjectName().c_str()); 
+    {
     if(period_set) {Printf("    period (ns): %lld\n", period);}}
 #ifdef __XENO__
@@ -365,6 +362,5 @@
   if (isRunning == true) {
     int status;
-		char errorMsg[256];
-
+  
 #ifdef __XENO__
     status = rt_task_join(&task_rt);
@@ -372,6 +368,8 @@
     status = pthread_join(task_nrt, NULL);
 #endif
-    if (status != 0)
+    if (status != 0) {
+      char errorMsg[256];
       self->Err("error %s\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
+    }
     isRunning = false;
   }
Index: trunk/lib/FlairCore/src/UdpSocket_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/UdpSocket_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/UdpSocket_impl.cpp	(revision 213)
@@ -160,6 +160,5 @@
   ssize_t written;
   string to_send;
-	char errorMsg[256];
-
+	
   if (broadcast == true) {
     to_send = getFrameworkManager()->ObjectName() + ":" + string(src, src_len);
@@ -173,4 +172,5 @@
 
   if (written < 0) {
+    char errorMsg[256];
     self->Err("rt_pipe_write error (%s)\n", strerror_r(-written, errorMsg, sizeof(errorMsg)));
   } else if (written != (ssize_t)src_len) {
Index: trunk/lib/FlairCore/src/Watchdog.cpp
===================================================================
--- trunk/lib/FlairCore/src/Watchdog.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/Watchdog.cpp	(revision 213)
@@ -22,5 +22,5 @@
 Watchdog::Watchdog(const Object *parent, std::function<void()> _expired,
                    Time _timer)
-    : Thread(parent, "watchdog", 0), expired(_expired), timer(_timer) {}
+    : Thread(parent, "watchdog", 0,16384*2), expired(_expired), timer(_timer) {}
 
 Watchdog::~Watchdog() {
Index: trunk/lib/FlairCore/src/Widget_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/Widget_impl.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/Widget_impl.cpp	(revision 213)
@@ -33,11 +33,11 @@
 namespace {
 #ifdef __XENO__
-RT_HEAP xml_heap;
-
-void xml2_free(void *mem) {
+RT_HEAP rt_xml_heap;
+
+void rt_xml2_free(void *mem) {
   // Printf("free %x\n",mem);
   if (mem == NULL)
     return;
-  int status = rt_heap_free(&xml_heap, mem);
+  int status = rt_heap_free(&rt_xml_heap, mem);
 
   if (status != 0) {
@@ -47,8 +47,8 @@
 }
 
-void *xml2_alloc(size_t sz) {
+void *rt_xml2_alloc(size_t sz) {
   void *ptr;
   // printf("alloc %i\n",sz);
-  int status = rt_heap_alloc(&xml_heap, sz, TM_NONBLOCK, &ptr);
+  int status = rt_heap_alloc(&rt_xml_heap, sz, TM_NONBLOCK, &ptr);
   if (status != 0) {
 		char errorMsg[256];
@@ -60,26 +60,26 @@
 }
 
-void *xml2_realloc(void *emem, size_t sz) {
+void *rt_xml2_realloc(void *emem, size_t sz) {
   // Printf("realloc %x %i -> %i\n",emem,sz,sz);
   void *mem_re;
 
   if (emem == NULL) {
-    return xml2_alloc(sz);
+    return rt_xml2_alloc(sz);
   } else if (sz == 0) {
-    xml2_free(emem);
-  }
-
-  mem_re = xml2_alloc(sz);
+    rt_xml2_free(emem);
+  }
+
+  mem_re = rt_xml2_alloc(sz);
 
   memcpy(mem_re, emem, sz);
 
-  xml2_free(emem);
+  rt_xml2_free(emem);
 
   return mem_re;
 }
 
-char *xml2_strdup(const char *str) {
+char *rt_xml2_strdup(const char *str) {
   // printf("strdup %s\n",str);
-  char *s = (char *)xml2_alloc(strlen(str) + 1);
+  char *s = (char *)rt_xml2_alloc(strlen(str) + 1);
   if (s == NULL)
     return NULL;
@@ -103,5 +103,5 @@
     string tmp_name;
     tmp_name = name + "-xml";
-    int status = rt_heap_create(&xml_heap, tmp_name.c_str(), XML_HEAP, H_FIFO);
+    int status = rt_heap_create(&rt_xml_heap, tmp_name.c_str(), RT_XML_HEAP, H_FIFO);
     if (status != 0) {
 			char errorMsg[256];
@@ -109,5 +109,5 @@
     }
 
-    xmlMemSetup(xml2_free, xml2_alloc, xml2_realloc, xml2_strdup);
+    xmlMemSetup(rt_xml2_free, rt_xml2_alloc, rt_xml2_realloc, rt_xml2_strdup);
 #endif //__XENO__
   }
@@ -188,8 +188,8 @@
 #ifdef __XENO__
     int status;
-		char errorMsg[256];
     RT_HEAP_INFO info;
-    status = rt_heap_inquire(&xml_heap, &info);
+    status = rt_heap_inquire(&rt_xml_heap, &info);
     if (status != 0) {
+      char errorMsg[256];
       self->Err("rt_heap_inquire error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     }
@@ -197,6 +197,7 @@
       self->Err("fuite memoire xml heap (%ld)\n", info.usedmem);
     // Printf("fin heap xml\n");
-    status = rt_heap_delete(&xml_heap);
+    status = rt_heap_delete(&rt_xml_heap);
     if (status != 0) {
+      char errorMsg[256];
       self->Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
     }
Index: trunk/lib/FlairCore/src/ui_com.cpp
===================================================================
--- trunk/lib/FlairCore/src/ui_com.cpp	(revision 212)
+++ trunk/lib/FlairCore/src/ui_com.cpp	(revision 213)
@@ -40,5 +40,5 @@
 
 ui_com::ui_com(const Object *parent, UDTSOCKET sock)
-    : Thread(parent, "send", 2) {
+    : Thread(parent, "send", 2,16384*2) {
   // buffer envoi
   send_buffer = (char *)malloc(3);
Index: trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h
===================================================================
--- trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h	(revision 212)
+++ trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h	(revision 213)
@@ -46,5 +46,5 @@
                        size_t rcv_buf_size);
   void SetupUserInterface(std::string xml_file);
-  void SetupLogger(std::string log_path);
+  void SetupLogger(std::string log_path,uint32_t stackSize);
   void AddDeviceToLog(flair::core::IODevice *device);
 	bool IsDeviceLogged(const flair::core::IODevice *device) const;
Index: trunk/lib/FlairCore/src/unexported/Matrix_impl.h
===================================================================
--- trunk/lib/FlairCore/src/unexported/Matrix_impl.h	(revision 213)
+++ trunk/lib/FlairCore/src/unexported/Matrix_impl.h	(revision 213)
@@ -0,0 +1,42 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file Matrix_impl.h
+ * \brief Classe définissant une matrice
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2018/01/30
+ * \version 4.0
+ */
+
+#ifndef MATRIX_IMPL_H
+#define MATRIX_IMPL_H
+
+#include <io_data.h>
+#include <Matrix.h>
+
+
+/*! \class Matrix_impl
+* \brief Classe définissant une matrice
+*
+*/
+class Matrix_impl {
+public:
+  Matrix_impl(flair::core::Matrix *self, int rows, int cols,
+                flair::core::ScalarType const &elementDataType, int n);
+  Matrix_impl(flair::core::Matrix *self,
+                const flair::core::cvmatrix_descriptor *descriptor,
+                flair::core::ScalarType const &elementDataType, int n);
+  ~Matrix_impl();
+
+  flair::core::ScalarType const &elementDataType;
+  flair::core::cvmatrix_descriptor *descriptor;
+  float **datas;
+
+private:
+  flair::core::Matrix *self;
+  void Init(flair::core::Matrix *self, int n);
+};
+
+#endif // MATRIX_IMPL_H
Index: trunk/lib/FlairCore/src/unexported/Thread_impl.h
===================================================================
--- trunk/lib/FlairCore/src/unexported/Thread_impl.h	(revision 212)
+++ trunk/lib/FlairCore/src/unexported/Thread_impl.h	(revision 213)
@@ -32,5 +32,5 @@
 class Thread_impl {
 public:
-  Thread_impl(flair::core::Thread *self, uint8_t priority);
+  Thread_impl(flair::core::Thread *self, uint8_t priority,uint32_t stackSize);
   ~Thread_impl();
   void Start(void);
@@ -55,4 +55,5 @@
   flair::core::ConditionVariable *cond;
   uint8_t priority;
+  uint32_t stackSize;
   flair::core::Time max_latency, min_latency, mean_latency;
   flair::core::Time last;
Index: trunk/lib/FlairCore/src/unexported/config.h
===================================================================
--- trunk/lib/FlairCore/src/unexported/config.h	(revision 212)
+++ trunk/lib/FlairCore/src/unexported/config.h	(revision 213)
@@ -20,8 +20,6 @@
 
 // stack size of nrt threads, comment it to use default value
+// only used for user threads in udpsocket and ui_com, in case of the rt library
 #define NRT_STACK_SIZE 1024 * 1024 * 1
-
-// stack size of rt threads, comment it to use default value
-#define RT_STACK_SIZE 1024 * 100
 
 // rt pipe size, comment it to use system heap
@@ -32,8 +30,8 @@
 
 // rt log heap size
-#define LOG_HEAP 1024 * 100
+#define RT_LOG_HEAP 1024 * 100
 
-// xml heap size
-#define XML_HEAP 5 * 1024 * 1024
+// rt xml heap size
+#define RT_XML_HEAP 5 * 1024 * 1024
 
 // nrt pipe path
