mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
moved gui to own repository
This commit is contained in:
parent
d361750293
commit
4b023b876b
|
@ -1,586 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Generated with glade 3.22.2 -->
|
|
||||||
<interface>
|
|
||||||
<requires lib="gtk+" version="3.20"/>
|
|
||||||
<object class="GtkWindow" id="main_window">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="role">FreeDV JATE</property>
|
|
||||||
<property name="default_width">1000</property>
|
|
||||||
<property name="default_height">400</property>
|
|
||||||
<property name="icon_name">face-smile</property>
|
|
||||||
<child type="titlebar">
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLayout">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="width">200</property>
|
|
||||||
<property name="height">200</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox">
|
|
||||||
<property name="width_request">464</property>
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">ARQ CMD</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="dxcall">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="max_length">6</property>
|
|
||||||
<property name="width_chars">10</property>
|
|
||||||
<property name="max_width_chars">6</property>
|
|
||||||
<property name="text" translatable="yes">DXCALL</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="ping">
|
|
||||||
<property name="label" translatable="yes">Ping</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="ping" object="dxcall" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="connect">
|
|
||||||
<property name="label" translatable="yes">Connect</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="connect" object="dxcall" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="disconnect">
|
|
||||||
<property name="label" translatable="yes">Disconnect</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="disconnect" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">15</property>
|
|
||||||
<property name="y">136</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox">
|
|
||||||
<property name="width_request">232</property>
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">MY STATION</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="callsign">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="max_length">6</property>
|
|
||||||
<property name="width_chars">10</property>
|
|
||||||
<property name="max_width_chars">6</property>
|
|
||||||
<property name="text" translatable="yes">MYCALL</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton">
|
|
||||||
<property name="label">gtk-apply</property>
|
|
||||||
<property name="width_request">100</property>
|
|
||||||
<property name="height_request">30</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="setCallsign" object="callsign" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">15</property>
|
|
||||||
<property name="y">51</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox">
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">BROADCAST</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="call_cq">
|
|
||||||
<property name="label" translatable="yes">CQ CQ CQ</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="send_cq" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">15</property>
|
|
||||||
<property name="y">93</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox" id="ARQ DATA BOX">
|
|
||||||
<property name="width_request">790</property>
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="homogeneous">True</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">ARQ DATA</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
<attribute name="stretch" value="normal"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="send_arq_data_100">
|
|
||||||
<property name="label" translatable="yes">Send 100 Bytes</property>
|
|
||||||
<property name="width_request">-1</property>
|
|
||||||
<property name="height_request">-1</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="send_arq_data_100" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="send_arq_data_200">
|
|
||||||
<property name="label" translatable="yes">Send 200 Bytes</property>
|
|
||||||
<property name="width_request">-1</property>
|
|
||||||
<property name="height_request">-1</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="send_arq_data_200" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="send_arq_data_400">
|
|
||||||
<property name="label" translatable="yes">Send 400 Bytes</property>
|
|
||||||
<property name="width_request">-1</property>
|
|
||||||
<property name="height_request">-1</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="send_arq_data_400" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
<property name="non_homogeneous">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="send_arq_data_800">
|
|
||||||
<property name="label" translatable="yes">Send 800 Bytes</property>
|
|
||||||
<property name="width_request">-1</property>
|
|
||||||
<property name="height_request">-1</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<signal name="clicked" handler="send_arq_data_800" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">15</property>
|
|
||||||
<property name="y">175</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid">
|
|
||||||
<property name="width_request">500</property>
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="column_spacing">40</property>
|
|
||||||
<property name="row_homogeneous">True</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">ARQ</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="arq_state">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">label</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">CHANNEL</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="channel_state">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">label</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">TNC</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="tnc_state">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">label</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">PTT</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="ptt_state">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">label</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">15</property>
|
|
||||||
<property name="y">300</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox">
|
|
||||||
<property name="width_request">255</property>
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="width_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">CONNECTION</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="host">
|
|
||||||
<property name="width_request">98</property>
|
|
||||||
<property name="height_request">34</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="width_chars">10</property>
|
|
||||||
<property name="text" translatable="yes">localhost</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="port">
|
|
||||||
<property name="width_request">30</property>
|
|
||||||
<property name="height_request">30</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="width_chars">6</property>
|
|
||||||
<property name="max_width_chars">6</property>
|
|
||||||
<property name="text" translatable="yes">3000</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">15</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox">
|
|
||||||
<property name="width_request">403</property>
|
|
||||||
<property name="height_request">80</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">RMS</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLevelBar" id="levelbar">
|
|
||||||
<property name="width_request">310</property>
|
|
||||||
<property name="height_request">34</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="max_value">10000</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">487</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid">
|
|
||||||
<property name="width_request">640</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkProgressBar" id="progressbar_tx">
|
|
||||||
<property name="width_request">615</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="show_text">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</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">TX</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkProgressBar" id="progressbar_rx">
|
|
||||||
<property name="width_request">615</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="show_text">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">RX</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x">170</property>
|
|
||||||
<property name="y">250</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</interface>
|
|
|
@ -1,195 +0,0 @@
|
||||||
import socket
|
|
||||||
import random
|
|
||||||
import threading
|
|
||||||
import time
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
import gi
|
|
||||||
gi.require_version("Gtk", "3.0")
|
|
||||||
from gi.repository import GLib, Gtk, GObject
|
|
||||||
|
|
||||||
def create_string(length):
|
|
||||||
random_string = ''
|
|
||||||
for _ in range(length):
|
|
||||||
# Considering only upper and lowercase letters
|
|
||||||
random_integer = random.randint(97, 97 + 26 - 1)
|
|
||||||
flip_bit = random.randint(0, 1)
|
|
||||||
# Convert to lowercase if the flip bit is on
|
|
||||||
random_integer = random_integer - 32 if flip_bit == 1 else random_integer
|
|
||||||
# Keep appending random characters using chr(x)
|
|
||||||
random_string += (chr(random_integer))
|
|
||||||
#print("STR:" + str(random_string))
|
|
||||||
|
|
||||||
return random_string
|
|
||||||
|
|
||||||
|
|
||||||
def send_command(command):
|
|
||||||
while True:
|
|
||||||
ip, port = builder.get_object('host').get_text(), int(builder.get_object('port').get_text())
|
|
||||||
try:
|
|
||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
||||||
sock.connect((ip, port))
|
|
||||||
if isinstance(command, str):
|
|
||||||
command = bytes(command, 'utf-8')
|
|
||||||
|
|
||||||
sock.sendall(command + b'\n')
|
|
||||||
print("done.....")
|
|
||||||
break
|
|
||||||
#response = str(sock.recv(1024), 'utf-8')
|
|
||||||
#sock.close()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def get_tnc_state():
|
|
||||||
print("starten wir mal....")
|
|
||||||
GLib.idle_add(get_tnc_state_worker)
|
|
||||||
#GObject.timeout_add(1000, pulse)
|
|
||||||
|
|
||||||
def get_tnc_state_worker():
|
|
||||||
|
|
||||||
#while True:
|
|
||||||
|
|
||||||
time.sleep(0.05)
|
|
||||||
ip, port = builder.get_object('host').get_text(), int(builder.get_object('port').get_text())
|
|
||||||
command = bytes('GET:TNC_STATE', 'utf-8')
|
|
||||||
try:
|
|
||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
||||||
sock.connect((ip, port))
|
|
||||||
sock.sendall(command + b'\n')
|
|
||||||
received = str(sock.recv(1024), "utf-8")
|
|
||||||
received_json = json.loads(received)
|
|
||||||
|
|
||||||
#print(received_json)
|
|
||||||
|
|
||||||
builder.get_object('ptt_state').set_text(received_json["PTT_STATE"])
|
|
||||||
builder.get_object('channel_state').set_text(received_json["CHANNEL_STATE"])
|
|
||||||
builder.get_object('tnc_state').set_text(received_json["TNC_STATE"])
|
|
||||||
builder.get_object('arq_state').set_text(received_json["ARQ_STATE"])
|
|
||||||
|
|
||||||
#builder.get_object('levelbar').set_min_value(0.0)
|
|
||||||
#builder.get_object('levelbar').set_max_value(10000.0)
|
|
||||||
builder.get_object('levelbar').set_value(int(received_json["AUDIO_RMS"]))
|
|
||||||
|
|
||||||
sock.close()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
#GObject.timeout_add(200, get_tnc_state_worker)
|
|
||||||
GLib.timeout_add(200, get_tnc_state_worker)
|
|
||||||
def get_data_state():
|
|
||||||
GLib.idle_add(get_data_state_worker)
|
|
||||||
|
|
||||||
|
|
||||||
def get_data_state_worker():
|
|
||||||
#while True:
|
|
||||||
|
|
||||||
ip, port = builder.get_object('host').get_text(), int(builder.get_object('port').get_text())
|
|
||||||
command = bytes('GET:DATA_STATE', 'utf-8')
|
|
||||||
try:
|
|
||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
||||||
sock.connect((ip, port))
|
|
||||||
sock.sendall(command + b'\n')
|
|
||||||
received = str(sock.recv(1024), "utf-8")
|
|
||||||
received_json = json.loads(received)
|
|
||||||
#print(received_json)
|
|
||||||
#builder.get_object('progressbar_tx').set_fraction(0.2)
|
|
||||||
#builder.get_object('progressbar_rx').set_fraction(0.2)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print(received_json["ARQ_TX_N_CURRENT_ARQ_FRAME"])
|
|
||||||
print(received_json["ARQ_TX_N_TOTAL_ARQ_FRAMES"])
|
|
||||||
print(received_json["ARQ_N_ARQ_FRAMES_PER_DATA_FRAME"])
|
|
||||||
print(received_json["ARQ_RX_N_CURRENT_ARQ_FRAME"])
|
|
||||||
print("-------")
|
|
||||||
if int(received_json["ARQ_TX_N_TOTAL_ARQ_FRAMES"]) > 0:
|
|
||||||
percentage_tx = int(received_json["ARQ_TX_N_CURRENT_ARQ_FRAME"]) / int(received_json["ARQ_TX_N_TOTAL_ARQ_FRAMES"])
|
|
||||||
print(percentage_tx)
|
|
||||||
else:
|
|
||||||
#print("0")
|
|
||||||
percentage_tx = 0.0
|
|
||||||
print(percentage_tx)
|
|
||||||
builder.get_object('progressbar_tx').set_fraction(percentage_tx)
|
|
||||||
|
|
||||||
|
|
||||||
if int(received_json["ARQ_N_ARQ_FRAMES_PER_DATA_FRAME"]) > 0:
|
|
||||||
percentage_rx = int(received_json["ARQ_RX_N_CURRENT_ARQ_FRAME"]) / int(received_json["ARQ_N_ARQ_FRAMES_PER_DATA_FRAME"])
|
|
||||||
#print(percentage_rx)
|
|
||||||
else:
|
|
||||||
#print("0")
|
|
||||||
percentage_rx = 0.0
|
|
||||||
#print(percentage_rx)
|
|
||||||
builder.get_object('progressbar_rx').set_fraction(percentage_rx)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#builder.get_object('progressbar').set_text('123')
|
|
||||||
#builder.get_object('progressbar').set_show_text('456')
|
|
||||||
|
|
||||||
sock.close()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
# GObject.timeout_add(200, get_data_state_worker)
|
|
||||||
GLib.timeout_add(200, get_data_state_worker)
|
|
||||||
class Handler:
|
|
||||||
def onDestroy(self, *args):
|
|
||||||
Gtk.main_quit()
|
|
||||||
|
|
||||||
def setCallsign(self, button):
|
|
||||||
call = builder.get_object('callsign').get_text()
|
|
||||||
send_command('SET:MYCALLSIGN:' + call)
|
|
||||||
|
|
||||||
def ping(self, button):
|
|
||||||
call = builder.get_object('dxcall').get_text()
|
|
||||||
send_command('PING:' + call)
|
|
||||||
|
|
||||||
def connect(self, button):
|
|
||||||
call = builder.get_object('dxcall').get_text()
|
|
||||||
send_command('ARQ:CONNECT:' + call)
|
|
||||||
|
|
||||||
def disconnect(self, button):
|
|
||||||
send_command('ARQ:DISCONNECT')
|
|
||||||
|
|
||||||
def send_arq_data_100(self, button):
|
|
||||||
data = create_string(100)
|
|
||||||
data = bytes("ARQ:DATA:" + data, 'utf-8')
|
|
||||||
send_command(data)
|
|
||||||
|
|
||||||
def send_arq_data_200(self, button):
|
|
||||||
data = create_string(200)
|
|
||||||
data = bytes("ARQ:DATA:" + data, 'utf-8')
|
|
||||||
send_command(data)
|
|
||||||
|
|
||||||
def send_arq_data_400(self, button):
|
|
||||||
data = create_string(400)
|
|
||||||
data = bytes("ARQ:DATA:" + data, 'utf-8')
|
|
||||||
send_command(data)
|
|
||||||
|
|
||||||
def send_arq_data_800(self, button):
|
|
||||||
data = create_string(800)
|
|
||||||
data = bytes("ARQ:DATA:" + data, 'utf-8')
|
|
||||||
send_command(data)
|
|
||||||
|
|
||||||
def send_cq(self, button):
|
|
||||||
send_command('CQCQCQ')
|
|
||||||
|
|
||||||
builder = Gtk.Builder()
|
|
||||||
builder.add_from_file("tnc_gui.glade")
|
|
||||||
builder.connect_signals(Handler())
|
|
||||||
|
|
||||||
window = builder.get_object("main_window")
|
|
||||||
window.show_all()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GET_TNC_STATE_THREAD = threading.Thread(target=get_tnc_state, args=[], name="TNC STATE")
|
|
||||||
GET_TNC_STATE_THREAD.start()
|
|
||||||
|
|
||||||
GET_DATA_STATE_THREAD = threading.Thread(target=get_data_state, args=[], name="DATA STATE")
|
|
||||||
GET_DATA_STATE_THREAD.start()
|
|
||||||
|
|
||||||
|
|
||||||
Gtk.main()
|
|
Loading…
Reference in a new issue