Skip to content

Commit

Permalink
Fix changes after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>
  • Loading branch information
LuciaEchevarria99 committed Sep 19, 2024
1 parent 5086a11 commit 101604b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 81 deletions.
5 changes: 2 additions & 3 deletions ddspipe_yaml/src/cpp/YamlReader_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ core::TopicRoutesConfiguration YamlReader::get(
return object;
}

/**************************
/*************************
* Monitor Configuration *
**************************/

Expand Down Expand Up @@ -308,8 +308,7 @@ void YamlReader::fill(
MONITOR_PERIOD_TAG,
DDS_PUBLISHING_ENABLE_TAG,
DDS_PUBLISHING_DOMAIN_TAG,
DDS_PUBLISHING_TOPIC_NAME_TAG,
DDS_PUBLISHING_PUBLISH_TYPE_TAG};
DDS_PUBLISHING_TOPIC_NAME_TAG};

/////
// Get optional monitor status tag
Expand Down
6 changes: 1 addition & 5 deletions ddspipe_yaml/src/cpp/YamlReader_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@
#include <ddspipe_core/types/dds/GuidPrefix.hpp>
#include <ddspipe_core/types/participant/ParticipantId.hpp>

#include <ddspipe_participants/types/address/Address.hpp>
#include <ddspipe_participants/types/security/tls/TlsConfiguration.hpp>

#include <ddspipe_participants/configuration/DiscoveryServerParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/EchoParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/InitialPeersParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/ParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/EchoParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/SimpleParticipantConfiguration.hpp>
#include <ddspipe_participants/types/address/Address.hpp>
#include <ddspipe_participants/types/address/DiscoveryServerConnectionAddress.hpp>
#include <ddspipe_participants/types/security/tls/TlsConfiguration.hpp>

#include <ddspipe_yaml/Yaml.hpp>
Expand Down
8 changes: 2 additions & 6 deletions ddspipe_yaml/src/cpp/YamlReader_participants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@
#include <ddspipe_core/types/dds/GuidPrefix.hpp>
#include <ddspipe_core/types/participant/ParticipantId.hpp>

#include <ddspipe_participants/types/address/Address.hpp>
#include <ddspipe_participants/types/security/tls/TlsConfiguration.hpp>

#include <ddspipe_participants/configuration/DiscoveryServerParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/EchoParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/InitialPeersParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/XmlParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/ParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/EchoParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/SimpleParticipantConfiguration.hpp>
#include <ddspipe_participants/configuration/XmlParticipantConfiguration.hpp>
#include <ddspipe_participants/types/address/Address.hpp>
#include <ddspipe_participants/types/address/DiscoveryServerConnectionAddress.hpp>
#include <ddspipe_participants/types/security/tls/TlsConfiguration.hpp>

#include <ddspipe_yaml/Yaml.hpp>
Expand Down
66 changes: 1 addition & 65 deletions ddspipe_yaml/src/cpp/YamlReader_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,69 +340,6 @@ Address YamlReader::get<Address>(
}
}

DiscoveryServerConnectionAddress _get_discovery_server_connection_address_v1(
const Yaml& yml,
const YamlReaderVersion version)
{
// GuidPrefix required
GuidPrefix server_guid = YamlReader::get<GuidPrefix>(yml, version);

// Addresses required
std::set<Address> addresses = YamlReader::get_set<Address>(yml, COLLECTION_ADDRESSES_TAG, version);

// Create Connection Address
return DiscoveryServerConnectionAddress(server_guid, addresses);
}

DiscoveryServerConnectionAddress _get_discovery_server_connection_address_latest(
const Yaml& yml,
const YamlReaderVersion version)
{
// GuidPrefix required
GuidPrefix server_guid = YamlReader::get<GuidPrefix>(yml, DISCOVERY_SERVER_GUID_PREFIX_TAG, version);

// Addresses required
std::set<Address> addresses = YamlReader::get_set<Address>(yml, COLLECTION_ADDRESSES_TAG, version);

// Create Connection Address
return DiscoveryServerConnectionAddress(server_guid, addresses);
}

template <>
DDSPIPE_YAML_DllAPI
bool YamlValidator::validate<DiscoveryServerConnectionAddress>(
const Yaml& yml,
const YamlReaderVersion& version)
{
std::set<TagType> tags{
COLLECTION_ADDRESSES_TAG};

if (version != V_1_0)
{
tags.insert(DISCOVERY_SERVER_GUID_PREFIX_TAG);
}

return YamlValidator::validate_tags(yml, tags);
}

template <>
DDSPIPE_YAML_DllAPI
DiscoveryServerConnectionAddress YamlReader::get<DiscoveryServerConnectionAddress>(
const Yaml& yml,
const YamlReaderVersion version)
{
YamlValidator::validate<DiscoveryServerConnectionAddress>(yml, version);

switch (version)
{
case V_1_0:
return _get_discovery_server_connection_address_v1(yml, version);

default:
return _get_discovery_server_connection_address_latest(yml, version);
}
}

template <>
DDSPIPE_YAML_DllAPI
void YamlReader::fill(
Expand Down Expand Up @@ -435,8 +372,7 @@ bool YamlValidator::validate<core::DdsPublishingConfiguration>(
static const std::set<TagType> tags{
DDS_PUBLISHING_ENABLE_TAG,
DDS_PUBLISHING_DOMAIN_TAG,
DDS_PUBLISHING_TOPIC_NAME_TAG,
DDS_PUBLISHING_PUBLISH_TYPE_TAG};
DDS_PUBLISHING_TOPIC_NAME_TAG};

return YamlValidator::validate_tags(yml, tags);
}
Expand Down
4 changes: 2 additions & 2 deletions ddspipe_yaml/src/cpp/YamlValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool YamlValidator::validate_tags(
// Check if the tag is valid
if (!valid_tags.count(tag_name))
{
logWarning(DDSPIPE_YAML, "Tag <" << tag_name << "> is not a valid tag (" << get_position_(tag) << ").");
EPROSIMA_LOG_WARNING(DDSPIPE_YAML, "Tag <" << tag_name << "> is not a valid tag (" << get_position_(tag) << ").");
is_valid = false;
}

Expand All @@ -55,7 +55,7 @@ bool YamlValidator::validate_tags(

if (tags_count[tag_name] > 1)
{
logWarning(DDSPIPE_YAML, "Tag <" << tag_name << "> is repeated (" << get_position_(tag) << ").");
EPROSIMA_LOG_WARNING(DDSPIPE_YAML, "Tag <" << tag_name << "> is repeated (" << get_position_(tag) << ").");
is_valid = false;
}
}
Expand Down

0 comments on commit 101604b

Please sign in to comment.