|
|
/home/brennan/n-sim/OrbisQuartus/server/orbisquartus.hGo to the documentation of this file.00001 00014 /* 00015 * Copyright 2007. Los Alamos National Security, LLC. This material 00016 * was produced under U.S. Government contract DE-AC52-06NA25396 for 00017 * Los Alamos National Laboratory (LANL), which is operated by Los 00018 * Alamos National Security, LLC, for the Department of Energy. The 00019 * U.S. Government has rights to use, reproduce, and distribute this 00020 * software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, 00021 * LLC, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL 00022 * LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to 00023 * produce derivative works, such modified software should be clearly 00024 * marked, so as not to confuse it with the version available from LANL. 00025 * 00026 * Additionally, this program is free software; you can redistribute 00027 * it and/or modify it under the terms of the GNU General Public 00028 * License as published by the Free Software Foundation; version 2 of 00029 * the License. Accordingly, this program is distributed in the hope 00030 * it will be useful, but WITHOUT ANY WARRANTY; without even the 00031 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00032 * PURPOSE. See the GNU General Public License for more details. 00033 */ 00034 00035 00036 #ifndef _ORBISQUARTUS_H_ 00037 #define _ORBISQUARTUS_H_ 00038 00039 #include <configuration.h> 00040 #include <sensor_node.h> 00041 #include <daemon.h> 00042 #include "mutex.h" 00043 00044 00045 class OrbisQuartus { 00046 int numprocs, myrank, num_mynodes; 00047 unsigned long *mynodes; 00048 00049 int _get_config(int, char**); 00050 void _init(); 00051 00052 public: 00053 thread_t ctl_thread, sim_thread, vt_thread; 00054 Configuration cfg; 00055 00056 OrbisQuartus(); 00057 ~OrbisQuartus() { if (mynodes != 0) free(mynodes); }; 00058 00059 void get_assignment(unsigned long *assign, int *num) { 00060 *num = num_mynodes; 00061 assign = mynodes; 00062 }; 00063 00064 int start(int, char**); 00065 int iterate(); 00066 void stop(); 00067 int quitting() { return daemon_quitting(); }; 00068 int shuttingdown() { return daemon_shuttingdown(); }; 00069 }; 00070 00071 00072 #endif // _ORBISQUARTUS_H_ |