added modbusTcp error method
parent
4c1ec41a15
commit
7fed767ff1
|
|
@ -168,7 +168,7 @@ void Idm::onReceivedHoldingRegister(int slaveAddress, int modbusRegister, const
|
|||
|
||||
void Idm::onModbusError()
|
||||
{
|
||||
qCDebug(dcIdm()) << "iDM: Received modbus error";
|
||||
qCDebug(dcIdm()) << "iDM: Received modbus error" << m_modbusMaster->errorString();
|
||||
m_idmInfo.connected = false;
|
||||
emit statusUpdated(m_idmInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,200 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Idm</name>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="61"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="64"/>
|
||||
<source>Connected</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: connected, ID: {cfd71e64-b666-45ef-8db0-8213acd82c5f})
|
||||
----------
|
||||
The name of the StateType ({cfd71e64-b666-45ef-8db0-8213acd82c5f}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="67"/>
|
||||
<source>Connected changed</source>
|
||||
<extracomment>The name of the EventType ({cfd71e64-b666-45ef-8db0-8213acd82c5f}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="70"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="73"/>
|
||||
<source>Current power consumption</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: currentPowerConsumptionHeatPump, ID: {b98fb325-100d-4eae-bf8d-97e8f7e1eb00})
|
||||
----------
|
||||
The name of the StateType ({b98fb325-100d-4eae-bf8d-97e8f7e1eb00}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="76"/>
|
||||
<source>Current power consumption heat pump changed</source>
|
||||
<extracomment>The name of the EventType ({b98fb325-100d-4eae-bf8d-97e8f7e1eb00}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="79"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="82"/>
|
||||
<source>Error</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: error, ID: {49fd83ee-ddf3-4477-9ee4-e01c53283b43})
|
||||
----------
|
||||
The name of the StateType ({49fd83ee-ddf3-4477-9ee4-e01c53283b43}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="85"/>
|
||||
<source>Error changed</source>
|
||||
<extracomment>The name of the EventType ({49fd83ee-ddf3-4477-9ee4-e01c53283b43}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="88"/>
|
||||
<source>IP address</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, Type: thing, ID: {05714e5c-d66a-4095-bbff-a0eb96fb035b})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="91"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="94"/>
|
||||
<source>Mode</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: mode, ID: {e539366b-44da-4119-b11b-497bcdb1f522})
|
||||
----------
|
||||
The name of the StateType ({e539366b-44da-4119-b11b-497bcdb1f522}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="97"/>
|
||||
<source>Mode changed</source>
|
||||
<extracomment>The name of the EventType ({e539366b-44da-4119-b11b-497bcdb1f522}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="100"/>
|
||||
<source>Navigator 2.0</source>
|
||||
<extracomment>The name of the ThingClass ({1c95ac91-4eca-4cbf-b0f4-d60d35d069ed})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="103"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="106"/>
|
||||
<source>Outside air temperature</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: outsideAirTemperature, ID: {9f3462c2-7c42-4eeb-afc4-092e1e41a25d})
|
||||
----------
|
||||
The name of the StateType ({9f3462c2-7c42-4eeb-afc4-092e1e41a25d}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="109"/>
|
||||
<source>Outside air temperature changed</source>
|
||||
<extracomment>The name of the EventType ({9f3462c2-7c42-4eeb-afc4-092e1e41a25d}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="112"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="115"/>
|
||||
<source>Power</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: power, ID: {33c27167-8e24-4cc5-943c-d17cd03e0f68})
|
||||
----------
|
||||
The name of the StateType ({33c27167-8e24-4cc5-943c-d17cd03e0f68}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="118"/>
|
||||
<source>Power changed</source>
|
||||
<extracomment>The name of the EventType ({33c27167-8e24-4cc5-943c-d17cd03e0f68}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="121"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="124"/>
|
||||
<source>Room temperature</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: temperature, ID: {f0f596bf-7e45-43ea-b3d4-767b82dd422a})
|
||||
----------
|
||||
The name of the StateType ({f0f596bf-7e45-43ea-b3d4-767b82dd422a}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="127"/>
|
||||
<source>Room temperature changed</source>
|
||||
<extracomment>The name of the EventType ({f0f596bf-7e45-43ea-b3d4-767b82dd422a}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="130"/>
|
||||
<source>Set target room temperature</source>
|
||||
<extracomment>The name of the ActionType ({efae7493-68c3-4cb9-853c-81011bdf09ca}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="133"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="136"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="139"/>
|
||||
<source>Target room temperature</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, ActionType: targetTemperature, ID: {efae7493-68c3-4cb9-853c-81011bdf09ca})
|
||||
----------
|
||||
The name of the ParamType (ThingClass: navigator2, EventType: targetTemperature, ID: {efae7493-68c3-4cb9-853c-81011bdf09ca})
|
||||
----------
|
||||
The name of the StateType ({efae7493-68c3-4cb9-853c-81011bdf09ca}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="142"/>
|
||||
<source>Target room temperature changed</source>
|
||||
<extracomment>The name of the EventType ({efae7493-68c3-4cb9-853c-81011bdf09ca}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="145"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="148"/>
|
||||
<source>Target water temperature</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: targetWaterTemperature, ID: {746244d6-dd37-4af8-b2ae-a7d8463e51e2})
|
||||
----------
|
||||
The name of the StateType ({746244d6-dd37-4af8-b2ae-a7d8463e51e2}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="151"/>
|
||||
<source>Target water temperature changed</source>
|
||||
<extracomment>The name of the EventType ({746244d6-dd37-4af8-b2ae-a7d8463e51e2}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="154"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="157"/>
|
||||
<source>Water temperature</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: navigator2, EventType: waterTemperature, ID: {fcf8e97f-a672-407f-94ae-30df15b310f4})
|
||||
----------
|
||||
The name of the StateType ({fcf8e97f-a672-407f-94ae-30df15b310f4}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="160"/>
|
||||
<source>Water temperature changed</source>
|
||||
<extracomment>The name of the EventType ({fcf8e97f-a672-407f-94ae-30df15b310f4}) of ThingClass navigator2</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="163"/>
|
||||
<location filename="../../../build-nymea-plugins-modbus-Desktop-Debug/idm/plugininfo.h" line="166"/>
|
||||
<source>iDM</source>
|
||||
<extracomment>The name of the vendor ({6f54e4b0-1057-4004-87a9-97fdf4581625})
|
||||
----------
|
||||
The name of the plugin Idm ({3968d86d-d51a-4ad1-a185-91faa017e38f})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IntegrationPluginIdm</name>
|
||||
<message>
|
||||
<location filename="../integrationpluginidm.cpp" line="50"/>
|
||||
<source>No IP address given</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../integrationpluginidm.cpp" line="65"/>
|
||||
<source>IP address already in use</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
@ -92,6 +92,11 @@ QString ModbusTCPMaster::errorString() const
|
|||
return m_modbusTcpClient->errorString();
|
||||
}
|
||||
|
||||
QModbusDevice::Error ModbusTCPMaster::error() const
|
||||
{
|
||||
return m_modbusTcpClient->error();
|
||||
}
|
||||
|
||||
uint ModbusTCPMaster::port()
|
||||
{
|
||||
return m_modbusTcpClient->connectionParameter(QModbusDevice::NetworkPortParameter).toUInt();
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ public:
|
|||
void setTimeout(int timeout);
|
||||
|
||||
QString errorString() const;
|
||||
QModbusDevice::Error error() const;
|
||||
|
||||
QUuid readCoil(uint slaveAddress, uint registerAddress, uint size = 1);
|
||||
QUuid readDiscreteInput(uint slaveAddress, uint registerAddress, uint size = 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue