This commit is contained in:
parent
5b26564058
commit
55d31d0dc2
@ -96,6 +96,13 @@ void initmission::initTasks() {
|
||||
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
|
||||
// FS task, task interval does not matter because it runs in permanent loop, priority low
|
||||
// because it is a non-essential background task
|
||||
@ -141,6 +148,7 @@ void initmission::initTasks() {
|
||||
tmTcDistributor->startTask();
|
||||
tmtcBridgeTask->startTask();
|
||||
tmtcPollingTask->startTask();
|
||||
ccsdsHandlerTask->startTask();
|
||||
#if BOARD_TE0720 == 0
|
||||
coreController->startTask();
|
||||
#endif
|
||||
|
@ -948,9 +948,9 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
|
||||
ccsdsHandler->addVirtualChannel(ccsds::VC0, vc);
|
||||
vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE);
|
||||
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);
|
||||
vc = new VirtualChannel(3, config::VC3_QUEUE_SIZE);
|
||||
vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE);
|
||||
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,7 @@ debugging. */
|
||||
#define OBSW_TEST_TE7020_HEATER 0
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
||||
#define OBSW_LINK_IS_UP 0
|
||||
|
||||
#define OBSW_DEBUG_P60DOCK 0
|
||||
#define OBSW_DEBUG_PDU1 0
|
||||
|
@ -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));
|
||||
}
|
||||
else {
|
||||
sif::warning << "PapbVcInterface::sendTm: Only written " << idx - 1 << " of "
|
||||
sif::warning << "PapbVcInterface::write: Only written " << idx << " of "
|
||||
<< size << " data" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
|
@ -48,9 +48,13 @@ private:
|
||||
|
||||
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 */
|
||||
static const int MAP_SIZE = 0x40000;
|
||||
#endif /* BOARD_TE0720 == 1 */
|
||||
|
||||
/**
|
||||
* Configuration bits:
|
||||
|
@ -43,6 +43,16 @@ ReturnValue_t CCSDSHandler::initialize() {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -56,11 +56,12 @@ MessageQueueId_t VirtualChannel::getReportReceptionQueue(uint8_t virtualChannel)
|
||||
return tmQueue->getId();
|
||||
}
|
||||
|
||||
void VirtualChannel::setPtmeObject(PtmeIF* ptme) {
|
||||
if (ptme == nullptr) {
|
||||
void VirtualChannel::setPtmeObject(PtmeIF* ptme_) {
|
||||
if (ptme_ == nullptr) {
|
||||
sif::warning << "VirtualChannel::setPtmeObject: Invalid ptme object" << std::endl;
|
||||
return;
|
||||
}
|
||||
ptme = ptme;
|
||||
ptme = ptme_;
|
||||
}
|
||||
|
||||
void VirtualChannel::setLinkState(bool linkIsUp) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef VIRTUALCHANNEL_H_
|
||||
#define VIRTUALCHANNEL_H_
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
|
||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||
#include <fsfw/ipc/MessageQueueIF.h>
|
||||
@ -31,7 +32,7 @@ class VirtualChannel: public AcceptsTelemetryIF, public HasReturnvaluesIF {
|
||||
*
|
||||
* @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
|
||||
@ -44,7 +45,13 @@ private:
|
||||
PtmeIF* ptme = nullptr;
|
||||
MessageQueueIF* tmQueue = nullptr;
|
||||
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;
|
||||
};
|
||||
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 53bf65083889af10f77c3899972b1153ea835f3c
|
||||
Subproject commit bad6a42af715f62ddc2a593a5f1ce344fde96da7
|
Loading…
Reference in New Issue
Block a user