emul.h Source File

Back to the index.

emul.h
Go to the documentation of this file.
1 #ifndef EMUL_H
2 #define EMUL_H
3 
4 /*
5  * Copyright (C) 2004-2010 Anders Gavare. All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  * 3. The name of the author may not be used to endorse or promote products
16  * derived from this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28  * SUCH DAMAGE.
29  */
30 
31 #include "misc.h"
32 
33 struct machine;
34 struct net;
35 struct settings;
36 
37 struct emul {
38  struct settings *settings;
39 
40  char *name;
41 
43  struct net *net;
44 
46  struct machine **machines;
47 
48  /* Additional debugger commands to run before
49  starting the simulation: */
51  char **debugger_cmds;
52 };
53 
54 
55 /* emul.c: */
56 struct emul *emul_new(char *name);
57 void emul_destroy(struct emul *emul);
58 
59 struct machine *emul_add_machine(struct emul *e, char *name);
60 void emul_machine_setup(struct machine *machine, int n_load, char **load_names,
61  int n_devices, char **device_names);
62 void emul_dumpinfo(struct emul *e);
63 void emul_simple_init(struct emul *emul);
64 struct emul *emul_create_from_configfile(char *fname);
65 void emul_run(struct emul *emul);
66 
67 
68 /* emul_parse.c: */
69 void emul_parse_config(struct emul *e, char *fname);
70 
71 
72 #endif /* EMUL_H */
emul::next_serial_nr
int next_serial_nr
Definition: emul.h:42
machine::name
const char * name
Definition: machine.h:105
emul::settings
struct settings * settings
Definition: emul.h:38
emul::n_debugger_cmds
int n_debugger_cmds
Definition: emul.h:50
emul_machine_setup
void emul_machine_setup(struct machine *machine, int n_load, char **load_names, int n_devices, char **device_names)
Definition: emul.cc:354
emul_simple_init
void emul_simple_init(struct emul *emul)
Definition: emul.cc:728
emul::n_machines
int n_machines
Definition: emul.h:45
emul_new
struct emul * emul_new(char *name)
Definition: emul.cc:143
emul::name
char * name
Definition: emul.h:40
emul_run
void emul_run(struct emul *emul)
Definition: emul.cc:785
emul_dumpinfo
void emul_dumpinfo(struct emul *e)
Definition: emul.cc:698
misc.h
emul_add_machine
struct machine * emul_add_machine(struct emul *e, char *name)
Definition: emul.cc:209
machine
Definition: machine.h:97
emul::debugger_cmds
char ** debugger_cmds
Definition: emul.h:51
emul::net
struct net * net
Definition: emul.h:43
settings
Definition: settings.cc:57
emul_parse_config
void emul_parse_config(struct emul *e, char *fname)
Definition: emul_parse.cc:699
emul_destroy
void emul_destroy(struct emul *emul)
Definition: emul.cc:178
emul
Definition: emul.h:37
emul_create_from_configfile
struct emul * emul_create_from_configfile(char *fname)
Definition: emul.cc:761
net
Definition: net.h:119
emul::machines
struct machine ** machines
Definition: emul.h:46

Generated on Tue Mar 24 2020 14:04:48 for GXemul by doxygen 1.8.17