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,18 +1,20 @@
#include <framework/devicehandlers/HealthDevice.h>
#include <framework/ipc/QueueFactory.h>
HealthDevice::HealthDevice(object_id_t setObjectId,
MessageQueueId_t parentQueue) :
SystemObject(setObjectId), lastHealth(HEALTHY), parentQueue(
parentQueue), commandQueue(3,
CommandMessage::COMMAND_MESSAGE_SIZE), healthHelper(this, setObjectId) {
parentQueue), commandQueue(), healthHelper(this, setObjectId) {
commandQueue = QueueFactory::instance()->createMessageQueue(3, CommandMessage::COMMAND_MESSAGE_SIZE);
}
HealthDevice::~HealthDevice() {
QueueFactory::instance()->deleteMessageQueue(commandQueue);
}
ReturnValue_t HealthDevice::performOperation() {
ReturnValue_t HealthDevice::performOperation(uint8_t opCode) {
CommandMessage message;
ReturnValue_t result = commandQueue.receiveMessage(&message);
ReturnValue_t result = commandQueue->receiveMessage(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
healthHelper.handleHealthCommand(&message);
}
@ -32,7 +34,7 @@ ReturnValue_t HealthDevice::initialize() {
}
MessageQueueId_t HealthDevice::getCommandQueue() const {
return commandQueue.getId();
return commandQueue->getId();
}
void HealthDevice::setParentQueue(MessageQueueId_t parentQueue) {