root/branches/api-cleanup/src/libstreaming/motu/MotuPort.h

Revision 809, 2.5 kB (checked in by ppalmers, 14 years ago)

First round of cleanup:
- make Ports auto-register to a PortManager?
- remove the different 'signal' types, everything is now period-signaled.
- removed obsolete streaming test programs

Line 
1 /*
2  * Copyright (C) 2005-2007 by Jonathan Woithe
3  * Copyright (C) 2005-2007 by Pieter Palmers
4  *
5  * This file is part of FFADO
6  * FFADO = Free Firewire (pro-)audio drivers for linux
7  *
8  * FFADO is based upon FreeBoB.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24
25 #ifndef __FFADO_MOTUPORT__
26 #define __FFADO_MOTUPORT__
27
28 /**
29  * This file implements the ports used in Motu devices
30  */
31
32 #include "MotuPortInfo.h"
33 #include "../generic/Port.h"
34
35 #include "debugmodule/debugmodule.h"
36
37 namespace Streaming {
38
39 /*!
40 \brief The Base Class for Motu Audio Port
41
42
43 */
44 class MotuAudioPort
45     : public AudioPort, public MotuPortInfo
46 {
47
48 public:
49
50     MotuAudioPort(PortManager &m,
51                   std::string name,
52                   enum E_Direction direction,
53                   int position,
54                   int size)
55     : AudioPort(m, name, direction),
56       MotuPortInfo( position, size) // TODO: add more port information parameters here if nescessary
57     {};
58
59     virtual ~MotuAudioPort() {};
60 };
61
62 /*!
63 \brief The Base Class for an Motu Midi Port
64
65
66 */
67 class MotuMidiPort
68     : public MidiPort, public MotuPortInfo
69 {
70
71 public:
72
73     MotuMidiPort(PortManager &m,
74                  std::string name,
75                  enum E_Direction direction,
76                  int position)
77         : MidiPort(m, name, direction),
78           MotuPortInfo(position, 0)  // TODO: add more port information parameters here if nescessary
79     {};
80
81     virtual ~MotuMidiPort() {};
82 };
83
84 /*!
85 \brief The Base Class for an Motu Control Port
86
87
88 */
89 class MotuControlPort
90     : public ControlPort, public MotuPortInfo
91 {
92
93 public:
94
95     MotuControlPort(PortManager &m,
96                     std::string name,
97                     enum E_Direction direction,
98                     int position)
99         : ControlPort(m, name, direction),
100           MotuPortInfo(position, 2) // TODO: add more port information parameters here if nescessary
101     {};
102
103     virtual ~MotuControlPort() {};
104 };
105
106 } // end of namespace Streaming
107
108 #endif /* __FFADO_MOTUPORT__ */
109
Note: See TracBrowser for help on using the browser.