ObjectManagerIF improvements #73

Merged
gaisser merged 13 commits from KSat/fsfw:mueller_objectManagerIF into master 2020-06-08 12:08:26 +02:00
Owner

fixes #67 .
I don't know if the exit is a good idea, could also just return nullptr.

fixes #67 . I don't know if the exit is a good idea, could also just return nullptr.
muellerr added the
feature
API Change
labels 2020-05-11 12:03:04 +02:00
muellerr changed title from removed config include, new retvals, nullptr check to ObjectManagerIF improvements 2020-05-29 17:17:15 +02:00
gaisser reviewed 2020-06-04 14:08:58 +02:00
@ -8,10 +8,11 @@
#ifndef OBJECTMANAGERIF_H_
#define OBJECTMANAGERIF_H_
#include "systemObjectList.h"
Owner

I think we can remove that include

I think we can remove that include
gaisser reviewed 2020-06-04 14:09:43 +02:00
@ -92,0 +94,4 @@
if(objectManager == nullptr) {
sif::error << "ObjectManagerIF: Global object manager has not "
"been initialized yet!" << std::endl;
std::exit(0);
Owner

This should be std::exit(1), we do exit with an failure here?

This should be std::exit(1), we do exit with an failure here?
gaisser self-assigned this 2020-06-04 14:11:53 +02:00
Owner

The current software does not know what to do if no ObjectManager is instanciated. So exit seems fine from my point of view.

API_Change because of removed inlcudes.

The current software does not know what to do if no ObjectManager is instanciated. So exit seems fine from my point of view. API_Change because of removed inlcudes.
Author
Owner

THe software does not compile if the object manager is not instantiated I think. But it is possible to forget the initialization.

THe software does not compile if the object manager is not instantiated I think. But it is possible to forget the initialization.
Owner

Hm if it does not compile, we can remove the exit.

Hm if it does not compile, we can remove the exit.
Author
Owner

Actually, its a linker error.

Actually, its a linker error.
Owner

Ok a linker error is ok. So, I think we can remove the sys.exit now.

Ok a linker error is ok. So, I think we can remove the sys.exit now.
gaisser reviewed 2020-06-05 18:14:52 +02:00
@ -72,1 +71,3 @@
<< std::dec << std::endl;
object_id_t var = it.first;
sif::error << "Object 0x" << std::hex << std::setw(8) <<
std::setfill('0')<< var << " failed to initialize " <<
Owner

std::setfill is not reset.

std::setfill is not reset.
Author
Owner

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

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

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

okay, i put std::setfill('') at the end
gaisser closed this pull request 2020-06-08 12:08:26 +02:00
gaisser deleted branch mueller_objectManagerIF 2020-06-08 12:09:36 +02:00
Sign in to join this conversation.
No description provided.