Merge branch 'master' into parse

This commit is contained in:
Nick Foster 2012-07-16 15:24:35 -07:00
commit 7388a8e910
5 changed files with 12 additions and 11 deletions

View File

@ -24,17 +24,18 @@
#define INCLUDED_AIR_MODES_PREAMBLE_H
#include <gr_block.h>
#include <air_modes_api.h>
class air_modes_preamble;
typedef boost::shared_ptr<air_modes_preamble> air_modes_preamble_sptr;
air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db);
AIR_MODES_API air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db);
/*!
* \brief mode select preamble detection
* \ingroup block
*/
class air_modes_preamble : public gr_block
class AIR_MODES_API air_modes_preamble : public gr_block
{
private:
friend air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db);

View File

@ -25,17 +25,18 @@
#include <gr_sync_block.h>
#include <gr_msg_queue.h>
#include <air_modes_api.h>
class air_modes_slicer;
typedef boost::shared_ptr<air_modes_slicer> air_modes_slicer_sptr;
air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue);
AIR_MODES_API air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue);
/*!
* \brief mode select slicer detection
* \ingroup block
*/
class air_modes_slicer : public gr_sync_block
class AIR_MODES_API air_modes_slicer : public gr_sync_block
{
private:
friend air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue);

View File

@ -29,9 +29,8 @@
#include <string.h>
#include <iostream>
#include <gr_tags.h>
#include <air_modes_api.h>
AIR_MODES_API air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db)
air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db)
{
return air_modes_preamble_sptr (new air_modes_preamble(channel_rate, threshold_db));
}

View File

@ -32,7 +32,6 @@
#include <modes_crc.h>
#include <iostream>
#include <gr_tags.h>
#include <air_modes_api.h>
extern "C"
{
@ -40,7 +39,7 @@ extern "C"
#include <string.h>
}
AIR_MODES_API air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue)
air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue)
{
return air_modes_slicer_sptr (new air_modes_slicer(channel_rate, queue));
}

View File

@ -64,6 +64,7 @@ class modes_output_sbs1(modes_parse.modes_parse):
def output(self, msg):
try:
sbs1_msg = self.parse(msg)
if sbs1_msg is not None:
for conn in self._conns[:]: #iterate over a copy of the list
conn.send(sbs1_msg)
except socket.error:
@ -145,7 +146,7 @@ class modes_output_sbs1(modes_parse.modes_parse):
def pp5(self, shortdata, ecc):
# I'm not sure what to do with the identiifcation shortdata & 0x1FFF
[datestr, timestr] = self.current_time()
[fs, dr, um, ident] = self.parse5(shortdata)
[fs, dr, um] = self.parse5(shortdata)
aircraft_id = self.get_aircraft_id(ecc)
retstr = "MSG,6,0,%i,%06X,%i,%s,%s,%s,%s,,,,,,,,," % (aircraft_id, ecc, aircraft_id+100, datestr, timestr, datestr, timestr)
return retstr + self.decode_fs(fs) + "\n"