GNU Radio's MIXALOT Package
flexencode_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_FLEXENCODE_IMPL_H
8#define INCLUDED_MIXALOT_FLEXENCODE_IMPL_H
9
11#include <queue>
12#include <vector>
13#include <itpp/comm/bch.h>
14
15using namespace itpp;
16using std::string;
17using std::vector;
18using std::shared_ptr;
19
20
21namespace gr {
22 namespace mixalot {
23
25 {
26 private:
27 std::queue<bool> d_bitqueue; // Queue of symbols to be sent out.
28 std::vector<string> d_cmdlist; // List of command IDs to ack
29 unsigned int d_baudrate; // baud rate to transmit at
30 unsigned long d_symrate; // output symbol rate (must be evenly divisible by the baud rate)
31
32 inline void queuebit(bool bit);
33
34 public:
37
39 void add_command_id(std::string cmdid);
40 bool queue_pocsag_batch(msgtype_t msgtype, unsigned int baudrate, unsigned int capcode, std::string message);
41 bool queue_flex_batch(const msgtype_t msgtype, const vector<uint32_t> &codes, const char *msgbody);
42 boost::mutex bitqueue_mutex;
43 boost::mutex cmdlist_mutex;
44
45 void tune_target(double freqhz);
46 bool make_standard_numeric_msg(unsigned int nwords, unsigned int message_start, const string msg, vector<uint32_t> &vecwords, vector<uint32_t> &msgwords, uint32_t &checksum);
47 bool make_alphanumeric_msg(unsigned int num_address_words, unsigned int message_start, const string msg, vector<uint32_t> &vecwords, vector<uint32_t> &msgwords);
48 void beeps_message(pmt::pmt_t msg);
49 void beeps_output(string const &msgtext);
50
51 void queue_pocsag(shared_ptr<bvec> bvptr);
52 void queue_pocsag(uint32_t val);
53 void queue(shared_ptr<bvec> bvptr);
54 void queue(uint8_t *arr, size_t sz);
55 void queue(uint32_t val);
56 int work(int noutput_items,
57 gr_vector_const_void_star &input_items,
58 gr_vector_void_star &output_items);
59 };
60
61
62 } // namespace mixalot
63} // namespace gr
64
65#endif /* INCLUDED_MIXALOT_FLEXENCODE_IMPL_H */
66
Definition flexencode_impl.h:25
void queue_pocsag(uint32_t val)
void add_command_id(std::string cmdid)
void tune_target(double freqhz)
boost::mutex cmdlist_mutex
Definition flexencode_impl.h:43
bool make_standard_numeric_msg(unsigned int nwords, unsigned int message_start, const string msg, vector< uint32_t > &vecwords, vector< uint32_t > &msgwords, uint32_t &checksum)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void queue(shared_ptr< bvec > bvptr)
void queue(uint8_t *arr, size_t sz)
void queue(uint32_t val)
boost::mutex bitqueue_mutex
Definition flexencode_impl.h:42
bool make_alphanumeric_msg(unsigned int num_address_words, unsigned int message_start, const string msg, vector< uint32_t > &vecwords, vector< uint32_t > &msgwords)
void beeps_message(pmt::pmt_t msg)
void beeps_output(string const &msgtext)
bool queue_pocsag_batch(msgtype_t msgtype, unsigned int baudrate, unsigned int capcode, std::string message)
void queue_pocsag(shared_ptr< bvec > bvptr)
bool queue_flex_batch(const msgtype_t msgtype, const vector< uint32_t > &codes, const char *msgbody)
Definition flexencode.h:18
msgtype_t
Definition flexencode.h:21
Definition flexencode.h:13