now only scheduling is left
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@ -7,15 +7,18 @@
|
||||
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "fsfw/tmtcservices/TmTcMessage.h"
|
||||
|
||||
VirtualChannelWithQueue::VirtualChannelWithQueue(VirtualChannel& channel, StorageManagerIF& tmStore,
|
||||
uint32_t tmQueueDepth,
|
||||
const std::atomic_bool& linkStateProvider)
|
||||
: channel(channel) {
|
||||
auto mqArgs = MqArgs(channel.getObjectId(), reinterpret_cast<void*>(channel.getVcid()));
|
||||
VirtualChannelWithQueue::VirtualChannelWithQueue(object_id_t objectId, uint8_t vcId,
|
||||
const char* vcName, PtmeIF& ptme,
|
||||
const std::atomic_bool& linkStateProvider,
|
||||
StorageManagerIF& tmStore, uint32_t tmQueueDepth)
|
||||
: VirtualChannel(objectId, vcId, vcName, ptme, linkStateProvider) {
|
||||
auto mqArgs = MqArgs(getObjectId(), reinterpret_cast<void*>(getVcid()));
|
||||
tmQueue = QueueFactory::instance()->createMessageQueue(
|
||||
tmQueueDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
||||
}
|
||||
|
||||
const char* VirtualChannelWithQueue::getName() const { return VirtualChannel::getName(); }
|
||||
|
||||
ReturnValue_t VirtualChannelWithQueue::sendNextTm() {
|
||||
TmTcMessage message;
|
||||
ReturnValue_t result = tmQueue->receiveMessage(&message);
|
||||
@ -33,7 +36,7 @@ ReturnValue_t VirtualChannelWithQueue::sendNextTm() {
|
||||
return result;
|
||||
}
|
||||
|
||||
channel.write(data, size);
|
||||
write(data, size);
|
||||
tmStore->deleteData(storeId);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
@ -44,5 +47,3 @@ ReturnValue_t VirtualChannelWithQueue::sendNextTm() {
|
||||
MessageQueueId_t VirtualChannelWithQueue::getReportReceptionQueue(uint8_t virtualChannel) const {
|
||||
return tmQueue->getId();
|
||||
}
|
||||
|
||||
VirtualChannel& VirtualChannelWithQueue::vc() { return channel; }
|
||||
|
Reference in New Issue
Block a user