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

Method loadTopic

tools/modeling/codegen/model/Config.cpp:481–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481void
482Config::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) {

Callers

nothing calls this directly

Calls 4

get_string_valueMethod · 0.45
lengthMethod · 0.45
replaceMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected