]> git.rkrishnan.org Git - dttsp.git/blobdiff - jDttSP/sdrexport.h
Major changes. Added metering and power spectrum, other fixes. Rearranged headers...
[dttsp.git] / jDttSP / sdrexport.h
index 9900339a820167a28e930039c578c64528746fc7..6303a6502b4011c866dc88770ae5f7769f14d1f1 100644 (file)
@@ -34,29 +34,39 @@ Bridgewater, NJ 08807
 #ifndef _sdrexport_h
 #define _sdrexport_h
   
-#include <common.h>
-
+#include <fromsys.h>
+#include <defs.h>
+#include <banal.h>
+#include <splitfields.h>
+#include <datatypes.h>
+#include <bufvec.h>
+#include <cxops.h>
+#include <ringb.h>
+#include <chan.h>
+#include <lmadf.h>
+#include <fftw.h>
+#include <ovsv.h>
+#include <filter.h>
+#include <oscillator.h>
+#include <digitalagc.h>
+#include <am_demod.h>
+#include <fm_demod.h>
+#include <noiseblanker.h>
+#include <correctIQ.h>
+#include <crc16.h>
+#include <speechproc.h>
+#include <spottone.h>
+#include <update.h>
+#include <local.h>
+#include <meter.h>
+#include <spectrum.h>
 //------------------------------------------------------------------------
 // max no. simultaneous receivers
+#ifndef MAXRX
 #define MAXRX (4)
+#endif
 //------------------------------------------------------------------------
 /* modulation types, modes */ 
-typedef enum _sdrmode {
-  LSB,                         //  0
-  USB,                         //  1
-  DSB,                         //  2
-  CWL,                         //  3
-  CWU,                         //  4
-  FMN,                         //  5
-  AM,                          //  6
-  PSK,                         //  7
-  SPEC,                                //  8
-  RTTY,                                //  9
-  SAM,                         // 10
-  DRM                          // 11
-} SDRMODE;
-
-typedef enum _trxmode { RX, TX } TRXMODE;
 
 //========================================================================
 /* RX/TX both */ 
@@ -70,16 +80,8 @@ extern struct _uni {
     TRXMODE trx;
   } mode;
 
-  struct {
-    BOOLEAN flag;
-    struct {
-      char *path;
-      size_t size;
-      Chan c;
-    } chan;
-    REAL val, avgval;
-    METERTYPE type;
-  } meter;
+  MeterBlock meter;
+  SpecBlock spec;
 
   struct {
     BOOLEAN flag;
@@ -238,12 +240,20 @@ extern struct _top {
       unsigned int frames, bytes;
     } size;
   } hold;
+
   struct {
     char *path;
     int fd;
     FILE *fp;
     char buff[4096];
   } parm;
+
+  struct {
+    struct {
+      char *path;
+      FILE *fp;
+    } mtr, spec;
+  } meas;
   
   struct {
     char name[256];
@@ -288,12 +298,13 @@ extern struct _top {
   struct {
     struct {
       pthread_t id;
-    } trx, upd, mon;
+    } trx, upd, mon, pws, mtr;
   } thrd;
+
   struct {
     struct {
       sem_t sem;
-    } buf, upd, mon;
+    } buf, upd, mon, pws, mtr;
   } sync;
   
   // TRX switching