fixed some shadowing issues
This commit is contained in:
parent
42dd665e26
commit
5ca26a72ea
@ -100,7 +100,6 @@ void ObjectManager::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectManager::printList() {
|
void ObjectManager::printList() {
|
||||||
std::map<object_id_t, SystemObjectIF*>::iterator it;
|
|
||||||
sif::debug << "ObjectManager: Object List contains:" << std::endl;
|
sif::debug << "ObjectManager: Object List contains:" << std::endl;
|
||||||
for (auto const& it : objectList) {
|
for (auto const& it : objectList) {
|
||||||
sif::debug << std::hex << it.first << " | " << it.second << std::endl;
|
sif::debug << std::hex << it.first << " | " << it.second << std::endl;
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
|
#include "Subsystem.h"
|
||||||
#include "../health/HealthMessage.h"
|
#include "../health/HealthMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManagerIF.h"
|
||||||
#include "../serialize/SerialArrayListAdapter.h"
|
#include "../serialize/SerialArrayListAdapter.h"
|
||||||
#include "../serialize/SerialFixedArrayListAdapter.h"
|
#include "../serialize/SerialFixedArrayListAdapter.h"
|
||||||
#include "../serialize/SerializeElement.h"
|
#include "../serialize/SerializeElement.h"
|
||||||
#include "../serialize/SerialLinkedListAdapter.h"
|
#include "../serialize/SerialLinkedListAdapter.h"
|
||||||
#include "../subsystem/Subsystem.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
Subsystem::Subsystem(object_id_t setObjectId, object_id_t parent,
|
Subsystem::Subsystem(object_id_t setObjectId, object_id_t parent,
|
||||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables) :
|
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables) :
|
||||||
SubsystemBase(setObjectId, parent, 0), isInTransition(false), childrenChangedHealth(
|
SubsystemBase(setObjectId, parent, 0), isInTransition(false),
|
||||||
false), uptimeStartTable(0), currentTargetTable(), targetMode(
|
childrenChangedHealth(false), currentTargetTable(),
|
||||||
0), targetSubmode(SUBMODE_NONE), initialMode(0), currentSequenceIterator(), modeTables(
|
targetMode(0), targetSubmode(SUBMODE_NONE), initialMode(0),
|
||||||
maxNumberOfTables), modeSequences(maxNumberOfSequences), IPCStore(
|
currentSequenceIterator(), modeTables(maxNumberOfTables),
|
||||||
NULL)
|
modeSequences(maxNumberOfSequences) {}
|
||||||
#ifdef USE_MODESTORE
|
|
||||||
,modeStore(NULL)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Subsystem::~Subsystem() {
|
Subsystem::~Subsystem() {
|
||||||
//Auto-generated destructor stub
|
//Auto-generated destructor stub
|
||||||
@ -151,7 +146,6 @@ HybridIterator<ModeListEntry> Subsystem::getTable(Mode_t id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
|
ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
|
||||||
ReturnValue_t result;
|
|
||||||
switch (message->getCommand()) {
|
switch (message->getCommand()) {
|
||||||
case HealthMessage::HEALTH_INFO: {
|
case HealthMessage::HEALTH_INFO: {
|
||||||
HealthState health = HealthMessage::getHealth(message);
|
HealthState health = HealthMessage::getHealth(message);
|
||||||
@ -166,7 +160,7 @@ ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
|
|||||||
FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> sequence;
|
FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> sequence;
|
||||||
const uint8_t *pointer;
|
const uint8_t *pointer;
|
||||||
size_t sizeRead;
|
size_t sizeRead;
|
||||||
result = IPCStore->getData(
|
ReturnValue_t result = IPCStore->getData(
|
||||||
ModeSequenceMessage::getStoreAddress(message), &pointer,
|
ModeSequenceMessage::getStoreAddress(message), &pointer,
|
||||||
&sizeRead);
|
&sizeRead);
|
||||||
if (result == RETURN_OK) {
|
if (result == RETURN_OK) {
|
||||||
@ -193,7 +187,7 @@ ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
|
|||||||
FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> table;
|
FixedArrayList<ModeListEntry, MAX_LENGTH_OF_TABLE_OR_SEQUENCE> table;
|
||||||
const uint8_t *pointer;
|
const uint8_t *pointer;
|
||||||
size_t sizeRead;
|
size_t sizeRead;
|
||||||
result = IPCStore->getData(
|
ReturnValue_t result = IPCStore->getData(
|
||||||
ModeSequenceMessage::getStoreAddress(message), &pointer,
|
ModeSequenceMessage::getStoreAddress(message), &pointer,
|
||||||
&sizeRead);
|
&sizeRead);
|
||||||
if (result == RETURN_OK) {
|
if (result == RETURN_OK) {
|
||||||
@ -210,21 +204,23 @@ ReturnValue_t Subsystem::handleCommandMessage(CommandMessage *message) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ModeSequenceMessage::DELETE_SEQUENCE:
|
case ModeSequenceMessage::DELETE_SEQUENCE:{
|
||||||
if (isInTransition) {
|
if (isInTransition) {
|
||||||
replyToCommand(IN_TRANSITION, 0);
|
replyToCommand(IN_TRANSITION, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = deleteSequence(ModeSequenceMessage::getSequenceId(message));
|
ReturnValue_t result = deleteSequence(ModeSequenceMessage::getSequenceId(message));
|
||||||
replyToCommand(result, 0);
|
replyToCommand(result, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ModeSequenceMessage::DELETE_TABLE:
|
case ModeSequenceMessage::DELETE_TABLE:{
|
||||||
if (isInTransition) {
|
if (isInTransition) {
|
||||||
replyToCommand(IN_TRANSITION, 0);
|
replyToCommand(IN_TRANSITION, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = deleteTable(ModeSequenceMessage::getTableId(message));
|
ReturnValue_t result = deleteTable(ModeSequenceMessage::getTableId(message));
|
||||||
replyToCommand(result, 0);
|
replyToCommand(result, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ModeSequenceMessage::LIST_SEQUENCES: {
|
case ModeSequenceMessage::LIST_SEQUENCES: {
|
||||||
SerialFixedArrayListAdapter<Mode_t, MAX_NUMBER_OF_TABLES_OR_SEQUENCES> sequences;
|
SerialFixedArrayListAdapter<Mode_t, MAX_NUMBER_OF_TABLES_OR_SEQUENCES> sequences;
|
||||||
|
@ -92,7 +92,7 @@ protected:
|
|||||||
|
|
||||||
bool childrenChangedHealth;
|
bool childrenChangedHealth;
|
||||||
|
|
||||||
uint32_t uptimeStartTable;
|
uint32_t uptimeStartTable = 0;
|
||||||
|
|
||||||
HybridIterator<ModeListEntry> currentTargetTable;
|
HybridIterator<ModeListEntry> currentTargetTable;
|
||||||
|
|
||||||
@ -108,10 +108,10 @@ protected:
|
|||||||
|
|
||||||
FixedMap<Mode_t, SequenceInfo> modeSequences;
|
FixedMap<Mode_t, SequenceInfo> modeSequences;
|
||||||
|
|
||||||
StorageManagerIF *IPCStore;
|
StorageManagerIF *IPCStore = nullptr;
|
||||||
|
|
||||||
#ifdef USE_MODESTORE
|
#ifdef USE_MODESTORE
|
||||||
ModeStoreIF *modeStore;
|
ModeStoreIF *modeStore = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool existsModeSequence(Mode_t id);
|
bool existsModeSequence(Mode_t id);
|
||||||
|
@ -119,7 +119,7 @@ ReturnValue_t CCSDSTime::convertFromCCS(Clock::TimeOfDay_t* to, const uint8_t* f
|
|||||||
|
|
||||||
if (temp->pField & (1 << 3)) { //day of year variation
|
if (temp->pField & (1 << 3)) { //day of year variation
|
||||||
uint16_t tempDay = (temp->month << 8) + temp->day;
|
uint16_t tempDay = (temp->month << 8) + temp->day;
|
||||||
ReturnValue_t result = convertDaysOfYear(tempDay, to->year,
|
result = convertDaysOfYear(tempDay, to->year,
|
||||||
&(temp->month), &(temp->day));
|
&(temp->month), &(temp->day));
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user