1 |
/* avc_signal_source.h |
---|
2 |
* Copyright (C) 2005 by Daniel Wagner |
---|
3 |
* |
---|
4 |
* This file is part of FreeBoB. |
---|
5 |
* |
---|
6 |
* FreeBoB is free software; you can redistribute it and/or modify |
---|
7 |
* it under the terms of the GNU General Public License as published by |
---|
8 |
* the Free Software Foundation; either version 2 of the License, or |
---|
9 |
* (at your option) any later version. |
---|
10 |
* FreeBoB is distributed in the hope that it will be useful, |
---|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 |
* GNU General Public License for more details. |
---|
14 |
* |
---|
15 |
* You should have received a copy of the GNU General Public License |
---|
16 |
* along with FreeBoB; if not, write to the Free Software |
---|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
---|
18 |
* MA 02111-1307 USA. |
---|
19 |
*/ |
---|
20 |
|
---|
21 |
#ifndef AVCSignalSource_h |
---|
22 |
#define AVCSignalSource_h |
---|
23 |
|
---|
24 |
#include "avc_generic.h" |
---|
25 |
#include "avc_definitions.h" |
---|
26 |
|
---|
27 |
#include <libavc1394/avc1394.h> |
---|
28 |
|
---|
29 |
class SignalAddress: public IBusData |
---|
30 |
{ |
---|
31 |
public: |
---|
32 |
enum EPlugId { |
---|
33 |
ePI_AnyAvailableSerialBusPlug = 0x7e, |
---|
34 |
ePI_Invalid = 0xfe, |
---|
35 |
ePI_AnyAvailableExternalPlug = 0xff, |
---|
36 |
}; |
---|
37 |
}; |
---|
38 |
|
---|
39 |
class SignalUnitAddress: public SignalAddress |
---|
40 |
{ |
---|
41 |
public: |
---|
42 |
SignalUnitAddress(); |
---|
43 |
|
---|
44 |
virtual bool serialize( IOSSerialize& se ); |
---|
45 |
virtual bool deserialize( IISDeserialize& de ); |
---|
46 |
virtual SignalUnitAddress* clone() const; |
---|
47 |
|
---|
48 |
byte_t m_plugId; |
---|
49 |
}; |
---|
50 |
|
---|
51 |
class SignalSubunitAddress: public SignalAddress |
---|
52 |
{ |
---|
53 |
public: |
---|
54 |
SignalSubunitAddress(); |
---|
55 |
|
---|
56 |
virtual bool serialize( IOSSerialize& se ); |
---|
57 |
virtual bool deserialize( IISDeserialize& de ); |
---|
58 |
virtual SignalSubunitAddress* clone() const; |
---|
59 |
|
---|
60 |
byte_t m_subunitType; |
---|
61 |
byte_t m_subunitId; |
---|
62 |
byte_t m_plugId; |
---|
63 |
}; |
---|
64 |
|
---|
65 |
class SignalSourceCmd: public AVCCommand |
---|
66 |
{ |
---|
67 |
public: |
---|
68 |
SignalSourceCmd( Ieee1394Service& ieee1394service ); |
---|
69 |
virtual ~SignalSourceCmd(); |
---|
70 |
|
---|
71 |
virtual bool serialize( IOSSerialize& se ); |
---|
72 |
virtual bool deserialize( IISDeserialize& de ); |
---|
73 |
|
---|
74 |
virtual const char* getCmdName() const |
---|
75 |
{ return "SignalSourceCmd"; } |
---|
76 |
|
---|
77 |
bool setSignalSource( SignalUnitAddress& signalAddress ); |
---|
78 |
bool setSignalSource( SignalSubunitAddress& signalAddress ); |
---|
79 |
bool setSignalDestination( SignalUnitAddress& signalAddress ); |
---|
80 |
bool setSignalDestination( SignalSubunitAddress& signalAddress ); |
---|
81 |
|
---|
82 |
SignalAddress* getSignalSource(); |
---|
83 |
SignalAddress* getSignalDestination(); |
---|
84 |
|
---|
85 |
// Control response |
---|
86 |
byte_t m_resultStatus; |
---|
87 |
|
---|
88 |
// Status response |
---|
89 |
byte_t m_outputStatus; |
---|
90 |
byte_t m_conv; |
---|
91 |
byte_t m_signalStatus; |
---|
92 |
|
---|
93 |
SignalAddress* m_signalSource; |
---|
94 |
SignalAddress* m_signalDestination; |
---|
95 |
}; |
---|
96 |
|
---|
97 |
|
---|
98 |
#endif // AVCSignalSource_h |
---|