updating code from Flying Laptop
This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
@ -1,27 +1,17 @@
|
||||
/*
|
||||
* TmStoreFrontendIF.h
|
||||
*
|
||||
* Created on: 19.02.2015
|
||||
* Author: baetz
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_TMTCSERVICES_TMSTOREFRONTENDIF_H_
|
||||
#define PLATFORM_TMTCSERVICES_TMSTOREFRONTENDIF_H_
|
||||
|
||||
#include <framework/ipc/MessageQueueSender.h>
|
||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <framework/tmstorage/TmStorePackets.h>
|
||||
#include <framework/ipc/MessageQueueSenderIF.h>
|
||||
class TmPacketMinimal;
|
||||
class SpacePacketBase;
|
||||
class TmStoreBackendIF;
|
||||
|
||||
class TmStoreFrontendIF {
|
||||
public:
|
||||
struct ApidSsc {
|
||||
uint16_t apid;
|
||||
uint16_t ssc;
|
||||
};
|
||||
virtual TmStoreBackendIF* getBackend() const = 0;
|
||||
virtual ReturnValue_t performOperation() = 0;
|
||||
virtual ReturnValue_t performOperation(uint8_t opCode) = 0;
|
||||
/**
|
||||
* Callback from the back-end to indicate a certain packet was received.
|
||||
* front-end takes care of discarding/downloading the packet.
|
||||
@ -31,24 +21,31 @@ public:
|
||||
* @return If more packets shall be fetched, RETURN_OK must be returned.
|
||||
* Any other code stops fetching packets.
|
||||
*/
|
||||
virtual ReturnValue_t packetRetrieved(TmPacketMinimal* packet, uint32_t address, bool isLastPacket = false) = 0;
|
||||
virtual ReturnValue_t packetRetrieved(TmPacketMinimal* packet, uint32_t address) = 0;
|
||||
virtual void noMorePacketsInStore() = 0;
|
||||
virtual void handleRetrievalFailed(ReturnValue_t errorCode, uint32_t parameter1 = 0, uint32_t parameter2 = 0) = 0;
|
||||
/**
|
||||
* To get the queue where commands shall be sent.
|
||||
* @return Id of command queue.
|
||||
*/
|
||||
virtual MessageQueueId_t getCommandQueue() = 0;
|
||||
virtual MessageQueueId_t getCommandQueue() const = 0;
|
||||
virtual ReturnValue_t fetchPackets(ApidSsc start, ApidSsc end) = 0;
|
||||
virtual ReturnValue_t deletePackets(ApidSsc upTo) = 0;
|
||||
virtual ReturnValue_t checkPacket(SpacePacketBase* tmPacket) = 0;
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual void setEnabled(bool enabled) = 0;
|
||||
virtual void restDownlinkedPacketCount() = 0;
|
||||
static const uint8_t INTERFACE_ID = TM_STORE_FRONTEND_IF;
|
||||
virtual void resetDownlinkedPacketCount() = 0;
|
||||
virtual ReturnValue_t setDumpTarget(object_id_t dumpTarget) = 0;
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::TM_STORE_FRONTEND_IF;
|
||||
static const ReturnValue_t BUSY = MAKE_RETURN_CODE(1);
|
||||
static const ReturnValue_t LAST_PACKET_FOUND = MAKE_RETURN_CODE(2);
|
||||
static const ReturnValue_t STOP_FETCH = MAKE_RETURN_CODE(3);
|
||||
static const ReturnValue_t TIMEOUT = MAKE_RETURN_CODE(4);
|
||||
static const ReturnValue_t TM_CHANNEL_FULL = MAKE_RETURN_CODE(5);
|
||||
static const ReturnValue_t NOT_STORED = MAKE_RETURN_CODE(6);
|
||||
static const ReturnValue_t ALL_DELETED = MAKE_RETURN_CODE(7);
|
||||
static const ReturnValue_t INVALID_DATA = MAKE_RETURN_CODE(8);
|
||||
static const ReturnValue_t NOT_READY = MAKE_RETURN_CODE(9);
|
||||
virtual ~TmStoreFrontendIF() {
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user