Skip to content

Commit f35cfe3

Browse files
committed
Update help
1 parent 14b6e0b commit f35cfe3

6 files changed

Lines changed: 47 additions & 2 deletions

File tree

omodsim/docs/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ <h1 class="title">JavaScript Help</h1>
134134
</li>
135135
<li class="object"><a href="#server"><strong>Server</strong></a>
136136
<ul class="level2">
137+
<li><a href="#server.addressbase">Server.addressBase</a></li>
137138
<li><a href="#server.onchange">Server.onChange</a></li>
138139
<li><a href="#server.readcoil">Server.readCoil</a></li>
139140
<li><a href="#server.readdiscrete">Server.readDiscrete</a></li>
@@ -157,6 +158,7 @@ <h1 class="title">JavaScript Help</h1>
157158
<li><a href="#server.writeunint64">Server.writeUInt64</a></li>
158159
<li><a href="#server.writedouble">Server.writeDouble</a></li>
159160
<li><a href="#server.writefloat">Server.writeFloat</a></li>
161+
<li><a href="#server.useglobalunitmap">Server.useGlobalUnitMap</a></li>
160162
</ul>
161163
</li>
162164
<li class="object"><a href="#storage"><strong>Storage</strong></a>
@@ -633,6 +635,16 @@ <h1 id="script">Script</h1>
633635
<h1 id="server">Server</h1>
634636
</div>
635637
<div class="section-content"><p>The <strong><code>Server</code></strong> object provides access to the MODBUS server functionality.</p></div>
638+
<section aria-labelledby="static_properties"><h2 id="script.static_properties">Static properties</h2><div class="section-content"><dl>
639+
<dt id="server.addressbase"><code>Server.addressBase</code></dt>
640+
<dd>
641+
<p>Returns or sets <a href="#addressbase">addressbase</a> of the Server object.</p>
642+
</dd>
643+
<dt id="server.useglobalunitmap"><code>Server.useGlobalUnitMap</code></dt>
644+
<dd>
645+
<p>Returns or sets global address map usage. Unallocated registers will be zero.</p>
646+
</dd>
647+
</dl>
636648
<section aria-labelledby="static_methods"><h2 id="server.static_methods">Static methods</h2><div class="section-content"><dl>
637649
<dt id="server.onchange"><code>Server.onChange(Register, address, functionRef)</code></dt>
638650
<dd>

omodsim/docs/index_ru.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ <h1 class="title">Справка по JavaScript</h1>
134134
</li>
135135
<li class="object"><a href="#server"><strong>Server</strong></a>
136136
<ul class="level2">
137+
<li><a href="#server.addressbase">Server.addressBase</a></li>
137138
<li><a href="#server.onchange">Server.onChange</a></li>
138139
<li><a href="#server.readcoil">Server.readCoil</a></li>
139140
<li><a href="#server.readdiscrete">Server.readDiscrete</a></li>
@@ -157,6 +158,7 @@ <h1 class="title">Справка по JavaScript</h1>
157158
<li><a href="#server.writeunint64">Server.writeUInt64</a></li>
158159
<li><a href="#server.writedouble">Server.writeDouble</a></li>
159160
<li><a href="#server.writefloat">Server.writeFloat</a></li>
161+
<li><a href="#server.useglobalunitmap">Server.useGlobalUnitMap</a></li>
160162
</ul>
161163
</li>
162164
<li class="object"><a href="#storage"><strong>Storage</strong></a>
@@ -633,6 +635,16 @@ <h1 id="script">Script</h1>
633635
<h1 id="server">Server</h1>
634636
</div>
635637
<div class="section-content"><p>Объект <strong><code>Server</code></strong> обеспечивает доступ к функциям сервера MODBUS.</p></div>
638+
<section aria-labelledby="static_properties"><h2 id="script.static_properties">Статические свойства</h2><div class="section-content"><dl>
639+
<dt id="server.addressbase"><code>Server.addressBase</code></dt>
640+
<dd>
641+
<p>Возвращает или устанавливает нумерацию <a href="#addressbase">адресного пространства</a> сервера.</p>
642+
</dd>
643+
<dt id="server.useglobalunitmap"><code>Server.useGlobalUnitMap</code></dt>
644+
<dd>
645+
<p>Возвращает или устанавливает использование глобальной карты адресов. Неразмеченные регистры будут занулены.</p>
646+
</dd>
647+
</dl>
636648
<section aria-labelledby="static_methods"><h2 id="server.static_methods">Статические методы</h2><div class="section-content"><dl>
637649
<dt id="server.onchange"><code>Server.onChange(Register, address, functionRef)</code></dt>
638650
<dd>

omodsim/jsobjects/server.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,24 @@ void Server::setAddressBase(Address::Base base)
4545
_addressBase = base;
4646
}
4747

48+
///
49+
/// \brief Server::useGlobalUnitMap
50+
/// \return
51+
///
52+
bool Server::useGlobalUnitMap() const
53+
{
54+
return _mbMultiServer->useGlobalUnitMap();
55+
}
56+
57+
///
58+
/// \brief Server::setUseGlobalUnitMap
59+
/// \param value
60+
///
61+
void Server::setUseGlobalUnitMap(bool value)
62+
{
63+
_mbMultiServer->setUseGlobalUnitMap(value);
64+
}
65+
4866
///
4967
/// \brief Server::readHolding
5068
/// \param address

omodsim/jsobjects/server.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ class Server : public QObject
4141
~Server() override;
4242

4343
Q_PROPERTY(Address::Base addressBase READ addressBase WRITE setAddressBase);
44+
Q_PROPERTY(bool useGlobalUnitMap READ useGlobalUnitMap WRITE setUseGlobalUnitMap);
4445

4546
Address::Base addressBase() const;
47+
bool useGlobalUnitMap() const;
4648

4749
Q_INVOKABLE quint16 readHolding(quint16 address) const;
4850
Q_INVOKABLE void writeHolding(quint16 address, quint16 value);
@@ -81,6 +83,7 @@ class Server : public QObject
8183

8284
public slots:
8385
void setAddressBase(Address::Base base);
86+
void setUseGlobalUnitMap(bool value);
8487

8588
private slots:
8689
void on_dataChanged(const QModbusDataUnit& data);

omodsim/translations/omodsim_zh.qm

-12 Bytes
Binary file not shown.

omodsim/translations/omodsim_zh.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,12 +1067,12 @@ MODBUS Point Type:
10671067
<location filename="../controls/helpwidget.cpp" line="30"/>
10681068
<location filename="../controls/helpwidget.cpp" line="59"/>
10691069
<source>qthelp://omodsim/doc/index.html</source>
1070-
<translation>qthelp://omodsim/doc/index_cn.html</translation>
1070+
<translation>qthelp://omodsim/doc/index.html</translation>
10711071
</message>
10721072
<message>
10731073
<location filename="../controls/helpwidget.cpp" line="68"/>
10741074
<source>qthelp://omodsim/doc/index.html#%1</source>
1075-
<translation>qthelp://omodsim/doc/index_cn.html#%1</translation>
1075+
<translation>qthelp://omodsim/doc/index.html#%1</translation>
10761076
</message>
10771077
</context>
10781078
<context>

0 commit comments

Comments
 (0)