Index: trunk/lib/FlairCore/src/AhrsData.cpp
===================================================================
--- trunk/lib/FlairCore/src/AhrsData.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/AhrsData.cpp	(revision 252)
@@ -232,5 +232,5 @@
 }
 
-void AhrsData::CopyDatas(char *dst) const {
+void AhrsData::RawRead(char *dst) const {
   GetMutex();
   Queue(&dst, &quaternion.q0, sizeof(quaternion.q0));
Index: trunk/lib/FlairCore/src/AhrsData.h
===================================================================
--- trunk/lib/FlairCore/src/AhrsData.h	(revision 250)
+++ trunk/lib/FlairCore/src/AhrsData.h	(revision 252)
@@ -161,12 +161,12 @@
 private:
   /*!
-  * \brief Copy datas
+  * \brief Raw read datas
   *
   * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
+  * See io_data::RawRead.
   *
   * \param dst destination buffer
   */
-  void CopyDatas(char *dst) const;
+  void RawRead(char *dst) const;
 
   void Queue(char **dst, const void *src, size_t size) const;
Index: trunk/lib/FlairCore/src/GeoCoordinate.cpp
===================================================================
--- trunk/lib/FlairCore/src/GeoCoordinate.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/GeoCoordinate.cpp	(revision 252)
@@ -69,5 +69,5 @@
 }
 
-void GeoCoordinate::CopyDatas(char *ptr) const { Warn("a ecrire"); }
+void GeoCoordinate::RawRead(char *ptr) const { Warn("a ecrire"); }
 
 } // end namespace core
Index: trunk/lib/FlairCore/src/GeoCoordinate.h
===================================================================
--- trunk/lib/FlairCore/src/GeoCoordinate.h	(revision 250)
+++ trunk/lib/FlairCore/src/GeoCoordinate.h	(revision 252)
@@ -96,12 +96,12 @@
 private:
   /*!
-  * \brief Copy datas
+  * \brief Raw read datas
   *
   * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
+  * See io_data::RawRead.
   *
   * \param dst destination buffer
   */
-  void CopyDatas(char *ptr) const;
+  void RawRead(char *ptr) const;
 
   double latitude;
Index: trunk/lib/FlairCore/src/GpsData.cpp
===================================================================
--- trunk/lib/FlairCore/src/GpsData.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/GpsData.cpp	(revision 252)
@@ -298,5 +298,5 @@
 }
 
