Boilerplate Code to make ploc and star tracker compile

This commit is contained in:
Ulrich Mohr 2022-07-27 23:09:05 +02:00
parent 24297a6a97
commit d92b1b170d
6 changed files with 19 additions and 14 deletions

View File

@ -154,7 +154,7 @@ class TcMemWrite : public TcBase {
protected: protected:
ReturnValue_t initPacket(void *actionIn) { ReturnValue_t initPacket(void *actionIn) {
auto action = dynamic_cast<PlocMpSoCMemWriteAction *>(actionIn); auto action = (PlocMpSoCMemWriteAction *)(actionIn); //TODO
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
// faking until framework code is ready // faking until framework code is ready
// uint16_t length = action->memoryData.length; // uint16_t length = action->memoryData.length;

View File

@ -480,7 +480,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCCamCmdSendAction* action)
} }
ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCFlashWriteAction* action) { ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCFlashWriteAction* action) {
ReturnValue_t result; ReturnValue_t result = RETURN_OK;
// if (size > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) { // if (size > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) {
// return MPSoCReturnValuesIF::FILENAME_TOO_LONG; // return MPSoCReturnValuesIF::FILENAME_TOO_LONG;
// } // }

View File

@ -80,12 +80,15 @@ void PlocSupervisorHandler::performOperationHook() {
} }
} }
ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId, ReturnValue_t PlocSupervisorHandler::executeAction(Action* action) {
MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
using namespace supv; using namespace supv;
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
//TODO
ActionId_t actionId = 0;
uint8_t *data = nullptr;
size_t size = 0;
switch (actionId) { switch (actionId) {
case TERMINATE_SUPV_HELPER: { case TERMINATE_SUPV_HELPER: {
supvHelper->stopProcess(); supvHelper->stopProcess();
@ -138,7 +141,7 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
default: default:
break; break;
} }
return DeviceHandlerBase::executeAction(actionId, commandedBy, data, size); return DeviceHandlerBase::executeAction(action);
} }
void PlocSupervisorHandler::doStartUp() { void PlocSupervisorHandler::doStartUp() {
@ -828,7 +831,7 @@ void PlocSupervisorHandler::handleEvent(EventMessage* eventMessage) {
event == PlocSupvHelper::SUPV_UPDATE_SUCCESSFUL || event == PlocSupvHelper::SUPV_UPDATE_SUCCESSFUL ||
event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_FAILED || event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_FAILED ||
event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_SUCCESSFUL) { event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_SUCCESSFUL) {
result = this->executeAction(supv::SHUTDOWN_MPSOC, NO_COMMANDER, nullptr, 0); //TODO result = this->executeAction(supv::SHUTDOWN_MPSOC, NO_COMMANDER, nullptr, 0);
if (result != RETURN_OK) { if (result != RETURN_OK) {
triggerEvent(SUPV_MPSOC_SHUWDOWN_BUILD_FAILED); triggerEvent(SUPV_MPSOC_SHUWDOWN_BUILD_FAILED);
sif::warning << "PlocSupervisorHandler::handleEvent: Failed to build MPSoC shutdown " sif::warning << "PlocSupervisorHandler::handleEvent: Failed to build MPSoC shutdown "

View File

@ -34,8 +34,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
virtual ReturnValue_t initialize() override; virtual ReturnValue_t initialize() override;
void performOperationHook() override; void performOperationHook() override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, ReturnValue_t executeAction(Action* action) override;
const uint8_t* data, size_t size) override;
protected: protected:
void doStartUp() override; void doStartUp() override;

View File

@ -91,10 +91,14 @@ ReturnValue_t StarTrackerHandler::initialize() {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, ReturnValue_t StarTrackerHandler::executeAction(Action* action) {
const uint8_t* data, size_t size) {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
//TODO
ActionId_t actionId = 0;
uint8_t *data = nullptr;
size_t size = 0;
switch (actionId) { switch (actionId) {
case (startracker::STOP_IMAGE_LOADER): { case (startracker::STOP_IMAGE_LOADER): {
strHelper->stopProcess(); strHelper->stopProcess();
@ -209,7 +213,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
default: default:
break; break;
} }
return DeviceHandlerBase::executeAction(actionId, commandedBy, data, size); return DeviceHandlerBase::executeAction(action);
} }
void StarTrackerHandler::performOperationHook() { void StarTrackerHandler::performOperationHook() {

View File

@ -44,8 +44,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
* @brief Overwrite this function from DHB to handle commands executed by the str image * @brief Overwrite this function from DHB to handle commands executed by the str image
* loader task. * loader task.
*/ */
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, ReturnValue_t executeAction(Action* action) override;
const uint8_t* data, size_t size) override;
void performOperationHook() override; void performOperationHook() override;