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

tutorial_1.cpp

Go to the documentation of this file.
00001 /****************************************************************
00002 **
00003 ** L1394 tutorial 1
00004 **
00005 ** This program starts a session and prints the node list
00006 ** to standard output.
00007 **
00008 **  begin                : Thu Nov 30 2000
00009 **  copyright            : (C) 2000-2004 by Michael Repplinger
00010 **  email                : repplinger@cs.uni-sb.de
00011 *******************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 #include <iostream>
00023 #include <l1394_session.h>
00024 
00025 using namespace L1394;
00026 
00027 int main(int argc, char* argv[])
00028 {
00029   Session* session = SSession::getInstance();
00030 
00031   if (!session) {
00032     cerr << "Could not get Session object" << endl;
00033     return 0;
00034   }
00035   for (int i = 0; i< session->getCardCount(); i++) {
00036     cout << "Nodes on Card " << i << " : " << endl;
00037     session->getCard(i)->printNodeList();
00038     Node** node_list = session->getCard(i)->getNodeArray();
00039     for (unsigned int j = 0; j< session->getCard(i)->getNodeCount(); ++j)
00040       cout << node_list[j]->getGuid() << endl;
00041   }
00042 }

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