Merge branch 'development' into mueller/timeman-update

This commit is contained in:
Steffen Gaisser 2020-12-22 15:40:14 +01:00
commit c8ca680d5f
19 changed files with 110 additions and 137 deletions

View File

@ -66,3 +66,7 @@ that DHB users adapt their polling sequence tables to perform this step. This st
allows setting a unique ID. Event.cpp source file removed, functions now allows setting a unique ID. Event.cpp source file removed, functions now
defined in header directly. Namespaces renamed. Functions declared `constexpr` defined in header directly. Namespaces renamed. Functions declared `constexpr`
now now
### Commanding Service Base
- CSB uses the new fsfwconfig::FSFW_CSB_FIFO_DEPTH variable to determine the FIFO depth for each CSB instance. This variable has to be set in the FSFWConfig.h file

View File

@ -49,7 +49,7 @@ public:
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
return result; return result;
} }
if (failureSubtype == TC_VERIFY::PROGRESS_FAILURE) { if (failureSubtype == tc_verification::PROGRESS_FAILURE) {
result = SerializeAdapter::serialize(&stepNumber, buffer, size, result = SerializeAdapter::serialize(&stepNumber, buffer, size,
maxSize, streamEndianness); maxSize, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
@ -77,7 +77,7 @@ public:
size_t size = 0; size_t size = 0;
size += SerializeAdapter::getSerializedSize(&packetId); size += SerializeAdapter::getSerializedSize(&packetId);
size += sizeof(packetSequenceControl); size += sizeof(packetSequenceControl);
if(failureSubtype==TC_VERIFY::PROGRESS_FAILURE){ if(failureSubtype==tc_verification::PROGRESS_FAILURE){
size += SerializeAdapter::getSerializedSize(&stepNumber); size += SerializeAdapter::getSerializedSize(&stepNumber);
} }
size += SerializeAdapter::getSerializedSize(&errorCode); size += SerializeAdapter::getSerializedSize(&errorCode);
@ -131,7 +131,7 @@ public:
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
return result; return result;
} }
if (subtype == TC_VERIFY::PROGRESS_SUCCESS) { if (subtype == tc_verification::PROGRESS_SUCCESS) {
result = SerializeAdapter::serialize(&stepNumber, buffer, size, result = SerializeAdapter::serialize(&stepNumber, buffer, size,
maxSize, streamEndianness); maxSize, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
@ -145,7 +145,7 @@ public:
size_t size = 0; size_t size = 0;
size += SerializeAdapter::getSerializedSize(&packetId); size += SerializeAdapter::getSerializedSize(&packetId);
size += sizeof(packetSequenceControl); size += sizeof(packetSequenceControl);
if(subtype == TC_VERIFY::PROGRESS_SUCCESS){ if(subtype == tc_verification::PROGRESS_SUCCESS){
size += SerializeAdapter::getSerializedSize(&stepNumber); size += SerializeAdapter::getSerializedSize(&stepNumber);
} }
return size; return size;

View File

@ -77,14 +77,14 @@ ReturnValue_t PUSDistributor::callbackAfterSending(ReturnValue_t queueStatus) {
tcStatus = queueStatus; tcStatus = queueStatus;
} }
if (tcStatus != RETURN_OK) { if (tcStatus != RETURN_OK) {
this->verifyChannel.sendFailureReport(TC_VERIFY::ACCEPTANCE_FAILURE, this->verifyChannel.sendFailureReport(tc_verification::ACCEPTANCE_FAILURE,
currentPacket, tcStatus); currentPacket, tcStatus);
// A failed packet is deleted immediately after reporting, // A failed packet is deleted immediately after reporting,
// otherwise it will block memory. // otherwise it will block memory.
currentPacket->deletePacket(); currentPacket->deletePacket();
return RETURN_FAILED; return RETURN_FAILED;
} else { } else {
this->verifyChannel.sendSuccessReport(TC_VERIFY::ACCEPTANCE_SUCCESS, this->verifyChannel.sendSuccessReport(tc_verification::ACCEPTANCE_SUCCESS,
currentPacket); currentPacket);
return RETURN_OK; return RETURN_OK;
} }

View File

@ -1,5 +1,5 @@
#ifndef ACCEPTSTELECOMMANDSIF_H_ #ifndef FRAMEWORK_TMTCSERVICES_ACCEPTSTELECOMMANDSIF_H_
#define ACCEPTSTELECOMMANDSIF_H_ #define FRAMEWORK_TMTCSERVICES_ACCEPTSTELECOMMANDSIF_H_
#include "../ipc/MessageQueueSenderIF.h" #include "../ipc/MessageQueueSenderIF.h"
@ -26,9 +26,9 @@ public:
/** /**
* @brief Getter for the service id. * @brief Getter for the service id.
* @details Any receiving service (at least any PUS service) shall have a * @details Any receiving service (at least any PUS service) shall have a
* service id. If the receiver can handle Telecommands, but for * service ID. If the receiver can handle Telecommands, but for
* some reason has no service id, it shall return 0. * some reason has no service id, it shall return 0.
* @return The service id or 0. * @return The service ID or 0.
*/ */
virtual uint16_t getIdentifier() = 0; virtual uint16_t getIdentifier() = 0;
/** /**
@ -40,4 +40,4 @@ public:
}; };
#endif /* ACCEPTSTELECOMMANDSIF_H_ */ #endif /* FRAMEWORK_TMTCSERVICES_ACCEPTSTELECOMMANDSIF_H_ */

View File

@ -1,5 +1,5 @@
#ifndef ACCEPTSTELEMETRYIF_H_ #ifndef FSFW_TMTCSERVICES_ACCEPTSTELEMETRYIF_H_
#define ACCEPTSTELEMETRYIF_H_ #define FSFW_TMTCSERVICES_ACCEPTSTELEMETRYIF_H_
#include "../ipc/MessageQueueSenderIF.h" #include "../ipc/MessageQueueSenderIF.h"
/** /**
@ -20,7 +20,8 @@ public:
* receiving message queue. * receiving message queue.
* @return The telemetry reception message queue id. * @return The telemetry reception message queue id.
*/ */
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) = 0; virtual MessageQueueId_t getReportReceptionQueue(
uint8_t virtualChannel = 0) = 0;
}; };
#endif /* ACCEPTSTELEMETRYIF_H_ */ #endif /* FSFW_TMTCSERVICES_ACCEPTSTELEMETRYIF_H_ */

