1 /*
2    Copyright (C) 1999 T. Scott Dattalo
3 
4 This file is part of gpsim.
5 
6 gpsim 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, or (at your option)
9 any later version.
10 
11 gpsim 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 gpsim; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20 
21 
22 #include <string>
23 
24 #include "cmd_bus.h"
25 #include "misc.h"
26 
27 cmd_bus c_bus;
28 
29 //extern void dump_bus_list(void);
30 //extern void add_bus(char *node_name);
31 
32 static cmd_options cmd_bus_options[] = {
33   {nullptr, 0, 0}
34 };
35 
36 
cmd_bus()37 cmd_bus::cmd_bus()
38   : command("bus", nullptr)
39 {
40   brief_doc = "Add or display node busses";
41   long_doc = "bus [new_bus1 new_bus2 ...]\n"
42              "\t If no new_bus is specified then all of the busses that have been\n"
43              "\tdefined are displayed. If a new_bus is specified then it will be\n"
44              "\tadded to the bus list. See the \"attach\" and \"stimulus\" commands\n"
45              "\tto see how stimuli are added to the busses.\n"
46              "\n"
47              "\texamples:\n"
48              "\n"
49              "\tbus              // display the bus list\n"
50              "\tbus b1 b2 b3     // create and add 3 new busses to the list\n";
51   op = cmd_bus_options;
52 }
53 
54 
list_busses()55 void cmd_bus::list_busses()
56 {
57   //  dump_bus_list();
58 }
59 
60 
add_busses(std::list<std::string> *)61 void cmd_bus::add_busses(std::list<std::string> * /* busses */ )
62 {
63   /*
64   if(busses) {
65 
66     list <string> :: iterator si;
67 
68     for (si = busses->begin();
69    si != busses->end();
70    ++si) {
71 
72       string s = *si;
73       add_bus((char *)s.c_str());
74     }
75 
76   }
77   */
78 }
79