1
0
forked from fsfw/fsfw

updating code from Flying Laptop

This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
2018-07-12 16:29:32 +02:00
parent 1d22a6c97e
commit 575f70ba03
395 changed files with 12807 additions and 8404 deletions

View File

@ -1,33 +1,27 @@
/*
* MemoryHelper.h
*
* Created on: 29.10.2013
* Author: Bastian
*/
#ifndef MEMORYHELPER_H_
#define MEMORYHELPER_H_
#include <framework/ipc/CommandMessage.h>
#include <framework/ipc/MessageQueue.h>
#include <framework/memory/AcceptsMemoryMessagesIF.h>
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <framework/storagemanager/StorageManagerIF.h>
#include <framework/ipc/MessageQueueIF.h>
class MemoryHelper : public HasReturnvaluesIF {
public:
static const uint8_t INTERFACE_ID = MEMORY_HELPER;
static const uint8_t INTERFACE_ID = CLASS_ID::MEMORY_HELPER;
static const ReturnValue_t UNKNOWN_CMD = MAKE_RETURN_CODE(0xE0);
static const ReturnValue_t INVALID_ADDRESS = MAKE_RETURN_CODE(0xE1);
static const ReturnValue_t INVALID_SIZE = MAKE_RETURN_CODE(0xE2);
static const ReturnValue_t STATE_MISMATCH = MAKE_RETURN_CODE(0xE3);
private:
HasMemoryIF* workOnThis;
MessageQueue* queueToUse;
MessageQueueIF* queueToUse;
StorageManagerIF* ipcStore;
store_address_t ipcAddress;
Command_t lastCommand;
MessageQueueId_t lastSender;
uint8_t* reservedSpaceInIPC;
bool busy;
void handleMemoryLoad(CommandMessage* message);
void handleMemoryCheckOrDump(CommandMessage* message);
public:
@ -36,7 +30,7 @@ public:
void completeDump( ReturnValue_t errorCode, const uint8_t* dataToCopy = NULL, const uint32_t size = 0);
void swapMatrixCopy( uint8_t *out, const uint8_t *in, uint32_t totalSize, uint8_t datatypeSize);
ReturnValue_t initialize();
MemoryHelper( HasMemoryIF* workOnThis, MessageQueue* useThisQueue );
MemoryHelper( HasMemoryIF* workOnThis, MessageQueueIF* useThisQueue );
~MemoryHelper();
};
#endif /* MEMORYHELPER_H_ */