View File

@ -1,5 +1,5 @@
#ifndef ACCEPTSVERIFICATIONMESSAGEIF_H_ #ifndef FSFW_TMTCSERVICES_ACCEPTSVERIFICATIONMESSAGEIF_H_
#define ACCEPTSVERIFICATIONMESSAGEIF_H_ #define FSFW_TMTCSERVICES_ACCEPTSVERIFICATIONMESSAGEIF_H_
#include "../ipc/MessageQueueSenderIF.h" #include "../ipc/MessageQueueSenderIF.h"
@ -12,4 +12,4 @@ public:
}; };
#endif /* ACCEPTSVERIFICATIONMESSAGEIF_H_ */ #endif /* FSFW_TMTCSERVICES_ACCEPTSVERIFICATIONMESSAGEIF_H_ */

View File

@ -1,9 +1,9 @@
#include "../tcdistribution/PUSDistributorIF.h"
#include "AcceptsTelemetryIF.h" #include "AcceptsTelemetryIF.h"
#include "../objectmanager/ObjectManagerIF.h"
#include "CommandingServiceBase.h" #include "CommandingServiceBase.h"
#include "TmTcMessage.h" #include "TmTcMessage.h"
#include "../tcdistribution/PUSDistributorIF.h"
#include "../objectmanager/ObjectManagerIF.h"
#include "../ipc/QueueFactory.h" #include "../ipc/QueueFactory.h"
#include "../tmtcpacket/pus/TcPacketStored.h" #include "../tmtcpacket/pus/TcPacketStored.h"
#include "../tmtcpacket/pus/TmPacketStored.h" #include "../tmtcpacket/pus/TmPacketStored.h"
@ -149,13 +149,13 @@ void CommandingServiceBase::handleCommandMessage(CommandMessage* reply) {
default: default:
if (isStep) { if (isStep) {
verificationReporter.sendFailureReport( verificationReporter.sendFailureReport(
TC_VERIFY::PROGRESS_FAILURE, iter->second.tcInfo.ackFlags, tc_verification::PROGRESS_FAILURE, iter->second.tcInfo.ackFlags,
iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcSequenceControl, iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcSequenceControl,
result, ++iter->second.step, failureParameter1, result, ++iter->second.step, failureParameter1,
failureParameter2); failureParameter2);
} else { } else {
verificationReporter.sendFailureReport( verificationReporter.sendFailureReport(
TC_VERIFY::COMPLETION_FAILURE, iter->second.tcInfo.ackFlags, tc_verification::COMPLETION_FAILURE, iter->second.tcInfo.ackFlags,
iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcSequenceControl, iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcSequenceControl,
result, 0, failureParameter1, failureParameter2); result, 0, failureParameter1, failureParameter2);
} }
@ -184,13 +184,13 @@ void CommandingServiceBase::handleReplyHandlerResult(ReturnValue_t result,
if (sendResult == RETURN_OK) { if (sendResult == RETURN_OK) {
if (isStep and result != NO_STEP_MESSAGE) { if (isStep and result != NO_STEP_MESSAGE) {
verificationReporter.sendSuccessReport( verificationReporter.sendSuccessReport(
TC_VERIFY::PROGRESS_SUCCESS, tc_verification::PROGRESS_SUCCESS,
iter->second.tcInfo.ackFlags, iter->second.tcInfo.tcPacketId, iter->second.tcInfo.ackFlags, iter->second.tcInfo.tcPacketId,
iter->second.tcInfo.tcSequenceControl, ++iter->second.step); iter->second.tcInfo.tcSequenceControl, ++iter->second.step);
} }
else { else {
verificationReporter.sendSuccessReport( verificationReporter.sendSuccessReport(
TC_VERIFY::COMPLETION_SUCCESS, tc_verification::COMPLETION_SUCCESS,
iter->second.tcInfo.ackFlags, iter->second.tcInfo.tcPacketId, iter->second.tcInfo.ackFlags, iter->second.tcInfo.tcPacketId,
iter->second.tcInfo.tcSequenceControl, 0); iter->second.tcInfo.tcSequenceControl, 0);
checkAndExecuteFifo(iter); checkAndExecuteFifo(iter);
@ -200,14 +200,14 @@ void CommandingServiceBase::handleReplyHandlerResult(ReturnValue_t result,
if (isStep) { if (isStep) {
nextCommand->clearCommandMessage(); nextCommand->clearCommandMessage();
verificationReporter.sendFailureReport( verificationReporter.sendFailureReport(
TC_VERIFY::PROGRESS_FAILURE, iter->second.tcInfo.ackFlags, tc_verification::PROGRESS_FAILURE, iter->second.tcInfo.ackFlags,
iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcPacketId,
iter->second.tcInfo.tcSequenceControl, sendResult, iter->second.tcInfo.tcSequenceControl, sendResult,
++iter->second.step, failureParameter1, failureParameter2); ++iter->second.step, failureParameter1, failureParameter2);
} else { } else {
nextCommand->clearCommandMessage(); nextCommand->clearCommandMessage();
verificationReporter.sendFailureReport( verificationReporter.sendFailureReport(
TC_VERIFY::COMPLETION_FAILURE, tc_verification::COMPLETION_FAILURE,
iter->second.tcInfo.ackFlags, iter->second.tcInfo.tcPacketId, iter->second.tcInfo.ackFlags, iter->second.tcInfo.tcPacketId,
iter->second.tcInfo.tcSequenceControl, sendResult, 0, iter->second.tcInfo.tcSequenceControl, sendResult, 0,
failureParameter1, failureParameter2); failureParameter1, failureParameter2);
@ -232,14 +232,14 @@ void CommandingServiceBase::handleRequestQueue() {
if ((packet.getSubService() == 0) if ((packet.getSubService() == 0)
or (isValidSubservice(packet.getSubService()) != RETURN_OK)) { or (isValidSubservice(packet.getSubService()) != RETURN_OK)) {
rejectPacket(TC_VERIFY::START_FAILURE, &packet, INVALID_SUBSERVICE); rejectPacket(tc_verification::START_FAILURE, &packet, INVALID_SUBSERVICE);
continue; continue;
} }
result = getMessageQueueAndObject(packet.getSubService(), result = getMessageQueueAndObject(packet.getSubService(),
packet.getApplicationData(), packet.getApplicationDataSize(), packet.getApplicationData(), packet.getApplicationDataSize(),
&queue, &objectId); &queue, &objectId);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
rejectPacket(TC_VERIFY::START_FAILURE, &packet, result); rejectPacket(tc_verification::START_FAILURE, &packet, result);
continue; continue;
} }
@ -250,14 +250,14 @@ void CommandingServiceBase::handleRequestQueue() {
if (iter != commandMap.end()) { if (iter != commandMap.end()) {
result = iter->second.fifo.insert(address); result = iter->second.fifo.insert(address);
if (result != RETURN_OK) { if (result != RETURN_OK) {
rejectPacket(TC_VERIFY::START_FAILURE, &packet, OBJECT_BUSY); rejectPacket(tc_verification::START_FAILURE, &packet, OBJECT_BUSY);
} }
} else { } else {
CommandInfo newInfo; //Info will be set by startExecution if neccessary CommandInfo newInfo; //Info will be set by startExecution if neccessary
newInfo.objectId = objectId; newInfo.objectId = objectId;
result = commandMap.insert(queue, newInfo, &iter); result = commandMap.insert(queue, newInfo, &iter);
if (result != RETURN_OK) { if (result != RETURN_OK) {
rejectPacket(TC_VERIFY::START_FAILURE, &packet, BUSY); rejectPacket(tc_verification::START_FAILURE, &packet, BUSY);
} else { } else {
startExecution(&packet, iter); startExecution(&packet, iter);
} }
@ -338,10 +338,10 @@ void CommandingServiceBase::startExecution(TcPacketStored *storedPacket,
iter->second.tcInfo.tcPacketId = storedPacket->getPacketId(); iter->second.tcInfo.tcPacketId = storedPacket->getPacketId();
iter->second.tcInfo.tcSequenceControl = iter->second.tcInfo.tcSequenceControl =
storedPacket->getPacketSequenceControl(); storedPacket->getPacketSequenceControl();
acceptPacket(TC_VERIFY::START_SUCCESS, storedPacket); acceptPacket(tc_verification::START_SUCCESS, storedPacket);
} else { } else {
command.clearCommandMessage(); command.clearCommandMessage();
rejectPacket(TC_VERIFY::START_FAILURE, storedPacket, sendResult); rejectPacket(tc_verification::START_FAILURE, storedPacket, sendResult);
checkAndExecuteFifo(iter); checkAndExecuteFifo(iter);
} }
break; break;
@ -352,18 +352,18 @@ void CommandingServiceBase::startExecution(TcPacketStored *storedPacket,
&command); &command);
} }
if (sendResult == RETURN_OK) { if (sendResult == RETURN_OK) {
verificationReporter.sendSuccessReport(TC_VERIFY::START_SUCCESS, verificationReporter.sendSuccessReport(tc_verification::START_SUCCESS,
storedPacket); storedPacket);
acceptPacket(TC_VERIFY::COMPLETION_SUCCESS, storedPacket); acceptPacket(tc_verification::COMPLETION_SUCCESS, storedPacket);
checkAndExecuteFifo(iter); checkAndExecuteFifo(iter);
} else { } else {
command.clearCommandMessage(); command.clearCommandMessage();
rejectPacket(TC_VERIFY::START_FAILURE, storedPacket, sendResult); rejectPacket(tc_verification::START_FAILURE, storedPacket, sendResult);
checkAndExecuteFifo(iter); checkAndExecuteFifo(iter);
} }
break; break;
default: default:
rejectPacket(TC_VERIFY::START_FAILURE, storedPacket, result); rejectPacket(tc_verification::START_FAILURE, storedPacket, result);
checkAndExecuteFifo(iter); checkAndExecuteFifo(iter);
break; break;
} }
@ -414,7 +414,7 @@ void CommandingServiceBase::checkTimeout() {
for (iter = commandMap.begin(); iter != commandMap.end(); ++iter) { for (iter = commandMap.begin(); iter != commandMap.end(); ++iter) {
if ((iter->second.uptimeOfStart + (timeoutSeconds * 1000)) < uptime) { if ((iter->second.uptimeOfStart + (timeoutSeconds * 1000)) < uptime) {
verificationReporter.sendFailureReport( verificationReporter.sendFailureReport(
TC_VERIFY::COMPLETION_FAILURE, iter->second.tcInfo.ackFlags, tc_verification::COMPLETION_FAILURE, iter->second.tcInfo.ackFlags,
iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcSequenceControl, iter->second.tcInfo.tcPacketId, iter->second.tcInfo.tcSequenceControl,
TIMEOUT); TIMEOUT);
checkAndExecuteFifo(iter); checkAndExecuteFifo(iter);

View File

@ -1,18 +1,20 @@
#ifndef FSFW_TMTCSERVICES_COMMANDINGSERVICEBASE_H_ #ifndef FSFW_TMTCSERVICES_COMMANDINGSERVICEBASE_H_
#define FSFW_TMTCSERVICES_COMMANDINGSERVICEBASE_H_ #define FSFW_TMTCSERVICES_COMMANDINGSERVICEBASE_H_
#include "AcceptsTelecommandsIF.h"
#include "VerificationReporter.h"
#include "../objectmanager/SystemObject.h" #include "../objectmanager/SystemObject.h"
#include "../storagemanager/StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"
#include "../tasks/ExecutableObjectIF.h" #include "../tasks/ExecutableObjectIF.h"
#include "../ipc/MessageQueueIF.h" #include "../ipc/MessageQueueIF.h"
#include "AcceptsTelecommandsIF.h"
#include "VerificationReporter.h"
#include "../ipc/CommandMessage.h" #include "../ipc/CommandMessage.h"
#include "../container/FixedMap.h" #include "../container/FixedMap.h"
#include "../container/FIFO.h" #include "../container/FIFO.h"
#include "../serialize/SerializeIF.h" #include "../serialize/SerializeIF.h"
#include <FSFWConfig.h>
class TcPacketStored; class TcPacketStored;
namespace Factory{ namespace Factory{
@ -40,7 +42,8 @@ class CommandingServiceBase: public SystemObject,
friend void (Factory::setStaticFrameworkObjectIds)(); friend void (Factory::setStaticFrameworkObjectIds)();
public: public:
// We could make this configurable via preprocessor and the FSFWConfig file. // We could make this configurable via preprocessor and the FSFWConfig file.
static constexpr uint8_t COMMAND_INFO_FIFO_DEPTH = 3; static constexpr uint8_t COMMAND_INFO_FIFO_DEPTH =
fsfwconfig::FSFW_CSB_FIFO_DEPTH;
static const uint8_t INTERFACE_ID = CLASS_ID::COMMAND_SERVICE_BASE; static const uint8_t INTERFACE_ID = CLASS_ID::COMMAND_SERVICE_BASE;

View File

@ -1,9 +1,10 @@
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../tcdistribution/PUSDistributorIF.h"
#include "AcceptsTelemetryIF.h"
#include "PusServiceBase.h" #include "PusServiceBase.h"
#include "AcceptsTelemetryIF.h"
#include "PusVerificationReport.h" #include "PusVerificationReport.h"
#include "TmTcMessage.h" #include "TmTcMessage.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../tcdistribution/PUSDistributorIF.h"
#include "../ipc/QueueFactory.h" #include "../ipc/QueueFactory.h"
object_id_t PusServiceBase::packetSource = 0; object_id_t PusServiceBase::packetSource = 0;
@ -41,9 +42,14 @@ void PusServiceBase::handleRequestQueue() {
ReturnValue_t result = RETURN_FAILED; ReturnValue_t result = RETURN_FAILED;
for (uint8_t count = 0; count < PUS_SERVICE_MAX_RECEPTION; count++) { for (uint8_t count = 0; count < PUS_SERVICE_MAX_RECEPTION; count++) {
ReturnValue_t status = this->requestQueue->receiveMessage(&message); ReturnValue_t status = this->requestQueue->receiveMessage(&message);
// debug << "PusServiceBase::performOperation: Receiving from MQ ID: " // if(status != MessageQueueIF::EMPTY) {
// << std::hex << this->requestQueue.getId() // sif::debug << "PusServiceBase::performOperation: Receiving from "
// << std::dec << " returned: " << status << std::endl; // << "MQ ID: " << std::hex << "0x" << std::setw(8)
// << std::setfill('0') << this->requestQueue->getId()
// << std::dec << " returned: " << status << std::setfill(' ')
// << std::endl;
// }
if (status == RETURN_OK) { if (status == RETURN_OK) {
this->currentPacket.setStoreAddress(message.getStorageId()); this->currentPacket.setStoreAddress(message.getStorageId());
//info << "Service " << (uint16_t) this->serviceId << //info << "Service " << (uint16_t) this->serviceId <<
@ -55,11 +61,11 @@ void PusServiceBase::handleRequestQueue() {
// ": handleRequest returned: " << (int)return_code << std::endl; // ": handleRequest returned: " << (int)return_code << std::endl;
if (result == RETURN_OK) { if (result == RETURN_OK) {
this->verifyReporter.sendSuccessReport( this->verifyReporter.sendSuccessReport(
TC_VERIFY::COMPLETION_SUCCESS, &this->currentPacket); tc_verification::COMPLETION_SUCCESS, &this->currentPacket);
} }
else { else {
this->verifyReporter.sendFailureReport( this->verifyReporter.sendFailureReport(
TC_VERIFY::COMPLETION_FAILURE, &this->currentPacket, tc_verification::COMPLETION_FAILURE, &this->currentPacket,
result, 0, errorParameter1, errorParameter2); result, 0, errorParameter1, errorParameter2);
} }
this->currentPacket.deletePacket(); this->currentPacket.deletePacket();
@ -74,9 +80,8 @@ void PusServiceBase::handleRequestQueue() {
} }
else { else {
sif::error << "PusServiceBase::performOperation: Service " sif::error << "PusServiceBase::performOperation: Service "
<< (uint16_t) this->serviceId << this->serviceId << ": Error receiving packet. Code: "
<< ": Error receiving packet. Code: " << std::hex << status << std::hex << status << std::dec << std::endl;
<< std::dec << std::endl;
} }
} }
} }
@ -98,19 +103,17 @@ ReturnValue_t PusServiceBase::initialize() {
packetDestination); packetDestination);
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>( PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
packetSource); packetSource);
if ((destService != nullptr) && (distributor != nullptr)) { if (destService == nullptr or distributor == nullptr) {
this->requestQueue->setDefaultDestination(
destService->getReportReceptionQueue());
distributor->registerService(this);
return RETURN_OK;
}
else {
sif::error << "PusServiceBase::PusServiceBase: Service " sif::error << "PusServiceBase::PusServiceBase: Service "
<< (uint32_t) this->serviceId << ": Configuration error." << this->serviceId << ": Configuration error. Make sure "
<< " Make sure packetSource and packetDestination are defined " << "packetSource and packetDestination are defined correctly"
"correctly" << std::endl; << std::endl;
return RETURN_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
this->requestQueue->setDefaultDestination(
destService->getReportReceptionQueue());
distributor->registerService(this);
return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t PusServiceBase::initializeAfterTaskCreation() { ReturnValue_t PusServiceBase::initializeAfterTaskCreation() {

View File

@ -1,14 +1,15 @@
#ifndef FRAMEWORK_TMTCSERVICES_PUSSERVICEBASE_H_ #ifndef FSFW_TMTCSERVICES_PUSSERVICEBASE_H_
#define FRAMEWORK_TMTCSERVICES_PUSSERVICEBASE_H_ #define FSFW_TMTCSERVICES_PUSSERVICEBASE_H_
#include "AcceptsTelecommandsIF.h"
#include "VerificationCodes.h"
#include "VerificationReporter.h"
#include "../objectmanager/ObjectManagerIF.h" #include "../objectmanager/ObjectManagerIF.h"
#include "../objectmanager/SystemObject.h" #include "../objectmanager/SystemObject.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../tasks/ExecutableObjectIF.h" #include "../tasks/ExecutableObjectIF.h"
#include "../tmtcpacket/pus/TcPacketStored.h" #include "../tmtcpacket/pus/TcPacketStored.h"
#include "AcceptsTelecommandsIF.h"
#include "VerificationCodes.h"
#include "VerificationReporter.h"
#include "../ipc/MessageQueueIF.h" #include "../ipc/MessageQueueIF.h"
namespace Factory{ namespace Factory{
@ -156,4 +157,4 @@ private:
void handleRequestQueue(); void handleRequestQueue();
}; };
#endif /* PUSSERVICEBASE_H_ */ #endif /* FSFW_TMTCSERVICES_PUSSERVICEBASE_H_ */

View File

@ -1,5 +1,5 @@
#include "../serialize/SerializeAdapter.h" #include "../serialize/SerializeAdapter.h"
#include "PusVerificationReport.h" #include "../tmtcservices/PusVerificationReport.h"
PusVerificationMessage::PusVerificationMessage() { PusVerificationMessage::PusVerificationMessage() {
} }

View File

@ -7,8 +7,6 @@
#include "../tmtcpacket/pus/TcPacketBase.h" #include "../tmtcpacket/pus/TcPacketBase.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include <cstdint>
class PusVerificationMessage: public MessageQueueMessage { class PusVerificationMessage: public MessageQueueMessage {
private: private:
struct verifciationMessageContent { struct verifciationMessageContent {

View File

@ -1,32 +0,0 @@
/**
* @file ServiceTypes.h
* @brief This file defines the ServiceTypes class.
* @date 11.04.2013
* @author baetz
*/
#ifndef SERVICETYPES_H_
#define SERVICETYPES_H_
namespace SERVICE {
enum ServiceTypes {
TELECOMMAND_VERIFICATION = 1,
DEVICE_COMMAND_DISTRIBUTION = 2,
HOUSEKEEPING_AND_DIAGNOSTIC_DATA_REPORTING = 3,
PARAMETER_STATISTICS_REPORTING = 4,
EVENT_REPORTING = 5,
MEMORY_MANAGEMENT = 6,
FUNCTION_MANAGEMENT = 8,
TIME_MANAGEMENT = 9,
ON_BOARD_OPERATIONS_SCHEDULING = 11,
ON_BOARD_MONITORING = 12,
LARGE_DATA_TRANSFER = 13,
PACKET_FORWARDING_CONTROL = 14,
ON_BOARD_STORAGE_AND_RETRIEVAL = 15,
TEST = 17,
ON_BOARD_OPERATIONS_PROCEDURE = 18,
EVENT_ACTION = 19
};
}
#endif /* SERVICETYPES_H_ */

View File

@ -1,12 +1,6 @@
/** #ifndef FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_
* @file SourceSequenceCounter.h #define FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_
* @brief This file defines the SourceSequenceCounter class.
* @date 04.02.2013
* @author baetz
*/
#ifndef SOURCESEQUENCECOUNTER_H_
#define SOURCESEQUENCECOUNTER_H_
#include "../tmtcpacket/SpacePacketBase.h" #include "../tmtcpacket/SpacePacketBase.h"
class SourceSequenceCounter { class SourceSequenceCounter {
@ -27,4 +21,4 @@ public:
}; };
#endif /* SOURCESEQUENCECOUNTER_H_ */ #endif /* FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_ */

View File

@ -1,7 +1,6 @@
#include "../tmtcservices/TmTcBridge.h" #include "TmTcBridge.h"
#include "../ipc/QueueFactory.h" #include "../ipc/QueueFactory.h"
#include "../tmtcservices/AcceptsTelecommandsIF.h"
#include "../serviceinterface/ServiceInterfaceStream.h" #include "../serviceinterface/ServiceInterfaceStream.h"
#include "../globalfunctions/arrayprinter.h" #include "../globalfunctions/arrayprinter.h"
@ -95,8 +94,9 @@ ReturnValue_t TmTcBridge::handleTm() {
ReturnValue_t status = HasReturnvaluesIF::RETURN_OK; ReturnValue_t status = HasReturnvaluesIF::RETURN_OK;
ReturnValue_t result = handleTmQueue(); ReturnValue_t result = handleTmQueue();
if(result != RETURN_OK) { if(result != RETURN_OK) {
sif::error << "TmTcBridge::handleTm: Error handling TM queue!" sif::error << "TmTcBridge::handleTm: Error handling TM queue with "
<< std::endl; << "error code 0x" << std::hex << result << std::dec
<< "!" << std::endl;
status = result; status = result;
} }

View File

@ -1,13 +1,13 @@
#ifndef FRAMEWORK_TMTCSERVICES_TMTCBRIDGE_H_ #ifndef FSFW_TMTCSERVICES_TMTCBRIDGE_H_
#define FRAMEWORK_TMTCSERVICES_TMTCBRIDGE_H_ #define FSFW_TMTCSERVICES_TMTCBRIDGE_H_
#include "AcceptsTelemetryIF.h"
#include "AcceptsTelecommandsIF.h"
#include "../objectmanager/SystemObject.h" #include "../objectmanager/SystemObject.h"
#include "../tmtcservices/AcceptsTelemetryIF.h"
#include "../tasks/ExecutableObjectIF.h" #include "../tasks/ExecutableObjectIF.h"
#include "../ipc/MessageQueueIF.h" #include "../ipc/MessageQueueIF.h"
#include "../storagemanager/StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"
#include "../tmtcservices/AcceptsTelecommandsIF.h"
#include "../container/DynamicFIFO.h" #include "../container/DynamicFIFO.h"
#include "../tmtcservices/TmTcMessage.h" #include "../tmtcservices/TmTcMessage.h"
@ -159,4 +159,4 @@ protected:
}; };
#endif /* FRAMEWORK_TMTCSERVICES_TMTCBRIDGE_H_ */ #endif /* FSFW_TMTCSERVICES_TMTCBRIDGE_H_ */

View File

@ -1,5 +1,6 @@
#include "TmTcMessage.h" #include "TmTcMessage.h"
#include <string.h>
#include <cstring>
TmTcMessage::TmTcMessage() { TmTcMessage::TmTcMessage() {
@ -15,15 +16,15 @@ store_address_t TmTcMessage::getStorageId() {
return temp_id; return temp_id;
} }
TmTcMessage::TmTcMessage(store_address_t store_id) { TmTcMessage::TmTcMessage(store_address_t storeId) {
this->messageSize += sizeof(store_address_t); this->messageSize += sizeof(store_address_t);
this->setStorageId(store_id); this->setStorageId(storeId);
} }
size_t TmTcMessage::getMinimumMessageSize() { size_t TmTcMessage::getMinimumMessageSize() {
return this->HEADER_SIZE + sizeof(store_address_t); return this->HEADER_SIZE + sizeof(store_address_t);
} }
void TmTcMessage::setStorageId(store_address_t store_id) { void TmTcMessage::setStorageId(store_address_t storeId) {
memcpy(this->getData(), &store_id, sizeof(store_address_t) ); memcpy(this->getData(), &storeId, sizeof(store_address_t) );
} }

View File

@ -1,5 +1,5 @@
#ifndef TMTCMESSAGE_H_ #ifndef FSFW_TMTCSERVICES_TMTCMESSAGE_H_
#define TMTCMESSAGE_H_ #define FSFW_TMTCSERVICES_TMTCMESSAGE_H_
#include "../ipc/MessageQueueMessage.h" #include "../ipc/MessageQueueMessage.h"
#include "../storagemanager/StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"
@ -10,13 +10,13 @@
* a packet stored in one of the IPC stores (typically a special TM and * a packet stored in one of the IPC stores (typically a special TM and
* a special TC store). This makes passing commands very simple and * a special TC store). This makes passing commands very simple and
* efficient. * efficient.
* \ingroup message_queue * @ingroup message_queue
*/ */
class TmTcMessage : public MessageQueueMessage { class TmTcMessage : public MessageQueueMessage {
protected: protected:
/** /**
* @brief This call always returns the same fixed size of the message. * @brief This call always returns the same fixed size of the message.
* @return Returns HEADER_SIZE + \c sizeof(store_address_t). * @return Returns HEADER_SIZE + @c sizeof(store_address_t).
*/ */
size_t getMinimumMessageSize(); size_t getMinimumMessageSize();
public: public:
@ -29,7 +29,7 @@ public:
* into the message. * into the message.
* @param packet_id The packet id to put into the message. * @param packet_id The packet id to put into the message.
*/ */
TmTcMessage( store_address_t packet_id ); TmTcMessage( store_address_t packetId );
/** /**
* @brief The class's destructor is empty. * @brief The class's destructor is empty.
*/ */
@ -42,9 +42,9 @@ public:
/** /**
* @brief In some cases it might be useful to have a setter for packet id * @brief In some cases it might be useful to have a setter for packet id
* as well. * as well.
* @param packet_id The packet id to put into the message. * @param packetId The packet id to put into the message.
*/ */
void setStorageId( store_address_t packet_id ); void setStorageId( store_address_t packetId );
}; };
#endif /* TMTCMESSAGE_H_ */ #endif /* FSFW_TMTCSERVICES_TMTCMESSAGE_H_ */

View File

@ -1,7 +1,7 @@
#ifndef VERIFICATIONCODES_H_ #ifndef VERIFICATIONCODES_H_
#define VERIFICATIONCODES_H_ #define VERIFICATIONCODES_H_
namespace TC_VERIFY { namespace tc_verification {
enum verification_flags { enum verification_flags {
NONE = 0b0000, NONE = 0b0000,