Index: /trunk/ReleaseNotes
===================================================================
--- /trunk/ReleaseNotes	(revision 120)
+++ /trunk/ReleaseNotes	(revision 121)
@@ -1,3 +1,6 @@
 * Actual Version:
+
+- added fixed cameras in simulator, see $FLAIR_ROOT/flair-bin/models/indoor_fligh
+t_arena.xml for an exemple
 
 -----------------------------------------------------------
Index: /trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
===================================================================
--- /trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 120)
+++ /trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 121)
@@ -30,4 +30,5 @@
 #include <Ahrs.h>
 #include <AhrsData.h>
+#include <Camera.h>
 
 using namespace std;
@@ -69,4 +70,5 @@
 
     customOrientation=new AhrsData(this,"orientation");
+		getFrameworkManager()->AddDeviceToLog(uav->GetVerticalCamera());
 }
 
Index: /trunk/lib/FlairCore/src/Buffer.cpp
===================================================================
--- /trunk/lib/FlairCore/src/Buffer.cpp	(revision 121)
+++ /trunk/lib/FlairCore/src/Buffer.cpp	(revision 121)
@@ -0,0 +1,36 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2016/12/22
+//  filename:   Buffer.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    Class defining a buffer, not for real time use
+//
+/*********************************************************************/
+
+#include "Buffer.h"
+
+using std::string;
+
+namespace flair {
+namespace core {
+
+Buffer::Buffer(const Object *parent, string name)
+    : io_data(parent, name, 1), dataType() {
+ 
+}
+
+Buffer::~Buffer() {
+ 
+}
+
+void Buffer::CopyDatas(char *dst) const { Warn("non implementé\n"); }
+
+} // end namespace core
+} // end namespace flair
Index: /trunk/lib/FlairCore/src/Buffer.h
===================================================================
--- /trunk/lib/FlairCore/src/Buffer.h	(revision 121)
+++ /trunk/lib/FlairCore/src/Buffer.h	(revision 121)
@@ -0,0 +1,79 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file Buffer.h
+ * \brief Class defining a buffer, not for real time use
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2016/12/22
+ * \version 4.0
+ */
+
+#ifndef BUFFER_H
+#define BUFFER_H
+
+#include <io_data.h>
+#include <stdint.h>
+
+namespace flair {
+namespace core {
+/*! \class Buffer
+*
+* \brief Class defining a buffer, not for real time use
+*
+*
+*/
+class Buffer : public io_data {
+public:
+  class Type : public DataType {
+  public:
+    Type() {}
+
+    size_t GetSize() const {
+    }
+		
+    std::string GetDescription() const { return "buffer"; };
+
+  private:
+  };
+
+  /*!
+  * \brief Constructor
+  *
+  * Construct a buffer.
+  *
+  * \param parent parent
+  * \param name name
+	* 
+  */
+  Buffer(const Object *parent, std::string name = "");
+
+  /*!
+  * \brief Destructor
+  *
+  */
+  ~Buffer();
+
+ 
+
+  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;
+
+  Type dataType;
+};
+
+} // end namespace core
+} // end namespace flair
+
+#endif // BUFFER_H
Index: /trunk/lib/FlairCore/src/IODevice.cpp
===================================================================
--- /trunk/lib/FlairCore/src/IODevice.cpp	(revision 120)
+++ /trunk/lib/FlairCore/src/IODevice.cpp	(revision 121)
@@ -29,5 +29,4 @@
 IODevice::IODevice(const Object* parent,string name): Object(parent,name,"IODevice") {
     pimpl_=new IODevice_impl(this);
-    lastUpdate=GetTime();
 }
 
