eive-obsw/mission/devices/PlocUpdater.h
2021-08-04 10:20:36 +02:00

46 lines
1.4 KiB
C++

#ifndef MISSION_DEVICES_PLOCUPDATER_H_
#define MISSION_DEVICES_PLOCUPDATER_H_
#include "fsfw/action/CommandActionHelper.h"
/**
* @brief An object of this class can be used to perform the software updates of the PLOC. The
* software update will be fetched via file system messages from the SD card handler,
* split into multiple space packets and sent to the PlocSupervisorHandler.
*
* @details The MPSoC has to boot memories (NVM0 and NVM1) where each stores two images (Partition A
* and Partition B)
*
* @author J. Meier
*/
class PlocUpdater : public SystemObject,
public HasActionsIF,
public ExecutableObjectIF {
public:
static const ActionId_t UPDATE_NVM0_A = 0;
static const ActionId_t UPDATE_NVM0_B = 0;
static const ActionId_t UPDATE_NVM1_A = 0;
static const ActionId_t UPDATE_NVM1_B = 0;
PlocUpdater();
virtual ~PlocUpdater();
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
MessageQueueId_t getCommandQueue() const;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_UPDATER;
//! [EXPORT] : [COMMENT] Updater is already performing an update
static const ReturnValue_t UPDATER_BUSY = MAKE_RETURN_CODE(0xA0);
static constexpr uint32_t QUEUE_SIZE = config::PLOC_UPDATER_QUEUE_SIZE;
CommandActionHelper commandActionHelper;
};
#endif /* MISSION_DEVICES_PLOCUPDATER_H_ */