Compare commits
13 Commits
spahr/Shar
...
main
Author | SHA1 | Date | |
---|---|---|---|
1da7f7f122 | |||
![]() |
aa443e6aa6 | ||
7ae58f8125 | |||
7784a26a10 | |||
![]() |
3afd0c8d3c | ||
![]() |
71623d5314 | ||
daac5ea727 | |||
2c01b83b75 | |||
![]() |
2af6e85f87 | ||
![]() |
d8ac312e85 | ||
![]() |
1e12753533 | ||
![]() |
b7699b327b | ||
![]() |
9945f72eaf |
@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Changed
|
## 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
|
- 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.
|
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.
|
- The local HK manager was replaced by a periodic HK helper which has reduced responsibilities.
|
||||||
|
@ -235,14 +235,14 @@ bool AssemblyBase::checkAndHandleRecovery() {
|
|||||||
if (recoveryOffTimer.isBusy()) {
|
if (recoveryOffTimer.isBusy()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
triggerEvent(RECOVERY_STEP, 0);
|
triggerEvent(RECOVERY_WAITING, recoveringDevice->first);
|
||||||
sendHealthCommand(recoveringDevice->second.commandQueue, HEALTHY);
|
sendHealthCommand(recoveringDevice->second.commandQueue, HEALTHY);
|
||||||
internalState = STATE_NONE;
|
internalState = STATE_NONE;
|
||||||
recoveryState = RECOVERY_ONGOING;
|
recoveryState = RECOVERY_ONGOING;
|
||||||
// Don't check state!
|
// Don't check state!
|
||||||
return true;
|
return true;
|
||||||
case RECOVERY_ONGOING:
|
case RECOVERY_ONGOING:
|
||||||
triggerEvent(RECOVERY_STEP, 1);
|
triggerEvent(RECOVERY_RESTARTING, recoveringDevice->first);
|
||||||
recoveryState = RECOVERY_ONGOING_2;
|
recoveryState = RECOVERY_ONGOING_2;
|
||||||
recoveringDevice->second.healthChanged = false;
|
recoveringDevice->second.healthChanged = false;
|
||||||
// Device should be healthy again, so restart a transition.
|
// Device should be healthy again, so restart a transition.
|
||||||
@ -250,7 +250,7 @@ bool AssemblyBase::checkAndHandleRecovery() {
|
|||||||
doStartTransition(targetMode, targetSubmode);
|
doStartTransition(targetMode, targetSubmode);
|
||||||
return true;
|
return true;
|
||||||
case RECOVERY_ONGOING_2:
|
case RECOVERY_ONGOING_2:
|
||||||
triggerEvent(RECOVERY_DONE);
|
triggerEvent(RECOVERY_DONE, recoveringDevice->first);
|
||||||
// Now we're through, but not sure if it was successful.
|
// Now we're through, but not sure if it was successful.
|
||||||
recoveryState = RECOVERY_IDLE;
|
recoveryState = RECOVERY_IDLE;
|
||||||
return false;
|
return false;
|
||||||
|
@ -27,13 +27,19 @@ class HasHealthIF {
|
|||||||
static const Event CHILD_PROBLEMS = MAKE_EVENT(8, severity::LOW);
|
static const Event CHILD_PROBLEMS = MAKE_EVENT(8, severity::LOW);
|
||||||
//! Assembly overwrites health information of children to keep satellite alive.
|
//! Assembly overwrites health information of children to keep satellite alive.
|
||||||
static const Event OVERWRITING_HEALTH = MAKE_EVENT(9, severity::LOW);
|
static const Event OVERWRITING_HEALTH = MAKE_EVENT(9, severity::LOW);
|
||||||
//! Someone starts a recovery of a component (typically power-cycle). No parameters.
|
//! Someone starts a recovery of a component (typically power-cycle).
|
||||||
|
//! P1: Object Id of the recovering device.
|
||||||
static const Event TRYING_RECOVERY = MAKE_EVENT(10, severity::MEDIUM);
|
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.
|
//! 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);
|
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 ~HasHealthIF() {}
|
||||||
|
|
||||||
virtual MessageQueueId_t getCommandQueue() const = 0;
|
virtual MessageQueueId_t getCommandQueue() const = 0;
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include "fsfw/housekeeping/HousekeepingSnapshot.h"
|
#include "fsfw/housekeeping/HousekeepingSnapshot.h"
|
||||||
#include "fsfw/ipc/QueueFactory.h"
|
#include "fsfw/ipc/QueueFactory.h"
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
#include "fsfw/timemanager/CCSDSTime.h"
|
|
||||||
|
|
||||||
using namespace hk;
|
using namespace hk;
|
||||||
|
|
||||||
@ -84,6 +83,7 @@ ReturnValue_t PeriodicHelper::performHkOperation() {
|
|||||||
|
|
||||||
ReturnValue_t PeriodicHelper::handleHousekeepingMessage(CommandMessage* message) {
|
ReturnValue_t PeriodicHelper::handleHousekeepingMessage(CommandMessage* message) {
|
||||||
Command_t command = message->getCommand();
|
Command_t command = message->getCommand();
|
||||||
|
MessageQueueId_t sender = message->getSender();
|
||||||
dp::sid_t sid = HousekeepingMessage::getStructureId(message);
|
dp::sid_t sid = HousekeepingMessage::getStructureId(message);
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
switch (command) {
|
switch (command) {
|
||||||
@ -113,7 +113,7 @@ ReturnValue_t PeriodicHelper::handleHousekeepingMessage(CommandMessage* message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case (HousekeepingMessage::GENERATE_ONE_PARAMETER_REPORT): {
|
case (HousekeepingMessage::GENERATE_ONE_PARAMETER_REPORT): {
|
||||||
return generateHousekeepingPacket(HousekeepingMessage::getStructureId(message));
|
return generateHousekeepingPacket(HousekeepingMessage::getStructureId(message), sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -114,6 +114,11 @@ void TmStoreMessage::setDownlinkContentTimeMessage(CommandMessage* cmd, store_ad
|
|||||||
cmd->setParameter2(storeId.raw);
|
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::getAddressLow(CommandMessage* cmd) { return cmd->getParameter(); }
|
||||||
uint32_t TmStoreMessage::getAddressHigh(CommandMessage* cmd) { return cmd->getParameter2(); }
|
uint32_t TmStoreMessage::getAddressHigh(CommandMessage* cmd) { return cmd->getParameter2(); }
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ class TmStoreMessage {
|
|||||||
static void setStoreCatalogueReportMessage(CommandMessage* cmd, object_id_t objectId,
|
static void setStoreCatalogueReportMessage(CommandMessage* cmd, object_id_t objectId,
|
||||||
store_address_t storeId);
|
store_address_t storeId);
|
||||||
static void setDownlinkContentTimeMessage(CommandMessage* cmd, 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 void setIndexReportMessage(CommandMessage* cmd, store_address_t storeId);
|
||||||
static ReturnValue_t setDeleteBlocksMessage(CommandMessage* cmd, uint32_t addressLow,
|
static ReturnValue_t setDeleteBlocksMessage(CommandMessage* cmd, uint32_t addressLow,
|
||||||
uint32_t addressHigh);
|
uint32_t addressHigh);
|
||||||
@ -54,6 +55,7 @@ class TmStoreMessage {
|
|||||||
static const Command_t DOWNLINK_STORE_CONTENT_BLOCKS = MAKE_COMMAND_ID(12);
|
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 REPORT_INDEX_REQUEST = MAKE_COMMAND_ID(13);
|
||||||
static const Command_t INDEX_REPORT = MAKE_COMMAND_ID(14);
|
static const Command_t INDEX_REPORT = MAKE_COMMAND_ID(14);
|
||||||
|
static const Command_t STOP_DOWNLINK_STORE_CONTENT = MAKE_COMMAND_ID(15);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TmStoreMessage();
|
TmStoreMessage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user