libsdr  0.1.0
A simple SDR library
ax25.hh
1 #ifndef __SDR_AX25_HH__
2 #define __SDR_AX25_HH__
3 
4 #include "node.hh"
5 
6 
7 namespace sdr {
8 
20 class AX25: public Sink<uint8_t>, public Source
21 {
22 public:
24  AX25();
26  virtual ~AX25();
28  virtual void config(const Config &src_cfg);
30  virtual void process(const Buffer<uint8_t> &buffer, bool allow_overwrite);
31 
33  static void unpackCall(const uint8_t *buffer, std::string &call, int &ssid, bool &addrExt);
34 
35 protected:
37  uint32_t _bitstream;
39  uint32_t _bitbuffer;
41  uint32_t _state;
42 
44  uint8_t _rxbuffer[512];
46  uint8_t *_ptr;
47 
50 };
51 
52 }
53 
54 
55 #endif // __SDR_AX25_HH__
virtual ~AX25()
Destructor.
Definition: ax25.cc:60
uint32_t _state
The current state.
Definition: ax25.hh:41
A collection of configuration information that is send by a source to all connected sinks to properga...
Definition: node.hh:35
uint8_t * _ptr
Insert-pointer to the buffer.
Definition: ax25.hh:46
uint32_t _bitstream
The last bits.
Definition: ax25.hh:37
uint8_t _rxbuffer[512]
Message buffer.
Definition: ax25.hh:44
Typed sink.
Definition: node.hh:192
Definition: autocast.hh:8
Generic source class.
Definition: node.hh:213
AX25()
Constructor.
Definition: ax25.cc:54
virtual void process(const Buffer< uint8_t > &buffer, bool allow_overwrite)
Processes the bit stream.
Definition: ax25.cc:92
Decodes AX25 (PacketRadio) messages from a bit stream.
Definition: ax25.hh:20
uint32_t _bitbuffer
A buffer of received bits.
Definition: ax25.hh:39
static void unpackCall(const uint8_t *buffer, std::string &call, int &ssid, bool &addrExt)
Unpacks a AX.25 encoded call (address).
Definition: ax25.cc:163
virtual void config(const Config &src_cfg)
Configures the node.
Definition: ax25.cc:65
Buffer< uint8_t > _buffer
Output buffer.
Definition: ax25.hh:49