| 1052 | } |
| 1053 | |
| 1054 | void |
| 1055 | Config::loadPublisher( |
| 1056 | ACE_Configuration_Heap& heap, |
| 1057 | ACE_Configuration_Section_Key& sectionKey, |
| 1058 | std::basic_string<ACE_TCHAR> sectionName |
| 1059 | ) |
| 1060 | { |
| 1061 | /** |
| 1062 | * [publisher/<name>] |
| 1063 | * # Publisher Qos Policy values |
| 1064 | * Presentation = <string> # One of INSTANCE, TOPIC, GROUP |
| 1065 | * PresentationCoherent = <bool> # Boolean: numeric 0 or 1 |
| 1066 | * PresentationOrdered = <bool> # Boolean: numeric 0 or 1 |
| 1067 | * Partition = <string> # Only single value supported |
| 1068 | * GroupData = <string> |
| 1069 | * EntityFactory = <bool> # Boolean: numeric 0 or 1 |
| 1070 | * |
| 1071 | * Participant = <string> # One of participant <name> |
| 1072 | * TransportIndex = <number> # Index into transport configurations |
| 1073 | */ |
| 1074 | |
| 1075 | // Note that this requires that the Service Participant already be |
| 1076 | // initialized before we configure from the file. Also, since we have |
| 1077 | // not created any Entities yet, we go to the initial default values |
| 1078 | // rather than to the containing Entity. |
| 1079 | PublisherProfile* profile = new PublisherProfile(); |
| 1080 | profile->qos = TheServiceParticipant->initial_PublisherQos(); |
| 1081 | ACE_TString valueString; |
| 1082 | |
| 1083 | // Presentation = <string> # One of INSTANCE, TOPIC, GROUP |
| 1084 | valueString.clear(); |
| 1085 | heap.get_string_value( sectionKey, PRESENTATION_KEYNAME, valueString); |
| 1086 | if (valueString.length() > 0) { |
| 1087 | if( OpenDDS::DCPS::DCPS_debug_level>1) { |
| 1088 | ACE_DEBUG((LM_DEBUG, |
| 1089 | ACE_TEXT("(%P|%t) Config::loadPublisher() - ") |
| 1090 | ACE_TEXT(" [publisher/%s] %s == %s.\n"), |
| 1091 | sectionName.c_str(), |
| 1092 | PRESENTATION_KEYNAME, |
| 1093 | valueString.c_str() |
| 1094 | )); |
| 1095 | } |
| 1096 | if( valueString == ACE_TEXT("INSTANCE")) { |
| 1097 | profile->qos.presentation.access_scope = ::DDS::INSTANCE_PRESENTATION_QOS; |
| 1098 | |
| 1099 | } else if( valueString == ACE_TEXT("TOPIC")) { |
| 1100 | profile->qos.presentation.access_scope = ::DDS::TOPIC_PRESENTATION_QOS; |
| 1101 | |
| 1102 | } else if( valueString == ACE_TEXT("GROUP")) { |
| 1103 | profile->qos.presentation.access_scope = ::DDS::GROUP_PRESENTATION_QOS; |
| 1104 | |
| 1105 | } else { |
| 1106 | ACE_DEBUG((LM_WARNING, |
| 1107 | ACE_TEXT("(%P|%t) loadPublisher() - ") |
| 1108 | ACE_TEXT("unrecognized value for %s: %s - ") |
| 1109 | ACE_TEXT("not assigning a value.\n"), |
| 1110 | PRESENTATION_KEYNAME, |
| 1111 | valueString.c_str() |
nothing calls this directly
no test coverage detected