a lot of debug output added
This commit is contained in:
@ -5,9 +5,11 @@
|
||||
#include <framework/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <framework/globalfunctions/arrayprinter.h>
|
||||
|
||||
TmTcBridge::TmTcBridge(object_id_t objectId,
|
||||
object_id_t ccsdsPacketDistributor): SystemObject(objectId),
|
||||
ccsdsPacketDistributor(ccsdsPacketDistributor)
|
||||
TmTcBridge::TmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
||||
object_id_t tmStoreId, object_id_t tcStoreId):
|
||||
SystemObject(objectId),tmStoreId(tmStoreId), tcStoreId(tcStoreId),
|
||||
tcDestination(tcDestination)
|
||||
|
||||
{
|
||||
tmTcReceptionQueue = QueueFactory::instance()->
|
||||
createMessageQueue(TMTC_RECEPTION_QUEUE_DEPTH);
|
||||
@ -42,18 +44,24 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
|
||||
}
|
||||
|
||||
ReturnValue_t TmTcBridge::initialize() {
|
||||
tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
||||
if (tcStore == NULL) {
|
||||
return RETURN_FAILED;
|
||||
tcStore = objectManager->get<StorageManagerIF>(tcStoreId);
|
||||
if (tcStore == nullptr) {
|
||||
sif::error << "TmTcBridge::initialize: TC store invalid. Make sure"
|
||||
"it is created and set up properly." << std::endl;
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
tmStore = objectManager->get<StorageManagerIF>(objects::TM_STORE);
|
||||
if (tmStore == NULL) {
|
||||
return RETURN_FAILED;
|
||||
tmStore = objectManager->get<StorageManagerIF>(tmStoreId);
|
||||
if (tmStore == nullptr) {
|
||||
sif::error << "TmTcBridge::initialize: TM store invalid. Make sure"
|
||||
"it is created and set up properly." << std::endl;
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
AcceptsTelecommandsIF* tcDistributor =
|
||||
objectManager->get<AcceptsTelecommandsIF>(ccsdsPacketDistributor);
|
||||
if (tcDistributor == NULL) {
|
||||
return RETURN_FAILED;
|
||||
objectManager->get<AcceptsTelecommandsIF>(tcDestination);
|
||||
if (tcDistributor == nullptr) {
|
||||
sif::error << "TmTcBridge::initialize: TC Distributor invalid"
|
||||
<< std::endl;
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
tmTcReceptionQueue->setDefaultDestination(tcDistributor->getRequestQueue());
|
||||
|
Reference in New Issue
Block a user