fprime/Os/Stub/Queue.cpp
M Starch cddf38bb6f
Make Os::Queues use Fw::MemAllocator pattern for memory (#4451)
* Queues use MemAllocator pattern

* Derive queue allocation from MallocRegistry

* Formatting

* Fix UTs

* Fix CI

* Fix alignment in UT

* Formatting and sp

* Formatting, bad header

* More formatting

* Add queue teardown

* Deinit components

* Fix priority queue test

* Fix bug in priority queue allocation

* Correct comments

* Fix FppTest and Ref UTs

* Fix max heap teardown

* Fix review comment on max heap

* Fix null -> nullptr
2025-12-02 17:36:15 -08:00

48 lines
1.6 KiB
C++

// ======================================================================
// \title Os/Stub/Queue.cpp
// \brief stub implementation for Os::Queue
// ======================================================================
#include "Queue.hpp"
namespace Os {
namespace Stub {
namespace Queue {
QueueInterface::Status StubQueue::create(FwEnumStoreType id,
const Fw::ConstStringBase& name,
FwSizeType depth,
FwSizeType messageSize) {
return QueueInterface::Status::UNKNOWN_ERROR;
}
QueueInterface::Status StubQueue::send(const U8* buffer,
FwSizeType size,
FwQueuePriorityType priority,
QueueInterface::BlockingType blockType) {
return QueueInterface::Status::UNINITIALIZED;
}
QueueInterface::Status StubQueue::receive(U8* destination,
FwSizeType capacity,
QueueInterface::BlockingType blockType,
FwSizeType& actualSize,
FwQueuePriorityType& priority) {
return QueueInterface::Status::UNINITIALIZED;
}
FwSizeType StubQueue::getMessagesAvailable() const {
return 0;
}
FwSizeType StubQueue::getMessageHighWaterMark() const {
return 0;
}
QueueHandle* StubQueue::getHandle() {
return &this->m_handle;
}
} // namespace Queue
} // namespace Stub
} // namespace Os