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

l1394_businfo.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           l1394businfo.cpp  -  description
00003                              -------------------
00004     begin                : Fri Oct 27 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 #include "l1394_businfo.h"
00019 using namespace std;
00020 namespace L1394{
00021 namespace internal{
00022 BusInfo::BusInfo(QArray* info_block)
00023 {
00024     bus_name = new char[4];
00025     Quadlet tmp = info_block->getQuadlet(0);
00026     memcpy(bus_name,&tmp, 4);
00027 
00028     node_info       = info_block->getQuadlet(1);
00029     node_vendor_id  = info_block->getQuadlet(2);
00030     chip_id_low      = info_block->getQuadlet(3);
00031 }
00032 
00033 BusInfo::~BusInfo()
00034 {
00035   delete []bus_name;
00036   delete &node_info;
00037   delete &node_vendor_id;
00038   delete &chip_id_low;
00039 }
00040 
00041 ostream& operator<<(ostream& o, const BusInfo& bi)
00042 {
00043   o<< "Busname : " << bi.bus_name << '\n';
00044   o<< "Flags : irmc = "<< bi.getIrmc()<<" cmc = "<<bi.getCmc()<<" isc = " << bi.getIsc()<< endl;
00045   return o;
00046 }
00047 /*
00048 Html& operator << (Html& h, const BusInfo& bi)
00049 {
00050   const char* bool_value[]={"NO", "YES"};
00051 
00052   h<< "<H4> Businformation Block </H4>  \n";
00053   h<< "Busname : " << bi.bus_name <<" <br> \n";
00054   h<< "Node_vendor_id : " <<  bi.node_vendor_id.toInt() << " <br> \n <br> \n";
00055 
00056   h<< "Flags : "<<" <br> \n";
00057   h<< "isochrone resource manager capable (irmc)     : " << bool_value[bi.getIrmc()]<<" <br> \n";
00058   h<< "cycle master capable (cmc)                    : " << bool_value[bi.getCmc()]<<" <br> \n";
00059   h<< "isochronous  capable  (isc)                   : " << bool_value[bi.getIsc()] << " <br> \n";
00060   h<< "bus master capable (bmc)                      : " << bool_value[bi.getBmc()] << " <br> \n";
00061   return h;
00062 }
00063   */
00064 
00065   }
00066 }

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