00001 /* 00002 * Copyright (C) 2009, Edmundo Albuquerque de Souza e Silva. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 #ifndef __MMINTSIMUL_H_ 00019 #define __MMINTSIMUL_H_ 00020 00021 #define MAXVARS 200 00022 #define MAXVARNAME 250 00023 #define MAXCONNECTTRIES 3 00024 #define PORT 6743 00025 #define STVARVALUEUNDEF 2147483647 00026 00027 #define END_OF_SIMULATION 1 00028 #define STEP_SIMULATION 2 00029 00030 #ifndef INADDR_NONE 00031 #define INADDR_NONE 0xffffffff 00032 #endif 00033 00034 struct INTSIMUL_HEADER_TAG 00035 { 00036 unsigned int version; 00037 unsigned int qtd_st_var; 00038 unsigned int st_var_names_size; 00039 unsigned int trans_line_size; 00040 }; 00041 00042 typedef struct tagT_statevar 00043 { 00044 char name[ MAXVARNAME ]; 00045 int value; 00046 } T_statevar; 00047 00048 typedef struct tagT_Packet 00049 { 00050 int code; 00051 int step; 00052 double elapsed_time; 00053 int varcount; 00054 T_statevar vars[ MAXVARS ]; 00055 } T_Packet; 00056 00057 #endif