ObjectManagerIF improvements #73

Merged
gaisser merged 13 commits from KSat/fsfw:mueller_objectManagerIF into master 2020-06-08 12:08:26 +02:00
Showing only changes of commit fd0cc2a8ca - Show all commits

View File

@ -65,10 +65,10 @@ void ObjectManager::initialize() {
this->produceObjects();
ReturnValue_t return_value = RETURN_FAILED;
uint32_t error_count = 0;
for (auto it = this->objectList.begin(); it != objectList.end(); it++ ) {
return_value = it->second->initialize();
for (auto const& it : objectList) {
return_value = it.second->initialize();
if ( return_value != RETURN_OK ) {
object_id_t var = it->first;
object_id_t var = it.first;
sif::error << "Object 0x" << std::hex << std::setw(8) <<
std::setfill('0')<< var << " failed to initialize " <<
Review

std::setfill is not reset.

std::setfill is not reset.
Review

should std::setw be reset as well? how to reset std::setfill?

should std::setw be reset as well? how to reset std::setfill?
Review

okay, i put std::setfill('') at the end

okay, i put std::setfill('') at the end
"with code 0x" << return_value << std::dec << std::endl;
@ -81,11 +81,10 @@ void ObjectManager::initialize() {
}
//Init was successful. Now check successful interconnections.
error_count = 0;
for (auto listIter = this->objectList.begin();
listIter != objectList.end(); listIter++ ) {
return_value = listIter->second->checkObjectConnections();
for (auto const& it : objectList) {
return_value = it.second->checkObjectConnections();
if ( return_value != RETURN_OK ) {
sif::error << "Object " << std::hex << (int) listIter->first
sif::error << "Object " << std::hex << (int) it.first
<< " connection check failed with code 0x" << return_value
<< std::dec << std::endl;
error_count++;