-void GpsData::CopyDatas(char *dst) const {
+void GpsData::RawRead(char *dst) const {
   GetMutex();
 
Index: trunk/lib/FlairCore/src/GpsData.h
===================================================================
--- trunk/lib/FlairCore/src/GpsData.h	(revision 250)
+++ trunk/lib/FlairCore/src/GpsData.h	(revision 252)
@@ -244,16 +244,16 @@
 
   Type const &GetDataType() const { return dataType; }
+  
+  /*!
+  * \brief Raw read datas
+  *
+  * Reimplemented from io_data. \n
+  * See io_data::RawRead.
+  *
+  * \param dst destination buffer
+  */
+  void RawRead(char *dst) const;
 
 private:
-  /*!
-  * \brief Copy datas
-  *
-  * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
-  *
-  * \param dst destination buffer
-  */
-  void CopyDatas(char *dst) const;
-
   void Queue(char **dst, const void *src, size_t size) const;
   Type dataType;
Index: trunk/lib/FlairCore/src/IODevice_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/IODevice_impl.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/IODevice_impl.cpp	(revision 252)
@@ -204,5 +204,5 @@
   for (size_t i = 0; i < datasToLog.size(); i++) {
     // printf("copy %s\n",datasToLog.at(i)->ObjectName().c_str());
-    datasToLog.at(i)->CopyDatas(*ptr);
+    datasToLog.at(i)->RawRead(*ptr);
     (*ptr) += datasToLog.at(i)->GetDataType().GetSize();
   }
Index: trunk/lib/FlairCore/src/ImuData.cpp
===================================================================
--- trunk/lib/FlairCore/src/ImuData.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/ImuData.cpp	(revision 252)
@@ -226,5 +226,5 @@
 }
 
-void ImuData::CopyDatas(char *dst) const {
+void ImuData::RawRead(char *dst) const {
   GetMutex();
 
Index: trunk/lib/FlairCore/src/ImuData.h
===================================================================
--- trunk/lib/FlairCore/src/ImuData.h	(revision 250)
+++ trunk/lib/FlairCore/src/ImuData.h	(revision 252)
@@ -186,12 +186,12 @@
 private:
   /*!
-  * \brief Copy datas
+  * \brief Raw read datas
   *
   * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
+  * See io_data::RawRead.
   *
   * \param dst destination buffer
   */
-  void CopyDatas(char *dst) const;
+  void RawRead(char *dst) const;
 
   /*!
Index: trunk/lib/FlairCore/src/Matrix.cpp
===================================================================
--- trunk/lib/FlairCore/src/Matrix.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/Matrix.cpp	(revision 252)
@@ -188,5 +188,5 @@
 }
 
-void Matrix::CopyDatas(char *dst) const {
+void Matrix::RawRead(char *dst) const {
   GetMutex();
   memcpy(dst, pimpl_->datas, dataType.GetSize());
@@ -194,4 +194,10 @@
 }
 
+void Matrix::RawWrite(char *src) {
+  GetMutex();
+  memcpy(pimpl_->datas, src,dataType.GetSize());
+  ReleaseMutex();
+}
+
 uint32_t Matrix::Rows(void) const { return pimpl_->descriptor->Rows(); }
 
Index: trunk/lib/FlairCore/src/Matrix.h
===================================================================
--- trunk/lib/FlairCore/src/Matrix.h	(revision 250)
+++ trunk/lib/FlairCore/src/Matrix.h	(revision 252)
@@ -194,16 +194,25 @@
 
   Type const &GetDataType() const { return dataType; };
-void CopyDatas(char *dst) const;
+  
+  /*!
+  * \brief Raw read datas
+  *
+  * Reimplemented from io_data. \n
+  * See io_data::RawRead.
+  *
+  * \param dst destination buffer
+  */
+  void RawRead(char *dst) const;
+
+  /*!
+  * \brief Raw write datas
+  *
+  * Copy the source to the internal datas. Source must be of the corresponding size.
+  *
+  * \param src source buffer
+  */
+  void RawWrite(char *src);
+  
 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;
Index: trunk/lib/FlairCore/src/RangeFinderPlot.cpp
===================================================================
--- trunk/lib/FlairCore/src/RangeFinderPlot.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/RangeFinderPlot.cpp	(revision 252)
@@ -58,5 +58,5 @@
 
 void RangeFinderPlot::CopyDatas(char *buf) const {
-  datas->CopyDatas(buf);
+  datas->RawRead(buf);
 }
 
Index: trunk/lib/FlairCore/src/Thread.cpp
===================================================================
--- trunk/lib/FlairCore/src/Thread.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/Thread.cpp	(revision 252)
@@ -107,5 +107,5 @@
     if(nanosleep(&req,&rem)!=0) Err("error in nanosleep\n");//todo, handle EINTR
   } else {
-    Err("error resume time is passed by %lldns\n", ( current-time));
+    Err("error resume time (%lldns) is passed by %lldns\n",time, ( current-time));
   }
 #endif
Index: trunk/lib/FlairCore/src/UsSensorPlot.cpp
===================================================================
--- trunk/lib/FlairCore/src/UsSensorPlot.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/UsSensorPlot.cpp	(revision 252)
@@ -63,6 +63,6 @@
 
 void UsSensorPlot::CopyDatas(char *buf) const {
-  datas->CopyDatas(buf);
-  peakInfos->CopyDatas(buf+datas->GetDataType().GetSize());
+  datas->RawRead(buf);
+  peakInfos->RawRead(buf+datas->GetDataType().GetSize());
 }
 
Index: trunk/lib/FlairCore/src/Vector3Ddata.h
===================================================================
--- trunk/lib/FlairCore/src/Vector3Ddata.h	(revision 250)
+++ trunk/lib/FlairCore/src/Vector3Ddata.h	(revision 252)
@@ -78,5 +78,5 @@
   *
   * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
+  * See io_data::RawRead.
   *
   * \param dst destination buffer
Index: trunk/lib/FlairCore/src/Watchdog.cpp
===================================================================
--- trunk/lib/FlairCore/src/Watchdog.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/Watchdog.cpp	(revision 252)
@@ -43,7 +43,7 @@
     Time current = GetTime();
     Time date = current + timer;
-    // Printf("watchdog goes to sleep at %llu, scheduled to wake up at
-    // %llu\n",current,date);
+    //Printf("watchdog goes to sleep at %llu, scheduled to wake up at %llu\n",current,date);
     if (!SuspendUntil(date)) {
+      //Printf("watchdog expired at %llu!!!!!!!!!!!!!!!!\n",GetTime());
       expired();
     }
Index: trunk/lib/FlairCore/src/cvimage.cpp
===================================================================
--- trunk/lib/FlairCore/src/cvimage.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/cvimage.cpp	(revision 252)
@@ -76,5 +76,5 @@
 }
 
-void cvimage::CopyDatas(char *dst) const { Warn("non implementé\n"); }
+void cvimage::RawRead(char *dst) const { Warn("non implementé\n"); }
 
 } // end namespace core
Index: trunk/lib/FlairCore/src/cvimage.h
===================================================================
--- trunk/lib/FlairCore/src/cvimage.h	(revision 250)
+++ trunk/lib/FlairCore/src/cvimage.h	(revision 252)
@@ -108,12 +108,12 @@
 private:
   /*!
-  * \brief Copy datas
+  * \brief Raw read datas
   *
   * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
+  * See io_data::RawRead.
   *
   * \param dst destination buffer
   */
