Added some debug messages in HandlerBase and Distributor (CCSDS/PUS/TC)
This commit is contained in:
parent
a468d96f14
commit
28a3daabac
@ -428,7 +428,7 @@ void DeviceHandlerBase::replyToReply(DeviceReplyMap::iterator iter,
|
||||
|
||||
void DeviceHandlerBase::doSendWrite() {
|
||||
if (cookieInfo.state == COOKIE_WRITE_READY) {
|
||||
|
||||
sif::debug<<" DeviceHandlerBase::doSendWrite: Calling sendMessage"<<std::endl;
|
||||
ReturnValue_t result = communicationInterface->sendMessage(cookie,
|
||||
rawPacket, rawPacketLen);
|
||||
|
||||
@ -450,6 +450,7 @@ void DeviceHandlerBase::doGetWrite() {
|
||||
return;
|
||||
}
|
||||
cookieInfo.state = COOKIE_UNUSED;
|
||||
sif::debug<<" DeviceHandlerBase::doGetWrite: Calling getSendSuccess"<<std::endl;
|
||||
ReturnValue_t result = communicationInterface->getSendSuccess(cookie);
|
||||
if (result == RETURN_OK) {
|
||||
if (wiretappingMode == RAW) {
|
||||
@ -470,7 +471,7 @@ void DeviceHandlerBase::doGetWrite() {
|
||||
|
||||
void DeviceHandlerBase::doSendRead() {
|
||||
ReturnValue_t result;
|
||||
|
||||
// sif::debug<<" DeviceHandlerBase::doSendRead: Calling requestReceiveMessage"<<std::endl;
|
||||
result = communicationInterface->requestReceiveMessage(cookie);
|
||||
if (result == RETURN_OK) {
|
||||
cookieInfo.state = COOKIE_READ_SENT;
|
||||
@ -497,7 +498,7 @@ void DeviceHandlerBase::doGetRead() {
|
||||
}
|
||||
|
||||
cookieInfo.state = COOKIE_UNUSED;
|
||||
|
||||
// sif::debug<<" DeviceHandlerBase::doGetRead: Calling readReceivedMessage"<<std::endl;
|
||||
result = communicationInterface->readReceivedMessage(cookie, &receivedData,
|
||||
&receivedDataLen);
|
||||
|
||||
@ -522,10 +523,12 @@ void DeviceHandlerBase::doGetRead() {
|
||||
//This approach avoids infinite loops due to buggy scanForReply routines (seen in bug 1077).
|
||||
uint32_t remainingLength = receivedDataLen;
|
||||
for (uint32_t count = 0; count < receivedDataLen; count++) {
|
||||
sif::debug<<" DeviceHandlerBase::doGetRead: Calling scanForReply"<<std::endl;
|
||||
result = scanForReply(receivedData, remainingLength, &foundId,
|
||||
&foundLen);
|
||||
switch (result) {
|
||||
case RETURN_OK:
|
||||
sif::debug<<" DeviceHandlerBase::doGetRead: Calling handle reply"<<std::endl;
|
||||
handleReply(receivedData, foundId, foundLen);
|
||||
break;
|
||||
case APERIODIC_REPLY: {
|
||||
|
@ -11,7 +11,7 @@ CCSDSDistributor::~CCSDSDistributor() {
|
||||
}
|
||||
|
||||
iterator_t CCSDSDistributor::selectDestination() {
|
||||
// debug << "CCSDSDistributor::selectDestination received: " << this->currentMessage.getStorageId().pool_index << ", " << this->currentMessage.getStorageId().packet_index << std::endl;
|
||||
sif::debug << "CCSDSDistributor::selectDestination received: " << this->currentMessage.getStorageId().pool_index << ", " << this->currentMessage.getStorageId().packet_index << std::endl;
|
||||
const uint8_t* p_packet = NULL;
|
||||
size_t size = 0;
|
||||
//TODO check returncode?
|
||||
|
@ -15,7 +15,7 @@ PUSDistributor::~PUSDistributor() {
|
||||
}
|
||||
|
||||
iterator_t PUSDistributor::selectDestination() {
|
||||
// debug << "PUSDistributor::handlePacket received: " << this->current_packet_id.store_index << ", " << this->current_packet_id.packet_index << std::endl;
|
||||
sif::debug << "PUSDistributor::handlePacket received "<<std::endl;// << this->currentPacket.store_index << ", " << this->current_packet_id.packet_index << std::endl;
|
||||
iterator_t queueMapIt = this->queueMap.end();
|
||||
this->currentPacket.setStoreAddress(this->currentMessage.getStorageId());
|
||||
if (currentPacket.getWholeData() != NULL) {
|
||||
|
@ -15,7 +15,7 @@ TcDistributor::~TcDistributor() {
|
||||
|
||||
ReturnValue_t TcDistributor::performOperation(uint8_t opCode) {
|
||||
ReturnValue_t status = RETURN_OK;
|
||||
// debug << "TcDistributor: performing Operation." << std::endl;
|
||||
//sif::debug << "TcDistributor: performing Operation." << std::endl;
|
||||
for (status = tcQueue->receiveMessage(¤tMessage); status == RETURN_OK;
|
||||
status = tcQueue->receiveMessage(¤tMessage)) {
|
||||
status = handlePacket();
|
||||
@ -31,6 +31,7 @@ ReturnValue_t TcDistributor::handlePacket() {
|
||||
|
||||
iterator_t queueMapIt = this->selectDestination();
|
||||
ReturnValue_t returnValue = RETURN_FAILED;
|
||||
sif::debug << "TcDistributor::handlePacket" << std::endl;
|
||||
if (queueMapIt != this->queueMap.end()) {
|
||||
returnValue = this->tcQueue->sendMessage(queueMapIt->second,
|
||||
&this->currentMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user