GNU Radio's MIXALOT Package
gscencode_impl.h
Go to the documentation of this file.
1/* Written by Brandon Creighton <cstone@pobox.com>.
2 *
3 * This code is in the public domain; however, note that most of its
4 * dependent code, including GNU Radio, is not.
5 */
6
7#ifndef INCLUDED_MIXALOT_GSCENCODE_IMPL_H
8#define INCLUDED_MIXALOT_GSCENCODE_IMPL_H
9
11#include <queue>
12#include <itpp/comm/bch.h>
13
14using namespace itpp;
15using std::string;
16using std::shared_ptr;
17
18
19namespace gr {
20 namespace mixalot {
21
23 {
24 private:
25 std::queue<bool> d_bitqueue; // Queue of symbols to be sent out.
26 int d_msgtype; // message type
27 unsigned int d_capcode; // capcode (pager ID)
28 unsigned long d_symrate; // output symbol rate (must be evenly divisible by the baud rate)
29 std::string d_message; // message to send
30
31 inline void queuebit(bool bit);
32 inline unsigned long queuesize() { return d_bitqueue.size(); }
33 void calc_pagerid(const unsigned int code, unsigned int &word1, unsigned int &word2, unsigned int &preamble_idx);
34 void queue_comma(unsigned int nbits, bool startingpolarity);
35 void queue_preamble(unsigned int num);
36 void queue_startcode();
37 void queue_dup(bvec &bv);
38 void queue_dup_rev(bvec &bv);
39 void queue_address(unsigned int word1, unsigned int word2);
40 void queue_message();
41 void queue_data_block(unsigned char *blockmsg, bool continuebit);
42
43 public:
44 gscencode_impl(int msgtype, unsigned int capcode, std::string message, unsigned long symrate);
46
47 // Where all the action really happens
49 void queue(shared_ptr<bvec> bvptr);
50 void queue(uint32_t val);
51 int work(int noutput_items,
52 gr_vector_const_void_star &input_items,
53 gr_vector_void_star &output_items);
54 };
55
56
57 } // namespace mixalot
58} // namespace gr
59
60#endif /* INCLUDED_MIXALOT_GSCENCODE_IMPL_H */
61
Definition gscencode_impl.h:23
void queue(shared_ptr< bvec > bvptr)
gscencode_impl(int msgtype, unsigned int capcode, std::string message, unsigned long symrate)
void queue(uint32_t val)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition gscencode.h:20
Definition flexencode.h:13