mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-07 07:50:32 +00:00
Improve reported output in case of configuration error
This commit is contained in:
parent
720215af30
commit
24041058a6
@ -32,16 +32,7 @@ Pass_Through::Pass_Through(const ConfigurationInterface* configuration, const st
|
|||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_item_type("gr_complex");
|
const std::string default_item_type("gr_complex");
|
||||||
const std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
|
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||||
const std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
|
|
||||||
if (input_type != output_type)
|
|
||||||
{
|
|
||||||
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
|
|
||||||
<< input_type
|
|
||||||
<< ", but item_size will supersede it.";
|
|
||||||
}
|
|
||||||
|
|
||||||
item_type_ = configuration->property(role + ".item_type", input_type);
|
|
||||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||||
|
|
||||||
if (item_type_ == "float")
|
if (item_type_ == "float")
|
||||||
@ -96,13 +87,11 @@ Pass_Through::Pass_Through(const ConfigurationInterface* configuration, const st
|
|||||||
DLOG(INFO) << "kludge_copy(" << kludge_copy_->unique_id() << ")";
|
DLOG(INFO) << "kludge_copy(" << kludge_copy_->unique_id() << ")";
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
{
|
{
|
||||||
LOG(ERROR) << "This implementation only supports one input stream";
|
LOG(ERROR) << "This implementation only supports one input stream but it is set to " << in_streams_;
|
||||||
LOG(ERROR) << in_streams_;
|
|
||||||
}
|
}
|
||||||
if (out_streams_ > 1)
|
if (out_streams_ > 1)
|
||||||
{
|
{
|
||||||
LOG(ERROR) << "This implementation only supports one output stream";
|
LOG(ERROR) << "This implementation only supports one output stream but it is set to " << out_streams_;
|
||||||
LOG(ERROR) << out_streams_;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,9 +736,13 @@ int GNSSFlowgraph::connect_signal_conditioners()
|
|||||||
{
|
{
|
||||||
std::string replace_me("copy");
|
std::string replace_me("copy");
|
||||||
size_t pos = reported_error.find(replace_me);
|
size_t pos = reported_error.find(replace_me);
|
||||||
size_t len = replace_me.length();
|
while (pos != std::string::npos)
|
||||||
reported_error.replace(pos, len, "PassThrough");
|
{
|
||||||
help_hint_ += " * Blocks within the Signal Conditioner are connected with mismatched item size\n";
|
size_t len = replace_me.length();
|
||||||
|
reported_error.replace(pos, len, "Pass_Through");
|
||||||
|
pos = reported_error.find(replace_me, pos + 1);
|
||||||
|
}
|
||||||
|
help_hint_ += " * Blocks within the Signal Conditioner are connected with mismatched input/ouput item size\n";
|
||||||
help_hint_ += " Reported error: " + reported_error + '\n';
|
help_hint_ += " Reported error: " + reported_error + '\n';
|
||||||
help_hint_ += " Check the Signal Conditioner documentation at https://gnss-sdr.org/docs/sp-blocks/signal-conditioner/\n";
|
help_hint_ += " Check the Signal Conditioner documentation at https://gnss-sdr.org/docs/sp-blocks/signal-conditioner/\n";
|
||||||
}
|
}
|
||||||
@ -1088,8 +1092,12 @@ int GNSSFlowgraph::connect_signal_sources_to_signal_conditioners()
|
|||||||
{
|
{
|
||||||
std::string replace_me("copy");
|
std::string replace_me("copy");
|
||||||
size_t pos = reported_error.find(replace_me);
|
size_t pos = reported_error.find(replace_me);
|
||||||
size_t len = replace_me.length();
|
while (pos != std::string::npos)
|
||||||
reported_error.replace(pos, len, "PassThrough");
|
{
|
||||||
|
size_t len = replace_me.length();
|
||||||
|
reported_error.replace(pos, len, "Pass_Through");
|
||||||
|
pos = reported_error.find(replace_me, pos + 1);
|
||||||
|
}
|
||||||
help_hint_ += " * The SignalSource output item size and the SignalConditioner input item size are mismatched\n";
|
help_hint_ += " * The SignalSource output item size and the SignalConditioner input item size are mismatched\n";
|
||||||
help_hint_ += " Reported error: " + reported_error + '\n';
|
help_hint_ += " Reported error: " + reported_error + '\n';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user