Revision control

Copy as Markdown

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>667</width>
<height>465</height>
</rect>
</property>
<property name="windowTitle">
<string>Modbus ADU Editor</string>
</property>
<property name="unifiedTitleAndToolBarOnMac">
<bool>false</bool>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout_4" rowstretch="0,0,0,1" columnstretch="0,1">
<item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="settingsBox">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="connectButton">
<property name="text">
<string>Connect</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QWidget" name="settingsWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="7" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>13</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="0" colspan="2">
<widget class="QLabel" name="timeoutLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Timeout (msec):</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>timeoutSpin</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="tcpPortLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Port:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>tcpPortEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>13</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="2">
<widget class="QLineEdit" name="tcpAddressEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>127.0.0.1</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="3">
<widget class="Line" name="line">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="tcpAddressLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Address:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>tcpAddressEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QComboBox" name="serialPortCombo"/>
</item>
<item row="8" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>13</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="2">
<widget class="QLineEdit" name="tcpPortEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>502</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="serialPortLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Port:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>serialPortCombo</cstring>
</property>
</widget>
</item>
<item row="11" column="2">
<widget class="QSpinBox" name="timeoutSpin">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="value">
<number>1000</number>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="serialRadio">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Serial</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0" colspan="2">
<widget class="QLabel" name="retriesLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Number of retries:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>retriesSpin</cstring>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QRadioButton" name="tcpRadio">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TCP</string>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QSpinBox" name="retriesSpin">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="value">
<number>3</number>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="parityLabel">
<property name="text">
<string>Parity:</string>
</property>
<property name="buddy">
<cstring>parityCombo</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="dataBitsLabel">
<property name="text">
<string>Data Bits:</string>
</property>
<property name="buddy">
<cstring>dataBitsCombo</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="stopBitsLabel">
<property name="text">
<string>Stop Bits:</string>
</property>
<property name="buddy">
<cstring>stopBitsCombo</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="baudRateLabel">
<property name="text">
<string>BaudRate:</string>
</property>
<property name="buddy">
<cstring>baudRateCombo</cstring>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="parityCombo">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>No</string>
</property>
</item>
<item>
<property name="text">
<string>Even</string>
</property>
</item>
<item>
<property name="text">
<string>Odd</string>
</property>
</item>
<item>
<property name="text">
<string>Space</string>
</property>
</item>
<item>
<property name="text">
<string>Mark</string>
</property>
</item>
</widget>
</item>
<item row="3" column="2">
<widget class="QComboBox" name="dataBitsCombo">
<property name="currentIndex">
<number>3</number>
</property>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
</widget>
</item>
<item row="4" column="2">
<widget class="QComboBox" name="stopBitsCombo">
<item>
<property name="text">
<string>1</string>
</property>
</item>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
</widget>
</item>
<item row="5" column="2">
<widget class="QComboBox" name="baudRateCombo">
<property name="currentIndex">
<number>4</number>
</property>
<item>
<property name="text">
<string>1200</string>
</property>
</item>
<item>
<property name="text">
<string>2400</string>
</property>
</item>
<item>
<property name="text">
<string>4800</string>
</property>
</item>
<item>
<property name="text">
<string>9600</string>
</property>
</item>
<item>
<property name="text">
<string>19200</string>
</property>
</item>
<item>
<property name="text">
<string>38400</string>
</property>
</item>
<item>
<property name="text">
<string>57600</string>
</property>
</item>
<item>
<property name="text">
<string>115200</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="disconnectButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Disconnect</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<layout class="QGridLayout" name="gridLayout_8">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="addressLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Server address:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>addressSpin</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="fcSerialLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Function code:</string>
</property>
<property name="buddy">
<cstring>fcSerialDrop</cstring>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="fcSerialDrop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Type your custom function code and data below</string>
</property>
</item>
<item>
<property name="text">
<string>0x01 - ReadCoils</string>
</property>
</item>
<item>
<property name="text">
<string>0x02 - Read Discrete Inputs</string>
</property>
</item>
<item>
<property name="text">
<string>0x03 - Read Holding Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x04 - Read Input Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x05 - Write Single Coil</string>
</property>
</item>
<item>
<property name="text">
<string>0x06 - Write Single Register</string>
</property>
</item>
<item>
<property name="text">
<string>0x07 - Read Exception Status</string>
</property>
</item>
<item>
<property name="text">
<string>0x08 - Diagnostics</string>
</property>
</item>
<item>
<property name="text">
<string>0x0B - Get Comm Event Counter</string>
</property>
</item>
<item>
<property name="text">
<string>0x0C - Get Comm Event Log</string>
</property>
</item>
<item>
<property name="text">
<string>0x0F - Write Multiple Coils</string>
</property>
</item>
<item>
<property name="text">
<string>0x10 - Write Multiple Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x11 - Report Server Id</string>
</property>
</item>
<item>
<property name="text">
<string>0x14 - Read File Record</string>
</property>
</item>
<item>
<property name="text">
<string>0x15 - Write File Record</string>
</property>
</item>
<item>
<property name="text">
<string>0x16 - Mask Write Register</string>
</property>
</item>
<item>
<property name="text">
<string>0x17 - Read/Write Multiple Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x18 - Read Fifo Queue</string>
</property>
</item>
<item>
<property name="text">
<string>0x2B - Encapsulated Interface Transport</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="pduSerialLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Data:</string>
</property>
<property name="buddy">
<cstring>pduSerialLine</cstring>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLineEdit" name="pduSerialLine">
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>Hexadecimal representation of the data in big-endian byte order.</string>
</property>
</widget>
</item>
<item row="3" column="1">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>163</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="2">
<widget class="QSpinBox" name="addressSpin">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="specialValueText">
<string>broadcast</string>
</property>
<property name="maximum">
<number>255</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<layout class="QGridLayout" name="gridLayout_9">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0" colspan="3">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="tiLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Transaction identifier</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="tiLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="ti1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>1. Byte:</string>
</property>
<property name="buddy">
<cstring>ti1Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ti1Spin">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ti2Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>2. Byte:</string>
</property>
<property name="buddy">
<cstring>ti2Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ti2Spin">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>35</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="piLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Protocol identifier</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="piLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="pi1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>1. Byte:</string>
</property>
<property name="buddy">
<cstring>pi1Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="pi1Spin">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="pi2Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>2. Byte:</string>
</property>
<property name="buddy">
<cstring>pi2Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="pi2Spin">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="lLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Length</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="lLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="l1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>1. Byte:</string>
</property>
<property name="buddy">
<cstring>l1Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="l1Spin">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l2Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>2. Byte:</string>
</property>
<property name="buddy">
<cstring>l2Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="l2Spin">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="2" column="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="uiLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Unit identifier</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="ui1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>1. Byte:</string>
</property>
<property name="buddy">
<cstring>ui1Spin</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ui1Spin">
<property name="specialValueText">
<string>broadcast</string>
</property>
<property name="maximum">
<number>255</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" rowspan="2" colspan="3">
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" colspan="3">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="fcTcpLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Function code:</string>
</property>
<property name="buddy">
<cstring>fcTcpDrop</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="fcTcpDrop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Type your custom function code and data below</string>
</property>
</item>
<item>
<property name="text">
<string>0x01 - ReadCoils</string>
</property>
</item>
<item>
<property name="text">
<string>0x02 - Read Discrete Inputs</string>
</property>
</item>
<item>
<property name="text">
<string>0x03 - Read Holding Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x04 - Read Input Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x05 - Write Single Coil</string>
</property>
</item>
<item>
<property name="text">
<string>0x06 - Write Single Register</string>
</property>
</item>
<item>
<property name="text">
<string>0x07 - Read Exception Status</string>
</property>
</item>
<item>
<property name="text">
<string>0x08 - Diagnostics</string>
</property>
</item>
<item>
<property name="text">
<string>0x0B - Get Comm Event Counter</string>
</property>
</item>
<item>
<property name="text">
<string>0x0C - Get Comm Event Log</string>
</property>
</item>
<item>
<property name="text">
<string>0x0F - Write Multiple Coils</string>
</property>
</item>
<item>
<property name="text">
<string>0x10 - Write Multiple Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x11 - Report Server Id</string>
</property>
</item>
<item>
<property name="text">
<string>0x14 - Read File Record</string>
</property>
</item>
<item>
<property name="text">
<string>0x15 - Write File Record</string>
</property>
</item>
<item>
<property name="text">
<string>0x16 - Mask Write Register</string>
</property>
</item>
<item>
<property name="text">
<string>0x17 - Read/Write Multiple Registers</string>
</property>
</item>
<item>
<property name="text">
<string>0x18 - Read Fifo Queue</string>
</property>
</item>
<item>
<property name="text">
<string>0x2B - Encapsulated Interface Transport</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pduTcpLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Data:</string>
</property>
<property name="buddy">
<cstring>pduTcpLine</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="pduTcpLine">
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>Hexadecimal representation of the data in big-endian byte order.</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="sendButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="PlainTextEdit" name="logTextEdit">
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>667</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuEdit">
<property name="title">
<string>Edit</string>
</property>
<addaction name="actionClear"/>
<addaction name="actionCopy"/>
<addaction name="separator"/>
<addaction name="actionSelect_All"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
</widget>
<action name="actionExit">
<property name="text">
<string>Exit</string>
</property>
<property name="shortcut">
<string>Alt+F4</string>
</property>
</action>
<action name="actionClear">
<property name="text">
<string>Clear</string>
</property>
</action>
<action name="actionCopy">
<property name="text">
<string>Copy</string>
</property>
<property name="shortcut">
<string>Ctrl+C</string>
</property>
</action>
<action name="actionSelect_All">
<property name="text">
<string>Select All</string>
</property>
<property name="shortcut">
<string>Ctrl+A</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>PlainTextEdit</class>
<extends>QPlainTextEdit</extends>
<header>plaintextedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>serialRadio</tabstop>
<tabstop>serialPortCombo</tabstop>
<tabstop>parityCombo</tabstop>
<tabstop>dataBitsCombo</tabstop>
<tabstop>stopBitsCombo</tabstop>
<tabstop>baudRateCombo</tabstop>
<tabstop>tcpRadio</tabstop>
<tabstop>tcpPortEdit</tabstop>
<tabstop>tcpAddressEdit</tabstop>
<tabstop>retriesSpin</tabstop>
<tabstop>timeoutSpin</tabstop>
<tabstop>connectButton</tabstop>
<tabstop>disconnectButton</tabstop>
<tabstop>addressSpin</tabstop>
<tabstop>fcSerialDrop</tabstop>
<tabstop>pduSerialLine</tabstop>
<tabstop>ti1Spin</tabstop>
<tabstop>ti2Spin</tabstop>
<tabstop>pi1Spin</tabstop>
<tabstop>pi2Spin</tabstop>
<tabstop>l1Spin</tabstop>
<tabstop>l2Spin</tabstop>
<tabstop>ui1Spin</tabstop>
<tabstop>fcTcpDrop</tabstop>
<tabstop>pduTcpLine</tabstop>
<tabstop>sendButton</tabstop>
<tabstop>logTextEdit</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>tcpRadio</sender>
<signal>toggled(bool)</signal>
<receiver>tcpPortEdit</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>61</x>
<y>210</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>236</y>
</hint>
</hints>
</connection>
<connection>
<sender>tcpRadio</sender>
<signal>toggled(bool)</signal>
<receiver>tcpAddressEdit</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>61</x>
<y>210</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>262</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>serialPortLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>68</x>
<y>57</y>
</hint>
<hint type="destinationlabel">
<x>107</x>
<y>83</y>
</hint>
</hints>
</connection>
<connection>
<sender>tcpRadio</sender>
<signal>toggled(bool)</signal>
<receiver>tcpPortLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>61</x>
<y>210</y>
</hint>
<hint type="destinationlabel">
<x>107</x>
<y>236</y>
</hint>
</hints>
</connection>
<connection>
<sender>tcpRadio</sender>
<signal>toggled(bool)</signal>
<receiver>tcpAddressLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>61</x>
<y>210</y>
</hint>
<hint type="destinationlabel">
<x>107</x>
<y>262</y>
</hint>
</hints>
</connection>
<connection>
<sender>connectButton</sender>
<signal>clicked(bool)</signal>
<receiver>connectButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>119</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>119</x>
<y>359</y>
</hint>
</hints>
</connection>
<connection>
<sender>connectButton</sender>
<signal>clicked(bool)</signal>
<receiver>disconnectButton</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>119</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>200</x>
<y>359</y>
</hint>
</hints>
</connection>
<connection>
<sender>disconnectButton</sender>
<signal>clicked(bool)</signal>
<receiver>connectButton</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>200</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>119</x>
<y>359</y>
</hint>
</hints>
</connection>
<connection>
<sender>disconnectButton</sender>
<signal>clicked(bool)</signal>
<receiver>disconnectButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>200</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>200</x>
<y>359</y>
</hint>
</hints>
</connection>
<connection>
<sender>connectButton</sender>
<signal>clicked(bool)</signal>
<receiver>settingsWidget</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>119</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>133</x>
<y>135</y>
</hint>
</hints>
</connection>
<connection>
<sender>disconnectButton</sender>
<signal>clicked(bool)</signal>
<receiver>settingsWidget</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>200</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>133</x>
<y>135</y>
</hint>
</hints>
</connection>
<connection>
<sender>disconnectButton</sender>
<signal>clicked(bool)</signal>
<receiver>sendButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>200</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>656</x>
<y>368</y>
</hint>
</hints>
</connection>
<connection>
<sender>connectButton</sender>
<signal>clicked(bool)</signal>
<receiver>sendButton</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>119</x>
<y>359</y>
</hint>
<hint type="destinationlabel">
<x>656</x>
<y>368</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>serialPortCombo</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>59</x>
<y>48</y>
</hint>
<hint type="destinationlabel">
<x>155</x>
<y>70</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>parityLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>68</x>
<y>49</y>
</hint>
<hint type="destinationlabel">
<x>68</x>
<y>100</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>dataBitsLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>36</x>
<y>48</y>
</hint>
<hint type="destinationlabel">
<x>56</x>
<y>127</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>stopBitsLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>32</x>
<y>56</y>
</hint>
<hint type="destinationlabel">
<x>53</x>
<y>157</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>baudRateLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>68</x>
<y>53</y>
</hint>
<hint type="destinationlabel">
<x>68</x>
<y>177</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>parityCombo</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>68</x>
<y>57</y>
</hint>
<hint type="destinationlabel">
<x>135</x>
<y>102</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>dataBitsCombo</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>68</x>
<y>56</y>
</hint>
<hint type="destinationlabel">
<x>140</x>
<y>127</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>stopBitsCombo</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>68</x>
<y>57</y>
</hint>
<hint type="destinationlabel">
<x>135</x>
<y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialRadio</sender>
<signal>toggled(bool)</signal>
<receiver>baudRateCombo</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>32</x>
<y>53</y>
</hint>
<hint type="destinationlabel">
<x>129</x>
<y>179</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionClear</sender>
<signal>triggered()</signal>
<receiver>logTextEdit</receiver>
<slot>clear()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>333</x>
<y>420</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionSelect_All</sender>
<signal>triggered()</signal>
<receiver>logTextEdit</receiver>
<slot>selectAll()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>333</x>
<y>420</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionCopy</sender>
<signal>triggered()</signal>
<receiver>logTextEdit</receiver>
<slot>copy()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>333</x>
<y>420</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionSelect_All</sender>
<signal>triggered()</signal>
<receiver>logTextEdit</receiver>
<slot>setFocus()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>333</x>
<y>420</y>
</hint>
</hints>
</connection>
</connections>
</ui>