[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r6386 - gnuradio/branches/developers/gnychis/inband/us
From: |
gnychis |
Subject: |
[Commit-gnuradio] r6386 - gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband |
Date: |
Mon, 10 Sep 2007 14:21:08 -0600 (MDT) |
Author: gnychis
Date: 2007-09-10 14:21:08 -0600 (Mon, 10 Sep 2007)
New Revision: 6386
Added:
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
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/Makefile.am
Log:
Beginning to build a small MAC layer m-block, 'gmac' ... no I'm not conceited,
it's GNU Radio MAC, not George MAC ;) ... for now!
Property changes on:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
.la
.lo
.deps
.libs
*.la
*.lo
*.dat
usrper
usrper2
test_input
test_fusb
test_usrp
test_usrp0
test_usrp_standard_rx
test_usrp_standard_tx
test_usrp_inband_timestamps
test_usrp_inband_registers
test_usrp_inband_rx
test_usrp_inband_tx
test_usrp_basic_rx
check_order_quickly
usrp_cal_dc_offset
test_usrp_inband_cs
read_packets
test_usrp_inband_ping
test_usrp_inband_underrun
+ Makefile
Makefile.in
.la
.lo
.deps
.libs
*.la
*.lo
*.dat
usrper
usrper2
test_input
test_fusb
test_usrp
test_usrp0
test_usrp_standard_rx
test_usrp_standard_tx
test_usrp_inband_timestamps
test_usrp_inband_registers
test_usrp_inband_rx
test_usrp_inband_tx
test_usrp_basic_rx
check_order_quickly
usrp_cal_dc_offset
test_usrp_inband_cs
read_packets
test_usrp_inband_ping
test_usrp_inband_underrun
test_usrp_inband_overrun
gmac_mbh.cc
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/Makefile.am
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/Makefile.am
2007-09-10 19:55:36 UTC (rev 6385)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/Makefile.am
2007-09-10 20:21:08 UTC (rev 6386)
@@ -43,7 +43,33 @@
ui_nco.h \
ui_sincos.h
+EXTRA_DIST = \
+ gmac.mbh
+lib_LTLIBRARIES = \
+ libgmac.la
+
+#------------------------------------------------------------------
+# Build gmac sources
+
+BUILT_SOURCES = \
+ gmac_mbh.cc
+
+gmac_mbh.cc : gmac.mbh
+ $(COMPILE_MBH) $(srcdir)/gmac.mbh gmac_mbh.cc
+
+libgmac_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ gmac.cc
+
+libgmac_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
+
+libgmac_inband_la_LIBADD = \
+ $(MBLOCK_LA) \
+ $(USRP_LA) \
+ -lstdc++
+
+
test_usrp_inband_cs_SOURCES = test_usrp_inband_cs.cc ui_sincos.c
test_usrp_inband_cs_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
Added: gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc
(rev 0)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.cc
2007-09-10 20:21:08 UTC (rev 6386)
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gmac.h>
+
+#include <mb_mblock.h>
+#include <mb_runtime.h>
+#include <mb_runtime_nop.h> // QA only
+#include <mb_protocol_class.h>
+#include <mb_exception.h>
+#include <mb_msg_queue.h>
+#include <mb_message.h>
+#include <mb_mblock_impl.h>
+#include <mb_msg_accepter.h>
+#include <mb_class_registry.h>
+#include <pmt.h>
+#include <ui_nco.h>
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+
+#include <symbols_usrp_server_cs.h>
+#include <symbols_usrp_channel.h>
+#include <symbols_usrp_low_level_cs.h>
+#include <symbols_usrp_tx.h>
+
+static bool verbose = false;
+
+gmac::gmac(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
+ : mb_mblock(rt, instance_name, user_arg)
+{
+
+}
+
+gmac::~gmac()
+{
+}
Added: gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h
(rev 0)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.h
2007-09-10 20:21:08 UTC (rev 6386)
@@ -0,0 +1,44 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GMAC_H
+#define INCLUDED_GMAC_H
+
+#include <mb_mblock.h>
+
+class gmac;
+
+class gmac : public mb_mblock
+{
+
+ mb_port_sptr d_cs;
+ mb_port_sptr d_tx;
+ mb_port_sptr d_rx;
+
+ public:
+ gmac(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
+ ~gmac();
+
+ private:
+
+};
+
+#endif // INCLUDED_GMAC_H
Added:
gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh
===================================================================
--- gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh
(rev 0)
+++ gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband/gmac.mbh
2007-09-10 20:21:08 UTC (rev 6386)
@@ -0,0 +1,141 @@
+;; -*- scheme -*- ; not really, but tells emacs how to format this
+;;
+;; Copyright 2007 Free Software Foundation, Inc.
+;;
+;; This file is part of GNU Radio
+;;
+;; GNU Radio is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Radio is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;
+
+;; ----------------------------------------------------------------
+;; This is an mblock header file
+;;
+;; The format is very much a work-in-progress.
+;; It'll be compiled to C++.
+;; ----------------------------------------------------------------
+
+;; In the outgoing messages described below, invocation-handle is an
+;; identifier provided by the client to tag the method invocation.
+;; The identifier will be returned with the response, to provide the
+;; client with a mechanism to match asynchronous responses with the
+;; commands that generate them. The value of the invocation-handle is
+;; opaque the the server, and is not required by the server to be
+;; unique.
+;;
+;; In the incoming messages described below, invocation-handle is the
+;; identifier provided by the client in the prompting invocation. The
+;; identifier is returned with the response, so that the client has a
+;; mechanism to match asynchronous responses with the commands that
+;; generated them.
+;;
+;; status is either #t, indicating success, or a symbol indicating an error.
+;; All symbol's names shall begin with %error-
+
+
+;; ----------------------------------------------------------------
+;; gmac-tx
+;;
+;; The protocol class is defined from the client's point-of-view.
+;; (The client port is unconjugated, the server port is conjugated.)
+
+(define-protocol-class gmac-tx
+
+ (:outgoing
+
+ ;; Transmitting packets can carry an invocation handle so the application
+ ;; can get TX results on specific packets, such as whether a packet tagged
+ ;; as #1 was successfully transmitted or not. This would allow the
+ ;; application to implement something sliding window like.
+ ;;
+ ;; 'dst' is the destination MAC address (given a MAC addressing scheme)
+ ;;
+ ;; 'data' will be treated transparently and passed on as samples.
+ ;;
+ ;; 'properties' can be used in the future to set per-packet options such as
+ ;; carrier sense overriding functionality.
+ (cmd-tx-pkt invocation-handle dst data properties)
+
+ )
+
+ (:incoming
+
+ ;; The response will carry the same invocation-handle passed with
cmd-tx-pkt
+ (response-tx-pkt invocation-handle status)
+
+ )
+ )
+
+;; ----------------------------------------------------------------
+;; gmac-rx
+;;
+;; The protocol class is defined from the client's point-of-view.
+;; (The client port is unconjugated, the server port is conjugated.)
+
+(define-protocol-class usrp-rx
+
+ (:outgoing
+
+ ;; There are currently no outgoing commands, I believe that the RX
+ ;; should always be enabled, there is no point in having an enable/disable
+ ;; that I can see.
+
+ )
+
+ (:incoming
+
+ ;; Contains packets decoded by the MAC destined for this machine, sent by
+ ;; the specified address.
+ (response-rx-pkt invocation-handle src data)
+
+ )
+ )
+
+
+;; ----------------------------------------------------------------
+;; gmac-cs
+;;
+;; The protocol class is defined from the client's point-of-view.
+;; (The client port is unconjugated, the server port is conjugated.)
+;;
+;; This defines a control/status interface to the MAC layer, for control over
+;; functionality such as carrier sense and future functionality such as channel
+;; hopping.
+
+
+(define-protocol-class gmac-cs
+
+ (:outgoing
+
+ ;; 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)
+
+ ;; Setting the number of fast transmission retries on a failure before
+ ;; reporting a loss back to the application.
+ (cmd-set-tx-retries invocation-handle retries)
+
+ )
+
+ (:incoming
+
+ (response-enable-carrier-sense invocation-handle status)
+ (response-disable-carrier-sense invocation-handle status)
+
+ (response-set-tx-retries invocation-handle status)
+
+ )
+ )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r6386 - gnuradio/branches/developers/gnychis/inband/usrp/host/apps-inband,
gnychis <=