00001 /* ----------------------------------------------------------------------------- 00002 * CfgFunction.h 00003 * 00004 * PMU Simulator - Phasor Measurement Unit Simulator 00005 * 00006 * Copyright (C) 2011 Nitesh Pandit 00007 * Copyright (C) 2011 Kedar V. Khandeparkar 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * as published by the Free Software Foundation; either version 2 00012 * of the License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 * 00023 * Authors: 00024 * Kedar V. Khandeparkar <kedar.khandeparkar@gmail.com> 00025 * Nitesh Pandit <panditnitesh@gmail.com> 00026 * 00027 * ----------------------------------------------------------------------------- */ 00028 00029 00030 00031 #include<gtk/gtk.h> 00032 00033 00034 /* ---------------------------------------------------------------- */ 00035 /* global variables */ 00036 /* ---------------------------------------------------------------- */ 00037 00038 char *hdr_frame, *markup1; 00039 00040 struct ConfigurationFrame 00041 { 00042 int cfg_pmuID; 00043 int cfg_fdf; 00044 int cfg_af; 00045 int cfg_pf; 00046 int cfg_pn; 00047 int cfg_phnmr_val; 00048 int cfg_annmr_val; 00049 int cfg_dgnmr_val; 00050 int cfg_dataRate; 00051 char *cfg_STNname; 00052 char *cfg_phasor_channels; 00053 char *cfg_analog_channels; 00054 char *cfg_digital_channels; 00055 }; 00056 struct ConfigurationFrame *cfg_info; 00057 00058 struct ConfigurationChange 00059 { 00060 int add_remove_choice; 00061 int new_cfg_phnmr_val; 00062 int new_cfg_annmr_val; 00063 int data_rate_choice; 00064 int new_data_rate; 00065 char *new_cfg_phasor_channels; 00066 char *new_cfg_analog_channels; 00067 }; 00068 struct ConfigurationChange *new_cfg_info; 00069 00070 00071 /* ---------------------------------------------------------------- */ 00072 /* Function prototypes */ 00073 /* ---------------------------------------------------------------- */ 00074 00075 void header_frm_gen(int len); 00076 00077 void reconfig_cfg_CC(); 00078 00079 void show_pmu_details (GtkWidget *widget, gpointer udata); 00080 00081 int create_cfg(); 00082