IPCQueue.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _IPCQueue_hpp_
  2. #define _IPCQueue_hpp_
  3. #include <Os/Queue.hpp>
  4. namespace Os {
  5. class IPCQueue : public Os::Queue {
  6. public:
  7. IPCQueue();
  8. ~IPCQueue();
  9. QueueStatus create(const Fw::StringBase &name, NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize); //!< create a message queue
  10. // Base class has overloads - NOTE(mereweth) - this didn't work
  11. //using Queue::send;
  12. //using Queue::receive;
  13. // Send serialized buffers
  14. QueueStatus send(const Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE priority, QueueBlocking block); //!< send a message
  15. QueueStatus receive(Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE &priority, QueueBlocking block); //!< receive a message
  16. // Send raw buffers
  17. QueueStatus send(const U8* buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority, QueueBlocking block); //!< send a message
  18. QueueStatus receive(U8* buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority, QueueBlocking block); //!< receive a message
  19. NATIVE_INT_TYPE getNumMsgs() const; //!< get the number of messages in the queue
  20. NATIVE_INT_TYPE getMaxMsgs() const; //!< get the maximum number of messages (high watermark)
  21. NATIVE_INT_TYPE getQueueSize() const; //!< get the queue depth (maximum number of messages queue can hold)
  22. NATIVE_INT_TYPE getMsgSize() const; //!< get the message size (maximum message size queue can hold)
  23. };
  24. }
  25. #endif