Commit d6518de3 authored by Pavel Vainerman's avatar Pavel Vainerman

add docs for MBTCPMaster

parent 21f127a6
......@@ -56,9 +56,9 @@ no_extimer(false)
throw UniSetTypes::SystemError(myname+"(MBMaster): Unknown inet port...(Use: " + tmp +")" );
recv_timeout = conf->getArgPInt("--" + prefix + "-recv-timeout",it.getProp("recv_timeout"), 50);
recv_timeout = conf->getArgPInt("--" + prefix + "-recv-timeout",it.getProp("recv_timeout"), 2000);
int alltout = conf->getArgPInt("--" + prefix + "-all-timeout",it.getProp("all_timeout"), 2000);
int alltout = conf->getArgPInt("--" + prefix + "-all-timeout",it.getProp("all_timeout"), 5000);
ptAllNotRespond.setTiming(alltout);
noQueryOptimization = conf->getArgInt("--" + prefix + "-no-query-optimization",it.getProp("no_query_optimization"));
......@@ -68,7 +68,7 @@ no_extimer(false)
polltime = conf->getArgPInt("--" + prefix + "-polltime",it.getProp("polltime"), 100);
initPause = conf->getArgPInt("--" + prefix + "-initPause",it.getProp("initPause"), 3000);
initPause = conf->getArgPInt("--" + prefix + "-initPause",it.getProp("initPause"), 50);
force = conf->getArgInt("--" + prefix + "-force",it.getProp("force"));
force_out = conf->getArgInt("--" + prefix + "-force-out",it.getProp("force_out"));
......
......@@ -22,54 +22,98 @@
- \ref sec_MBTCP_Comm
- \ref sec_MBTCP_Conf
- \ref sec_MBTCP_ConfList
\section sec_MBTCP_Comm ModbusTCP master
(/) RTU-,
TCP-.
<sensors>. . \ref sec_MBTCP_Conf
\b <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.
\section sec_MBTCP_Conf ModbusTCP master
.
\par
ϣ , ݣ ,
.
:
\code
<MBMaster1 name="MBMaster1" gateway_iaddr="127.0.0.1" gateway_port="30000" polltime="200">
<DeviceList>
<item addr="0x01" respondSensor="RTU1_Not_Respond_FS" timeout="2000" invert="1"/>
<item addr="0x02" respondSensor="RTU2_Respond_FS" timeout="2000" invert="0"/>
</DeviceList>
</MBMaster1>
\endcode
<DeviceList> RTU-.
\b --xxx-recv-timeout \b recv_timeout
- \b addr - ,
- \b timeout msec - ,
- \b invert - . "1" \b .
- \b respondSensor - .
\par
.
\b xxx="mbtcp".
:
\b --xxx-name ID - .
\b --xxx-all-timeout \b all_timeout
IP- \b gateway_iaddr
\b --xxx-gateway-iaddr.
\b --xxx-no-query-optimization \b no_query_optimization
\b gateway_port
\b --xxx-gateway-port. \b 502.
\b --xxx-poll-time \b poll_time
\b --xxx-recv-timeout \b recv_timeout msec - ɣ . 2000 .
\b --xxx-init-time \b init_time
\b --xxx-all-timeout \b all_timeout msec -
( ģ )
\b --xxx-force \b foce
\b --xxx-no-query-optimization \b no_query_optimization - [1|0]
, / .
, \b mbfunc .
\b --xxx-force-out \b foce_out
\b --xxx-reg-from-id \b reg_from_id
\b --xxx-poll-time \b poll_time msec - . 100 .
\b --xxx-heartbeat-id \b heartbeat_id
\b --xxx-initPause \b initPause msec - , . 50 .
\b --xxx-heartbeat-max \b heartbeat_max
\b --xxx-activate-timeout msec . 2000.
\b --xxx-filter-field
\b --xxx-filter-value
\b --xxx-force \b foce [1|0]
- 1 - SharedMemory
- 0 -
\b --xxx-force-out \b foce_out [1|0]
- 1 - SharedMemory
- 0 -
\b --xxx-reg-from-id \b reg_from_id [1|0]
- 1 -
- 0 - tcp_mbreg
\b --xxx-heartbeat-id \b heartbeat_id ID - "" (. \ref sec_SM_HeartBeat)
\b --xxx-heartbeat-max \b heartbeat_max val - ޣ "".
\b --xxx-activate-timeout msec . 2000. - SharedMemory .
\section sec_MBTCP_ConfList ModbusTCP master
<sensors> .
\b --xxx-filter-field -
\b --xxx-filter-value - . .
, ,
.
\section sec_MBTCP_Conf ModbusTCP master
<sensors> .
:
\warning , .
:
\code
<sensors name="Sensors">
...
......@@ -78,7 +122,8 @@
/>
...
</sensors>
\endcode
\endcode
:
- \b tcp_mbtype - [rtu] - ۣ .
- \b tcp_mbaddr - RTU-.
......@@ -96,7 +141,6 @@
.. / "mbreg+mboffset".
\warning . \a nbit \a nbyte.
*/
// -----------------------------------------------------------------------------
......@@ -131,8 +175,8 @@ class MBTCPMaster:
enum DeviceType
{
dtUnknown, /*!< */
dtRTU /*!< RTU (default) */
dtUnknown, /*!< */
dtRTU /*!< RTU (default) */
};
static DeviceType getDeviceType( const std::string dtype );
......@@ -145,10 +189,10 @@ class MBTCPMaster:
public IOBase
{
// only for RTU
short nbit; /*!< bit number) */
short nbit; /*!< bit number) */
VTypes::VType vType; /*!< type of value */
short rnum; /*!< count of registers */
short nbyte; /*!< byte number (1-2) */
short rnum; /*!< count of registers */
short nbyte; /*!< byte number (1-2) */
RSProperty():
nbit(-1),vType(VTypes::vtUnknown),
......@@ -173,7 +217,7 @@ class MBTCPMaster:
{}
ModbusRTU::ModbusData mbval;
ModbusRTU::ModbusData mbreg; /*!< */
ModbusRTU::ModbusData mbreg; /*!< */
ModbusRTU::SlaveFunctionCode mbfunc; /*!< / */
PList slst;
......@@ -182,7 +226,7 @@ class MBTCPMaster:
int offset;
// optimization
int q_num; /*! number in query */
int q_num; /*! number in query */
int q_count; /*! count registers for query */
RegMap::iterator rit;
......
......@@ -12,7 +12,7 @@
#include "WDTInterface.h"
// -----------------------------------------------------------------------------
/*! \page page_SharedMemory
/*! \page page_SharedMemory (SharedMemory)
\section sec_SM_Common SharedMemory
......@@ -72,7 +72,7 @@
\par (depends)
\code
--d-filter-field - "" (depends)
--d-filter-field - "" (depends)
--d-filter-value - . .
\endcode
... ... ...
......
......@@ -16,11 +16,11 @@ namespace VTypes
enum VType
{
vtUnknown,
vtF2, /*!< (4 ) */
vtF4, /*!< 8- */
vtByte, /*!< */
vtUnsigned, /*!< */
vtSigned /*!< */
vtF2, /*!< (4 ). \b "F2". */
vtF4, /*!< 8- . \b "F4". */
vtByte, /*!< . \b "byte". */
vtUnsigned, /*!< . \b "unsigned". */
vtSigned /*!< . \b "signed". */
};
std::ostream& operator<<( std::ostream& os, const VType& vt );
......
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