summaryrefslogtreecommitdiff
path: root/usrp/host/lib/inband/usrp_interface.mbh
blob: ad0f78b4e1264154d1bbe5d9bf2c0e6741016707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
;; -*- 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++.
;; ----------------------------------------------------------------

;; ----------------------------------------------------------------
;; usrp-interface-cs
;;
;; Handles interaction between the usrp_sever and the USB interface

(define-protocol-class usrp-interface-cs

  (:outgoing
   (cmd-usrp-open invocation-handle which-usrp)
   (cmd-usrp-close invocation-handle)
   (cmd-usrp-ntx-chan invocation-handle)
   (cmd-usrp-nrx-chan invocation-handle)
   (cmd-usrp-write invocation-handle channel data)
   (cmd-usrp-start-reading invocation-handle channel)
   )

  (:incoming
   (response-usrp-open invocation-handle status)
   (response-usrp-close invocation-handle status)
   (response-usrp-ntx-chan invocation-handle ntx-chan)
   (response-usrp-nrx-chan invocation-handle nrx-chan)
   (response-usrp-write invocation-handle status channel)
   (response-usrp-read invocation-handle status data)
   )
  )

;; ----------------------------------------------------------------
;; usrp-tx-cs
;;
;; Handles interaction between the USB interface and TX interface

(define-protocol-class usrp-tx-cs

  (:outgoing
   (cmd-usrp-tx-write invocation-handle channel data tx-handle)
   )

  (:incoming
   (response-usrp-tx-write invocation-handle status channel)
   )
  )

;; ----------------------------------------------------------------
;; usrp-rx-cs
;;
;; Handles interaction between the USB interface and RX interface

(define-protocol-class usrp-rx-cs

  (:outgoing
   (cmd-usrp-rx-start-reading invocation-handle rx-handle)
   (cmd-usrp-rx-stop-reading invocation-handle)
   )

  (:incoming
   (response-usrp-rx-read invocation-handle status data)

   ;; There is currently no response to a stop reading
   )
  )