Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
2e796b52
Commit
2e796b52
authored
Mar 05, 2013
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Написал небольшую документацию по использованию python-module-uniset
parent
5e656d94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
25 deletions
+22
-25
UniSetDox.cfg.in
docs/UniSetDox.cfg.in
+5
-3
UniSetDoxDevel.cfg.in
docs/UniSetDoxDevel.cfg.in
+9
-8
UModbus.h
python/lib/pyUniSet/UModbus.h
+8
-14
No files found.
docs/UniSetDox.cfg.in
View file @
2e796b52
...
...
@@ -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
...
...
docs/UniSetDoxDevel.cfg.in
View file @
2e796b52
...
...
@@ -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
...
...
python/lib/pyUniSet/UModbus.h
View file @
2e796b52
#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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment