root/trunk/libfreebob/src/configrom.h

Revision 336, 3.2 kB (checked in by pieterpalmers, 17 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 /* configrom.h
2  * Copyright (C) 2005,06 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 CONFIGROM_H
22 #define CONFIGROM_H
23
24 #include "fbtypes.h"
25 #include "csr1212.h"
26
27 #include "debugmodule/debugmodule.h"
28
29 #include <string>
30
31 class Ieee1394Service;
32
33 class ConfigRom {
34  public:
35     ConfigRom( Ieee1394Service& ieee1394service, fb_nodeid_t nodeId );
36     virtual ~ConfigRom();
37
38     bool initialize();
39
40     const fb_nodeid_t getNodeId() const;
41     const fb_octlet_t getGuid() const;
42     const std::string getModelName() const;
43     const std::string getVendorName() const;
44    
45     const unsigned int getModelId() const;
46     const unsigned int getVendorId() const;
47     const unsigned int getUnitSpecifierId() const;
48     const unsigned int getUnitVersion() const;
49
50     bool isIsoResourseManager() const
51         { return m_isIsoResourceManager; }
52     bool isCycleMasterCapable() const
53         { return m_isCycleMasterCapable; }
54     bool isSupportsIsoOperations() const
55         { return m_isSupportIsoOperations; }
56     bool isBusManagerCapable() const
57         { return m_isBusManagerCapable; }
58     fb_byte_t getCycleClockAccurancy() const
59         { return m_cycleClkAcc; }
60     fb_byte_t getMaxRec() const
61         { return m_maxRec; }
62     unsigned short getAsyMaxPayload() const;
63
64     fb_quadlet_t getNodeVendorId() const
65         { return m_nodeVendorId; }
66
67     bool updatedNodeId();
68
69     void printConfigRom() const;
70
71  protected:
72     void processUnitDirectory( struct csr1212_csr*    csr,
73                                struct csr1212_keyval* ud_kv,
74                                unsigned int*          id );
75
76     void processRootDirectory( struct csr1212_csr* csr );
77
78     Ieee1394Service* m_1394Service;
79     fb_nodeid_t      m_nodeId;
80     bool             m_avcDevice;
81     fb_octlet_t      m_guid;
82     std::string      m_vendorName;
83     std::string      m_modelName;
84     unsigned int     m_vendorId;
85     unsigned int     m_modelId;
86     unsigned int     m_unit_specifier_id;
87     unsigned int     m_unit_version;
88     bool             m_isIsoResourceManager;
89     bool             m_isCycleMasterCapable;
90     bool             m_isSupportIsoOperations;
91     bool             m_isBusManagerCapable;
92     fb_byte_t        m_cycleClkAcc;
93     fb_byte_t        m_maxRec;
94     fb_quadlet_t     m_nodeVendorId;
95     fb_byte_t        m_chipIdHi;
96     fb_quadlet_t     m_chipIdLow;
97
98     /* only used during parsing */
99     struct csr1212_keyval* m_vendorNameKv;
100     struct csr1212_keyval* m_modelNameKv;
101     struct csr1212_csr*    m_csr;
102
103 private:
104     ConfigRom( const ConfigRom& );
105
106     DECLARE_DEBUG_MODULE;
107 };
108
109 #endif /* CONFIGROM_H */
Note: See TracBrowser for help on using the browser.