Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Platform/Aperios1.3.2/Sensors.h

Go to the documentation of this file.

    00001 /**
    00002 * @file Platform/Aperios1.3.2/Sensors.h
    00003 *
    00004 * Declaration of class Sensors and streaming operators for images and sensor data
    00005 * for Aperios platform
    00006 *
    00007 * @author Thomas Röfer
    00008 * @author Martin Lötzsch
    00009 * @author Sebastian Petters
    00010 * @author Joscha Bach
    00011 */
    00012
    00013 #ifndef __Sensors_h_
    00014 #define __Sensors_h_
    00015
    00016 #include "Representations/Perception/SensorDataBuffer.h"
    00017 #include "Representations/Perception/Image.h"
    00018 #include "Representations/Perception/CameraParameters.h"
    00019
    00020 /**
    00021  * @class Sensors
    00022  * base class for sensor processes
    00023  *
    00024  * @author Joscha Bach
    00025  */
    00026
    00027 class Sensors
    00028 {
    00029   public:
    00030   /**
    00031   * constructor.
    00032   * reads camera parameters from file or sets defaults if no file exists
    00033   */
    00034   Sensors();
    00035   /**
    00036   * sets Camera Parameters with CameraParameters ;-/
    00037   */
    00038   void setCameraParameters (CameraParameters &cameraParameters);
    00039   CameraParameters getCameraParameters ();
    00040   protected:
    00041   CameraParameters cameraParameters;
    00042 };
    00043
    00044 /**
    00045  * Streaming operator that converts system-dependent images into the portable class Image.
    00046  * @todo Implement copying from OFbkImageVectorData to Image.
    00047  * @param stream The stream from which is read.
    00048  * @param image The system independent image object.
    00049  * @return The stream.
    00050  */
    00051 In& operator>>(In& stream,Image& image);
    00052
    00053 /**
    00054  * The macro instantiates a receiver for an Image.
    00055  * The Image receiver is system-specific.
    00056  * For Aperios, an Image receiver must be registered as OFbkImageVectorData.
    00057  * @param blocking Decides whether this sender blocks the execution of the next frame
    00058  *                 until all connected receivers have requested a new package.
    00059  */
    00060 #define INIT_RECEIVER_IMAGE(blocking) \
    00061   theImageReceiver(this,"Receiver.OFbkImageVectorData.O",blocking)
    00062
    00063 /**
    00064  * Streaming operator that converts system-dependent sensor data into the portable class SensorDataBuffer.
    00065  * @param stream The stream from which is read.
    00066  * @param sensorDataBuffer The system independent sensor data buffer object.
    00067  * @return The stream.
    00068  */
    00069 In& operator>>(In& stream,SensorDataBuffer& sensorDataBuffer);
    00070
    00071 /**
    00072  * The macro instantiates a receiver for SensorDataBuffer.
    00073  * The SensorDataBuffer receiver is system-specific.
    00074  * For Aperios, a SensorDataBuffer receiver must be registered as OSensorFrameVectorData.
    00075  * @param blocking Decides whether this sender blocks the execution of the next frame
    00076  *                 until all connected receivers have requested a new package.
    00077  */
    00078 #define INIT_RECEIVER_SENSORDATA(blocking) \
    00079   theSensorDataBufferReceiver(this,"Receiver.OSensorFrameVectorData.O",blocking)
    00080
    00081 #endif //__Sensors_h_