IpcMsgQueue.h

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #ifndef IPC_MSG_QUEUE_H_
00004 #define IPC_MSG_QUEUE_H_
00005 
00006 #include <fesa-core/Core/AbstractMsgQueue.h>
00007 
00008 #include <string>
00009 #include <mqueue.h>
00010 
00011 namespace fesa
00012 {
00013 
00019 class IpcMsgQueue: public AbstractMsgQueue
00020 {
00021   public:
00028     IpcMsgQueue(const std::string& name, uint32_t queuelength, bool blocking);
00029 
00033     ~IpcMsgQueue();
00034 
00040     void postMsg(AbstractMessage* msg);
00041 
00048     AbstractMessage* consumeMsg();
00049 
00054     void purge();
00055 
00061     uint32_t getCurrentMsgCount();
00062 
00063   private:
00064 
00068     mqd_t msgQueue_;
00069 
00070 
00076     void checkSystemMaxValues(uint32_t queuelength);
00077 
00078 
00082     IpcMsgQueue(const IpcMsgQueue&);
00083 
00087     IpcMsgQueue& operator=(const IpcMsgQueue&);
00088 };
00089 
00090 } // fesa
00091 
00092 #endif // IPC_MSG_QUEUE_H_

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1