clang format, similar to GNU Radio

This commit is contained in:
Bastian Bloessl
2021-07-17 10:07:21 +02:00
parent 5f7e102e3d
commit a2491b5474
50 changed files with 3331 additions and 3059 deletions
+2 -2
View File
@@ -20,9 +20,9 @@
#include <gnuradio/attributes.h>
#ifdef gnuradio_ieee802_11_EXPORTS
# define IEEE802_11_API __GR_ATTR_EXPORT
#define IEEE802_11_API __GR_ATTR_EXPORT
#else
# define IEEE802_11_API __GR_ATTR_IMPORT
#define IEEE802_11_API __GR_ATTR_IMPORT
#endif
#endif /* INCLUDED_IEEE802_11_API_H */
+3 -3
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_CHUNKS_TO_SYMBOLS_H
#define INCLUDED_IEEE802_11_CHUNKS_TO_SYMBOLS_H
#include <ieee802_11/api.h>
#include <gnuradio/tagged_stream_block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,8 +26,8 @@ namespace ieee802_11 {
class IEEE802_11_API chunks_to_symbols : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<chunks_to_symbols> sptr;
static sptr make();
typedef boost::shared_ptr<chunks_to_symbols> sptr;
static sptr make();
};
} /* namespace ieee802_11 */
+13 -14
View File
@@ -18,8 +18,8 @@
#ifndef INCLUDED_IEEE802_11_CONSTELLATIONS_H
#define INCLUDED_IEEE802_11_CONSTELLATIONS_H
#include <ieee802_11/api.h>
#include <gnuradio/digital/constellation.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -27,45 +27,44 @@ namespace ieee802_11 {
class IEEE802_11_API constellation_bpsk : virtual public digital::constellation
{
public:
typedef boost::shared_ptr<gr::ieee802_11::constellation_bpsk> sptr;
static sptr make();
typedef boost::shared_ptr<gr::ieee802_11::constellation_bpsk> sptr;
static sptr make();
protected:
constellation_bpsk();
constellation_bpsk();
};
class IEEE802_11_API constellation_qpsk : virtual public digital::constellation
{
public:
typedef boost::shared_ptr<gr::ieee802_11::constellation_qpsk> sptr;
static sptr make();
typedef boost::shared_ptr<gr::ieee802_11::constellation_qpsk> sptr;
static sptr make();
protected:
constellation_qpsk();
constellation_qpsk();
};
class IEEE802_11_API constellation_16qam : virtual public digital::constellation
{
public:
typedef boost::shared_ptr<gr::ieee802_11::constellation_16qam> sptr;
static sptr make();
typedef boost::shared_ptr<gr::ieee802_11::constellation_16qam> sptr;
static sptr make();
protected:
constellation_16qam();
constellation_16qam();
};
class IEEE802_11_API constellation_64qam : virtual public digital::constellation
{
public:
typedef boost::shared_ptr<gr::ieee802_11::constellation_64qam> sptr;
static sptr make();
typedef boost::shared_ptr<gr::ieee802_11::constellation_64qam> sptr;
static sptr make();
protected:
constellation_64qam();
constellation_64qam();
};
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_CONSTELLATIONS_H */
+5 -9
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_DECODE_MAC_H
#define INCLUDED_IEEE802_11_DECODE_MAC_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,15 +26,11 @@ namespace ieee802_11 {
class IEEE802_11_API decode_mac : virtual public block
{
public:
typedef boost::shared_ptr<decode_mac> sptr;
static sptr make(bool log = false, bool debug = false);
typedef boost::shared_ptr<decode_mac> sptr;
static sptr make(bool log = false, bool debug = false);
};
} // namespace ieee802_11
} // namespace gr
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_DECODE_MAC_H */
+5 -7
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_ETHER_ENCAP_H
#define INCLUDED_IEEE802_11_ETHER_ENCAP_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,13 +26,11 @@ namespace ieee802_11 {
class IEEE802_11_API ether_encap : virtual public block
{
public:
typedef boost::shared_ptr<ether_encap> sptr;
static sptr make(bool debug);
typedef boost::shared_ptr<ether_encap> sptr;
static sptr make(bool debug);
};
} // namespace ieee802_11
} // namespace gr
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_ETHER_ENCAP_H */
+5 -4
View File
@@ -21,16 +21,17 @@
#ifndef INCLUDED_IEEE802_11_EXTRACT_CSI_H
#define INCLUDED_IEEE802_11_EXTRACT_CSI_H
#include <ieee802_11/api.h>
#include <gnuradio/sync_block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
class IEEE802_11_API extract_csi : virtual public gr::sync_block {
class IEEE802_11_API extract_csi : virtual public gr::sync_block
{
public:
typedef boost::shared_ptr<extract_csi> sptr;
static sptr make();
typedef boost::shared_ptr<extract_csi> sptr;
static sptr make();
};
} // namespace ieee802_11
+10 -11
View File
@@ -20,14 +20,14 @@
#ifndef INCLUDED_IEEE802_11_FRAME_EQUALIZER_H
#define INCLUDED_IEEE802_11_FRAME_EQUALIZER_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
enum Equalizer {
LS = 0,
LMS = 1,
COMB = 2,
STA = 3,
LS = 0,
LMS = 1,
COMB = 2,
STA = 3,
};
namespace gr {
@@ -37,12 +37,11 @@ class IEEE802_11_API frame_equalizer : virtual public gr::block
{
public:
typedef boost::shared_ptr<frame_equalizer> sptr;
static sptr make(Equalizer algo, double freq, double bw,
bool log, bool debug);
virtual void set_algorithm(Equalizer algo) = 0;
virtual void set_bandwidth(double bw) = 0;
virtual void set_frequency(double freq) = 0;
typedef boost::shared_ptr<frame_equalizer> sptr;
static sptr make(Equalizer algo, double freq, double bw, bool log, bool debug);
virtual void set_algorithm(Equalizer algo) = 0;
virtual void set_bandwidth(double bw) = 0;
virtual void set_frequency(double freq) = 0;
};
} // namespace ieee802_11
+7 -8
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_MAC_H
#define INCLUDED_IEEE802_11_MAC_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,14 +26,13 @@ namespace ieee802_11 {
class IEEE802_11_API mac : virtual public block
{
public:
typedef boost::shared_ptr<mac> sptr;
static sptr make(std::vector<uint8_t> src_mac,
std::vector<uint8_t> dst_mac,
std::vector<uint8_t> bss_mac);
typedef boost::shared_ptr<mac> sptr;
static sptr make(std::vector<uint8_t> src_mac,
std::vector<uint8_t> dst_mac,
std::vector<uint8_t> bss_mac);
};
} // namespace ieee802_11
} // namespace gr
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_MAC_H */
+14 -15
View File
@@ -17,18 +17,18 @@
#ifndef INCLUDED_IEEE802_11_MAPPER_H
#define INCLUDED_IEEE802_11_MAPPER_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
enum Encoding {
BPSK_1_2 = 0,
BPSK_3_4 = 1,
QPSK_1_2 = 2,
QPSK_3_4 = 3,
QAM16_1_2 = 4,
QAM16_3_4 = 5,
QAM64_2_3 = 6,
QAM64_3_4 = 7,
BPSK_1_2 = 0,
BPSK_3_4 = 1,
QPSK_1_2 = 2,
QPSK_3_4 = 3,
QAM16_1_2 = 4,
QAM16_3_4 = 5,
QAM64_2_3 = 6,
QAM64_3_4 = 7,
};
namespace gr {
@@ -37,13 +37,12 @@ namespace ieee802_11 {
class IEEE802_11_API mapper : virtual public block
{
public:
typedef boost::shared_ptr<mapper> sptr;
static sptr make(Encoding mcs, bool debug = false);
virtual void set_encoding(Encoding mcs) = 0;
typedef boost::shared_ptr<mapper> sptr;
static sptr make(Encoding mcs, bool debug = false);
virtual void set_encoding(Encoding mcs) = 0;
};
} // namespace ieee802_11
} // namespace gr
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_MAPPER_H */
+3 -5
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_PARSE_MAC_H
#define INCLUDED_IEEE802_11_PARSE_MAC_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,10 +26,8 @@ namespace ieee802_11 {
class IEEE802_11_API parse_mac : virtual public block
{
public:
typedef boost::shared_ptr<parse_mac> sptr;
static sptr make(bool log = false, bool debug = false);
typedef boost::shared_ptr<parse_mac> sptr;
static sptr make(bool log = false, bool debug = false);
};
} // namespace ieee802_11
+4 -5
View File
@@ -18,8 +18,8 @@
#ifndef INCLUDED_IEEE802_11_SIGNAL_FIELD_H
#define INCLUDED_IEEE802_11_SIGNAL_FIELD_H
#include <ieee802_11/api.h>
#include <gnuradio/digital/packet_header_default.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -27,15 +27,14 @@ namespace ieee802_11 {
class IEEE802_11_API signal_field : virtual public digital::packet_header_default
{
public:
typedef boost::shared_ptr<signal_field> sptr;
static sptr make();
typedef boost::shared_ptr<signal_field> sptr;
static sptr make();
protected:
signal_field();
signal_field();
};
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_SIGNAL_FIELD_H */
+5 -8
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_SYNC_LONG_H
#define INCLUDED_IEEE802_11_SYNC_LONG_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,14 +26,11 @@ namespace ieee802_11 {
class IEEE802_11_API sync_long : virtual public block
{
public:
typedef boost::shared_ptr<sync_long> sptr;
static sptr make(unsigned int sync_length,
bool log = false, bool debug = false);
typedef boost::shared_ptr<sync_long> sptr;
static sptr make(unsigned int sync_length, bool log = false, bool debug = false);
};
} // namespace ieee802_11
} // namespace gr
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_SYNC_LONG_H */
+8 -7
View File
@@ -17,8 +17,8 @@
#ifndef INCLUDED_IEEE802_11_SYNC_SHORT_H
#define INCLUDED_IEEE802_11_SYNC_SHORT_H
#include <ieee802_11/api.h>
#include <gnuradio/block.h>
#include <ieee802_11/api.h>
namespace gr {
namespace ieee802_11 {
@@ -26,13 +26,14 @@ namespace ieee802_11 {
class IEEE802_11_API sync_short : virtual public block
{
public:
typedef boost::shared_ptr<sync_short> sptr;
static sptr make(double threshold, unsigned int min_plateau, bool log = false, bool debug = false);
typedef boost::shared_ptr<sync_short> sptr;
static sptr make(double threshold,
unsigned int min_plateau,
bool log = false,
bool debug = false);
};
} // namespace ieee802_11
} // namespace gr
} // namespace ieee802_11
} // namespace gr
#endif /* INCLUDED_IEEE802_11_SYNC_SHORT_H */