Commit 21f127a6 authored by Pavel Vainerman's avatar Pavel Vainerman

add little docs for MBTCPMaster

parent 3a9fba8e
......@@ -11,7 +11,6 @@
- \ref sec_Cnpt_Repository
- \ref sec_Cnpt_Sensor
- \ref sec_Cnpt_Process
- \ref sec_Cnpt_Service
\section sec_Cnpt_Object
......@@ -186,9 +185,9 @@ UniSetTypes::Message::TheLastFieldOfTypeOfMessage.
/.
""(DI,AI) - , " "
""(DO,AO) - " ".
, "" .
, "" .
ң , ,
,
,
""
"1".
()
......@@ -211,7 +210,4 @@ UniSetTypes::Message::TheLastFieldOfTypeOfMessage.
ģ ""
, .
\section sec_Cnpt_Service
*/
\ No newline at end of file
......@@ -1273,12 +1273,9 @@ void MBTCPMaster::help_print( int argc, const char* const* argv )
cout << "--mbm-heartbeat-max - heartbeat-ޣ . 10." << endl;
cout << "--mbm-ready-timeout - SM , . (-1 - '')" << endl;
cout << "--mbm-force - SM, , " << endl;
cout << "--mbm-initPause - ( )" << endl;
cout << "--mbm-sm-ready-timeout - SM" << endl;
cout << " RS: " << endl;
cout << "--mbm-dev devname - " << endl;
cout << "--mbm-speed - (9600,19920,38400,57600,115200)." << endl;
cout << "--mbm-my-addr - " << endl;
cout << "--mbm-initPause - ( )" << endl;
// cout << "--mbm-sm-ready-timeout - SM" << endl;
cout << " TCP: " << endl;
cout << "--mbm-recv-timeout - ." << endl;
}
// -----------------------------------------------------------------------------
......
......@@ -18,8 +18,91 @@
#include "VTypes.h"
// -----------------------------------------------------------------------------
/*!
Реализация Modbus TCP Master-а для работы со многими ModbusRTU устройствами,
но только через ОДИН ModbusTCP-шлюз.
\page page_ModbusTCP ModbusTCP master
- \ref sec_MBTCP_Comm
- \ref sec_MBTCP_Conf
\section sec_MBTCP_Comm ModbusTCP master
(/) RTU-,
TCP-.
<sensors>. . \ref sec_MBTCP_Conf
\b --xxx-name
IP- \b gateway_iaddr
\b --xxx-gateway-iaddr.
\b gateway_port
\b --xxx-gateway-port. \b 502.
\b --xxx-recv-timeout \b recv_timeout
\b --xxx-all-timeout \b all_timeout
\b --xxx-no-query-optimization \b no_query_optimization
\b --xxx-poll-time \b poll_time
\b --xxx-init-time \b init_time
\b --xxx-force \b foce
\b --xxx-force-out \b foce_out
\b --xxx-reg-from-id \b reg_from_id
\b --xxx-heartbeat-id \b heartbeat_id
\b --xxx-heartbeat-max \b heartbeat_max
\b --xxx-activate-timeout msec . 2000.
\b --xxx-filter-field
\b --xxx-filter-value
\section sec_MBTCP_Conf ModbusTCP master
<sensors> .
:
\code
<sensors name="Sensors">
...
<item name="MySensor_S" textname="my sesnsor" iotype="DI"
tcp_mbtype="rtu" tcp_mbaddr="0x01" tcp_mbfunc="0x04" tcp_mbreg="0x02" my_tcp="1"
/>
...
</sensors>
\endcode
:
- \b tcp_mbtype - [rtu] - ۣ .
- \b tcp_mbaddr - RTU-.
- \b tcp_mbreg - / .
- \b tcp_mbfunc - [0x1,0x2,0x3,...] /. ۣ . ModbusRTU::SlaveFunctionCode.
:
- \b tcp_vtype - . VTypes::VType.
- \b tcp_rawdata - [1|0] -
- \b tcp_iotype - [DI,DO,AI,AO] - . iotype.
- \b tcp_nbit - . DI,DO
(03
- \b tcp_nbyte - [1|2] . tcp_vtype="byte".
- \b tcp_mboffset - ""( ) /.
.. / "mbreg+mboffset".
\warning . \a nbit \a nbyte.
*/
// -----------------------------------------------------------------------------
/*!
Modbus TCP Master ModbusRTU
modbus tcp .
*/
class MBTCPMaster:
public UniSetObject_LT
......
......@@ -12,22 +12,23 @@
// -----------------------------------------------------------------------------
namespace VTypes
{
/*! Modbus[RTU|TCP] */
enum VType
{
vtUnknown,
vtF2,
vtF4,
vtByte,
vtUnsigned,
vtSigned
vtF2, /*!< (4 ) */
vtF4, /*!< 8- */
vtByte, /*!< */
vtUnsigned, /*!< */
vtSigned /*!< */
};
std::ostream& operator<<( std::ostream& os, const VType& vt );
// -------------------------------------------------------------------------
std::string type2str( VType t ); /*!< */
std::string type2str( VType t ); /*!< */
VType str2type( const std::string s ); /*!< */
int wsize( VType t ); /*!< */
int wsize( VType t ); /*!< */
// -------------------------------------------------------------------------
class F2
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment