PUS distrib update
This commit is contained in:
parent
d838259243
commit
c5ec984d0b
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#define PUS_DISTRIBUTOR_DEBUGGING 0
|
#define PUS_DISTRIBUTOR_DEBUGGING 0
|
||||||
|
|
||||||
PusDistributor::PusDistributor(uint16_t setApid, object_id_t setObjectId,
|
PusDistributor::PusDistributor(uint16_t setApid, object_id_t setObjectId, StorageManagerIF* store_,
|
||||||
CcsdsDistributorIF* distributor, StorageManagerIF* store_)
|
CcsdsDistributorIF* distributor)
|
||||||
: TcDistributorBase(setObjectId),
|
: TcDistributorBase(setObjectId),
|
||||||
store(store_),
|
store(store_),
|
||||||
checker(setApid, ccsds::PacketType::TC),
|
checker(setApid, ccsds::PacketType::TC),
|
||||||
@ -122,14 +122,12 @@ ReturnValue_t PusDistributor::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ccsdsDistributor == nullptr) {
|
if (ccsdsDistributor != nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
ReturnValue_t result =
|
||||||
sif::error << "PUSDistributor::initialize: Packet source invalid" << std::endl;
|
ccsdsDistributor->registerApplication(CcsdsDistributorIF::DestInfo(*this, false));
|
||||||
sif::error << " Make sure it exists and implements CCSDSDistributorIF!" << std::endl;
|
if (result != returnvalue::OK) {
|
||||||
#else
|
return result;
|
||||||
sif::printError("PusDistributor::initialize: Packet source invalid\n");
|
}
|
||||||
sif::printError("Make sure it exists and implements CcsdsDistributorIF\n");
|
|
||||||
#endif
|
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
if (verifyChannel == nullptr) {
|
if (verifyChannel == nullptr) {
|
||||||
@ -139,7 +137,6 @@ ReturnValue_t PusDistributor::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ccsdsDistributor->registerApplication(CcsdsDistributorIF::DestInfo(*this, false));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PusDistributor::checkerFailurePrinter() const {
|
void PusDistributor::checkerFailurePrinter() const {
|
||||||
|
@ -31,8 +31,9 @@ class PusDistributor : public TcDistributorBase,
|
|||||||
* @param setPacketSource Object ID of the source of TC packets.
|
* @param setPacketSource Object ID of the source of TC packets.
|
||||||
* Must implement CcsdsDistributorIF.
|
* Must implement CcsdsDistributorIF.
|
||||||
*/
|
*/
|
||||||
PusDistributor(uint16_t setApid, object_id_t setObjectId, CcsdsDistributorIF* packetSource,
|
PusDistributor(uint16_t setApid, object_id_t setObjectId, StorageManagerIF* store = nullptr,
|
||||||
StorageManagerIF* store = nullptr);
|
CcsdsDistributorIF* packetSource = nullptr);
|
||||||
|
|
||||||
[[nodiscard]] const char* getName() const override;
|
[[nodiscard]] const char* getName() const override;
|
||||||
/**
|
/**
|
||||||
* The destructor is empty.
|
* The destructor is empty.
|
||||||
|
Loading…
Reference in New Issue
Block a user