iPDC-suite/iPDC/inc/utility_tools.h

55 lines
1.2 KiB
C
Raw Normal View History

2022-09-28 16:40:10 +05:30
#include <stdio.h>
#include<gtk/gtk.h>
2022-09-24 14:25:37 +05:30
#include "osm-gps-map.h"
2022-10-20 14:26:58 +05:30
#include "livechart.h"
2022-08-23 22:04:29 +05:30
/* Convenience macros for obtaining objects from UI file */
#define CH_GET_OBJECT(builder, name, type, data) \
data->name = type(gtk_builder_get_object (builder, #name) )
#define CH_GET_WIDGET(builder, name, data) \
CH_GET_OBJECT(builder, name, GTK_WIDGET, data)
2022-10-19 16:30:42 +05:30
/* Main data structure definition */
typedef struct _UtData UtData;
struct _UtData
{
/* Main window */
GtkWidget *util_window;
/* ui buttons */
GtkWidget *voltage;
GtkWidget *frequency;
2022-10-29 15:58:45 +05:30
GtkWidget *dfreq;
2022-10-19 16:30:42 +05:30
GtkWidget *attack_detection;
GtkWidget *algorithm;
GtkWidget *dimmension;
OsmGpsMap *util_map;
GtkContainer *map_layout;
2022-10-29 15:58:45 +05:30
GtkContainer *graph_layoutvol;
GtkContainer *graph_layoutfreq;
GtkContainer *graph_layoutdfreq;
GtkLabel *algo_label;
GtkLabel *dimm_label;
GtkBox * ml_vol;
GtkBox * ml_freq;
GtkBox * ml_dfreq;
GtkBox * ml_ad;
GtkWidget *swvol;
GtkWidget *swfreq;
GtkWidget *swdfreq;
GtkWidget *swad;
2022-10-29 23:53:32 +05:30
GtkWidget *maplabel;
GtkWidget *graphlabel;
2022-10-19 16:30:42 +05:30
};
UtData *utdata;
2022-10-25 21:43:07 +05:30
// global variables
int curr_measurement;
int algorithm;
int dimmension;
2022-09-28 16:40:10 +05:30
2022-09-24 14:25:37 +05:30
2022-08-23 13:05:44 +05:30
void utility_tools(GtkButton *but, gpointer udata);