root/trunk/freebob/src/avdevice.h

Revision 40, 2.6 kB (checked in by pieterpalmers, 19 years ago)

Added:
- Information retrieval functions for several infoblocks
- Status printing functions for several infoblocks
- debugPrintShort to print debug comments without leading context info
- optional ANSI colored output of debug commands (see debugmodule.h)
- optional colored HTML output of debug commands for e.g. printouts (see debugmodule.h)
- AvDeviceSubunit?->Reserve() / unReserve() / isReserved()
- AvDevice::[set|get][Input|Output]PlugSignalFormat? functions (incomplete)
- added preliminary detection of internal connections

Changed:
- removed a lot of obsolete test code from ieee1394service.cpp
- added some other test code to ieee1394service.cpp

Bugfixes:
- Corrected bug in AvClusterInfoBlock?. This originated from an error in the spec.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avdevice.h
2  * Copyright (C) 2004 by Daniel Wagner, Pieter Palmers
3  *
4  *
5  * This file is part of FreeBob.
6  *
7  * FreeBob is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  * FreeBob is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with FreeBob; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  * MA 02111-1307 USA.
20  */
21
22 #include "ieee1394service.h"
23
24 #include <vector>
25 using std::vector;
26
27
28 #ifndef AVDEVICE_H
29 #define AVDEVICE_H
30
31 class AvDeviceSubunit;
32
33 class AvDevice {
34  public:
35     AvDevice(int node,int port);
36     virtual ~AvDevice();
37
38     quadlet_t * avcExecuteTransaction(quadlet_t *request, unsigned int request_len, unsigned int response_len);
39
40     FBReturnCodes Initialize();
41
42     bool isInitialised();
43
44     FBReturnCodes setInputPlugSignalFormat(unsigned char plug, unsigned char fmt, quadlet_t fdf);
45     FBReturnCodes getInputPlugSignalFormat(unsigned char plug, unsigned char *fmt, quadlet_t *fdf); 
46     FBReturnCodes setOutputPlugSignalFormat(unsigned char plug, unsigned char fmt, quadlet_t fdf);
47     FBReturnCodes getOutputPlugSignalFormat(unsigned char plug, unsigned char *fmt, quadlet_t *fdf); 
48    
49 //      getSourcePlugConnection();
50         void printConnections();
51            
52         unsigned char getNbAsyncSourcePlugs() { return iNbAsyncSourcePlugs; } ;
53     unsigned char getNbAsyncDestinationPlugs() { return iNbAsyncDestinationPlugs; } ;
54     unsigned char getNbIsoSourcePlugs() { return iNbIsoSourcePlugs; } ; // oPCR
55     unsigned char getNbIsoDestinationPlugs() { return iNbIsoDestinationPlugs; } ; // iPCR
56     unsigned char getNbExtSourcePlugs() { return iNbExtSourcePlugs; } ;
57     unsigned char getNbExtDestinationPlugs() { return iNbExtDestinationPlugs; } ;
58    
59     int getNodeId() { return iNodeId; } ;
60
61  protected:
62         AvDeviceSubunit *getSubunit(unsigned char type, unsigned char id);
63  
64  private:
65         int iNodeId;
66         raw1394handle_t m_handle;
67         int m_iPort;
68         bool m_bInitialised;
69         vector<AvDeviceSubunit *> cSubUnits;
70
71         unsigned char iNbAsyncDestinationPlugs;
72         unsigned char iNbAsyncSourcePlugs;
73         unsigned char iNbIsoDestinationPlugs;
74         unsigned char iNbIsoSourcePlugs;
75         unsigned char iNbExtDestinationPlugs;
76         unsigned char iNbExtSourcePlugs;
77
78 };
79
80 #endif
Note: See TracBrowser for help on using the browser.