better returnvalues for CSB init

This commit is contained in:
Robin Müller 2020-06-24 16:03:54 +02:00
parent 8a56964dab
commit 644896245f
2 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,8 @@ public:
static constexpr uint8_t INTERFACE_ID = CLASS_ID::OBJECT_MANAGER_IF;
static constexpr ReturnValue_t INSERTION_FAILED = MAKE_RETURN_CODE( 1 );
static constexpr ReturnValue_t NOT_FOUND = MAKE_RETURN_CODE( 2 );
static constexpr ReturnValue_t CHILD_INIT_FAILED = MAKE_RETURN_CODE( 3 );
static constexpr ReturnValue_t CHILD_INIT_FAILED = MAKE_RETURN_CODE( 3 ); //!< Can be used if the initialization of a SystemObject failed.
static constexpr ReturnValue_t INTERNAL_ERR_REPORTER_UNINIT = MAKE_RETURN_CODE( 4 );
protected:

View File

@ -57,7 +57,7 @@ ReturnValue_t CommandingServiceBase::initialize() {
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
packetSource);
if (packetForwarding == nullptr or distributor == nullptr) {
return RETURN_FAILED;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
distributor->registerService(this);
@ -68,7 +68,7 @@ ReturnValue_t CommandingServiceBase::initialize() {
TCStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
if (IPCStore == nullptr or TCStore == nullptr) {
return RETURN_FAILED;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
return RETURN_OK;