| 1882 | } |
| 1883 | |
| 1884 | void |
| 1885 | Config::loadSubscriber( |
| 1886 | ACE_Configuration_Heap& heap, |
| 1887 | ACE_Configuration_Section_Key& sectionKey, |
| 1888 | std::basic_string<ACE_TCHAR> sectionName |
| 1889 | ) |
| 1890 | { |
| 1891 | /** |
| 1892 | * [subscriber/<name>] |
| 1893 | * # Subscriber Qos Policy values |
| 1894 | * Presentation = <string> # One of INSTANCE, TOPIC, GROUP |
| 1895 | * PresentationCoherent = <bool> # Boolean: numeric 0 or 1 |
| 1896 | * PresentationOrdered = <bool> # Boolean: numeric 0 or 1 |
| 1897 | * Partition = <string> # Only single value supported |
| 1898 | * GroupData = <string> |
| 1899 | * EntityFactory = <bool> # Boolean: numeric 0 or 1 |
| 1900 | * |
| 1901 | * Participant = <string> # One of participant <name> |
| 1902 | * TransportIndex = <number> # Index into transport configurations |
| 1903 | */ |
| 1904 | |
| 1905 | // Note that this requires that the Service Participant already be |
| 1906 | // initialized before we configure from the file. Also, since we have |
| 1907 | // not created any Entities yet, we go to the initial default values |
| 1908 | // rather than to the containing Entity. |
| 1909 | SubscriberProfile* profile = new SubscriberProfile(); |
| 1910 | profile->qos = TheServiceParticipant->initial_SubscriberQos(); |
| 1911 | ACE_TString valueString; |
| 1912 | |
| 1913 | // Presentation = <string> # One of INSTANCE, TOPIC, GROUP |
| 1914 | valueString.clear(); |
| 1915 | heap.get_string_value( sectionKey, PRESENTATION_KEYNAME, valueString); |
| 1916 | if (valueString.length() > 0) { |
| 1917 | if( OpenDDS::DCPS::DCPS_debug_level>1) { |
| 1918 | ACE_DEBUG((LM_DEBUG, |
| 1919 | ACE_TEXT("(%P|%t) Config::loadSubscriber() - ") |
| 1920 | ACE_TEXT(" [subscriber/%s] %s == %s.\n"), |
| 1921 | sectionName.c_str(), |
| 1922 | PRESENTATION_KEYNAME, |
| 1923 | valueString.c_str() |
| 1924 | )); |
| 1925 | } |
| 1926 | if( valueString == ACE_TEXT("INSTANCE")) { |
| 1927 | profile->qos.presentation.access_scope = ::DDS::INSTANCE_PRESENTATION_QOS; |
| 1928 | |
| 1929 | } else if( valueString == ACE_TEXT("TOPIC")) { |
| 1930 | profile->qos.presentation.access_scope = ::DDS::TOPIC_PRESENTATION_QOS; |
| 1931 | |
| 1932 | } else if( valueString == ACE_TEXT("GROUP")) { |
| 1933 | profile->qos.presentation.access_scope = ::DDS::GROUP_PRESENTATION_QOS; |
| 1934 | |
| 1935 | } else { |
| 1936 | ACE_DEBUG((LM_WARNING, |
| 1937 | ACE_TEXT("(%P|%t) loadSubscriber() - ") |
| 1938 | ACE_TEXT("unrecognized value for %s: %s - ") |
| 1939 | ACE_TEXT("not assigning a value.\n"), |
| 1940 | PRESENTATION_KEYNAME, |
| 1941 | valueString.c_str() |
nothing calls this directly
no test coverage detected