GNU Radio's LORA Package
debugger.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2017 Pieter Robyns.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_DEBUGGER_H
22#define INCLUDED_DEBUGGER_H
23
24#include <gnuradio/gr_complex.h>
25#include <vector>
26#include <stdint.h>
27
28#define PACKED __attribute__((packed, aligned(1)))
29
30namespace gr {
31 namespace lora {
32 class debugger {
33 public:
34 debugger();
35 virtual ~debugger();
36
37 void attach(std::string path = "/tmp/gr_lora.sock");
38 void detach(void);
39 void analyze_samples(bool clear, bool draw_over);
40 void store_samples(const gr_complex* samples, uint32_t length);
41 private:
42 typedef struct header {
43 uint32_t length;
44 bool draw_over;
45 } PACKED header;
46
47 void send_samples();
48 std::vector<gr_complex> d_samples;
49 int d_socket;
50 bool d_attached;
51 };
52 }
53}
54
55#endif /* INCLUDED_DEBUGGER_H */
#define PACKED
Definition debugger.h:28
Definition channelizer.h:28