structure improved
This commit is contained in:
parent
ea8ef8b874
commit
fa67f82462
@ -95,16 +95,19 @@ uint16_t PUSDistributor::getIdentifier() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PUSDistributor::initialize() {
|
ReturnValue_t PUSDistributor::initialize() {
|
||||||
|
currentPacket = new TcPacketStored();
|
||||||
|
if(currentPacket == nullptr) {
|
||||||
|
// Should not happen, memory allocation failed!
|
||||||
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
CCSDSDistributorIF* ccsdsDistributor =
|
CCSDSDistributorIF* ccsdsDistributor =
|
||||||
objectManager->get<CCSDSDistributorIF>(packetSource);
|
objectManager->get<CCSDSDistributorIF>(packetSource);
|
||||||
currentPacket = new TcPacketStored();
|
|
||||||
if (ccsdsDistributor == nullptr) {
|
if (ccsdsDistributor == nullptr) {
|
||||||
sif::error << "PUSDistributor::initialize: Packet source invalid."
|
sif::error << "PUSDistributor::initialize: Packet source invalid."
|
||||||
<< " Make sure it exists and implements CCSDSDistributorIF!"
|
<< " Make sure it exists and implements CCSDSDistributorIF!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
else {
|
return ccsdsDistributor->registerApplication(this);
|
||||||
return ccsdsDistributor->registerApplication(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user