Add request to ofdm.c
authorokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 16 Jun 2017 10:27:51 +0000 (10:27 +0000)
committerokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 16 Jun 2017 10:27:51 +0000 (10:27 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3200 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/codec2_ofdm.h
codec2-dev/src/ofdm.c

index f5d9700f5426784132a43391832c2a6e6b69ffff..11265bdd483306bfa54389593396635ab043549e 100644 (file)
@@ -49,15 +49,16 @@ struct OFDM *ofdm_create(void);
 void ofdm_destroy(struct OFDM *);
 void ofdm_mod(struct OFDM *, COMP *, const int *);
 void ofdm_demod(struct OFDM *, int *, COMP *);
+int ofdm_get_nin(struct OFDM *);
 
 /* option setters */
 
-void set_verbose(struct OFDM *, int);
-void set_timing_enable(struct OFDM *, bool);
-void set_foff_est_enable(struct OFDM *, bool);
-void set_phase_est_enable(struct OFDM *, bool);
-void set_foff_est_gain(struct OFDM *, float);
-void set_off_est_hz(struct OFDM *, float);
+void ofdm_set_verbose(struct OFDM *, int);
+void ofdm_set_timing_enable(struct OFDM *, bool);
+void ofdm_set_foff_est_enable(struct OFDM *, bool);
+void ofdm_set_phase_est_enable(struct OFDM *, bool);
+void ofdm_set_foff_est_gain(struct OFDM *, float);
+void ofdm_set_off_est_hz(struct OFDM *, float);
 
 #ifdef __cplusplus
 }
index 13dfbe1afe22f4e212ababbb569d2ebf1dd7896d..23e676c8316e5f7855947eeefce6a39c71703916 100644 (file)
@@ -304,6 +304,13 @@ struct OFDM *ofdm_create() {
         }
     }
 
+
+    for (i = 0; i < (OFDM_NS + 3); i++) {
+        for (j = 0; j < (OFDM_NC + 2); j++) {
+            ofdm->rx_sym[i][j] = 0.0f + 0.0f * I;
+        }
+    }
+
     /* default settings of options and states */
 
     ofdm->verbose = 0;
@@ -345,27 +352,31 @@ struct OFDM *ofdm_create() {
 void ofdm_destroy(struct OFDM *ofdm) {
 }
 
-void set_verbose(struct OFDM *ofdm, int level) {
+int ofdm_get_nin(struct OFDM *ofdm) {
+    return ofdm->nin;
+}
+
+void ofdm_set_verbose(struct OFDM *ofdm, int level) {
     ofdm->verbose = level;
 }
 
-void set_timing_enable(struct OFDM *ofdm, bool val) {
+void ofdm_set_timing_enable(struct OFDM *ofdm, bool val) {
     ofdm->timing_en = val;
 }
 
-void set_foff_est_enable(struct OFDM *ofdm, bool val) {
+void ofdm_set_foff_est_enable(struct OFDM *ofdm, bool val) {
     ofdm->foff_est_en = val;
 }
 
-void set_phase_est_enable(struct OFDM *ofdm, bool val) {
+void ofdm_set_phase_est_enable(struct OFDM *ofdm, bool val) {
     ofdm->phase_est_en = val;
 }
 
-void set_foff_est_gain(struct OFDM *ofdm, float val) {
+void ofdm_set_foff_est_gain(struct OFDM *ofdm, float val) {
     ofdm->foff_est_gain = val;
 }
 
-void set_off_est_hz(struct OFDM *ofdm, float val) {
+void ofdm_set_off_est_hz(struct OFDM *ofdm, float val) {
     ofdm->foff_est_hz = val;
 }