BasicDataBuffer.hpp
Go to the documentation of this file.
00001 
00005 #ifndef BASICDATABUFFER_HPP
00006 #define BASICDATABUFFER_HPP
00007 
00008 #include "../BasicDatatypes.hpp"
00009 #include "Mutex.hpp"
00010 #include <vector>       // for std::vector
00011 #include <list>         // for std::list
00012 
00013 using namespace datatypes;
00014 
00015 //
00016 // Buffer for Data of base-type BasicData.
00017 //
00018 class BasicDataBuffer
00019 {
00020 public:
00022         BasicDataBuffer();
00023 
00025         ~BasicDataBuffer();
00026         
00027         void setLimit(UINT32 maxBytesToBeUsed);
00028         bool pushData(BasicData* data);
00029         BasicData* popData();
00030         UINT32 getUsedBytes();
00031         UINT32 getBufferSize(); // # gespeicherter Datensaetze
00032         
00033 
00034 private:
00035         bool m_beVerbose;
00036         UINT32 m_bytesMax;
00037         std::list<BasicData*> m_buffer;
00038         UINT32 m_bytesUsed;
00039         Mutex m_mutex;  // Thread-Safety
00040 };
00041 
00042 
00043 
00044 #endif


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Thu Jun 6 2019 21:02:36