From 2039aa56658923cb4127fddb409c251fdb8d55af Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 25 Nov 2019 00:14:39 +0100 Subject: [PATCH] Service Interface Stream buffer size higher to print long buffers (like nav data) --- serviceinterface/ServiceInterfaceBuffer.h | 2 +- tmtcservices/PusServiceBase.cpp | 10 +++++----- tmtcservices/PusServiceBase.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/serviceinterface/ServiceInterfaceBuffer.h b/serviceinterface/ServiceInterfaceBuffer.h index b42c8a197..9a5f4ef8e 100644 --- a/serviceinterface/ServiceInterfaceBuffer.h +++ b/serviceinterface/ServiceInterfaceBuffer.h @@ -30,7 +30,7 @@ private: typedef std::char_traits Traits; // Work in buffer mode. It is also possible to work without buffer. - static size_t const BUF_SIZE = 128; + static size_t const BUF_SIZE = 255; char buf[BUF_SIZE]; // In this function, the characters are parsed. diff --git a/tmtcservices/PusServiceBase.cpp b/tmtcservices/PusServiceBase.cpp index c8f6accf8..6e1053252 100644 --- a/tmtcservices/PusServiceBase.cpp +++ b/tmtcservices/PusServiceBase.cpp @@ -23,14 +23,14 @@ ReturnValue_t PusServiceBase::performOperation(uint8_t opCode) { TmTcMessage message; for (uint8_t count = 0; count < PUS_SERVICE_MAX_RECEPTION; count++) { ReturnValue_t status = this->requestQueue->receiveMessage(&message); - // debug << "PusServiceBase::performOperation: Receiving from MQ ID: " << std::hex << this->requestQueue.getId() << std::dec << " returned: " << status << std::endl; + // debug << "PusServiceBase::performOperation: Receiving from MQ ID: " << std::hex << this->requestQueue.getId() + // << std::dec << " returned: " << status << std::endl; if (status == RETURN_OK) { this->currentPacket.setStoreAddress(message.getStorageId()); -// info << "Service " << (uint16_t) this->serviceId << ": new packet!" -// << std::endl; + // info << "Service " << (uint16_t) this->serviceId << ": new packet!" << std::endl; ReturnValue_t return_code = this->handleRequest(); - // debug << "Service " << (uint16_t)this->serviceId << ": handleRequest returned: " << (int)return_code << std::endl; + // debug << "Service " << (uint16_t)this->serviceId << ": handleRequest returned: " << (int)return_code << std::endl; if (return_code == RETURN_OK) { this->verifyReporter.sendSuccessReport( TC_VERIFY::COMPLETION_SUCCESS, &this->currentPacket); @@ -44,7 +44,7 @@ ReturnValue_t PusServiceBase::performOperation(uint8_t opCode) { errorParameter2 = 0; } else if (status == MessageQueueIF::EMPTY) { status = RETURN_OK; - // debug << "PusService " << (uint16_t)this->serviceId << ": no new packet." << std::endl; + // debug << "PusService " << (uint16_t)this->serviceId << ": no new packet." << std::endl; break; } else { diff --git a/tmtcservices/PusServiceBase.h b/tmtcservices/PusServiceBase.h index 4fe13ca91..2b5e8b67c 100644 --- a/tmtcservices/PusServiceBase.h +++ b/tmtcservices/PusServiceBase.h @@ -52,7 +52,7 @@ public: * Success or Failure Reports are generated automatically after execution of this method. * If a Telecommand can not be executed within one call cycle, this Base class is not the right parent. * The child class may add additional error information in #errorParameters which are attached to the generated - * verification message. + * verification message. Subservice checking should be implemented in this method. * @return The returned status_code is directly taken as main error code in the Verification Report. * On success, RETURN_OK shall be returned. */