Compare commits
No commits in common. "0a45563c3f1f4f0a5af4d964e000566d4a824ad0" and "f438835200b7701002f33f9767d877b35953a0fe" have entirely different histories.
0a45563c3f
...
f438835200
|
@ -3,8 +3,8 @@
|
|||
<interface>
|
||||
<requires lib="gtk+" version="3.24"/>
|
||||
<object class="GtkWindow" id="util_window">
|
||||
<property name="width-request">985</property>
|
||||
<property name="height-request">800</property>
|
||||
<property name="width-request">800</property>
|
||||
<property name="height-request">700</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLayout" id="util_layout">
|
||||
|
@ -15,7 +15,7 @@
|
|||
<property name="margin-bottom">3</property>
|
||||
<child>
|
||||
<object class="GtkMenuBar" id="util_menubar">
|
||||
<property name="width-request">900</property>
|
||||
<property name="width-request">800</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="can-default">True</property>
|
||||
|
@ -169,7 +169,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=3 n-rows=4 -->
|
||||
<!-- n-columns=3 n-rows=2 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="width-request">100</property>
|
||||
<property name="height-request">80</property>
|
||||
|
@ -309,7 +309,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLayout" id="graph_layoutvol">
|
||||
<object class="GtkLayout" id="graph_layout">
|
||||
<property name="height-request">150</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
|
@ -320,539 +320,100 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=4 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="mlad">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Attack/Event</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mlvol">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">>6900V</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes"><6800V
|
||||
<6300V</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mlfreq">
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Deviation > 0.5 mHz</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">deviation < 0.5mHz</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mldfreq">
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Attack/Event</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
|
@ -860,28 +421,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLayout" id="graph_layoutfreq">
|
||||
<property name="height-request">150</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLayout" id="graph_layoutdfreq">
|
||||
<property name="height-request">150</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swvol">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
|
@ -890,83 +430,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="gl1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="graph_legend2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Graph Legend</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(253,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">RSS</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swfreq">
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="gl2">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
|
@ -992,7 +456,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(253,0,0)</property>
|
||||
<property name="rgba">rgb(255,120,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
|
@ -1003,7 +467,7 @@
|
|||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">RSS</property>
|
||||
<property name="label" translatable="yes">Pmu</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
|
@ -1018,10 +482,28 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -1030,91 +512,9 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swdfreq">
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="gl3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="graph_legend3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Graph Legend</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(253,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">RSS</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<interface>
|
||||
<requires lib="gtk+" version="3.24"/>
|
||||
<object class="GtkWindow" id="util_window">
|
||||
<property name="width-request">985</property>
|
||||
<property name="height-request">800</property>
|
||||
<property name="width-request">800</property>
|
||||
<property name="height-request">600</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLayout" id="util_layout">
|
||||
|
@ -15,7 +15,7 @@
|
|||
<property name="margin-bottom">3</property>
|
||||
<child>
|
||||
<object class="GtkMenuBar" id="util_menubar">
|
||||
<property name="width-request">900</property>
|
||||
<property name="width-request">800</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="can-default">True</property>
|
||||
|
@ -169,7 +169,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=3 n-rows=4 -->
|
||||
<!-- n-columns=3 n-rows=3 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="width-request">100</property>
|
||||
<property name="height-request">80</property>
|
||||
|
@ -179,7 +179,7 @@
|
|||
<property name="margin-top">10</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<!-- n-columns=1 n-rows=9 -->
|
||||
<!-- n-columns=1 n-rows=5 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="width-request">80</property>
|
||||
<property name="visible">True</property>
|
||||
|
@ -187,7 +187,7 @@
|
|||
<property name="row-spacing">35</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="voltage">
|
||||
<property name="label" translatable="yes">Voltage Magnitude</property>
|
||||
<property name="label" translatable="yes">Voltage</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
|
@ -218,7 +218,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -227,14 +227,13 @@
|
|||
<property name="can-focus">False</property>
|
||||
<property name="active">0</property>
|
||||
<items>
|
||||
<item id="0" translatable="yes">Gaussian</item>
|
||||
<item id="1" translatable="yes">kmeans</item>
|
||||
<item translatable="yes">DTW</item>
|
||||
<item id="0" translatable="yes">kmeans</item>
|
||||
<item id="1" translatable="yes">simple</item>
|
||||
</items>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">5</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -244,52 +243,15 @@
|
|||
<property name="active">0</property>
|
||||
<items>
|
||||
<item id="0" translatable="yes">frequency only</item>
|
||||
<item id="1" translatable="yes">voltage only</item>
|
||||
<item id="2" translatable="yes">frequency,voltage</item>
|
||||
<item id="1" translatable="yes">frequency,voltage</item>
|
||||
<item id="2" translatable="yes">voltage</item>
|
||||
</items>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="dfreq">
|
||||
<property name="label" translatable="yes">dfreq</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="algo_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Algorithm</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="dimm_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Dimmensions</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
|
@ -309,806 +271,16 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLayout" id="graph_layoutvol">
|
||||
<property name="height-request">150</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=4 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="mlad">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Attack/Event</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mlvol">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">>6900V</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes"><6800V
|
||||
<6300V</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mlfreq">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Attack/Event</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mldfreq">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Legend</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="title" translatable="yes">red</property>
|
||||
<property name="rgba">rgb(238,29,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="legend_label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Attack/Event</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(0,255,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(119,118,123)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">No data</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLayout" id="graph_layoutfreq">
|
||||
<property name="height-request">150</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLayout" id="graph_layoutdfreq">
|
||||
<property name="height-request">150</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swvol">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="gl1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="graph_legend2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Graph Legend</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(253,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">RSS</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swfreq">
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="gl2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="graph_legend1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Graph Legend</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(253,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">RSS</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swdfreq">
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="gl3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="graph_legend3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Graph Legend</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="rgba">rgb(253,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">RSS</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include<gtk/gtk.h>
|
||||
#include<osm-gps-map.h>
|
||||
#include "livechart.h"
|
||||
|
||||
typedef struct{
|
||||
OsmGpsMap *util_map;
|
||||
GdkPixbuf *g_red_image;
|
||||
|
@ -14,13 +12,11 @@ struct vis_data{
|
|||
int id;
|
||||
float lat;
|
||||
float lon;
|
||||
GdkColor color;
|
||||
OsmGpsMapImage *last_image; // TODO:
|
||||
GdkPixbuf *last_image;
|
||||
GTimeVal last_update_time;
|
||||
LiveChartSerie *serie;
|
||||
struct vis_data *next;
|
||||
};
|
||||
|
||||
struct vis_data *vis_data_head;
|
||||
struct vis_data *head;
|
||||
|
||||
gboolean update_images(gpointer* pars);
|
|
@ -20,25 +20,12 @@ struct _UtData
|
|||
/* ui buttons */
|
||||
GtkWidget *voltage;
|
||||
GtkWidget *frequency;
|
||||
GtkWidget *dfreq;
|
||||
GtkWidget *attack_detection;
|
||||
GtkWidget *algorithm;
|
||||
GtkWidget *dimmension;
|
||||
OsmGpsMap *util_map;
|
||||
GtkContainer *map_layout;
|
||||
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;
|
||||
GtkContainer *graph_layout;
|
||||
};
|
||||
|
||||
UtData *utdata;
|
||||
|
|
|
@ -20,12 +20,11 @@ struct vollist
|
|||
int idcode;
|
||||
long double AVERAGE_OF_VOLTAGE;
|
||||
unsigned long long int COUNT;
|
||||
struct vollist* next;
|
||||
};
|
||||
|
||||
|
||||
struct freqlist *head = NULL;
|
||||
struct vollist *headvol = NULL;
|
||||
struct vollist *headvol = NULL
|
||||
|
||||
gboolean attack_detect_freq(struct data_frame *df)
|
||||
{
|
||||
|
@ -34,7 +33,6 @@ gboolean attack_detect_freq(struct data_frame *df)
|
|||
head = (struct freqlist *)malloc(sizeof(struct freqlist));
|
||||
head->AVERAGE_OF_FREQUENCY = 50;
|
||||
head->COUNT = 500;
|
||||
head->idcode=to_intconvertor(df->idcode);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -84,7 +82,6 @@ gboolean attack_detect_freq(struct data_frame *df)
|
|||
bring = (struct freqlist *)malloc(sizeof(struct freqlist));
|
||||
bring->AVERAGE_OF_FREQUENCY = 50;
|
||||
bring->COUNT = 500;
|
||||
bring->idcode = to_intconvertor(df->idcode);
|
||||
previous->next=bring;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -114,17 +111,16 @@ gboolean attack_detect_vol(struct data_frame *df)
|
|||
long double v2 = decode_ieee_single(s2);
|
||||
CURR_vol = sqrt((v1 * v1) + (v2 * v2));
|
||||
}
|
||||
if (headvol == NULL)
|
||||
if (head == NULL)
|
||||
{
|
||||
headvol = (struct vollist *)malloc(sizeof(struct vollist));
|
||||
headvol->AVERAGE_OF_VOLTAGE = CURR_vol;
|
||||
headvol->COUNT = 500;
|
||||
headvol->idcode=to_intconvertor(df->idcode);
|
||||
head = (struct vollist *)malloc(sizeof(struct vollist));
|
||||
head->AVERAGE_OF_VOLTAGE = CURR_vol;
|
||||
head->COUNT = 500;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct vollist *temp = headvol;
|
||||
struct vollist *temp = head;
|
||||
struct vollist *previous = NULL;
|
||||
while (temp != NULL)
|
||||
{
|
||||
|
@ -163,7 +159,6 @@ gboolean attack_detect_vol(struct data_frame *df)
|
|||
bring->AVERAGE_OF_VOLTAGE = CURR_vol;
|
||||
bring->COUNT = 500;
|
||||
previous->next = bring;
|
||||
bring->idcode = to_intconvertor(df->idcode);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,25 +30,25 @@ struct DTWvollist
|
|||
};
|
||||
|
||||
|
||||
struct DTWfreqlist *dtwhead = NULL;
|
||||
struct DTWvollist *dtwheadvol = NULL;
|
||||
struct DTWfreqlist *head = NULL;
|
||||
struct DTWvollist *headvol = NULL;
|
||||
|
||||
int DTWfreqDistance(struct data_frame *df)
|
||||
{
|
||||
if (dtwhead == NULL)
|
||||
if (head == NULL)
|
||||
{
|
||||
dtwhead = (struct DTWfreqlist *)malloc(sizeof(struct DTWfreqlist));
|
||||
dtwhead->count_track1 = 0;
|
||||
dtwhead->count_track2 = 0;
|
||||
dtwhead->flag = 0;
|
||||
dtwhead->idcode = to_intconvertor(df->idcode);
|
||||
dtwhead->next = NULL;
|
||||
dtwhead->result=1;
|
||||
head = (struct DTWfreqlist *)malloc(sizeof(struct DTWfreqlist));
|
||||
head->count_track1 = 0;
|
||||
head->count_track2 = 0;
|
||||
head->flag = 0;
|
||||
head->idcode = to_intconvertor(df->idcode);
|
||||
head->next = NULL;
|
||||
head->result=1;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct DTWfreqlist *temp = dtwhead;
|
||||
struct DTWfreqlist *temp = head;
|
||||
struct DTWfreqlist *previous;
|
||||
while (temp != NULL)
|
||||
{
|
||||
|
@ -161,20 +161,20 @@ int DTWfreqDistance(struct data_frame *df)
|
|||
|
||||
int DTWvolDistance(struct data_frame *df)
|
||||
{
|
||||
if (dtwheadvol == NULL)
|
||||
if (headvol == NULL)
|
||||
{
|
||||
dtwheadvol = (struct DTWvollist *)malloc(sizeof(struct DTWvollist));
|
||||
dtwheadvol->count_track1 = 0;
|
||||
dtwheadvol->count_track2 = 0;
|
||||
dtwheadvol->flag = 0;
|
||||
dtwheadvol->idcode = to_intconvertor(df->idcode);
|
||||
dtwheadvol->next = NULL;
|
||||
dtwheadvol->result=1;
|
||||
headvol = (struct DTWvollist *)malloc(sizeof(struct DTWvollist));
|
||||
headvol->count_track1 = 0;
|
||||
headvol->count_track2 = 0;
|
||||
headvol->flag = 0;
|
||||
headvol->idcode = to_intconvertor(df->idcode);
|
||||
headvol->next = NULL;
|
||||
headvol->result=1;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct DTWvollist *temp = dtwheadvol;
|
||||
struct DTWvollist *temp = headvol;
|
||||
struct DTWvollist *previous;
|
||||
while (temp != NULL)
|
||||
{
|
||||
|
|
|
@ -6,96 +6,53 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <math.h>
|
||||
|
||||
// FILE *fp;
|
||||
FILE *fp;
|
||||
/*intial weights weights for each points */
|
||||
unsigned long long int count_A = 1000;
|
||||
unsigned long long int count_B = 1000;
|
||||
unsigned long long int count_C = 1000;
|
||||
|
||||
struct kmeans1
|
||||
{
|
||||
int idcode;
|
||||
unsigned long long int count_A = 1000;
|
||||
unsigned long long int count_B = 1000;
|
||||
unsigned long long int count_C = 1000;
|
||||
long double A = 50;
|
||||
long double B = 49;
|
||||
long double C = 51;
|
||||
struct kmeans1 *next;
|
||||
}
|
||||
|
||||
struct kmeans1 *headk = NULL;
|
||||
/*In India frequency ranges from 49.5 to 50.2 Hz*/
|
||||
long double std_dev = 0.6454972244;
|
||||
long double A = 0; // for point A=50
|
||||
long double B = -1.5491933394; // for point B=49
|
||||
long double C = 0.7745966692; // for point C=50.5
|
||||
long double mean = 50;
|
||||
unsigned long long int count = 3000;
|
||||
|
||||
gboolean kmeans(struct data_frame *df)
|
||||
{
|
||||
if (headk == NULL)
|
||||
long double CURR_FREQ = 50 + to_intconvertor(df->dpmu[0]->freq) * 1e-3;
|
||||
long double CURR_FREQ_temp = CURR_FREQ;
|
||||
CURR_FREQ = (CURR_FREQ - mean) / std_dev;
|
||||
long double diff_A = fabs(A - CURR_FREQ);
|
||||
long double diff_B = fabs(B - CURR_FREQ);
|
||||
long double diff_C = fabs(C - CURR_FREQ);
|
||||
// fp = fopen("points.csv","a");
|
||||
// printf("A: %Lf, B: %Lf, C: %Lf\n",A,B,C);
|
||||
// fprintf(fp,"%Lf, %Lf, %Lf\n",A,B,C);
|
||||
// fclose(fp);
|
||||
|
||||
/*Updating std_dev and mean*/
|
||||
// printf("std_dev: %Lf, mean: %Lf\n",std_dev,mean);
|
||||
mean = ((mean * count) + CURR_FREQ_temp) / (++count);
|
||||
std_dev = (((std_dev * std_dev) * (count - 1)) + (CURR_FREQ * std_dev * CURR_FREQ * std_dev)) / count;
|
||||
std_dev = sqrt(std_dev);
|
||||
|
||||
if (diff_A <= diff_B && diff_A <= diff_C)
|
||||
{
|
||||
headk->A = 50;
|
||||
headk->B = 49;
|
||||
headk->C = 51;
|
||||
headk->count_A = 1000;
|
||||
headk->count_B = 1000;
|
||||
headk->count_C = 1000;
|
||||
headk->next = NULL;
|
||||
headk->idcode = to_intconvertor(df->idcode);
|
||||
A = ((count_A * (A)) + CURR_FREQ) / (++count_A);
|
||||
return TRUE;
|
||||
}
|
||||
else if (diff_B < diff_C)
|
||||
{
|
||||
B = ((count_B * (B)) + CURR_FREQ) / (++count_B);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct kmeans1 *temp == headk;
|
||||
struct kmeans1 *previous == NULL;
|
||||
while (temp != NULL)
|
||||
{
|
||||
if (temp->idcode == to_intconvertor(df->idcode))
|
||||
{
|
||||
float CURR_FREQ;
|
||||
if (df->dpmu[0]->fmt->freq == '0')
|
||||
{
|
||||
CURR_FREQ = 50 + to_intconvertor(df->dpmu[0]->freq) * 1e-3;
|
||||
}
|
||||
else
|
||||
{
|
||||
CURR_FREQ = decode_ieee_single(df->dpmu[0]->freq);
|
||||
}
|
||||
|
||||
long double diff_A = fabs(temp->A - CURR_FREQ);
|
||||
long double diff_B = fabs(temp->B - CURR_FREQ);
|
||||
long double diff_C = fabs(temp->C - CURR_FREQ);
|
||||
// fp = fopen("points.csv","a");
|
||||
// printf("A: %Lf, B: %Lf, C: %Lf\n",A,B,C);
|
||||
// fprintf(fp,"%Lf, %Lf, %Lf\n",A,B,C);
|
||||
// fclose(fp);
|
||||
|
||||
if (diff_A <= diff_B && diff_A <= diff_C)
|
||||
{
|
||||
temp->A = ((temp->count_A * (temp->A)) + CURR_FREQ) / (++temp->count_A);
|
||||
return TRUE;
|
||||
}
|
||||
else if (diff_B < diff_C)
|
||||
{
|
||||
temp->B = ((temp->count_B * (temp->B)) + CURR_FREQ) / (++temp->count_B);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp->C = ((temp->count_C * (temp->C)) + CURR_FREQ) / (++temp->count_C);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
previous=temp;
|
||||
temp = temp->next;
|
||||
}
|
||||
if(temp==NULL)
|
||||
{
|
||||
struct kmeans1 *bring = (struct kmeans1 *)malloc(sizeof(struct kmeans1));
|
||||
bring->A = 50;
|
||||
bring->B = 49;
|
||||
bring->C = 51;
|
||||
bring->count_A = 1000;
|
||||
bring->count_B = 1000;
|
||||
bring->count_C = 1000;
|
||||
bring->next = NULL;
|
||||
bring->idcode = to_intconvertor(df->idcode);
|
||||
previous->next=bring;
|
||||
return TRUE;
|
||||
}
|
||||
C = ((count_C * (C)) + CURR_FREQ) / (++count_C);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ gboolean update_images(gpointer* pars){
|
|||
pthread_mutex_lock(&mutex_on_TSB);
|
||||
struct data_frame *df = TSB[MAXTSB-1].first_data_frame;
|
||||
struct Lower_Layer_Details *LLptr;
|
||||
struct vis_data *vis_ptr;
|
||||
|
||||
if (df == NULL){
|
||||
pthread_mutex_unlock(&mutex_on_TSB);
|
||||
|
@ -46,17 +45,17 @@ gboolean update_images(gpointer* pars){
|
|||
float lat;
|
||||
float lon;
|
||||
loops++;
|
||||
printf("loops: %d\n", loops);
|
||||
// printf("loops: %d\n", loops);
|
||||
|
||||
id = to_intconvertor(df->idcode);
|
||||
printf("id = %d\n",id);
|
||||
// printf("id = %d\n",id);
|
||||
pthread_mutex_lock(&mutex_cfg);
|
||||
temp_cfg = cfgfirst;
|
||||
// Check for the IDCODE in Configuration Frame
|
||||
while(temp_cfg != NULL){
|
||||
if(id == to_intconvertor(temp_cfg->idcode)){
|
||||
cfg_match = 1;
|
||||
printf("Matched - id : %d\n",id);
|
||||
// printf("Matched - id : %d\n",id);
|
||||
freq_fmt = temp_cfg->pmu[0]->fmt->freq;
|
||||
anal_fmt = temp_cfg->pmu[0]->fmt->analog;
|
||||
phas_fmt = temp_cfg->pmu[0]->fmt->phasor;
|
||||
|
@ -71,7 +70,7 @@ gboolean update_images(gpointer* pars){
|
|||
// get data from df.
|
||||
if(freq_fmt == '1'){
|
||||
freq = decode_ieee_single(df->dpmu[i]->freq);
|
||||
printf("freq = %f\n",freq);
|
||||
// printf("freq = %f\n",freq);
|
||||
}else{
|
||||
freq = to_intconvertor(df->dpmu[i]->freq)*1e-6+50;
|
||||
}
|
||||
|
@ -82,42 +81,28 @@ gboolean update_images(gpointer* pars){
|
|||
strncpy(last2bytes, df->dpmu[i]->phasors[0]+2, 2);
|
||||
vol_magnitude = to_intconvertor(first2bytes);
|
||||
float imaginary = to_intconvertor(last2bytes);
|
||||
printf("vol = %f imag = %f\n",vol_magnitude, imaginary);
|
||||
// printf("vol = %f imag = %f\n",vol_magnitude, imaginary);
|
||||
|
||||
live_chart_serie_add(serie, freq);
|
||||
|
||||
// check lower layer details to get longitude and lattitude.
|
||||
// pthread_mutex_lock(&mutex_Lower_Layer_Details);
|
||||
// LLptr = LLfirst;
|
||||
// match = 0;
|
||||
// while(LLptr != NULL){
|
||||
// printf("pmuid = %d\n",LLptr->pmuid);
|
||||
// if(LLptr->pmuid == id){
|
||||
// match = 1;
|
||||
// lat = LLptr->latitude;
|
||||
// lon = LLptr->longitude;
|
||||
// printf("lat = %f; lon = %f\n",lat,lon);
|
||||
// break;
|
||||
// }
|
||||
// LLptr = LLptr->next;
|
||||
// }
|
||||
// pthread_mutex_unlock(&mutex_Lower_Layer_Details);
|
||||
|
||||
vis_ptr = vis_data_head;
|
||||
pthread_mutex_lock(&mutex_Lower_Layer_Details);
|
||||
LLptr = LLfirst;
|
||||
match = 0;
|
||||
while(vis_ptr != NULL){
|
||||
printf("vis_ptr->id = %d\n",vis_ptr->id);
|
||||
if(vis_ptr->id == id){
|
||||
while(LLptr != NULL){
|
||||
// printf("pmuid = %d\n",LLptr->pmuid);
|
||||
if(LLptr->pmuid == id){
|
||||
match = 1;
|
||||
printf("Matched - id : %d\n",id);
|
||||
float lat = LLptr->latitude;
|
||||
float lon = LLptr->longitude;
|
||||
break;
|
||||
}
|
||||
vis_ptr = vis_ptr->next;
|
||||
LLptr = LLptr->next;
|
||||
}
|
||||
pthread_mutex_unlock(&mutex_Lower_Layer_Details);
|
||||
|
||||
|
||||
if(match == 1 && cfg_match == 1){
|
||||
printf("lat = %f, lon = %f, freq = %f\n",lat,lon,freq);
|
||||
// if(match == 1 && cfg_match == 1){
|
||||
// printf("lat = %f, lon = %f, freq = %f\n",lat,lon,freq);
|
||||
if(parameters->g_last_image != 0){
|
||||
osm_gps_map_image_remove(parameters->util_map, parameters->g_last_image);
|
||||
}
|
||||
|
@ -126,7 +111,7 @@ gboolean update_images(gpointer* pars){
|
|||
}else{
|
||||
parameters->g_last_image = osm_gps_map_image_add(parameters->util_map,lat, lon, parameters->g_red_image);
|
||||
}
|
||||
}
|
||||
// }
|
||||
df = df->dnext;
|
||||
// i++;
|
||||
k++;
|
||||
|
|
|
@ -163,7 +163,6 @@ int add_PMU(char pmuid[], char ip[], char port[], char protocol[], char latitude
|
|||
temp_pmu->request_cfg_frame = 0;
|
||||
temp_pmu->latitude = atof(latitude);
|
||||
temp_pmu->longitude = atof(longitude);
|
||||
printf(" lat = %f long = %f\n",temp_pmu->latitude,temp_pmu->longitude);
|
||||
temp_pmu->next = NULL;
|
||||
temp_pmu->prev = NULL;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "map_vis.h"
|
||||
#include "utility_tools.h"
|
||||
#include "livechart.h"
|
||||
#include "connections.h"
|
||||
|
||||
#define UI_fILE "./assets/utility_tools.ui"
|
||||
#define RED_IMAGE "./assets/red.png"
|
||||
|
@ -20,216 +19,50 @@
|
|||
// }
|
||||
|
||||
// on closing the window kill the g_timeout_add
|
||||
|
||||
GdkRGBA getIndexColor(int index){
|
||||
GdkRGBA color;
|
||||
// get the color from the index mathematically
|
||||
switch(index){
|
||||
case 0:
|
||||
color.red = 1.0;
|
||||
color.green = 0.0;
|
||||
color.blue = 0.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 1:
|
||||
color.red = 0.0;
|
||||
color.green = 1.0;
|
||||
color.blue = 0.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 2:
|
||||
color.red = 0.0;
|
||||
color.green = 0.0;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 3:
|
||||
color.red = 1.0;
|
||||
color.green = 1.0;
|
||||
color.blue = 0.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 4:
|
||||
color.red = 1.0;
|
||||
color.green = 0.0;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 5:
|
||||
color.red = 0.0;
|
||||
color.green = 1.0;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 6:
|
||||
color.red = 1.0;
|
||||
color.green = 0.5;
|
||||
color.blue = 0.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 7:
|
||||
color.red = 0.0;
|
||||
color.green = 0.5;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 8:
|
||||
color.red = 0.5;
|
||||
color.green = 1.0;
|
||||
color.blue = 0.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 9:
|
||||
color.red = 0.5;
|
||||
color.green = 0.0;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 10:
|
||||
color.red = 1.0;
|
||||
color.green = 0.0;
|
||||
color.blue = 0.5;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 11:
|
||||
color.red = 0.0;
|
||||
color.green = 1.0;
|
||||
color.blue = 0.5;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 12:
|
||||
color.red = 0.5;
|
||||
color.green = 0.0;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
case 13:
|
||||
color.red = 1.0;
|
||||
color.green = 0.5;
|
||||
color.blue = 0.0;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
default:
|
||||
color.red = 0.0+0.1*index;
|
||||
color.green = 0.0+0.9*index;
|
||||
color.blue = 0.0+0.5*index;
|
||||
color.alpha = 1.0;
|
||||
break;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
void on_window_destroy(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
g_source_remove(GPOINTER_TO_UINT(data));
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
// on clicking the button voltage
|
||||
void on_voltage_clicked(GtkButton *but, gpointer udata)
|
||||
{
|
||||
curr_measurement = 0;
|
||||
|
||||
gtk_widget_show(utdata->ml_vol);
|
||||
gtk_widget_hide(utdata->ml_freq);
|
||||
gtk_widget_hide(utdata->ml_dfreq);
|
||||
gtk_widget_hide(utdata->ml_ad);
|
||||
|
||||
gtk_widget_hide(utdata->algorithm);
|
||||
gtk_widget_hide(utdata->dimmension);
|
||||
gtk_widget_hide(utdata->algo_label);
|
||||
gtk_widget_hide(utdata->dimm_label);
|
||||
gtk_widget_set_sensitive(utdata->voltage, FALSE);
|
||||
gtk_widget_set_sensitive(utdata->frequency, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->dfreq, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->attack_detection, TRUE);
|
||||
printf("Voltage\n");
|
||||
}
|
||||
|
||||
// on clicking the button frequency
|
||||
void on_frequency_clicked(GtkButton *but, gpointer udata)
|
||||
{
|
||||
curr_measurement = 1;
|
||||
|
||||
gtk_widget_show(utdata->ml_freq);
|
||||
gtk_widget_hide(utdata->ml_vol);
|
||||
gtk_widget_hide(utdata->ml_dfreq);
|
||||
gtk_widget_hide(utdata->ml_ad);
|
||||
|
||||
gtk_widget_hide(utdata->algorithm);
|
||||
gtk_widget_hide(utdata->dimmension);
|
||||
gtk_widget_hide(utdata->algo_label);
|
||||
gtk_widget_hide(utdata->dimm_label);
|
||||
gtk_widget_set_sensitive(utdata->voltage, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->frequency, FALSE);
|
||||
gtk_widget_set_sensitive(utdata->dfreq, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->attack_detection, TRUE);
|
||||
|
||||
printf("Frequency\n");
|
||||
}
|
||||
|
||||
// on clicking the button dfreq
|
||||
void on_dfreq_clicked(GtkButton *but, gpointer udata)
|
||||
{
|
||||
curr_measurement = 2;
|
||||
|
||||
gtk_widget_show(utdata->ml_dfreq);
|
||||
gtk_widget_hide(utdata->ml_vol);
|
||||
gtk_widget_hide(utdata->ml_freq);
|
||||
gtk_widget_hide(utdata->ml_ad);
|
||||
|
||||
|
||||
gtk_widget_hide(utdata->algorithm);
|
||||
gtk_widget_hide(utdata->dimmension);
|
||||
gtk_widget_hide(utdata->algo_label);
|
||||
gtk_widget_hide(utdata->dimm_label);
|
||||
gtk_widget_set_sensitive(utdata->voltage, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->frequency, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->dfreq, FALSE);
|
||||
gtk_widget_set_sensitive(utdata->attack_detection, TRUE);
|
||||
|
||||
printf("dfreq\n");
|
||||
}
|
||||
|
||||
// on clicking the button attack_detection
|
||||
void on_attack_detection_clicked(GtkButton *but, gpointer udata)
|
||||
{
|
||||
curr_measurement = 3;
|
||||
curr_measurement = 2;
|
||||
gtk_widget_set_sensitive(utdata->voltage, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->frequency, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->dfreq, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->attack_detection, FALSE);
|
||||
|
||||
gtk_widget_show(utdata->algorithm);
|
||||
gtk_widget_show(utdata->dimmension);
|
||||
gtk_widget_show(utdata->algo_label);
|
||||
gtk_widget_show(utdata->dimm_label);
|
||||
gtk_widget_show(utdata->ml_ad);
|
||||
|
||||
gtk_widget_hide(utdata->ml_vol);
|
||||
gtk_widget_hide(utdata->ml_freq);
|
||||
gtk_widget_hide(utdata->ml_dfreq);
|
||||
|
||||
printf("Attack Detection\n");
|
||||
}
|
||||
|
||||
void set_algo(GtkComboBox *combo, gpointer udata)
|
||||
// on clicking the button voltage
|
||||
void on_voltage_clicked(GtkButton *but, gpointer udata)
|
||||
{
|
||||
algorithm = gtk_combo_box_get_active(combo);
|
||||
printf("Algorithm: %d\n", algorithm);
|
||||
curr_measurement = 0;
|
||||
gtk_widget_hide(utdata->algorithm);
|
||||
gtk_widget_hide(utdata->dimmension);
|
||||
gtk_widget_set_sensitive(utdata->voltage, FALSE);
|
||||
gtk_widget_set_sensitive(utdata->frequency, TRUE);
|
||||
gtk_widget_set_sensitive(utdata->attack_detection, TRUE);
|
||||
printf("Voltage\n");
|
||||
}
|
||||
|
||||
void set_dimm(GtkComboBox *combo, gpointer udata)
|
||||
{
|
||||
dimmension = gtk_combo_box_get_active(combo);
|
||||
|
||||
printf("dimmension = %d\n", dimmension);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void utility_tools(GtkButton *but, gpointer udata)
|
||||
{
|
||||
GdkPixbuf *g_red_image;
|
||||
|
@ -250,40 +83,20 @@ void utility_tools(GtkButton *but, gpointer udata)
|
|||
utdata->util_window = GTK_WIDGET(gtk_builder_get_object(builder, "util_window"));
|
||||
utdata->voltage = GTK_WIDGET(gtk_builder_get_object(builder, "voltage"));
|
||||
utdata->frequency = GTK_WIDGET(gtk_builder_get_object(builder, "freq"));
|
||||
utdata->dfreq = GTK_WIDGET(gtk_builder_get_object(builder, "dfreq"));
|
||||
utdata->attack_detection = GTK_WIDGET(gtk_builder_get_object(builder, "attack_detection"));
|
||||
utdata->algorithm = GTK_WIDGET(gtk_builder_get_object(builder, "algorithm"));
|
||||
utdata->dimmension = GTK_WIDGET(gtk_builder_get_object(builder, "dimmension"));
|
||||
// utdata->util_map = GTK_WIDGET(gtk_builder_get_object(builder, "util_map"));
|
||||
utdata->map_layout = GTK_CONTAINER(gtk_builder_get_object(builder, "map_layout"));
|
||||
utdata->graph_layoutvol = GTK_CONTAINER(gtk_builder_get_object(builder, "graph_layoutvol"));
|
||||
utdata->graph_layoutfreq = GTK_CONTAINER(gtk_builder_get_object(builder, "graph_layoutfreq"));
|
||||
utdata->graph_layoutdfreq = GTK_CONTAINER(gtk_builder_get_object(builder, "graph_layoutdfreq"));
|
||||
utdata->algo_label = GTK_WIDGET(gtk_builder_get_object(builder, "algo_label"));
|
||||
utdata->dimm_label = GTK_WIDGET(gtk_builder_get_object(builder, "dimm_label"));
|
||||
utdata->ml_vol = GTK_WIDGET(gtk_builder_get_object(builder, "mlvol"));
|
||||
utdata->ml_freq = GTK_WIDGET(gtk_builder_get_object(builder, "mlfreq"));
|
||||
utdata->ml_dfreq = GTK_WIDGET(gtk_builder_get_object(builder, "mldfreq"));
|
||||
utdata->ml_ad = GTK_WIDGET(gtk_builder_get_object(builder, "mlad"));
|
||||
utdata->swvol = GTK_WIDGET(gtk_builder_get_object(builder, "swvol"));
|
||||
utdata->swfreq = GTK_WIDGET(gtk_builder_get_object(builder, "swfreq"));
|
||||
utdata->swdfreq = GTK_WIDGET(gtk_builder_get_object(builder, "swdfreq"));
|
||||
utdata->swad = GTK_WIDGET(gtk_builder_get_object(builder, "swad"));
|
||||
utdata->graph_layout = GTK_CONTAINER(gtk_builder_get_object(builder, "graph_layout"));
|
||||
|
||||
gtk_widget_set_sensitive(utdata->voltage, FALSE);
|
||||
gtk_widget_set_visible(utdata->algorithm, FALSE);
|
||||
gtk_widget_set_visible(utdata->dimmension, FALSE);
|
||||
|
||||
gtk_widget_set_visible(utdata->graph_layoutfreq, FALSE);
|
||||
gtk_widget_set_visible(utdata->graph_layoutdfreq, FALSE);
|
||||
|
||||
|
||||
g_signal_connect(utdata->voltage, "clicked", G_CALLBACK(on_voltage_clicked), NULL);
|
||||
g_signal_connect(utdata->frequency, "clicked", G_CALLBACK(on_frequency_clicked), NULL);
|
||||
g_signal_connect(utdata->dfreq, "clicked", G_CALLBACK(on_dfreq_clicked), NULL);
|
||||
g_signal_connect(utdata->attack_detection, "clicked", G_CALLBACK(on_attack_detection_clicked), NULL);
|
||||
g_signal_connect(utdata->algorithm, "changed", G_CALLBACK(set_algo), NULL);
|
||||
g_signal_connect(utdata->dimmension, "changed", G_CALLBACK(set_dimm), NULL);
|
||||
g_signal_connect(utdata->frequency, "clicked", G_CALLBACK(on_frequency_clicked), NULL);
|
||||
g_signal_connect(utdata->voltage, "clicked", G_CALLBACK(on_voltage_clicked), NULL);
|
||||
|
||||
g_red_image = gdk_pixbuf_new_from_file_at_size(RED_IMAGE, 24, 24, NULL);
|
||||
g_green_image = gdk_pixbuf_new_from_file_at_size(GREEN_IMAGE, 24, 24, NULL);
|
||||
|
@ -306,43 +119,22 @@ void utility_tools(GtkButton *but, gpointer udata)
|
|||
dimmension = 0;
|
||||
myParameters parameters = {utdata->util_map, g_red_image, g_green_image, g_last_image};
|
||||
gpointer data = (gpointer)¶meters;
|
||||
guint pid = g_timeout_add(20, (GSourceFunc)update_images, data);
|
||||
|
||||
gtk_widget_set_size_request(GTK_WIDGET(utdata->util_map), 600, 500);
|
||||
|
||||
gtk_container_add(utdata->map_layout, GTK_WIDGET(utdata->util_map));
|
||||
|
||||
// add live chart
|
||||
serie = live_chart_serie_new("IIT", (LiveChartSerieRenderer*)live_chart_line_new(live_chart_values_new(10000)));
|
||||
serie = live_chart_serie_new("Hello", (LiveChartSerieRenderer*)live_chart_line_new (live_chart_values_new(10000)));
|
||||
// live_chart set color to the serie
|
||||
GdkRGBA color = getIndexColor(0);
|
||||
GdkRGBA color;
|
||||
color.red = 1.0;
|
||||
color.green = 0.0;
|
||||
color.blue = 1.0;
|
||||
color.alpha = 1.0;
|
||||
|
||||
live_chart_path_set_color(live_chart_serie_get_line(serie), &color);
|
||||
|
||||
// iterate over llptr and load the map_vis_head structure
|
||||
|
||||
// vis_data_head = (struct map_vis_head *)malloc(sizeof(struct vis_data));
|
||||
|
||||
struct Lower_Layer_Details *llptr = LLfirst;
|
||||
struct vis_data * visptr = vis_data_head;
|
||||
int index = 0;
|
||||
while (llptr != NULL)
|
||||
{
|
||||
visptr = (struct vis_data *)malloc(sizeof(struct vis_data));
|
||||
visptr->id = llptr->pmuid;
|
||||
visptr->lat = llptr->latitude;
|
||||
visptr->lon = llptr->longitude;
|
||||
visptr->last_image = osm_gps_map_image_add(utdata->util_map, llptr->latitude, llptr->longitude, g_red_image); // TODO: change the image
|
||||
visptr->serie = live_chart_serie_new(llptr->ip, (LiveChartSerieRenderer*)live_chart_line_new(live_chart_values_new(10000)));
|
||||
// live_chart set color to the serie
|
||||
GdkRGBA color = getIndexColor(index);
|
||||
live_chart_path_set_color(live_chart_serie_get_line(visptr->serie), &color);
|
||||
visptr->next = NULL;
|
||||
visptr = visptr->next;
|
||||
index++;
|
||||
llptr = llptr->next;
|
||||
}
|
||||
|
||||
guint pid = g_timeout_add(20, (GSourceFunc)update_images, data);
|
||||
|
||||
LiveChartConfig *config = live_chart_config_new();
|
||||
live_chart_yaxis_set_unit(config->y_axis, "mHz");
|
||||
live_chart_xaxis_set_tick_interval(config->x_axis, 20);
|
||||
|
@ -357,8 +149,7 @@ void utility_tools(GtkButton *but, gpointer udata)
|
|||
// gtk_widget_set_vexpand(GTK_WIDGET(chart), TRUE);
|
||||
gtk_widget_set_size_request(GTK_WIDGET(chart), 600, 150);
|
||||
|
||||
gtk_container_add(utdata->graph_layoutvol, GTK_WIDGET(chart));
|
||||
|
||||
gtk_container_add(utdata->graph_layout, GTK_WIDGET(chart));
|
||||
|
||||
|
||||
|
||||
|
@ -376,14 +167,6 @@ void utility_tools(GtkButton *but, gpointer udata)
|
|||
|
||||
gtk_widget_hide(utdata->algorithm);
|
||||
gtk_widget_hide(utdata->dimmension);
|
||||
gtk_widget_hide(utdata->algo_label);
|
||||
gtk_widget_hide(utdata->dimm_label);
|
||||
gtk_widget_hide(utdata->ml_freq);
|
||||
gtk_widget_hide(utdata->ml_dfreq);
|
||||
gtk_widget_hide(utdata->ml_ad);
|
||||
gtk_widget_hide(utdata->swfreq);
|
||||
gtk_widget_hide(utdata->swdfreq);
|
||||
gtk_widget_hide(utdata->swad);
|
||||
|
||||
gtk_main();
|
||||
}
|
Loading…
Reference in New Issue