@@ -49,5 +48,4 @@
 
     if(data!=NULL) {
-        lastUpdate=data->DataTime();
         if(getFrameworkManager()->IsLogging()==true) pimpl_->WriteLog(data->DataTime());
 
Index: /trunk/lib/FlairCore/src/IODevice.h
===================================================================
--- /trunk/lib/FlairCore/src/IODevice.h	(revision 120)
+++ /trunk/lib/FlairCore/src/IODevice.h	(revision 121)
@@ -115,5 +115,4 @@
   virtual DataType const &GetOutputDataType() const;
 
-            Time lastUpdate;
         protected:
             /*!
Index: /trunk/lib/FlairMeta/src/Uav.cpp
===================================================================
--- /trunk/lib/FlairMeta/src/Uav.cpp	(revision 120)
+++ /trunk/lib/FlairMeta/src/Uav.cpp	(revision 121)
@@ -46,4 +46,5 @@
   uav_vrpn = NULL;
   verticalCamera = NULL;
+  horizontalCamera = NULL;
   this->multiplex = multiplex;
 }
@@ -76,4 +77,8 @@
 void Uav::SetVerticalCamera(const Camera *inVerticalCamera) {
   verticalCamera = (Camera *)inVerticalCamera;
+}
+
+void Uav::SetHorizontalCamera(const Camera *inHorizontalCamera) {
+  horizontalCamera = (Camera *)inHorizontalCamera;
 }
 /*
@@ -189,4 +194,6 @@
 Camera *Uav::GetVerticalCamera(void) const { return verticalCamera; }
 
+Camera *Uav::GetHorizontalCamera(void) const { return horizontalCamera; }
+
 } // end namespace meta
 } // end namespace flair
Index: /trunk/lib/FlairMeta/src/Uav.h
===================================================================
--- /trunk/lib/FlairMeta/src/Uav.h	(revision 120)
+++ /trunk/lib/FlairMeta/src/Uav.h	(revision 121)
@@ -78,4 +78,5 @@
   meta::MetaVrpnObject *GetVrpnObject(void) const;
   sensor::Camera *GetVerticalCamera(void) const;
+  sensor::Camera *GetHorizontalCamera(void) const;
 
 protected:
@@ -86,4 +87,5 @@
   void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
   void SetVerticalCamera(const sensor::Camera *verticalCamera);
+  void SetHorizontalCamera(const sensor::Camera *verticalCamera);
 
 private:
@@ -97,5 +99,5 @@
   MetaVrpnObject *uav_vrpn;
   sensor::BatteryMonitor *battery;
-  sensor::Camera *verticalCamera;
+  sensor::Camera *verticalCamera,*horizontalCamera;
 };
 } // end namespace meta
Index: /trunk/lib/FlairSensorActuator/src/Camera.cpp
===================================================================
--- /trunk/lib/FlairSensorActuator/src/Camera.cpp	(revision 120)
+++ /trunk/lib/FlairSensorActuator/src/Camera.cpp	(revision 121)
@@ -24,4 +24,5 @@
 #include <DataPlot1D.h>
 #include <Picture.h>
+#include <Buffer.h>
 #include <highgui.h>
 #include <fstream>
@@ -38,8 +39,10 @@
     : IODevice(parent, name) {
   plot_tab = NULL;
+	jpgBuffer=NULL;
+	logFormat=LogFormat::NONE;
 
   // do not allocate imagedata, allocation is done by the camera
   output = new cvimage((IODevice *)this, width, height, format, "out", false);
-
+	
   // station sol
   main_tab = new Tab(parent->GetTabWidget(), name);
@@ -50,4 +53,5 @@
 }
 
+//This contructor must only be called for a simulated device.
 Camera::Camera(const IODevice *parent, std::string name)
     : IODevice(parent, name) {
@@ -59,4 +63,6 @@
 
   output = NULL;
+	jpgBuffer=NULL;
+	logFormat=LogFormat::NONE;
 }
 
@@ -64,4 +70,22 @@
   if (main_tab != NULL)
     delete main_tab;
+}
+
+void Camera::SetLogFormat(LogFormat logFormat) {
+	this->logFormat=logFormat;
+	switch(logFormat) {
+		case LogFormat::RAW:
+			AddDataToLog(output);
+			Warn("raw log of cvimage is not yet implemented\n");
+			break;
+		case LogFormat::JPG:
+			if(jpgBuffer==NULL) {
+				jpgBuffer=new Buffer(this,"jpg_bufer");
+				AddDataToLog(jpgBuffer);
+			}else{
+				Warn("log format already defined\n");
+			}
+			break;
+	}
 }
 
@@ -94,4 +118,13 @@
 core::cvimage *Camera::Output(void) { return output; }
 
+void Camera::ProcessUpdate(core::io_data* data) {
+	switch(logFormat) {
+		case LogFormat::JPG:
+				ajouter compression jpg
+			break;
+	}
+	IODevice::ProcessUpdate(data);
+}
+
 void Camera::SaveToFile(string filename) const {
   Printf("saving %s, size %i\n", filename.c_str(), output->img->imageSize);
Index: /trunk/lib/FlairSensorActuator/src/Camera.h
===================================================================
--- /trunk/lib/FlairSensorActuator/src/Camera.h	(revision 120)
+++ /trunk/lib/FlairSensorActuator/src/Camera.h	(revision 121)
@@ -19,11 +19,14 @@
 
 namespace flair {
-namespace gui {
-class GroupBox;
-class Tab;
-class TabWidget;
-class Picture;
-class GridLayout;
-}
+	namespace gui {
+		class GroupBox;
+		class Tab;
+		class TabWidget;
+		class Picture;
+		class GridLayout;
+	}
+	namespace core {
+		class Buffer;
+	}
 }
 
@@ -122,5 +125,26 @@
 
   core::DataType const &GetOutputDataType() const;
-
+	
+	/*!
+	\enum LogFormat
+	\brief log formats
+	*/
+	enum class LogFormat {
+		NONE, /*!< by default, no logging */
+		RAW, /*!< raw format */
+		JPG, /*!< jpg format */
+	};
+	
+	/*!
+	* \brief Set log format
+	*
+	* Set the log format. \n
+	* Logging of the camera will be disabled if this method is not called. \n
+	* Calling this method enables logging of camera.
+	*
+	* \param LogFormat log format
+	*/
+  void SetLogFormat(LogFormat logFormat);
+void ProcessUpdate(core::io_data* data);
 protected:
   /*!
@@ -138,4 +162,6 @@
   gui::GroupBox *setup_groupbox;
   gui::GridLayout *setup_layout;
+	LogFormat logFormat;
+	core::Buffer *jpgBuffer;
 };
 } // end namespace sensor
