Compare commits
3 Commits
main
...
7795fecfcb
Author | SHA1 | Date | |
---|---|---|---|
7795fecfcb | |||
9361af02c4
|
|||
842a3b1b03 |
@ -26,7 +26,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Added
|
||||
|
||||
- FreeRTOS monotonic clock which is not subjected to time jumps of the system clock
|
||||
- add CFDP subsystem ID
|
||||
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742
|
||||
- `PusTmZcWriter` now exposes API to set message counter field.
|
||||
@ -35,7 +34,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Changed
|
||||
|
||||
- send HK one-parameter-report back to sender instead of default hk queue
|
||||
- Complete overhaul of HK subsystem. Replaced local data pool manager by periodic HK
|
||||
helper. The shared pool and the periodic HK generation are now distinct concepts.
|
||||
- The local HK manager was replaced by a periodic HK helper which has reduced responsibilities.
|
||||
|
@ -18,13 +18,13 @@ class MgmRM3100Handler : public DeviceHandlerBase {
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::MGM_RM3100;
|
||||
|
||||
//! [EXPORT] : [COMMENT] P1: TMRC value which was set, P2: 0
|
||||
static constexpr Event tmrcSet = event::makeEvent<SUBSYSTEM_ID::MGM_RM3100, 0x00, severity::INFO>();
|
||||
static constexpr Event tmrcSet = event::makeEvent(SUBSYSTEM_ID::MGM_RM3100, 0x00, severity::INFO);
|
||||
|
||||
//! [EXPORT] : [COMMENT] Cycle counter set. P1: First two bytes new Cycle Count X
|
||||
//! P1: Second two bytes new Cycle Count Y
|
||||
//! P2: New cycle count Z
|
||||
static constexpr Event cycleCountersSet =
|
||||
event::makeEvent<SUBSYSTEM_ID::MGM_RM3100, 0x01, severity::INFO>();
|
||||
event::makeEvent(SUBSYSTEM_ID::MGM_RM3100, 0x01, severity::INFO);
|
||||
|
||||
MgmRM3100Handler(object_id_t objectId, object_id_t deviceCommunication, CookieIF *comCookie,
|
||||
uint32_t transitionDelay);
|
||||
|
@ -19,13 +19,13 @@ struct FsfwParams {
|
||||
};
|
||||
|
||||
namespace events {
|
||||
static constexpr Event PDU_SEND_ERROR = event::makeEvent<SSID, 1, severity::LOW>();
|
||||
static constexpr Event SERIALIZATION_ERROR = event::makeEvent<SSID, 2, severity::LOW>();
|
||||
static constexpr Event FILESTORE_ERROR = event::makeEvent<SSID, 3, severity::LOW>();
|
||||
static constexpr Event PDU_SEND_ERROR = event::makeEvent(SSID, 1, severity::LOW);
|
||||
static constexpr Event SERIALIZATION_ERROR = event::makeEvent(SSID, 2, severity::LOW);
|
||||
static constexpr Event FILESTORE_ERROR = event::makeEvent(SSID, 3, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name
|
||||
static constexpr Event FILENAME_TOO_LARGE_ERROR = event::makeEvent<SSID, 4, severity::LOW>();
|
||||
static constexpr Event FILENAME_TOO_LARGE_ERROR = event::makeEvent(SSID, 4, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] CFDP request handling failed. P2: Returncode.
|
||||
static constexpr Event HANDLING_CFDP_REQUEST_FAILED = event::makeEvent<SSID, 5, severity::LOW>();
|
||||
static constexpr Event HANDLING_CFDP_REQUEST_FAILED = event::makeEvent(SSID, 5, severity::LOW);
|
||||
} // namespace events
|
||||
|
||||
static constexpr ReturnValue_t SOURCE_TRANSACTION_PENDING = returnvalue::makeCode(CID, 0);
|
||||
|
@ -210,7 +210,6 @@ inline ReturnValue_t PoolVariable<T>::readWithoutLock() {
|
||||
}
|
||||
|
||||
this->value = *(poolEntry->getDataPtr());
|
||||
this->valid = poolEntry->getValid();
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
@ -242,7 +241,6 @@ ReturnValue_t PoolVariable<T>::commitWithoutLock() {
|
||||
}
|
||||
|
||||
*(poolEntry->getDataPtr()) = this->value;
|
||||
poolEntry->setValid(this->valid);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ bool AssemblyBase::handleChildrenChangedHealth() {
|
||||
if (iter == childrenMap.end()) {
|
||||
return false;
|
||||
}
|
||||
HealthState healthState = healthHelper.healthTable->getHealth(convertToDeviceObjectId(iter->first));
|
||||
HealthState healthState = healthHelper.healthTable->getHealth(iter->first);
|
||||
if (healthState == HasHealthIF::NEEDS_RECOVERY) {
|
||||
triggerEvent(TRYING_RECOVERY, iter->first, 0);
|
||||
recoveryState = RECOVERY_STARTED;
|
||||
@ -92,14 +92,9 @@ void AssemblyBase::handleChildrenTransition() {
|
||||
if (commandsOutstanding <= 0) {
|
||||
switch (internalState) {
|
||||
case STATE_NEED_SECOND_STEP:
|
||||
{
|
||||
internalState = STATE_SECOND_STEP;
|
||||
ReturnValue_t result = commandChildren(targetMode, targetSubmode);
|
||||
if(result == NEED_SECOND_STEP) {
|
||||
internalState = STATE_NEED_SECOND_STEP;
|
||||
}
|
||||
commandChildren(targetMode, targetSubmode);
|
||||
return;
|
||||
}
|
||||
case STATE_OVERWRITE_HEALTH: {
|
||||
internalState = STATE_SINGLE_STEP;
|
||||
ReturnValue_t result = commandChildren(mode, submode);
|
||||
@ -175,7 +170,7 @@ ReturnValue_t AssemblyBase::checkChildrenStateOff() {
|
||||
|
||||
ReturnValue_t AssemblyBase::checkChildOff(uint32_t objectId) {
|
||||
ChildInfo childInfo = childrenMap.find(objectId)->second;
|
||||
if (healthHelper.healthTable->isCommandable(convertToDeviceObjectId(objectId))) {
|
||||
if (healthHelper.healthTable->isCommandable(objectId)) {
|
||||
if (childInfo.submode != SUBMODE_NONE) {
|
||||
return returnvalue::FAILED;
|
||||
} else {
|
||||
@ -232,7 +227,7 @@ bool AssemblyBase::checkAndHandleRecovery() {
|
||||
case RECOVERY_STARTED:
|
||||
// The recovery was already start in #handleChildrenChangedHealth and we just need
|
||||
// to wait for an off time period.
|
||||
// The timeout can be defined by #setRecoveryWaitTimer
|
||||
// TODO: make time period configurable
|
||||
recoveryState = RECOVERY_WAIT;
|
||||
recoveryOffTimer.resetTimer();
|
||||
return true;
|
||||
@ -240,14 +235,14 @@ bool AssemblyBase::checkAndHandleRecovery() {
|
||||
if (recoveryOffTimer.isBusy()) {
|
||||
return true;
|
||||
}
|
||||
triggerEvent(RECOVERY_WAITING, recoveringDevice->first);
|
||||
triggerEvent(RECOVERY_STEP, 0);
|
||||
sendHealthCommand(recoveringDevice->second.commandQueue, HEALTHY);
|
||||
internalState = STATE_NONE;
|
||||
recoveryState = RECOVERY_ONGOING;
|
||||
// Don't check state!
|
||||
return true;
|
||||
case RECOVERY_ONGOING:
|
||||
triggerEvent(RECOVERY_RESTARTING, recoveringDevice->first);
|
||||
triggerEvent(RECOVERY_STEP, 1);
|
||||
recoveryState = RECOVERY_ONGOING_2;
|
||||
recoveringDevice->second.healthChanged = false;
|
||||
// Device should be healthy again, so restart a transition.
|
||||
@ -255,7 +250,7 @@ bool AssemblyBase::checkAndHandleRecovery() {
|
||||
doStartTransition(targetMode, targetSubmode);
|
||||
return true;
|
||||
case RECOVERY_ONGOING_2:
|
||||
triggerEvent(RECOVERY_DONE, recoveringDevice->first);
|
||||
triggerEvent(RECOVERY_DONE);
|
||||
// Now we're through, but not sure if it was successful.
|
||||
recoveryState = RECOVERY_IDLE;
|
||||
return false;
|
||||
@ -269,15 +264,7 @@ void AssemblyBase::overwriteDeviceHealth(object_id_t objectId, HasHealthIF::Heal
|
||||
triggerEvent(OVERWRITING_HEALTH, objectId, oldHealth);
|
||||
internalState = STATE_OVERWRITE_HEALTH;
|
||||
modeHelper.setForced(true);
|
||||
if(childrenMap.find(objectId) != childrenMap.end()) {
|
||||
sendHealthCommand(childrenMap.at(objectId).commandQueue, EXTERNAL_CONTROL);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << std::hex << SystemObject::getObjectId() << ": invalid mode table entry"
|
||||
<< std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
sendHealthCommand(childrenMap[objectId].commandQueue, EXTERNAL_CONTROL);
|
||||
}
|
||||
|
||||
void AssemblyBase::triggerModeHelperEvents(Mode_t mode, Submode_t submode) {
|
||||
@ -287,7 +274,3 @@ void AssemblyBase::triggerModeHelperEvents(Mode_t mode, Submode_t submode) {
|
||||
triggerEvent(CHANGING_MODE, mode, submode);
|
||||
}
|
||||
}
|
||||
|
||||
void AssemblyBase::setRecoveryWaitTimer(uint32_t timeoutMS) {
|
||||
recoveryOffTimer.setTimeout(timeoutMS);
|
||||
}
|
||||
|
@ -206,8 +206,6 @@ class AssemblyBase : public SubsystemBase {
|
||||
void overwriteDeviceHealth(object_id_t objectId, HasHealthIF::HealthState oldHealth);
|
||||
|
||||
void triggerModeHelperEvents(Mode_t mode, Submode_t submode);
|
||||
|
||||
void setRecoveryWaitTimer(uint32_t timeoutMS);
|
||||
};
|
||||
|
||||
#endif /* FSFW_DEVICEHANDLERS_ASSEMBLYBASE_H_ */
|
||||
|
@ -14,6 +14,8 @@ enum Severity : EventSeverity_t { INFO = 1, LOW = 2, MEDIUM = 3, HIGH = 4 };
|
||||
|
||||
} // namespace severity
|
||||
|
||||
#define MAKE_EVENT(id, severity) (((severity) << 16) + (SUBSYSTEM_ID * 100) + (id))
|
||||
|
||||
typedef uint32_t Event;
|
||||
|
||||
namespace event {
|
||||
@ -22,14 +24,11 @@ constexpr EventId_t getEventId(Event event) { return (event & 0xFFFF); }
|
||||
|
||||
constexpr EventSeverity_t getSeverity(Event event) { return ((event >> 16) & 0xFF); }
|
||||
|
||||
template<uint8_t subsystemId, UniqueEventId_t uniqueEventId, EventSeverity_t eventSeverity>
|
||||
constexpr Event makeEvent() {
|
||||
static_assert(uniqueEventId < 100, "The unique event ID must be smaller than 100!");
|
||||
constexpr Event makeEvent(uint8_t subsystemId, UniqueEventId_t uniqueEventId,
|
||||
EventSeverity_t eventSeverity) {
|
||||
return (eventSeverity << 16) + (subsystemId * 100) + uniqueEventId;
|
||||
}
|
||||
|
||||
} // namespace event
|
||||
|
||||
#define MAKE_EVENT(id, severity) event::makeEvent<SUBSYSTEM_ID, id, severity>();
|
||||
|
||||
#endif /* EVENTOBJECT_EVENT_H_ */
|
||||
|
@ -27,19 +27,13 @@ class HasHealthIF {
|
||||
static const Event CHILD_PROBLEMS = MAKE_EVENT(8, severity::LOW);
|
||||
//! Assembly overwrites health information of children to keep satellite alive.
|
||||
static const Event OVERWRITING_HEALTH = MAKE_EVENT(9, severity::LOW);
|
||||
//! Someone starts a recovery of a component (typically power-cycle).
|
||||
//! P1: Object Id of the recovering device.
|
||||
//! Someone starts a recovery of a component (typically power-cycle). No parameters.
|
||||
static const Event TRYING_RECOVERY = MAKE_EVENT(10, severity::MEDIUM);
|
||||
//! Recovery is ongoing. Comes twice during recovery.
|
||||
//! P1: 0 for the first, 1 for the second event. P2: 0
|
||||
static const Event RECOVERY_STEP = MAKE_EVENT(11, severity::MEDIUM);
|
||||
//! Recovery was completed. Not necessarily successful. No parameters.
|
||||
//! P1: Object Id of the recovering device.
|
||||
static const Event RECOVERY_DONE = MAKE_EVENT(12, severity::MEDIUM);
|
||||
//! Recovery is ongoing. The recovering device is currently OFF, waiting for restart.
|
||||
//! P1: Object Id of the recovering device.
|
||||
static const Event RECOVERY_WAITING = MAKE_EVENT(13, severity::MEDIUM);
|
||||
//! Recovery is ongoing. Restarting the recovering device.
|
||||
//! P1: Object Id of the recovering device.
|
||||
static const Event RECOVERY_RESTARTING = MAKE_EVENT(14, severity::MEDIUM);
|
||||
|
||||
virtual ~HasHealthIF() {}
|
||||
|
||||
virtual MessageQueueId_t getCommandQueue() const = 0;
|
||||
|
@ -91,7 +91,7 @@ class Dataset : public SerializeIF {
|
||||
|
||||
void setChildrenValidity(bool valid) {
|
||||
for (auto &serializable : serializables) {
|
||||
serializable.get().setValid(valid);
|
||||
serializable.get().setValid(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "fsfw/housekeeping/HousekeepingSnapshot.h"
|
||||
#include "fsfw/ipc/QueueFactory.h"
|
||||
#include "fsfw/objectmanager/ObjectManager.h"
|
||||
#include "fsfw/timemanager/CCSDSTime.h"
|
||||
|
||||
using namespace hk;
|
||||
|
||||
@ -83,7 +84,6 @@ ReturnValue_t PeriodicHelper::performHkOperation() {
|
||||
|
||||
ReturnValue_t PeriodicHelper::handleHousekeepingMessage(CommandMessage* message) {
|
||||
Command_t command = message->getCommand();
|
||||
MessageQueueId_t sender = message->getSender();
|
||||
dp::sid_t sid = HousekeepingMessage::getStructureId(message);
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
switch (command) {
|
||||
@ -113,7 +113,7 @@ ReturnValue_t PeriodicHelper::handleHousekeepingMessage(CommandMessage* message)
|
||||
}
|
||||
|
||||
case (HousekeepingMessage::GENERATE_ONE_PARAMETER_REPORT): {
|
||||
return generateHousekeepingPacket(HousekeepingMessage::getStructureId(message), sender);
|
||||
return generateHousekeepingPacket(HousekeepingMessage::getStructureId(message));
|
||||
}
|
||||
|
||||
default:
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "fsfw/globalfunctions/timevalOperations.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterfacePrinter.h"
|
||||
#include "fsfw/osal/freertos/Timekeeper.h"
|
||||
#include "task.h"
|
||||
|
||||
@ -48,8 +47,8 @@ ReturnValue_t Clock::getClock(timeval* time) {
|
||||
}
|
||||
|
||||
ReturnValue_t Clock::getClockMonotonic(timeval* time) {
|
||||
*time = Timekeeper::instance()->getMonotonicClockOffset() + getUptime();
|
||||
return returnvalue::OK;
|
||||
// TODO: I don't actually know if the timekeeper is monotonic..
|
||||
return getClock_timeval(time);
|
||||
}
|
||||
|
||||
ReturnValue_t Clock::getUptime(timeval* uptime) {
|
||||
@ -59,7 +58,7 @@ ReturnValue_t Clock::getUptime(timeval* uptime) {
|
||||
}
|
||||
|
||||
timeval Clock::getUptime() {
|
||||
TickType_t ticksSinceStart = Timekeeper::instance()->getTicks();
|
||||
TickType_t ticksSinceStart = xTaskGetTickCount();
|
||||
return Timekeeper::ticksToTimeval(ticksSinceStart);
|
||||
}
|
||||
|
||||
|
@ -17,13 +17,7 @@ Timekeeper* Timekeeper::instance() {
|
||||
return myinstance;
|
||||
}
|
||||
|
||||
void Timekeeper::setOffset(const timeval& offset) {
|
||||
if (not monotonicClockInitialized) {
|
||||
this->monotonicClockOffset = offset;
|
||||
monotonicClockInitialized = true;
|
||||
}
|
||||
this->offset = offset;
|
||||
}
|
||||
void Timekeeper::setOffset(const timeval& offset) { this->offset = offset; }
|
||||
|
||||
timeval Timekeeper::ticksToTimeval(TickType_t ticks) {
|
||||
timeval uptime;
|
||||
@ -39,7 +33,3 @@ timeval Timekeeper::ticksToTimeval(TickType_t ticks) {
|
||||
}
|
||||
|
||||
TickType_t Timekeeper::getTicks() { return xTaskGetTickCount(); }
|
||||
|
||||
const timeval Timekeeper::getMonotonicClockOffset() const {
|
||||
return monotonicClockOffset;
|
||||
}
|
||||
|
@ -18,14 +18,9 @@ class Timekeeper {
|
||||
Timekeeper();
|
||||
|
||||
timeval offset;
|
||||
// Set when offset is initialized the first time
|
||||
timeval monotonicClockOffset;
|
||||
bool monotonicClockInitialized = false;
|
||||
|
||||
static Timekeeper* myinstance;
|
||||
|
||||
void setMonotonicClockOffset(const timeval& monotonicClockOffset);
|
||||
|
||||
public:
|
||||
static Timekeeper* instance();
|
||||
virtual ~Timekeeper();
|
||||
@ -39,7 +34,6 @@ class Timekeeper {
|
||||
|
||||
const timeval& getOffset() const;
|
||||
void setOffset(const timeval& offset);
|
||||
const timeval getMonotonicClockOffset() const;
|
||||
};
|
||||
|
||||
#endif /* FRAMEWORK_OSAL_FREERTOS_TIMEKEEPER_H_ */
|
||||
|
@ -49,7 +49,7 @@ class Service11TelecommandScheduling final : public PusServiceBase {
|
||||
|
||||
//! [EXPORT] : [COMMENT] Deletion of a TC from the map failed.
|
||||
//! P1: First 32 bit of request ID, P2. Last 32 bit of Request ID
|
||||
static constexpr Event TC_DELETION_FAILED = event::makeEvent<SUBSYSTEM_ID, 0, severity::MEDIUM>();
|
||||
static constexpr Event TC_DELETION_FAILED = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
|
||||
// The types of PUS-11 subservices
|
||||
enum Subservice : uint8_t {
|
||||
|
@ -53,17 +53,17 @@ void fsfwPrint(sif::PrintLevel printType, const char *fmt, va_list arg) {
|
||||
#endif
|
||||
|
||||
if (printType == sif::PrintLevel::INFO_LEVEL) {
|
||||
len += sprintf(bufferPosition + len, "INFO ");
|
||||
len += sprintf(bufferPosition + len, "INFO");
|
||||
}
|
||||
if (printType == sif::PrintLevel::DEBUG_LEVEL) {
|
||||
len += sprintf(bufferPosition + len, "DEBUG ");
|
||||
len += sprintf(bufferPosition + len, "DEBUG");
|
||||
}
|
||||
if (printType == sif::PrintLevel::WARNING_LEVEL) {
|
||||
len += sprintf(bufferPosition + len, "WARNING");
|
||||
}
|
||||
|
||||
if (printType == sif::PrintLevel::ERROR_LEVEL) {
|
||||
len += sprintf(bufferPosition + len, "ERROR ");
|
||||
len += sprintf(bufferPosition + len, "ERROR");
|
||||
}
|
||||
|
||||
#if FSFW_COLORED_OUTPUT == 1
|
||||
@ -75,7 +75,7 @@ void fsfwPrint(sif::PrintLevel printType, const char *fmt, va_list arg) {
|
||||
/*
|
||||
* Log current time to terminal if desired.
|
||||
*/
|
||||
len += sprintf(bufferPosition + len, " | %02lu:%02lu:%02lu.%03lu | ", (unsigned long)now.hour,
|
||||
len += sprintf(bufferPosition + len, " | %lu:%02lu:%02lu.%03lu | ", (unsigned long)now.hour,
|
||||
(unsigned long)now.minute, (unsigned long)now.second,
|
||||
(unsigned long)now.usecond / 1000);
|
||||
|
||||
|
@ -78,37 +78,23 @@ void SubsystemBase::executeTable(HybridIterator<ModeListEntry> tableIter, Submod
|
||||
submodeToCommand = targetSubmode;
|
||||
}
|
||||
|
||||
if (healthHelper.healthTable->hasHealth(convertToDeviceObjectId(object))) {
|
||||
|
||||
switch (healthHelper.healthTable->getHealth(convertToDeviceObjectId(object))) {
|
||||
case NEEDS_RECOVERY:
|
||||
case FAULTY:
|
||||
case PERMANENT_FAULTY:
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND, HasModesIF::MODE_OFF,
|
||||
SUBMODE_NONE);
|
||||
break;
|
||||
case HEALTHY:
|
||||
if (modeHelper.isForced()) {
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND_FORCED,
|
||||
tableIter.value->getMode(), submodeToCommand);
|
||||
} else {
|
||||
if (healthHelper.healthTable->hasHealth(object)) {
|
||||
if (healthHelper.healthTable->isFaulty(object)) {
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND, HasModesIF::MODE_OFF,
|
||||
SUBMODE_NONE);
|
||||
} else {
|
||||
if (modeHelper.isForced()) {
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND_FORCED,
|
||||
tableIter.value->getMode(), submodeToCommand);
|
||||
} else {
|
||||
if (healthHelper.healthTable->isCommandable(object)) {
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND,
|
||||
tableIter.value->getMode(), submodeToCommand);
|
||||
}
|
||||
break;
|
||||
case EXTERNAL_CONTROL:
|
||||
if (modeHelper.isForced()) {
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND_FORCED,
|
||||
tableIter.value->getMode(), submodeToCommand);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// This never happens
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
ModeMessage::setModeMessage(&command, ModeMessage::CMD_MODE_COMMAND,
|
||||
tableIter.value->getMode(), submodeToCommand);
|
||||
@ -353,7 +339,3 @@ ReturnValue_t SubsystemBase::registerChild(object_id_t childObjectId, MessageQue
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
object_id_t SubsystemBase::convertToDeviceObjectId(object_id_t id) {
|
||||
return id;
|
||||
}
|
@ -153,12 +153,6 @@ class SubsystemBase : public SystemObject,
|
||||
virtual void announceMode(bool recursive) override;
|
||||
|
||||
virtual void modeChanged();
|
||||
|
||||
/**
|
||||
* @brief Provides an adaptation point for the user to change an objectId into
|
||||
* a different objectId.
|
||||
*/
|
||||
virtual object_id_t convertToDeviceObjectId(object_id_t id);
|
||||
};
|
||||
|
||||
#endif /* FSFW_SUBSYSTEM_SUBSYSTEMBASE_H_ */
|
||||
|
@ -25,7 +25,7 @@ static constexpr ReturnValue_t INCORRECT_SECONDARY_HEADER = MAKE_RETURN_CODE(11)
|
||||
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TMTC_DISTRIBUTION;
|
||||
//! P1: Returnvalue, P2: 0 for TM issues, 1 for TC issues
|
||||
static constexpr Event HANDLE_PACKET_FAILED = event::makeEvent<SUBSYSTEM_ID, 0, severity::LOW>();
|
||||
static constexpr Event HANDLE_PACKET_FAILED = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW);
|
||||
|
||||
}; // namespace tmtcdistrib
|
||||
#endif // FSFW_TMTCPACKET_DEFINITIONS_H
|
||||
|
@ -142,7 +142,7 @@ class TemperatureSensor : public AbstractTemperatureSensor {
|
||||
|
||||
deltaTime = (uptime.tv_sec + uptime.tv_usec / 1000000.) -
|
||||
(uptimeOfOldTemperature.tv_sec + uptimeOfOldTemperature.tv_usec / 1000000.);
|
||||
deltaTemp = oldTemperature - outputTemperature.value;
|
||||
deltaTemp = oldTemperature - outputTemperature;
|
||||
if (deltaTemp < 0) {
|
||||
deltaTemp = -deltaTemp;
|
||||
}
|
||||
@ -160,13 +160,13 @@ class TemperatureSensor : public AbstractTemperatureSensor {
|
||||
outputTemperature.setValid(PoolVariableIF::INVALID);
|
||||
outputTemperature = thermal::INVALID_TEMPERATURE;
|
||||
} else {
|
||||
oldTemperature = outputTemperature.value;
|
||||
oldTemperature = outputTemperature;
|
||||
uptimeOfOldTemperature = uptime;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
float getTemperature() { return outputTemperature.value; }
|
||||
float getTemperature() { return outputTemperature; }
|
||||
|
||||
bool isValid() { return outputTemperature.isValid(); }
|
||||
|
||||
|
@ -192,8 +192,6 @@ class Clock {
|
||||
static MutexIF *timeMutex;
|
||||
static uint16_t leapSeconds;
|
||||
static bool leapSecondsSet;
|
||||
static bool monotonicClockInitialized;
|
||||
static timeval monotonicClockOffset;
|
||||
};
|
||||
|
||||
#endif /* FSFW_TIMEMANAGER_CLOCK_H_ */
|
||||
|
@ -114,11 +114,6 @@ void TmStoreMessage::setDownlinkContentTimeMessage(CommandMessage* cmd, store_ad
|
||||
cmd->setParameter2(storeId.raw);
|
||||
}
|
||||
|
||||
void TmStoreMessage::setStopDownlinkContentMessage(CommandMessage* cmd, store_address_t storeId) {
|
||||
cmd->setCommand(STOP_DOWNLINK_STORE_CONTENT);
|
||||
cmd->setParameter2(storeId.raw);
|
||||
}
|
||||
|
||||
uint32_t TmStoreMessage::getAddressLow(CommandMessage* cmd) { return cmd->getParameter(); }
|
||||
uint32_t TmStoreMessage::getAddressHigh(CommandMessage* cmd) { return cmd->getParameter2(); }
|
||||
|
||||
|
@ -21,7 +21,6 @@ class TmStoreMessage {
|
||||
static void setStoreCatalogueReportMessage(CommandMessage* cmd, object_id_t objectId,
|
||||
store_address_t storeId);
|
||||
static void setDownlinkContentTimeMessage(CommandMessage* cmd, store_address_t storeId);
|
||||
static void setStopDownlinkContentMessage(CommandMessage* cmd, store_address_t storeId);
|
||||
static void setIndexReportMessage(CommandMessage* cmd, store_address_t storeId);
|
||||
static ReturnValue_t setDeleteBlocksMessage(CommandMessage* cmd, uint32_t addressLow,
|
||||
uint32_t addressHigh);
|
||||
@ -55,7 +54,6 @@ class TmStoreMessage {
|
||||
static const Command_t DOWNLINK_STORE_CONTENT_BLOCKS = MAKE_COMMAND_ID(12);
|
||||
static const Command_t REPORT_INDEX_REQUEST = MAKE_COMMAND_ID(13);
|
||||
static const Command_t INDEX_REPORT = MAKE_COMMAND_ID(14);
|
||||
static const Command_t STOP_DOWNLINK_STORE_CONTENT = MAKE_COMMAND_ID(15);
|
||||
|
||||
private:
|
||||
TmStoreMessage();
|
||||
|
Reference in New Issue
Block a user