| 1737 | } |
| 1738 | |
| 1739 | int |
| 1740 | StaticDiscovery::parse_topics() |
| 1741 | { |
| 1742 | RcHandle<ConfigStoreImpl> config_store = TheServiceParticipant->config_store(); |
| 1743 | const ConfigStoreImpl::StringList sections = config_store->get_section_names("TOPIC"); |
| 1744 | |
| 1745 | // Loop through the [topic/*] sections |
| 1746 | for (ConfigStoreImpl::StringList::const_iterator pos = sections.begin(), limit = sections.end(); |
| 1747 | pos != limit; ++pos) { |
| 1748 | const String& topic_name = *pos; |
| 1749 | |
| 1750 | if (DCPS_debug_level > 0) { |
| 1751 | ACE_DEBUG((LM_NOTICE, |
| 1752 | ACE_TEXT("(%P|%t) NOTICE: StaticDiscovery::parse_topics ") |
| 1753 | ACE_TEXT("processing [topic/%C] section.\n"), |
| 1754 | topic_name.c_str())); |
| 1755 | } |
| 1756 | |
| 1757 | EndpointRegistry::Topic topic; |
| 1758 | topic.name = config_store->get((String("TOPIC_") + topic_name + "_NAME").c_str(), topic_name); |
| 1759 | topic.type_name = config_store->get((String("TOPIC_") + topic_name + "_TYPE_NAME").c_str(), ""); |
| 1760 | if (topic.type_name.empty()) { |
| 1761 | ACE_ERROR((LM_ERROR, |
| 1762 | ACE_TEXT("(%P|%t) StaticDiscovery::parse_topics ") |
| 1763 | ACE_TEXT("No type_name specified for [topic/%C] section.\n"), |
| 1764 | topic_name.c_str())); |
| 1765 | return -1; |
| 1766 | } |
| 1767 | if (topic.type_name.size() >= TYPE_NAME_MAX) { |
| 1768 | ACE_ERROR((LM_ERROR, |
| 1769 | ACE_TEXT("(%P|%t) StaticDiscovery::parse_topics ") |
| 1770 | ACE_TEXT("type_name (%C) must be less than 128 characters in [topic/%C] section.\n"), |
| 1771 | topic.type_name.c_str(), topic_name.c_str())); |
| 1772 | return -1; |
| 1773 | |
| 1774 | } |
| 1775 | |
| 1776 | registry.topic_map[topic_name] = topic; |
| 1777 | } |
| 1778 | |
| 1779 | return 0; |
| 1780 | } |
| 1781 | |
| 1782 | int |
| 1783 | StaticDiscovery::parse_datawriterqos() |
nothing calls this directly
no test coverage detected