commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6399 - gnuradio/branches/developers/gnychis/inband/us


From: gnychis
Subject: [Commit-gnuradio] r6399 - gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband
Date: Tue, 11 Sep 2007 11:35:26 -0600 (MDT)

Author: gnychis
Date: 2007-09-11 11:35:26 -0600 (Tue, 11 Sep 2007)
New Revision: 6399

Modified:
   gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc
   gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h
   gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh
   
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac_symbols.h
   
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_gmac_tx.cc
Log:
Changing signal names and method names for handling carrier sense to be more
standard.


Modified: 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc   
2007-09-11 15:51:30 UTC (rev 6398)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc   
2007-09-11 17:35:26 UTC (rev 6399)
@@ -224,14 +224,14 @@
       if(pmt_eq(d_cs->port_symbol(), port_id)) {
         
         //------- ENABLE CARRIER SENSE --------------------------------------//
-        if(pmt_eq(event, s_cmd_enable_carrier_sense)) {
-          handle_cmd_enable_carrier_sense(data);
+        if(pmt_eq(event, s_cmd_carrier_sense_enable)) {
+          handle_cmd_carrier_sense_enable(data);
           return;
         }
 
         //------- DISABLE CARRIER SENSE -------------------------------------//
-        if(pmt_eq(event, s_cmd_disable_carrier_sense)) {
-          handle_cmd_disable_carrier_sense(data);
+        if(pmt_eq(event, s_cmd_carrier_sense_disable)) {
+          handle_cmd_carrier_sense_disable(data);
           return;
         }
 
@@ -589,7 +589,7 @@
 // C/S port.  It can be used to re-adjust the threshold or simply enabled
 // carrier sense.  When a threshold is not provided, the MAC will use an
 // averaging algorithm to determine the threshold (in the future).
-void gmac::handle_cmd_enable_carrier_sense(pmt_t data)
+void gmac::handle_cmd_carrier_sense_enable(pmt_t data)
 {
   pmt_t invocation_handle = pmt_nth(0, data);
   pmt_t threshold = pmt_nth(1, data);
@@ -609,7 +609,7 @@
 // over the control status channel.  It so far does not ellicit a response, 
this
 // needs to be added correctly.  It needs to wait for the response for the C/S
 // packet from usrp_server.
-void gmac::handle_cmd_disable_carrier_sense(pmt_t data) 
+void gmac::handle_cmd_carrier_sense_disable(pmt_t data) 
 {
   pmt_t invocation_handle = pmt_nth(0, data);
   

Modified: 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h    
2007-09-11 15:51:30 UTC (rev 6398)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h    
2007-09-11 17:35:26 UTC (rev 6399)
@@ -79,8 +79,8 @@
   void handle_cmd_tx_pkt(pmt_t data);
   void handle_response_xmit_raw_frame(pmt_t data);
   bool carrier_sense_pkt(pmt_t pkt_properties);
-  void handle_cmd_enable_carrier_sense(pmt_t data);
-  void handle_cmd_disable_carrier_sense(pmt_t data);
+  void handle_cmd_carrier_sense_enable(pmt_t data);
+  void handle_cmd_carrier_sense_disable(pmt_t data);
  
 };
 

Modified: 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh  
2007-09-11 15:51:30 UTC (rev 6398)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh  
2007-09-11 17:35:26 UTC (rev 6399)
@@ -121,8 +121,8 @@
     ;; Threshold represents the carrier sense threshold based on the digital
     ;; reading out of the DAC.  If the threshold is set to PMT_NIL then the
     ;; MAC will use averaging to determine an appropriate threshold.
-    (cmd-enable-carrier-sense invocation-handle threshold)
-    (cmd-disable-carrier-sense invocation-handle)
+    (cmd-carrier-sense-enable invocation-handle threshold)
+    (cmd-carrier-sense-disable invocation-handle)
 
     ;; Setting the number of fast transmission retries on a failure before
     ;; reporting a loss back to the application.
@@ -134,8 +134,8 @@
 
     (response-gmac-initialized invocation-handle status)
 
-    (response-enable-carrier-sense invocation-handle status)
-    (response-disable-carrier-sense invocation-handle status)
+    (response-carrier-sense-enable invocation-handle status)
+    (response-carrier-sense-disable invocation-handle status)
 
     (response-set-tx-retries invocation-handle status)
 

Modified: 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac_symbols.h
===================================================================
--- 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac_symbols.h
    2007-09-11 15:51:30 UTC (rev 6398)
+++ 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac_symbols.h
    2007-09-11 17:35:26 UTC (rev 6399)
@@ -32,12 +32,12 @@
 static pmt_t s_response_rx_pkt = pmt_intern("response-rx-pkt");
 
 // CS
-static pmt_t s_cmd_enable_carrier_sense = 
pmt_intern("cmd-enable-carrier-sense");
-static pmt_t s_cmd_disable_carrier_sense = 
pmt_intern("cmd-disable-carrier-sense");
+static pmt_t s_cmd_carrier_sense_enable = 
pmt_intern("cmd-carrier-sense-enable");
+static pmt_t s_cmd_carrier_sense_disable = 
pmt_intern("cmd-carrier-sense-disable");
 static pmt_t s_cmd_set_tx_retries = pmt_intern("cmd-set-tx-retries");
 static pmt_t s_response_gmac_initialized = 
pmt_intern("response-gmac-initialized");
-static pmt_t s_response_enable_carrier_sense = 
pmt_intern("response-enable-carrier-sense");
-static pmt_t s_response_disable_carrier_sense = 
pmt_intern("response-disable-carrier-sense");
+static pmt_t s_response_carrier_sense_enable = 
pmt_intern("response-carrier-sense-enable");
+static pmt_t s_response_carrier_sense_disable = 
pmt_intern("response-carrier-sense-disable");
 static pmt_t s_response_set_tx_retries = pmt_intern("response-set-tx-retries");
 
 #endif // INCLUDED_GMAC_SYMBOLS_H

Modified: 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_gmac_tx.cc
===================================================================
--- 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_gmac_tx.cc
   2007-09-11 15:51:30 UTC (rev 6398)
+++ 
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/test_gmac_tx.cc
   2007-09-11 17:35:26 UTC (rev 6399)
@@ -242,24 +242,24 @@
   // Per packet properties
   pmt_t tx_properties = pmt_make_dict();
     
-  if(d_nframes_xmitted > 25000) {
-    pmt_dict_set(tx_properties,
-                 pmt_intern("carrier-sense"),
-                 PMT_F);
-  }
+//  if(d_nframes_xmitted > 25000) {
+//    pmt_dict_set(tx_properties,
+//                 pmt_intern("carrier-sense"),
+//                 PMT_F);
+//  }
+//
+//  if(d_nframes_xmitted > 35000) {
+//    pmt_dict_set(tx_properties,
+//                 pmt_intern("carrier-sense"),
+//                 PMT_NIL);
+//  }
+//
+//  if(d_nframes_xmitted == 40000) {
+//    d_cs->send(s_cmd_carrier_sense_enable, 
+//               pmt_list2(PMT_NIL,
+//                         pmt_from_long(100)));
+//  }
 
-  if(d_nframes_xmitted > 35000) {
-    pmt_dict_set(tx_properties,
-                 pmt_intern("carrier-sense"),
-                 PMT_NIL);
-  }
-
-  if(d_nframes_xmitted == 40000) {
-    d_cs->send(s_cmd_enable_carrier_sense, 
-               pmt_list2(PMT_NIL,
-                         pmt_from_long(100)));
-  }
-
   pmt_t timestamp = pmt_from_long(0xffffffff); // NOW
   d_tx->send(s_cmd_tx_pkt,
             pmt_list4(PMT_NIL,   // invocation-handle





reply via email to

[Prev in Thread] Current Thread [Next in Thread]