root/branches/libfreebob-2.0/src/libfreebobavc/avc_subunit_info.h

Revision 336, 1.8 kB (checked in by pieterpalmers, 16 years ago)

- Merged the developments on trunk since branch-off:

branch occurred at rev 194
svn merge -r 194:HEAD https://svn.sourceforge.net/svnroot/freebob/trunk/libfreebob

- Modified libfreebobavc to use the messagebuffer for debug info.
- This should compile and run

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avc_subunit_info.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 AVCSubUnitInfo_h
22 #define AVCSubUnitInfo_h
23
24 #include "avc_generic.h"
25
26 #include <libavc1394/avc1394.h>
27
28
29 // No extended subunit queries supported
30
31 class SubUnitInfoCmd: public AVCCommand
32 {
33 public:
34     SubUnitInfoCmd( Ieee1394Service* ieee1349service );
35     virtual ~SubUnitInfoCmd();
36
37     virtual bool serialize( IOSSerialize& se );
38     virtual bool deserialize( IISDeserialize& de );
39
40     virtual const char* getCmdName() const
41         { return "SubUnitInfoCmd"; }
42
43     bool clear();
44
45     page_t           m_page;
46     extension_code_t m_extension_code;
47
48
49
50     enum {
51         eMaxSubunitsPerPage = 4,
52         eMaxSubunitsPerUnit = 32,
53     };
54
55     struct TableEntry {
56         subunit_type_t   m_subunit_type;
57         max_subunit_id_t m_max_subunit_id;
58     };
59
60     struct TableEntry m_table[eMaxSubunitsPerPage];
61
62     short getMaxNoOfPages()
63         { return eMaxSubunitsPerUnit / eMaxSubunitsPerPage; }
64
65
66     short            m_nrOfValidEntries;
67     short getNrOfValidEntries()
68         { return m_nrOfValidEntries; }
69
70 };
71
72
73 #endif // AVCSubUnitInfo_h
Note: See TracBrowser for help on using the browser.