Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

definitions.h

Go to the documentation of this file.
00001 /*
00002  * MAX : definitions.h, Sam Dez 29 19:35:27 CET 2001 -sg
00003  * 
00004  * This file is part of Max data acquisition software
00005  * Copyright (C) 1997,98 Christian Rosen
00006  *
00007  * Max is free software; you can redistribute it and/or modify it
00008  * under the terms of the version 2 of GNU General Public License as
00009  * published by the Free Software Foundation.
00010  *
00011  * Max is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * (see the file COPYING) in this directory; if not, write to the
00018  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #ifndef _DEFINITIONS_H_
00022 #define _DEFINITIONS_H_
00023 
00024 // Filename of the default resource file
00025 #define MAIN_INITFILE           "initmax\0"
00026 
00027 #define DATA_PACKET_SIZE        1024   //size of data-packets data field. default : 1024
00028 #define DEFAULT_HOST            "localhost" //default host to connect to
00029 
00040 #define DEFAULT_PORT            20000
00041 
00045 #define DATA_SEND_INTERVALL     1000    //update of plotwidgets in millisecs.
00046 
00052 #define DATA_RECEIVED_INTERVALL 100     //intervall to send data to client.
00053 
00058 #define PARA_SEND_INTERVALL     100     //intervall to send device parameters to client.
00059 
00063 #define MAX_NAME_LENGTH         32   // Maximum length of variable names.
00064 
00068 #define MAX_VAR_LENGTH          32   //Length of variable values in data packets
00069 
00072 #define ERR_MSG_LENGTH          128     //Length of error messages. default:265
00073 
00077 #define MAX_DEVICE_NAME_LENGTH  32    //maximal length of a device name
00078 #define BUFSIZE                 65000   //only for testing. default : 65000
00079 
00080 #define CONNECT_WAIT            50000   //client wait in microsecs before opening next socket.
00081                                         // default : 400000 (Network), 50000 (local)
00082 
00083 //channel and integrations can not exceed to bytes !!
00084 //this is the representation in the network packets
00085 #define MAX_INTEGRATIONS        10000   //Max Integrations per channel, default : 100000
00086 #define MAX_DEVICES             10      //Max Devices that can be used, default : 255
00087 
00088 #define MAX_VAR                 255     //Maximum Variables ("Channels") to store measured data in.
00089 #define ACTIVE_VARIABLES        100     //number of var's that can be stored per channel
00090 
00091 #define MAX_ARRAY_SIZE          10000   //size of arrays to be stored, default : 10000
00092 
00093 //definitions for GUI look & feel -> you can change this !
00094 #define MAIN_GUI_X_SIZE         500     
00095 #define MAIN_GUI_Y_SIZE         600     
00096 #define MAIN_GUI_POSITION_X     100     
00097 #define MAIN_GUI_POSITION_Y     100     
00098 #define MIN_BUTTON_SIZE         60      
00099 #define SAVE_DETECT             FALSE   
00100 
00101 //default parameters -> You can change this
00102 #define INT_TRIGGER_PERIOD      500     
00103 #define MONITOR_MODE            FALSE   
00104 #define UPDATE_INTERVALL        500     
00105 #define BUTTON_BLINK            500     
00106 #define LISTB_UPDATE_INTERVALL  2000    
00107 #define PLOT_WINDOW_UPDATE      1000    
00108 
00109 
00117 #define START                   'a' //start measurement in polld
00118 #define STOP                    'b' //stop     "              "
00119 #define PAUSE                   'c' //pause    "
00120 #define CONTINUE                'd' //cont     "              "
00121 #define CHANNELNUMBER           'e' //
00122 #define INTEGRATIONS            'f' //set integrations in polld
00123 #define PRIORITY                'g' //set device and priority in polld
00124 #define REQUEST_CHANNELNUMBER   'h' //client requests actual channel
00125 #define REQUEST_INTEGRATIONS    'i' //client requests actual integrations
00126 #define ERROR                   'j' //send error message to GUI for user info
00127 #define MON_MODE                'k' //set monitor mode
00128 #define DATAQ_MODE              'l' //set dataq mode (default)
00129 #define RESET                   'm' //reset
00130 #define EXT_TRIGGER             'n' //set trigger external
00131 #define INT_TRIGGER             'o' //set trigger internal
00132 #define SET_PERIOD              'p' //set period of internal trigger (in ms)
00133 #define CLEAR_DEVICES           'q' //erase device parameter database
00134 #define CLEAR_PRIORITY          'r' //erase priority database
00135 #define KILL_YOURSELF           's' //send kill command to partner
00136 #define SET_DAT_SEND_INTERVALL  't' //intervall to send measured data
00137 #define DEAMON_DIES             'u' //Notify client that deamon will die
00138 #define PRIORITY_CHECK          'v' //Tell Server to check consistency of priority database
00139 //end of command definitions
00140 
00141 /* *********************************
00142  *definitions for the plotwindow
00143  *you can change some things here !!!
00144  ****************************************/
00145 
00146 #define P_MIN_SIZE_X            400   
00147 
00148 #define P_MIN_SIZE_Y            300   
00149 
00150 #define P_LEFT_BORDER           35    
00151 
00152 #define P_UPPER_BORDER          40    
00153 
00154 #define P_DEF_SIZE_X            300-2*P_LEFT_BORDER
00155 /* \def P_DEF_SIZE_X */
00156 #define P_DEF_SIZE_Y            200-2*P_UPPER_BORDER
00157 /* \def P_DEF_SIZE_Y */
00158 #define Y_TICKS                 11   
00159 
00160 #define X_TICKS                 11   
00161 
00162 #define TICKSIZE                5    
00163 
00164 #define TICKPOS                 30   
00165 
00166 #define TICKPOS_X               15   
00167 
00168 #define HGRIDLINES              TRUE; 
00169 
00170 #define VGRIDLINES              FALSE; 
00171 
00172 #define Y_UPPER_LIMIT           2      
00173 
00174 #define Y_LOWER_LIMIT           -5.000 
00175 
00176 #define AUTOSCALE               TRUE 
00177 
00178 #define AS_INTERVAL             1    
00179 
00184 #define MON_MODE_CHANNELS       1000 
00185 
00188 //definitions for styles
00189 #define SOLIDLINE               1    //Linestyle for Plotwindow
00190 
00191 #define POINTS                  2    //Draw points or lines in plotwindow
00192 
00193 #define MIN_ARRAY_LENGTH        10   
00194 
00199 // Colors are : black, white, darkGray, gray, lightGray, red, green, blue, cyan, magenta, yellow,
00200 // darkRed, darkGreen, darkBlue, darkCyan, darkMagenta, darkYellow, color0 and color1.
00201 #define AXISCOLOR               red     
00202 #define LINECOLOR               white   
00203 #define ARRAYLINECOLOR          yellow  
00204 #define LABELCOLOR              white   
00205 #define BACKGROUND              black   
00206 /****************************************/
00207 /* end plotwindow definitions           */
00208 /****************************************/
00209 
00210 /*Definitions for the save Widget      */
00211 #define SAVE_WIDGET_X_SIZE      440     
00212 #define SAVE_WIDGET_Y_SIZE      330     
00213 
00214 #endif

Generated at Mon Sep 2 18:21:03 2002 for MAX by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001