1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-18 08:05:17 +00:00

Introduce readability-identifier-naming check

This commit enforces naming style for Classes and global constants:
Camel_Snake_Case for Classes
UPPER_CASE for global constants
CamelCase for abstract classes
This commit is contained in:
Carles Fernandez
2019-02-22 10:47:24 +01:00
parent 6d6979bb56
commit 62a7e54359
356 changed files with 2277 additions and 2268 deletions

View File

@@ -222,7 +222,7 @@ void rtl_tcp_signal_source_c::set_if_gain(int gain)
{
double start, stop, step;
};
if (info_.get_tuner_type() != rtl_tcp_dongle_info::TUNER_E4000)
if (info_.get_tuner_type() != Rtl_Tcp_Dongle_Info::TUNER_E4000)
{
return;
}

View File

@@ -88,7 +88,7 @@ private:
int16_t port,
bool flip_iq);
rtl_tcp_dongle_info info_;
Rtl_Tcp_Dongle_Info info_;
// IO members
boost::asio::io_service io_service_;

View File

@@ -39,7 +39,7 @@
#include <cstring> // for memcpy
#include <utility>
gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
uint64_t nitems,
gr::msg_queue::sptr queue,
bool stop_flowgraph) : gr::sync_block("valve",
@@ -56,25 +56,25 @@ gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue, bool stop_flowgraph)
{
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph));
boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph));
return valve_;
}
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue)
{
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), true));
boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), true));
return valve_;
}
void gnss_sdr_valve::open_valve()
void Gnss_Sdr_Valve::open_valve()
{
d_open_valve = true;
}
int gnss_sdr_valve::work(int noutput_items,
int Gnss_Sdr_Valve::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{

View File

@@ -52,7 +52,7 @@ boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
* \brief Implementation of a GNU Radio block that sends a STOP message to the
* control queue right after a specific number of samples have passed through it.
*/
class gnss_sdr_valve : public gr::sync_block
class Gnss_Sdr_Valve : public gr::sync_block
{
friend boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
uint64_t nitems,
@@ -69,7 +69,7 @@ class gnss_sdr_valve : public gr::sync_block
bool d_open_valve;
public:
gnss_sdr_valve(size_t sizeof_stream_item,
Gnss_Sdr_Valve(size_t sizeof_stream_item,
uint64_t nitems,
gr::msg_queue::sptr queue, bool stop_flowgraph);
void open_valve();

View File

@@ -37,13 +37,13 @@
using boost::asio::ip::tcp;
rtl_tcp_dongle_info::rtl_tcp_dongle_info() : tuner_type_(0), tuner_gain_count_(0)
Rtl_Tcp_Dongle_Info::Rtl_Tcp_Dongle_Info() : tuner_type_(0), tuner_gain_count_(0)
{
std::memset(magic_, 0, sizeof(magic_));
}
boost::system::error_code rtl_tcp_dongle_info::read(boost::asio::ip::tcp::socket &socket)
boost::system::error_code Rtl_Tcp_Dongle_Info::read(boost::asio::ip::tcp::socket &socket)
{
boost::system::error_code ec;
@@ -67,7 +67,7 @@ boost::system::error_code rtl_tcp_dongle_info::read(boost::asio::ip::tcp::socket
}
const char *rtl_tcp_dongle_info::get_type_name() const
const char *Rtl_Tcp_Dongle_Info::get_type_name() const
{
switch (get_tuner_type())
{
@@ -89,7 +89,7 @@ const char *rtl_tcp_dongle_info::get_type_name() const
}
double rtl_tcp_dongle_info::clip_gain(int gain) const
double Rtl_Tcp_Dongle_Info::clip_gain(int gain) const
{
// the following gain values have been copied from librtlsdr
// all gain values are expressed in tenths of a dB
@@ -146,7 +146,7 @@ double rtl_tcp_dongle_info::clip_gain(int gain) const
}
bool rtl_tcp_dongle_info::is_valid() const
bool Rtl_Tcp_Dongle_Info::is_valid() const
{
return std::memcmp(magic_, "RTL0", 4) == 0;
}

View File

@@ -39,7 +39,7 @@
* \brief This class represents the dongle information
* which is sent by rtl_tcp.
*/
class rtl_tcp_dongle_info
class Rtl_Tcp_Dongle_Info
{
private:
char magic_[4]{};
@@ -58,7 +58,7 @@ public:
TUNER_R828D
};
rtl_tcp_dongle_info();
Rtl_Tcp_Dongle_Info();
boost::system::error_code read(boost::asio::ip::tcp::socket &socket);