Commit 2e796b52 authored by Pavel Vainerman's avatar Pavel Vainerman

Написал небольшую документацию по использованию python-module-uniset

parent 5e656d94
......@@ -653,7 +653,8 @@ INPUT = DocPages/ \
../src/ \
../conf \
../Utilities \
../extensions
../extensions \
../python
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
......@@ -674,7 +675,8 @@ INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.dox \
*.cc \
*.h \
*.idl
*.idl \
*.py
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
......@@ -724,7 +726,7 @@ EXAMPLE_PATH =
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
EXAMPLE_PATTERNS = DocPages/exmaples
EXAMPLE_PATTERNS =
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude
......
......@@ -647,13 +647,14 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = ../include/ \
INPUT = DocPages/ \
../include/ \
../IDL/ \
../src/ \
DocPages/ \
../conf \
../Utilities \
../extensions
../extensions \
../python
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
......@@ -671,11 +672,11 @@ INPUT_ENCODING = UTF-8
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.for *.vhd *.vhdl
FILE_PATTERNS = *.cc \
FILE_PATTERNS = *.dox \
*.cc \
*.h \
*.idl \
*.dox \
*.hh
*.py
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
......@@ -689,7 +690,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = ../include/gtkmm
EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
......@@ -724,7 +725,7 @@ EXAMPLE_PATH =
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
EXAMPLE_PATTERNS = DocPages/Exmaples
EXAMPLE_PATTERNS =
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude
......
#ifndef UModbus_H_
#define UModbus_H_
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
#include <Configuration.h>
#include <UniversalInterface.h>
#include <modbus/ModbusTCPMaster.h>
......@@ -9,7 +9,7 @@
#include <Debug.h>
#include "UTypes.h"
#include "UExceptions.h"
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
class UModbus
{
public:
......@@ -18,13 +18,13 @@ class UModbus
UModbus();
~UModbus();
inline const char* getUIType(){ return "modbus"; }
inline const char* getUIType(){ return "modbus"; }
inline bool isWriteFunction( int mbfunc ){ return ModbusRTU::isWriteFunction((ModbusRTU::SlaveFunctionCode)mbfunc); }
// выставление паметров связи, без установления соединения (!)
void prepare( const char* ip, int port )throw(UException);
void connect( const char* ip, int port )throw(UException);
inline int conn_port(){ return port; }
inline std::string conn_ip(){ return ip; }
......@@ -32,10 +32,9 @@ class UModbus
inline void setTimeout( int msec ){ tout_msec = msec; }
/*! Универсальная функция для чтения регистров.
* Если не указывать ip и порт, будут использованы, те
* чтобы были заданы в UModbus::connect(). Если заданы другие ip и port,
* будет сделано переподключение..
/* Если не указывать ip и порт, будут использованы, те
* чтобы были заданы в connect(). Если заданы другие ip и port,
* будет сделана переподключение..
*/
long mbread( int addr, int mbreg, int mbfunc,
const char* vtype, int nbit=-1,
......@@ -45,16 +44,11 @@ class UModbus
long getByte( int addr, int mbreg, int mbfunc=0x4 )throw(UException);
bool getBit( int addr, int mbreg, int mbfunc=0x2 )throw(UException);
/*! Функция записи регистров 0x06 или 0x10 задаётся параметром \a mbfunc.
* Если не указывать ip и порт, будут использованы, те
* чтобы были заданы в UModbus::connect(). Если заданы другие ip и port,
* будет сделана переподключение..
*/
void mbwrite( int addr, int mbreg, int val, int mbfunc, const char* ip=0, int port=-1 )throw(UException);
protected:
long data2value( VTypes::VType vt, ModbusRTU::ModbusData* data );
private:
// DebugStream dlog;
ModbusTCPMaster* mb;
......
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