mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
* NATIVE_INT_TYPE use in toString * NATIVE_INT_TYPE use in SimpleObjRegistry * NATIVE_INT_TYPE use in Asserts * NATIVE_INT_TYPE use in Fw/Comp * NATIVE_INT_TYPE use in getCapacity * NATIVE_INT_TYPE use in getEntries * NATIVE_INT_TYPE use in size/length * NATIVE_INT_TYPE use in FILE_NAME_ARG * NATIVE_INT_TYPE use in Fw (misc) * NATIVE_INT_TYPE use in identifier * NATIVE_INT_TYPE use in Fw (misc II) * POINTER_CAST in Buffer * POINTER_CAST in Serializable * sp * Removing no longer used DefaultTypes.hpp * Fixes to accomidate Fw refactor * Unit-test and CI fixes * Fixing review comments - pt 1
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#include <Fw/Comp/QueuedComponentBase.hpp>
|
|
#include <Fw/Types/Assert.hpp>
|
|
#include <FpConfig.hpp>
|
|
#include <Os/QueueString.hpp>
|
|
|
|
#include <cstdio>
|
|
|
|
namespace Fw {
|
|
|
|
QueuedComponentBase::QueuedComponentBase(const char* name) : PassiveComponentBase(name),m_msgsDropped(0) {
|
|
|
|
}
|
|
|
|
QueuedComponentBase::~QueuedComponentBase() {
|
|
|
|
}
|
|
|
|
void QueuedComponentBase::init(FwEnumStoreType instance) {
|
|
PassiveComponentBase::init(instance);
|
|
}
|
|
|
|
#if FW_OBJECT_TO_STRING == 1
|
|
const char* QueuedComponentBase::getToStringFormatString() {
|
|
return "QueueComp: %s";
|
|
}
|
|
#endif
|
|
|
|
Os::Queue::Queue::Status QueuedComponentBase::createQueue(FwSizeType depth, FwSizeType msgSize) {
|
|
|
|
Os::QueueString queueName;
|
|
#if FW_OBJECT_NAMES == 1
|
|
queueName = this->m_objName;
|
|
#else
|
|
queueName.format("CompQ_%" PRI_FwSizeType,Os::Queue::getNumQueues());
|
|
#endif
|
|
return this->m_queue.create(queueName, depth, msgSize);
|
|
}
|
|
|
|
FwSizeType QueuedComponentBase::getNumMsgsDropped() {
|
|
return this->m_msgsDropped;
|
|
}
|
|
|
|
void QueuedComponentBase::incNumMsgDropped() {
|
|
this->m_msgsDropped++;
|
|
}
|
|
|
|
}
|