| 479 | } |
| 480 | |
| 481 | void |
| 482 | Config::loadTopic( |
| 483 | ACE_Configuration_Heap& heap, |
| 484 | ACE_Configuration_Section_Key& sectionKey, |
| 485 | std::basic_string<ACE_TCHAR> sectionName |
| 486 | ) |
| 487 | { |
| 488 | /** |
| 489 | * [topic/<name>] |
| 490 | * # Topic Qos Policy values |
| 491 | * TopicData = <string> |
| 492 | * Durability = <string> # One of VOLATILE, LOCAL, TRANSIENT, PERSISTENT |
| 493 | * DurabilityServiceDuration = <number> |
| 494 | * DurabilityServiceHistoryKind = <string> # One of ALL, LAST |
| 495 | * DurabilityServiceHistoryDepth = <number> |
| 496 | * DurabilityServiceSamples = <number> |
| 497 | * DurabilityServiceInstances = <number> |
| 498 | * DurabilityServiceSamplesPerInstance = <number> |
| 499 | * Deadline = <number> |
| 500 | * LatencyBudget = <number> |
| 501 | * LivelinessKind = <string> # One of AUTOMATIC, PARTICIPANT, TOPIC |
| 502 | * LivelinessDuration = <number> |
| 503 | * ReliabilityKind = <string> # One of BEST_EFFORT, RELIABLE |
| 504 | * ReliabilityMaxBlocking = <number> |
| 505 | * DestinationOrder = <string> # One of SOURCE, RECEPTION |
| 506 | * HistoryKind = <string> # One of ALL, LAST |
| 507 | * HistoryDepth = <number> |
| 508 | * ResourceMaxSamples = <number> |
| 509 | * ResourceMaxInstances = <number> |
| 510 | * ResourceMaxSamplesPerInstance = <number> |
| 511 | * TransportPriority = <number> |
| 512 | * LifespanDuration = <number> |
| 513 | * OwnershipKind = <string> # One of SHARED, EXCLUSIVE |
| 514 | * |
| 515 | * Participant = <string> # One of participant <name> |
| 516 | * Type = <string> # Name for a registered datatype. |
| 517 | * Topic = <string> # Name for topic |
| 518 | */ |
| 519 | |
| 520 | // Note that this requires that the Service Participant already be |
| 521 | // initialized before we configure from the file. Also, since we have |
| 522 | // not created any Entities yet, we go to the initial default values |
| 523 | // rather than to the containing Entity. |
| 524 | TopicProfile* profile = new TopicProfile(); |
| 525 | profile->qos = TheServiceParticipant->initial_TopicQos(); |
| 526 | ACE_TString valueString; |
| 527 | |
| 528 | // TopicData = <string> |
| 529 | heap.get_string_value( sectionKey, TOPICDATA_KEYNAME, valueString); |
| 530 | if (valueString.length() > 0) { |
| 531 | profile->qos.topic_data.value.replace( |
| 532 | static_cast<CORBA::ULong>(valueString.length()), |
| 533 | static_cast<CORBA::ULong>(valueString.length()), |
| 534 | const_cast<CORBA::Octet*>( |
| 535 | reinterpret_cast<const CORBA::Octet*>( valueString.c_str()) |
| 536 | ) |
| 537 | ); |
| 538 | if( OpenDDS::DCPS::DCPS_debug_level>1) { |
nothing calls this directly
no test coverage detected