Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

l1394_csrrom.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           l1394csrrom.h  -  description
00003                              -------------------
00004     begin                : Thu Sep 21 2000
00005     copyright            : (C) 2000-2004 by Michael Repplinger
00006     email                : repplinger@cs.uni-sb.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef L1394CSRROM_H
00019 #define L1394CSRROM_H
00020 
00021 
00022 #include <netinet/in.h>
00023 
00024 #include "l1394_businfo.h"
00025 #include "l1394_csrdirectory.h"
00026 #include "l1394_node.h"
00027 //document_status : final
00028 //debug_status : tested
00029 
00030 namespace L1394{
00031 namespace internal{
00032 /*! \class CsrRom
00033   * \ingroup Internal
00034   * \brief This class create an CsrRom Object, defined in the IEEE1212 standard.
00035   *
00036   * Every node on FireWire bus, expect nodes with a physical layer only, has a Control
00037   * and Status Register (CSR) rom. So very Node object has a CsrRom object, expect the PhyNode objects.
00038   *
00039   * The main object in CSR rom is the CSR-directory, which (can) contain a lot of information
00040   * about the FireWire node. About datas and data structure that can be stored in
00041   * CSR rom see the IEEE-1212 specification.
00042   *
00043   * So this class provide functions to access the CsrDirectory object and the bus information block
00044   * of a node.
00045   *
00046   * @author Michael Repplinger
00047   */
00048 
00049 
00050 class CsrRom
00051 {
00052 
00053 public:
00054 
00055 
00056 /*! \fn CsrRom(Node* parent)
00057   * \brief Constructor
00058   * \param parent : pointer to parent node
00059   */
00060   CsrRom(Node* parent);
00061 
00062  /*! \fn ~CsrRom()
00063    * \brief destructor
00064    */
00065   ~CsrRom();
00066 
00067 /*! \fn getBusInfoBlock()
00068   * \brief This method returns the bus information block of a node.
00069   *
00070   * The bus information block store information about general features of
00071   * a node, like isMasterCapable and so on. The BusInfo object will be created
00072   * by the first call of this function. For more information see class BusInfo.
00073   * \return BusInfo* : pointer to the bus information block.
00074   */
00075   BusInfo* getBusInfoBlock()  { if (node_bus_info == NULL)
00076                                 readInfoBlock (); return node_bus_info; }
00077 
00078 /*! \fn getCsrDirectory()
00079   * \brief With this method you can access the csr directory of an node.
00080   *
00081   * The CsrDirectory object will be created by the first call of this function.
00082   * For more information see class CsrDirectory.
00083   * \return CsrDirectory* : pointer
00084   */
00085   CsrDirectory *getCsrDirectory() { if (root_directory == NULL) readDirectory(); return root_directory;}
00086 
00087 
00088 private:
00089 
00090   //disabled copy constructor
00091   CsrRom(const CsrRom&);
00092 
00093   // Read the bus information block
00094   void readInfoBlock();
00095 
00096   // Read the directory information
00097   void readDirectory();
00098 
00099   // Read the bus topology from a master capable device
00100   void storeBlockInfoValues(QArray*);
00101   void storeDirectoryValues(int);
00102   void storeDirectory(int, int);
00103   void storeLeaf(int, int);
00104 
00105   BusInfo *node_bus_info;
00106 
00107   CsrDirectory *root_directory, *actual_directory;
00108 
00109   Node *parent;
00110 
00111 };
00112 }
00113 }
00114 #endif

Generated on Wed Aug 24 00:36:40 2005 for L1394 by doxygen 1.4.2
L1394 library (NMM) grahics.cs.uni-sb.de/~repplix/l1394_home/