Skip to content

Commit

Permalink
Refs #20823: Initialize interval in publisher
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf committed Jun 5, 2024
1 parent 7ebcb8b commit 558593c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/cpp/content_filter/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CLIParser
struct publisher_config
{
uint16_t samples = 0;
uint16_t interval = 0;
uint16_t interval = 100;
};

//! Subscriber application configuration structure
Expand Down Expand Up @@ -241,7 +241,7 @@ class CLIParser
}
else if (config.entity == CLIParser::EntityKind::PUBLISHER)
{
EPROSIMA_LOG_ERROR(CLI_PARSER, "fliter option can only be used with the Subscriber");
EPROSIMA_LOG_ERROR(CLI_PARSER, "filter option can only be used with the Subscriber");
print_help(EXIT_FAILURE);
}
else
Expand Down
1 change: 1 addition & 0 deletions examples/cpp/content_filter/PublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ PublisherApp::PublisherApp(
, matched_(0)
, samples_(config.samples)
, stop_(false)
, period_ms_(config.interval)
{
// Initialize internal variables
matched_ = 0;
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/content_filter/PublisherApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class PublisherApp : public Application, public DataWriterListener

std::atomic<bool> stop_;

const uint32_t period_ms_ = 100; // in ms
uint16_t period_ms_ = 100; // in ms
};

} // namespace content_filter
Expand Down

0 comments on commit 558593c

Please sign in to comment.