receiveTc function adapted
This commit is contained in:
parent
c867b83541
commit
f3af2987e6
@ -14,7 +14,7 @@
|
||||
TmTcBridge::TmTcBridge(object_id_t objectId_, object_id_t ccsdsPacketDistributor_):
|
||||
SystemObject(objectId_),tcStore(NULL), tmStore(NULL),
|
||||
ccsdsPacketDistributor(ccsdsPacketDistributor_), communicationLinkUp(false),
|
||||
tmStored(false) {
|
||||
tmStored(false), size(0) {
|
||||
TmTcReceptionQueue = QueueFactory::instance()->
|
||||
createMessageQueue(TMTC_RECEPTION_QUEUE_DEPTH);
|
||||
|
||||
@ -55,7 +55,7 @@ ReturnValue_t TmTcBridge::performOperation(uint8_t operationCode) {
|
||||
}
|
||||
|
||||
ReturnValue_t TmTcBridge::handleTc() {
|
||||
ReturnValue_t result = receiveTc();
|
||||
ReturnValue_t result = receiveTc(&recvBuffer, &size);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,11 @@ protected:
|
||||
/**
|
||||
* Implemented by child class. Perform receiving of Telecommand, for example by implementing
|
||||
* specific drivers or wrappers, e.g. UART Communication or lwIP stack
|
||||
* @param recvBuffer [out] Received data
|
||||
* @param size [out] Size of received data
|
||||
* @return
|
||||
*/
|
||||
virtual ReturnValue_t receiveTc() = 0;
|
||||
virtual ReturnValue_t receiveTc(uint8_t ** recvBuffer, uint32_t * size) = 0;
|
||||
|
||||
/**
|
||||
* Handle Telemetry. Default implementation provided.
|
||||
@ -117,6 +119,8 @@ private:
|
||||
static const uint8_t MAX_DOWNLINK_PACKETS_STORED = 20;
|
||||
|
||||
FIFO<store_address_t, MAX_DOWNLINK_PACKETS_STORED> fifo;
|
||||
uint8_t * recvBuffer;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user