root/trunk/libffado/src/libavc/ccm/avc_signal_source.h

Revision 503, 2.7 kB (checked in by ppalmers, 17 years ago)

- put all libavc stuff into it's own name namespace (AVC)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #ifndef AVCSIGNALSOURCE_H
25 #define AVCSIGNALSOURCE_H
26
27 #include "../general/avc_generic.h"
28 #include "../avc_definitions.h"
29
30 #include <libavc1394/avc1394.h>
31
32 namespace AVC {
33
34
35 class SignalAddress: public IBusData
36 {
37 public:
38     enum EPlugId {
39         ePI_AnyAvailableSerialBusPlug = 0x7e,
40         ePI_Invalid                   = 0xfe,
41         ePI_AnyAvailableExternalPlug  = 0xff,
42     };
43 };
44
45 class SignalUnitAddress: public SignalAddress
46 {
47 public:
48     SignalUnitAddress();
49
50     virtual bool serialize( IOSSerialize& se );
51     virtual bool deserialize( IISDeserialize& de );
52     virtual SignalUnitAddress* clone() const;
53
54     byte_t m_plugId;
55 };
56
57 class SignalSubunitAddress: public SignalAddress
58 {
59 public:
60     SignalSubunitAddress();
61
62     virtual bool serialize( IOSSerialize& se );
63     virtual bool deserialize( IISDeserialize& de );
64     virtual SignalSubunitAddress* clone() const;
65
66     byte_t m_subunitType;
67     byte_t m_subunitId;
68     byte_t m_plugId;
69 };
70
71 class SignalSourceCmd: public AVCCommand
72 {
73 public:
74     SignalSourceCmd( Ieee1394Service& ieee1394service );
75     virtual ~SignalSourceCmd();
76
77     virtual bool serialize( IOSSerialize& se );
78     virtual bool deserialize( IISDeserialize& de );
79
80     virtual const char* getCmdName() const
81     { return "SignalSourceCmd"; }
82
83     bool setSignalSource( SignalUnitAddress& signalAddress );
84     bool setSignalSource( SignalSubunitAddress& signalAddress );
85     bool setSignalDestination( SignalUnitAddress& signalAddress );
86     bool setSignalDestination( SignalSubunitAddress& signalAddress );
87
88     SignalAddress* getSignalSource();
89     SignalAddress* getSignalDestination();
90
91     // Control response
92     byte_t m_resultStatus;
93
94     // Status response
95     byte_t m_outputStatus;
96     byte_t m_conv;
97     byte_t m_signalStatus;
98
99     SignalAddress* m_signalSource;
100     SignalAddress* m_signalDestination;
101 };
102
103 }
104
105 #endif // AVCSIGNALSOURCE_H
Note: See TracBrowser for help on using the browser.