GNU Radio's AIS Package
pdu_to_nmea_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 <+YOU OR YOUR COMPANY+>.
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_AIS_PDU_TO_NMEA_IMPL_H
22 #define INCLUDED_AIS_PDU_TO_NMEA_IMPL_H
23 
24 #include <ais/pdu_to_nmea.h>
25 #include <pmt/pmt.h>
26 #include <string>
27 
28 namespace gr {
29  namespace ais {
30 
32  {
33  private:
34  void print(pmt::pmt_t msg);
35  void to_nmea(pmt::pmt_t msg);
36  std::vector<uint8_t> unpack_bits(pmt::pmt_t msg, uint8_t *npad);
37  std::string to_ascii(std::vector<uint8_t> msg);
38  uint8_t get_checksum(std::string &msg);
39  std::string to_sentence(std::string ascii, uint8_t npad);
40  std::string msg_to_sentence(pmt::pmt_t msg);
41 
42  std::string d_designator;
43 
44  public:
45  pdu_to_nmea_impl(std::string designator);
47  };
48 
49  } // namespace ais
50 } // namespace gr
51 
52 #endif /* INCLUDED_AIS_PDU_TO_NMEA_IMPL_H */
53 
pdu_to_nmea_impl(std::string designator)
<+description of block+>
Definition: pdu_to_nmea.h:36
Definition: pdu_to_nmea_impl.h:31