root/branches/streaming-rework/src/libieee1394/configrom.h

Revision 435, 3.8 kB (checked in by pieterpalmers, 14 years ago)

src/devicemanager:
- start OSC server for the device manager

src/devicemanager,
src/iavdevice,
src/libieee1394/configrom:
- inherit from OscNode? to become Osc'able

src/bounce,
src/libstreaming/AmdtpStreamProcessor,
src/libstreaming/AmdtpSlaveStreamProcessor:
- fixed bounce device implementation, now working

src/bebob:
- fixed midi bug

General:
- removed 'intermediate XML'
- removed obsolete tests
- removed obsolete files
- removed obsolete API calls

  • 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 "libutil/serialize.h"
28 #include "debugmodule/debugmodule.h"
29
30 #include "libosc/OscNode.h"
31
32 #include <string>
33
34 class Ieee1394Service;
35
36 class ConfigRom
37     : public OSC::OscNode
38 {
39  public:
40     ConfigRom( Ieee1394Service& ieee1394service, fb_nodeid_t nodeId );
41     virtual ~ConfigRom();
42
43     bool initialize();
44
45     bool operator == ( const ConfigRom& rhs );
46
47     const fb_nodeid_t getNodeId() const;
48     const fb_octlet_t getGuid() const;
49     const Glib::ustring getModelName() const;
50     const Glib::ustring getVendorName() const;
51
52     const unsigned int getModelId() const;
53     const unsigned int getVendorId() const;
54     const unsigned int getUnitSpecifierId() const;
55     const unsigned int getUnitVersion() const;
56
57     bool isIsoResourseManager() const
58         { return m_isIsoResourceManager; }
59     bool isCycleMasterCapable() const
60         { return m_isCycleMasterCapable; }
61     bool isSupportsIsoOperations() const
62         { return m_isSupportIsoOperations; }
63     bool isBusManagerCapable() const
64         { return m_isBusManagerCapable; }
65     fb_byte_t getCycleClockAccurancy() const
66         { return m_cycleClkAcc; }
67     fb_byte_t getMaxRec() const
68         { return m_maxRec; }
69     unsigned short getAsyMaxPayload() const;
70
71     fb_quadlet_t getNodeVendorId() const
72         { return m_nodeVendorId; }
73
74     bool updatedNodeId();
75     bool setNodeId( fb_nodeid_t nodeId );
76
77     void printConfigRom() const;
78
79     bool serialize( Glib::ustring path, Util::IOSerialize& ser );
80     static ConfigRom* deserialize( Glib::ustring path,
81                                    Util::IODeserialize& deser,
82                                    Ieee1394Service& ieee1394Service );
83
84  protected:
85     void processUnitDirectory( struct csr1212_csr*    csr,
86                                struct csr1212_keyval* ud_kv,
87                                unsigned int*          id );
88
89     void processRootDirectory( struct csr1212_csr* csr );
90
91     Ieee1394Service* m_1394Service;
92     fb_nodeid_t      m_nodeId;
93     bool             m_avcDevice;
94     fb_octlet_t      m_guid;
95     Glib::ustring    m_vendorName;
96     Glib::ustring    m_modelName;
97     unsigned int     m_vendorId;
98     unsigned int     m_modelId;
99     unsigned int     m_unit_specifier_id;
100     unsigned int     m_unit_version;
101     bool             m_isIsoResourceManager;
102     bool             m_isCycleMasterCapable;
103     bool             m_isSupportIsoOperations;
104     bool             m_isBusManagerCapable;
105     fb_byte_t        m_cycleClkAcc;
106     fb_byte_t        m_maxRec;
107     fb_quadlet_t     m_nodeVendorId;
108     fb_byte_t        m_chipIdHi;
109     fb_quadlet_t     m_chipIdLow;
110
111     /* only used during parsing */
112     struct csr1212_keyval* m_vendorNameKv;
113     struct csr1212_keyval* m_modelNameKv;
114     struct csr1212_csr*    m_csr;
115
116 protected: // OSC handling
117     OSC::OscResponse processOscMessage(OSC::OscMessage *m);
118
119 private:
120     ConfigRom( const ConfigRom& ); // do not allow copy ctor
121     ConfigRom();                   // ctor for deserialition
122
123     DECLARE_DEBUG_MODULE;
124 };
125
126 #endif /* CONFIGROM_H */
Note: See TracBrowser for help on using the browser.