all retval replacements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <fsfw/returnvalues/returnvalue.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||
@ -56,15 +56,15 @@ void initmission::initTasks() {
|
||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||
ReturnValue_t result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Object add component failed" << std::endl;
|
||||
}
|
||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Object add component failed" << std::endl;
|
||||
}
|
||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Object add component failed" << std::endl;
|
||||
}
|
||||
|
||||
@ -72,13 +72,13 @@ void initmission::initTasks() {
|
||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
||||
"TMTC_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
|
||||
}
|
||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Add component UDP Polling failed" << std::endl;
|
||||
}
|
||||
|
||||
@ -86,89 +86,89 @@ void initmission::initTasks() {
|
||||
PeriodicTaskIF* pusVerification = factory->createPeriodicTask(
|
||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Object add component failed" << std::endl;
|
||||
}
|
||||
|
||||
PeriodicTaskIF* eventHandling = factory->createPeriodicTask(
|
||||
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||
result = eventHandling->addComponent(objects::EVENT_MANAGER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
|
||||
}
|
||||
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||
}
|
||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||
}
|
||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||
}
|
||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||
}
|
||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
||||
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
||||
}
|
||||
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||
}
|
||||
|
||||
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
||||
}
|
||||
|
||||
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||
}
|
||||
|
||||
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
||||
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||
result = dummy_pst::pst(pstTask);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
||||
}
|
||||
|
||||
#if OBSW_ADD_TEST_CODE == 1
|
||||
result = testTask->addComponent(objects::TEST_TASK);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||
}
|
||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||
|
@ -130,7 +130,7 @@ ArduinoComIF::~ArduinoComIF() {
|
||||
#endif
|
||||
}
|
||||
ReturnValue_t ArduinoComIF::initializeInterface(CookieIF *cookie) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data, size_t len) {
|
||||
@ -142,10 +142,10 @@ ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data, s
|
||||
return sendMessage(arduinoCookie->command, arduinoCookie->address, data, len);
|
||||
}
|
||||
|
||||
ReturnValue_t ArduinoComIF::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
|
||||
ReturnValue_t ArduinoComIF::getSendSuccess(CookieIF *cookie) { return returnvalue::OK; }
|
||||
|
||||
ReturnValue_t ArduinoComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
||||
@ -158,7 +158,7 @@ ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buff
|
||||
|
||||
*buffer = arduinoCookie->replyBuffer.data();
|
||||
*size = arduinoCookie->receivedDataLen;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const uint8_t *data,
|
||||
@ -178,14 +178,14 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
||||
|
||||
ReturnValue_t result =
|
||||
DleEncoder::encode(&command, 1, currentPosition, remainingLen, &encodedLen, false);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
currentPosition += encodedLen;
|
||||
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
|
||||
|
||||
result = DleEncoder::encode(&address, 1, currentPosition, remainingLen, &encodedLen, false);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
currentPosition += encodedLen;
|
||||
@ -199,7 +199,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
||||
|
||||
result =
|
||||
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
currentPosition += encodedLen;
|
||||
@ -207,7 +207,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
||||
|
||||
// encoding the actual data
|
||||
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen, &encodedLen, false);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
currentPosition += encodedLen;
|
||||
@ -224,7 +224,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
||||
|
||||
result =
|
||||
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
currentPosition += encodedLen;
|
||||
@ -241,16 +241,16 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
||||
ssize_t writtenlen = ::write(serialPort, sendBuffer, encodedLen);
|
||||
if (writtenlen < 0) {
|
||||
// we could try to find out what happened...
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (writtenlen != encodedLen) {
|
||||
// the OS failed us, we do not try to block until everything is written, as
|
||||
// we can not block the whole system here
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
#elif WIN32
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ void ArduinoComIF::handleSerialPortRx() {
|
||||
packet, sizeof(packet), &packetLen);
|
||||
|
||||
size_t toDelete = firstSTXinRawData;
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
handlePacket(packet, packetLen);
|
||||
|
||||
// after handling the packet, we can delete it from the raw stream,
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <fsfw/container/SimpleRingBuffer.h>
|
||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||
#include <fsfw/objectmanager/SystemObject.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <fsfw/returnvalues/returnvalue.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
|
@ -129,12 +129,12 @@ ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
if (thisSequence->checkSequence() == returnvalue::OK) {
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" << std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef POLLINGSEQUENCEFACTORY_H_
|
||||
#define POLLINGSEQUENCEFACTORY_H_
|
||||
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <fsfw/returnvalues/returnvalue.h>
|
||||
|
||||
class FixedTimeslotTaskIF;
|
||||
|
||||
|
Reference in New Issue
Block a user