2 * Simulator of microcontrollers (cmd.src/cmdconf.cc)
4 * Copyright (C) 2001,01 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
36 #include "cmdconfcl.h"
41 *----------------------------------------------------------------------------
45 //cl_conf_cmd::do_work(class cl_sim *sim,
46 // class cl_cmdline *cmdline, class cl_console_base *con)
47 COMMAND_DO_WORK_UC(cl_conf_cmd)
51 con->dd_printf("ucsim version %s\n", VERSIONSTR);
52 con->dd_printf("Type of microcontroller: %s\n", uc->id_string());
53 con->dd_printf("Controller has %d hardware element(s).\n",
55 for (i= 0; i < uc->hws->count; i++)
57 class cl_hw *hw= (class cl_hw *)(uc->hws->at(i));
58 con->dd_printf(" %s[%d]\n", hw->id_string, hw->id);
64 * Command: conf objects
65 *----------------------------------------------------------------------------
69 conf_objects_cmd_print_node(class cl_console_base *con,
70 int indent, class cl_base *node)
75 for (i= 0; i < indent; i++)
77 const char *name= node->get_name("unknown");
78 con->dd_printf("%s\n", name);
79 class cl_base *c= node->first_child();
82 conf_objects_cmd_print_node(con, indent+2, c);
83 c= node->next_child(c);
88 //cl_conf_addmem_cmd::do_work(class cl_sim *sim,
89 // class cl_cmdline *cmdline, class cl_console_base *con)
90 COMMAND_DO_WORK_APP(cl_conf_objects_cmd)
92 //class cl_address_space *mem= 0;
93 /*class cl_cmd_arg *params[4]= { cmdline->param(0),
96 cmdline->param(3) };*/
97 class cl_error *cl_error_base = new cl_error();
98 conf_objects_cmd_print_node(con, 0, /*application*/cl_error_base->get_class());
104 /* End of cmd.src/cmdconf.cc */