MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / manageTransportLink

Method manageTransportLink

tools/monitor/MonitorDataStorage.cpp:515–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515void
516Monitor::MonitorDataStorage::manageTransportLink(
517 TreeNode* node,
518 int transport_id,
519 bool& create
520)
521{
522 // Start by finding the participant node.
523 TreeNode* processNode = node->parent();
524 if( processNode) {
525 // And follow it to the actual process node.
526 processNode = processNode->parent();
527
528 } else {
529 // Horribly corrupt model, something oughta been done about it!
530 ACE_ERROR((LM_ERROR,
531 ACE_TEXT("(%P|%t) ERROR: MonitorDataStorage::manageTransportLink() - ")
532 ACE_TEXT("unable to locate the ancestor process node!\n")
533 ));
534 return;
535 }
536
537 // Then finds its key in the maps.
538 ProcessKey processKey;
539 std::pair< bool, ProcessKey> pResult
540 = this->findKey( this->processToTreeMap_, processNode);
541 if( pResult.first) {
542 processKey = pResult.second;
543
544 } else {
545 // Horribly corrupt model, something oughta been done about it!
546 ACE_ERROR((LM_ERROR,
547 ACE_TEXT("(%P|%t) ERROR: MonitorDataStorage::manageTransportLink() - ")
548 ACE_TEXT("unable to locate the process node in the maps!\n")
549 ));
550 return;
551 }
552
553 // Now we have enough information to build a TransportKey and find or
554 // create a transport node for our Id value.
555 TransportKey transportKey(
556 processKey.host,
557 processKey.pid,
558 transport_id
559 );
560 TreeNode* transportNode = this->getTransportNode( transportKey, create);
561 if( !node) {
562 return;
563 }
564
565 // Transport Id display.
566 QString label( QObject::tr( "Transport"));
567 int row = node->indexOf( 0, label);
568 if( row == -1) {
569 // New entry, add a reference to the actual transport node.
570 QList<QVariant> list;
571 list << label << QString( QObject::tr("<error>"));
572 TreeNode* idNode = new TreeNode( list, node);

Callers

nothing calls this directly

Calls 6

getTransportNodeMethod · 0.95
indexOfMethod · 0.80
setColorMethod · 0.80
addValueRefMethod · 0.80
parentMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected