subsystem update
This commit is contained in:
parent
3c316218f7
commit
7eeba71619
@ -1,10 +1,12 @@
|
||||
#include "Subsystem.h"
|
||||
|
||||
#include "../health/HealthMessage.h"
|
||||
#include "../objectmanager/ObjectManagerIF.h"
|
||||
#include "../serialize/SerialArrayListAdapter.h"
|
||||
#include "../serialize/SerialFixedArrayListAdapter.h"
|
||||
#include "../serialize/SerializeElement.h"
|
||||
#include "../serialize/SerialLinkedListAdapter.h"
|
||||
#include "Subsystem.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
Subsystem::Subsystem(object_id_t setObjectId, object_id_t parent,
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "SubsystemBase.h"
|
||||
|
||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "../ipc/QueueFactory.h"
|
||||
|
||||
SubsystemBase::SubsystemBase(object_id_t setObjectId, object_id_t parent,
|
||||
Mode_t initialMode, uint16_t commandQueueDepth) :
|
||||
SystemObject(setObjectId), mode(initialMode), submode(SUBMODE_NONE), childrenChangedMode(
|
||||
false), commandsOutstanding(0), commandQueue(NULL), healthHelper(this,
|
||||
setObjectId), modeHelper(this), parentId(parent) {
|
||||
SystemObject(setObjectId), mode(initialMode), submode(SUBMODE_NONE),
|
||||
childrenChangedMode(false), commandsOutstanding(0), commandQueue(NULL),
|
||||
healthHelper(this, setObjectId), modeHelper(this), parentId(parent) {
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(commandQueueDepth,
|
||||
CommandMessage::MAX_MESSAGE_SIZE);
|
||||
}
|
||||
|
@ -1,22 +1,19 @@
|
||||
#ifndef MODEDEFINITIONS_H_
|
||||
#define MODEDEFINITIONS_H_
|
||||
#ifndef FSFW_SUBSYSTEM_MODES_MODEDEFINITIONS_H_
|
||||
#define FSFW_SUBSYSTEM_MODES_MODEDEFINITIONS_H_
|
||||
|
||||
#include "../../modes/HasModesIF.h"
|
||||
#include "../../objectmanager/SystemObjectIF.h"
|
||||
#include "../../serialize/SerializeIF.h"
|
||||
#include "../../serialize/SerialLinkedListAdapter.h"
|
||||
|
||||
class ModeListEntry: public SerializeIF, public LinkedElement<ModeListEntry> {
|
||||
public:
|
||||
ModeListEntry() :
|
||||
LinkedElement<ModeListEntry>(this), value1(0), value2(0), value3(0), value4(
|
||||
0) {
|
||||
ModeListEntry(): LinkedElement<ModeListEntry>(this) {}
|
||||
|
||||
}
|
||||
|
||||
uint32_t value1;
|
||||
uint32_t value2;
|
||||
uint8_t value3;
|
||||
uint8_t value4;
|
||||
uint32_t value1 = 0;
|
||||
uint32_t value2 = 0;
|
||||
uint8_t value3 = 0;
|
||||
uint8_t value4 = 0;
|
||||
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
size_t maxSize, Endianness streamEndianness) const {
|
||||
@ -149,4 +146,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif //MODEDEFINITIONS_H_
|
||||
#endif /* FSFW_SUBSYSTEM_MODES_MODEDEFINITIONS_H_ */
|
||||
|
@ -1,8 +1,7 @@
|
||||
#include "../../objectmanager/ObjectManagerIF.h"
|
||||
#include "../../objectmanager/ObjectManagerIF.h"
|
||||
#include "ModeSequenceMessage.h"
|
||||
|
||||
#include "../../objectmanager/ObjectManagerIF.h"
|
||||
#include "../../storagemanager/StorageManagerIF.h"
|
||||
#include "ModeSequenceMessage.h"
|
||||
|
||||
void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||
Command_t command, Mode_t sequence, store_address_t storeAddress) {
|
||||
@ -11,25 +10,12 @@ void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||
message->setParameter2(sequence);
|
||||
}
|
||||
|
||||
//void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||
// Command_t command, ModeTableId_t table, store_address_t storeAddress) {
|
||||
// message->setCommand(command);
|
||||
// message->setParameter(storeAddress.raw);
|
||||
// message->setParameter2(table);
|
||||
//}
|
||||
|
||||
void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||
Command_t command, Mode_t sequence) {
|
||||
message->setCommand(command);
|
||||
message->setParameter2(sequence);
|
||||
}
|
||||
|
||||
//void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||
// Command_t command, ModeTableId_t table) {
|
||||
// message->setCommand(command);
|
||||
// message->setParameter2(table);
|
||||
//}
|
||||
|
||||
void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||
Command_t command, store_address_t storeAddress) {
|
||||
message->setCommand(command);
|
||||
@ -64,8 +50,9 @@ void ModeSequenceMessage::clear(CommandMessage *message) {
|
||||
case TABLE_LIST:
|
||||
case TABLE:
|
||||
case SEQUENCE: {
|
||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
||||
if (ipcStore != NULL){
|
||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
||||
objects::IPC_STORE);
|
||||
if (ipcStore != nullptr){
|
||||
ipcStore->deleteData(ModeSequenceMessage::getStoreAddress(message));
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
#ifndef MODESEQUENCEMESSAGE_H_
|
||||
#define MODESEQUENCEMESSAGE_H_
|
||||
#ifndef FSFW_SUBSYSTEM_MODES_MODESEQUENCEMESSAGE_H_
|
||||
#define FSFW_SUBSYSTEM_MODES_MODESEQUENCEMESSAGE_H_
|
||||
|
||||
#include "ModeDefinitions.h"
|
||||
|
||||
#include "../../ipc/CommandMessage.h"
|
||||
#include "../../storagemanager/StorageManagerIF.h"
|
||||
#include "ModeDefinitions.h"
|
||||
|
||||
|
||||
class ModeSequenceMessage {
|
||||
public:
|
||||
@ -45,4 +47,4 @@ private:
|
||||
ModeSequenceMessage();
|
||||
};
|
||||
|
||||
#endif /* MODESEQUENCEMESSAGE_H_ */
|
||||
#endif /* FSFW_SUBSYSTEM_MODES_MODESEQUENCEMESSAGE_H_ */
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "ModeStore.h"
|
||||
|
||||
#ifdef USE_MODESTORE
|
||||
// todo: I think some parts are deprecated. If this is used, the define
|
||||
// USE_MODESTORE could be part of the new FSFWConfig.h file.
|
||||
#if FSFW_USE_MODESTORE == 1
|
||||
|
||||
ModeStore::ModeStore(object_id_t objectId, uint32_t slots) :
|
||||
SystemObject(objectId), store(slots), emptySlot(store.front()) {
|
||||
|
@ -1,12 +1,14 @@
|
||||
#ifndef MODESTORE_H_
|
||||
#define MODESTORE_H_
|
||||
|
||||
#ifdef USE_MODESTORE
|
||||
#include <FSFWConfig.h>
|
||||
|
||||
#if FSFW_USE_MODESTORE == 1
|
||||
|
||||
#include "../../container/ArrayList.h"
|
||||
#include "../../container/SinglyLinkedList.h"
|
||||
#include "../../objectmanager/SystemObject.h"
|
||||
#include "ModeStoreIF.h"
|
||||
#include "../../subsystem/modes/ModeStoreIF.h"
|
||||
|
||||
class ModeStore: public ModeStoreIF, public SystemObject {
|
||||
public:
|
||||
|
@ -1,12 +1,14 @@
|
||||
#ifndef MODESTOREIF_H_
|
||||
#define MODESTOREIF_H_
|
||||
|
||||
#ifdef USE_MODESTORE
|
||||
#include <FSFWConfig.h>
|
||||
|
||||
#if FSFW_USE_MODESTORE == 1
|
||||
|
||||
#include "../../container/ArrayList.h"
|
||||
#include "../../container/SinglyLinkedList.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
#include "ModeDefinitions.h"
|
||||
#include "../../subsystem/modes/ModeDefinitions.h"
|
||||
|
||||
class ModeStoreIF {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user