-  void CopyDatas(char *dst) const;
+  void RawRead(char *dst) const;
 
   bool allocate_data;
Index: trunk/lib/FlairCore/src/cvmatrix.h
===================================================================
--- trunk/lib/FlairCore/src/cvmatrix.h	(revision 250)
+++ trunk/lib/FlairCore/src/cvmatrix.h	(revision 252)
@@ -209,5 +209,5 @@
   *
   * Reimplemented from io_data. \n
-  * See io_data::CopyDatas.
+  * See io_data::RawRead.
   *
   * \param dst destination buffer
Index: trunk/lib/FlairCore/src/io_data.h
===================================================================
--- trunk/lib/FlairCore/src/io_data.h	(revision 250)
+++ trunk/lib/FlairCore/src/io_data.h	(revision 252)
@@ -176,4 +176,26 @@
 
   virtual DataType const &GetDataType() const = 0;
+  
+  /*!
+  * \brief Raw write datas
+  *
+  * Copy the source to the internal datas. Source must be of the corresponding size.
+  *
+  * \param src source buffer
+  */
+  virtual void RawWrite(char *src)  {};//todo put pure virtual
+  
+  /*!
+  * \brief Raw read datas
+  *
+  * This method is automatically called by IODevice::ProcessUpdate to log
+  * io_data datas. \n
+  * This method must be reimplemented, in order to copy the datas to the logs.
+  * Copy the internal datas to destination. Destination must be of the corresponding size.
+  *
+  * \param dst destination buffer
+  */
+  virtual void RawRead(char *dst) const = 0;
+
 
 protected:
@@ -208,16 +230,4 @@
 
 private:
-  /*!
-  * \brief Copy datas
-  *
-  * This method is automatically called by IODevice::ProcessUpdate to log
-  *io_data datas. \n
-  * This method must be reimplemented, in order to copy the datas to the logs.
-  * Copied datas must be of size io_data::Size.
-  *
-  * \param dst destination buffer
-  */
-  virtual void CopyDatas(char *dst) const = 0;
-
   io_data_impl *pimpl_;
 };
Index: trunk/lib/FlairCore/src/ui_com.cpp
===================================================================
--- trunk/lib/FlairCore/src/ui_com.cpp	(revision 250)
+++ trunk/lib/FlairCore/src/ui_com.cpp	(revision 252)
@@ -153,5 +153,5 @@
 }
 
-void ui_com::Send(char *buf, ssize_t size) {
+void ui_com::Send(char *buf, ssize_t size,int ttl) {
   if (connection_lost == true)
     return;
@@ -188,5 +188,5 @@
     if (compressBuffer(tosend, size, &out, &out_size, 9) == Z_OK) {
       size = out_size;
-      nb_write = UDT::sendmsg(socket_fd, out, size, -1, true);
+      nb_write = UDT::sendmsg(socket_fd, out, size,ttl, true);
       free(out);
     } else {
@@ -197,9 +197,9 @@
 
   if (!sendItCompressed) {
-    nb_write = UDT::sendmsg(socket_fd, tosend, size, -1, true);
+    nb_write = UDT::sendmsg(socket_fd, tosend, size, ttl, true);
   }
 
 #else // COMPRESS_FRAMES
-  nb_write = UDT::sendmsg(socket_fd, tosend, size, -1, true);
+  nb_write = UDT::sendmsg(socket_fd, tosend, size, ttl, true);
 #endif // COMPRESS_FRAMES
    //Printf("write %i %i\n",nb_write,size);
@@ -295,8 +295,8 @@
       if (offset != 3) {
         memcpy(&send_buffer[1], &resume_period, sizeof(uint16_t));
-        // printf("send %i %i %i %x %x\n",resume_period,offset,sizeof(uint16_t),send_buffer,&send_buffer[1]);
+        //printf("send %i %i %i %x %x\n",resume_period,offset,sizeof(uint16_t),send_buffer,&send_buffer[1]);
         // for(int i=0;i<offset;i++) printf("%x ",send_buffer[i]);
         // printf("\n");
-        Send(send_buffer, offset);
+        Send(send_buffer, offset,resume_period);
       }
 
Index: trunk/lib/FlairCore/src/unexported/ui_com.h
===================================================================
--- trunk/lib/FlairCore/src/unexported/ui_com.h	(revision 250)
+++ trunk/lib/FlairCore/src/unexported/ui_com.h	(revision 252)
@@ -39,5 +39,5 @@
   ui_com(const flair::core::Object *parent, UDTSOCKET sock);
   ~ui_com();
-  void Send(char *buf, ssize_t size);
+  void Send(char *buf, ssize_t size,int ttl = -1);//ttl in ms, -1 for infinite; not used in RT (todo!)
   ssize_t Receive(char *buf, ssize_t buf_size);
   void AddSendData(const flair::gui::SendData *obj);
