v1.9.0 #175

Merged
muellerr merged 623 commits from develop into main 2022-03-08 10:32:41 +01:00
9 changed files with 41 additions and 10 deletions
Showing only changes of commit 55d31d0dc2 - Show all commits

View File

@ -96,6 +96,13 @@ void initmission::initTasks() {
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK); initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
} }
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
"UDP_POLLING", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
}
# if BOARD_TE0720 == 0 # if BOARD_TE0720 == 0
// FS task, task interval does not matter because it runs in permanent loop, priority low // FS task, task interval does not matter because it runs in permanent loop, priority low
// because it is a non-essential background task // because it is a non-essential background task
@ -141,6 +148,7 @@ void initmission::initTasks() {
tmTcDistributor->startTask(); tmTcDistributor->startTask();
tmtcBridgeTask->startTask(); tmtcBridgeTask->startTask();
tmtcPollingTask->startTask(); tmtcPollingTask->startTask();
ccsdsHandlerTask->startTask();
#if BOARD_TE0720 == 0 #if BOARD_TE0720 == 0
coreController->startTask(); coreController->startTask();
#endif #endif

View File

@ -948,9 +948,9 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
ccsdsHandler->addVirtualChannel(ccsds::VC0, vc); ccsdsHandler->addVirtualChannel(ccsds::VC0, vc);
vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE); vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE);
ccsdsHandler->addVirtualChannel(ccsds::VC1, vc); ccsdsHandler->addVirtualChannel(ccsds::VC1, vc);
vc = new VirtualChannel(2, config::VC2_QUEUE_SIZE); vc = new VirtualChannel(ccsds::VC2, config::VC2_QUEUE_SIZE);
ccsdsHandler->addVirtualChannel(ccsds::VC2, vc); ccsdsHandler->addVirtualChannel(ccsds::VC2, vc);
vc = new VirtualChannel(3, config::VC3_QUEUE_SIZE); vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE);
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc); ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
} }

View File

@ -86,6 +86,7 @@ debugging. */
#define OBSW_TEST_TE7020_HEATER 0 #define OBSW_TEST_TE7020_HEATER 0
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0 #define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0 #define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
#define OBSW_LINK_IS_UP 0
#define OBSW_DEBUG_P60DOCK 0 #define OBSW_DEBUG_P60DOCK 0
#define OBSW_DEBUG_PDU1 0 #define OBSW_DEBUG_PDU1 0

View File

@ -26,7 +26,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t * data, size_t size) {
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(*(data + idx)); *(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(*(data + idx));
} }
else { else {
sif::warning << "PapbVcInterface::sendTm: Only written " << idx - 1 << " of " sif::warning << "PapbVcInterface::write: Only written " << idx << " of "
<< size << " data" << std::endl; << size << " data" << std::endl;
return RETURN_FAILED; return RETURN_FAILED;
} }

View File

@ -48,9 +48,13 @@ private:
static const ReturnValue_t UNKNOWN_VC_ID = MAKE_RETURN_CODE(0xA0); static const ReturnValue_t UNKNOWN_VC_ID = MAKE_RETURN_CODE(0xA0);
#if BOARD_TE0720 == 1
/** Size of mapped address space */
static const int MAP_SIZE = 0x1000;
#else
/** Size of mapped address space */ /** Size of mapped address space */
static const int MAP_SIZE = 0x40000; static const int MAP_SIZE = 0x40000;
#endif /* BOARD_TE0720 == 1 */
/** /**
* Configuration bits: * Configuration bits:

View File

@ -43,6 +43,16 @@ ReturnValue_t CCSDSHandler::initialize() {
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
return result; return result;
} }
VirtualChannelMapIter iter;
for (iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) {
result = iter->second->initialize();
if (result != RETURN_OK) {
return result;
}
iter->second->setPtmeObject(ptme);
}
return result; return result;
} }

View File

@ -56,11 +56,12 @@ MessageQueueId_t VirtualChannel::getReportReceptionQueue(uint8_t virtualChannel)
return tmQueue->getId(); return tmQueue->getId();
} }
void VirtualChannel::setPtmeObject(PtmeIF* ptme) { void VirtualChannel::setPtmeObject(PtmeIF* ptme_) {
if (ptme == nullptr) { if (ptme_ == nullptr) {
sif::warning << "VirtualChannel::setPtmeObject: Invalid ptme object" << std::endl; sif::warning << "VirtualChannel::setPtmeObject: Invalid ptme object" << std::endl;
return;
} }
ptme = ptme; ptme = ptme_;
} }
void VirtualChannel::setLinkState(bool linkIsUp) { void VirtualChannel::setLinkState(bool linkIsUp) {

View File

@ -1,6 +1,7 @@
#ifndef VIRTUALCHANNEL_H_ #ifndef VIRTUALCHANNEL_H_
#define VIRTUALCHANNEL_H_ #define VIRTUALCHANNEL_H_
#include "OBSWConfig.h"
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h" #include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <fsfw/ipc/MessageQueueIF.h> #include <fsfw/ipc/MessageQueueIF.h>
@ -31,7 +32,7 @@ class VirtualChannel: public AcceptsTelemetryIF, public HasReturnvaluesIF {
* *
* @param ptme Pointer to ptme object * @param ptme Pointer to ptme object
*/ */
void setPtmeObject(PtmeIF* ptme); void setPtmeObject(PtmeIF* ptme_);
/** /**
* @brief Can be used by the owner to set the link state. Packets will be discarded if link * @brief Can be used by the owner to set the link state. Packets will be discarded if link
@ -44,7 +45,13 @@ private:
PtmeIF* ptme = nullptr; PtmeIF* ptme = nullptr;
MessageQueueIF* tmQueue = nullptr; MessageQueueIF* tmQueue = nullptr;
uint8_t vcId; uint8_t vcId;
bool linkIsUp;
#if OBSW_LINK_IS_UP == 1
bool linkIsUp = true;
#else
bool linkIsUp = false;
#endif /* OBSW_LINK_IS_UP == 1 */
StorageManagerIF* tmStore = nullptr; StorageManagerIF* tmStore = nullptr;
}; };

2
tmtc

@ -1 +1 @@
Subproject commit 53bf65083889af10f77c3899972b1153ea835f3c Subproject commit bad6a42af715f62ddc2a593a5f1ce344fde96da7