mirror of
https://github.com/3cky/mbusd.git
synced 2025-01-12 19:30:45 +01:00
File updated
This commit is contained in:
parent
1595d6d3be
commit
0999dbae05
@ -294,6 +294,7 @@ GZIP_ENV = --best
|
||||
distdir: $(DISTFILES)
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkinstalldirs) $(distdir)/doc
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
|
@ -17,6 +17,12 @@
|
||||
#undef PACKAGE_MENU_DIR
|
||||
#undef PACKAGE_SOURCE_DIR
|
||||
|
||||
/* Define if you have the cfsetspeed function. */
|
||||
#undef HAVE_CFSETSPEED
|
||||
|
||||
/* Define if you have the daemon function. */
|
||||
#undef HAVE_DAEMON
|
||||
|
||||
/* Define if you have the util library (-lutil). */
|
||||
#undef HAVE_LIBUTIL
|
||||
|
||||
|
170
configure
vendored
170
configure
vendored
@ -802,7 +802,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=mbusd
|
||||
VERSION=0.1.1
|
||||
VERSION=0.1.2
|
||||
cat >> confdefs.h <<EOF
|
||||
#define PACKAGE "$PACKAGE"
|
||||
EOF
|
||||
@ -1995,6 +1995,172 @@ else
|
||||
echo "configure: warning: "Function uu_lock\(\) is not found in libutil. UUCP locking switched off!"" 1>&2
|
||||
fi
|
||||
|
||||
for ac_func in daemon
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2002: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2007 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char $ac_func();
|
||||
|
||||
int main() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
$ac_func();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_func 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in cfsetspeed
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2057: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2062 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char $ac_func();
|
||||
|
||||
int main() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
$ac_func();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_func 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
for ac_func in cfsetispeed
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2109: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2114 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char $ac_func();
|
||||
|
||||
int main() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
$ac_func();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_func 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
{ echo "configure: error: "Both cfsetspeed\(\) and cfsetispeed\(\) functions not found!"" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
packagesrcdir=`cd $srcdir && pwd`
|
||||
|
||||
@ -2166,6 +2332,7 @@ trap 'rm -fr `echo "
|
||||
Makefile
|
||||
src/Makefile
|
||||
doc/Makefile
|
||||
doc/mbusd.8
|
||||
config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
@ -2291,6 +2458,7 @@ cat >> $CONFIG_STATUS <<EOF
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
||||
src/Makefile
|
||||
doc/Makefile
|
||||
doc/mbusd.8
|
||||
"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
@ -90,12 +90,12 @@ man_MANS = mbusd.8
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_FILES = mbusd.8
|
||||
DIST_SOURCES =
|
||||
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = Makefile.am Makefile.in mbusd.8.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@ -115,6 +115,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
mbusd.8: $(top_builddir)/config.status mbusd.8.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
||||
uninstall-info-am:
|
||||
|
||||
man8dir = $(mandir)/man8
|
||||
|
79
doc/mbusd.8
79
doc/mbusd.8
@ -1,79 +0,0 @@
|
||||
.TH "mbusd" 8 "13 September 2003" "mbusd 0.1.1"
|
||||
.SH NAME
|
||||
mbusd \- OpenMODBUS/TCP to MODBUS RTU gateway server
|
||||
.SH SYNOPSIS
|
||||
.B mbusd
|
||||
.RB [ -h ]
|
||||
.RB [ -d ]
|
||||
.RB [ -v
|
||||
.IR level ]
|
||||
.RB [ -L
|
||||
.IR name ]
|
||||
.RB [ -p
|
||||
.IR name ]
|
||||
.RB [ -s
|
||||
.IR value ]
|
||||
.RB [ -P
|
||||
.IR number ]
|
||||
.RB [ -C
|
||||
.IR number ]
|
||||
.RB [ -N
|
||||
.IR number ]
|
||||
.RB [ -R
|
||||
.IR value ]
|
||||
.RB [ -W
|
||||
.IR value ]
|
||||
.RB [ -T
|
||||
.IR value ]
|
||||
.SH DESCRIPTION
|
||||
\fImbusd\fR is OpenMODBUS/TCP to MODBUS RTU gateway server.
|
||||
.SH OPTIONS
|
||||
.IP \fB-h\fR
|
||||
Usage help.
|
||||
.IP \fB-d\fR
|
||||
Instruct \fImbusd\fR not to fork itself (non-daemonize).
|
||||
.IP "\fB-v \fIlevel\fR"
|
||||
Specifies log verbosity level. 0 enables logging of errors only,
|
||||
1 also enables warnings and 2 enables information messages.
|
||||
If \fImbusd\fR was compiled in debug mode, valid log levels is up to 9,
|
||||
where log levels above 2 forces logging of information about additional
|
||||
internal events.
|
||||
.IP "\fB-L \fIname\fR"
|
||||
Specifies log file name.
|
||||
.IP "\fB-p \fIname\fR"
|
||||
Specifies serial port device name.
|
||||
.IP "\fB-s \fIvalue\fR"
|
||||
Specifies serial port speed.
|
||||
.IP "\fB-P \fInumber\fR"
|
||||
Specifies TCP port number.
|
||||
.IP "\fB-C \fInumber\fR"
|
||||
Specifies maximum number of simultaneous connections.
|
||||
.IP "\fB-N \fInumber\fR"
|
||||
Specifies maximum number of request retries. 0 - no retries.
|
||||
.IP "\fB-R \fIvalue\fR"
|
||||
Specifies pause between requests in miliseconds.
|
||||
.IP "\fB-W \fIvalue\fR"
|
||||
Specifies response wait time in miliseconds.
|
||||
.IP "\fB-T \fIvalue\fR"
|
||||
Specifies connection timeout value in seconds. 0 - no timeout.
|
||||
.SH NOTES
|
||||
Because MODBUS RTU protocol have situations which can't straightforwardly
|
||||
translated into MODBUS/TCP protocol entities, \fImbusd\fR extends standard excepton codes set.
|
||||
In case of situation when \fImbusd\fR received response with invalid CRC and can't correct
|
||||
error by re-request, it returns MODBUS/TCP packet with exception code 128. In case of situation
|
||||
when \fImbusd\fR can't receive response from MODBUS RTU device (e.g. addressed controller
|
||||
is not present on the network), it returns MODBUS/TCP packet with exception code 129.
|
||||
.SH FILES
|
||||
.PP
|
||||
The default locations of the \fImbusd\fR log file is:
|
||||
.PP
|
||||
/var/log/mbusd.log
|
||||
.SH BUGS
|
||||
Broadcast messaging on MODBUS network isn't supported.
|
||||
|
||||
Please send bug reports to author.
|
||||
.SH AUTHOR
|
||||
Victor Antonovich <avmlink@vlink.ru>.
|
||||
.SH LICENSE
|
||||
This program is distributed under the BSD-like license, included in
|
||||
each source file. See also COPYING file in the installation directory.
|
@ -28,7 +28,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: globals.h,v 1.1 2003/09/13 20:38:16 kapyar Exp $
|
||||
* $Id: globals.h,v 1.2 2003/09/27 13:45:01 kapyar Exp $
|
||||
*/
|
||||
|
||||
#ifndef _GLOBALS_H
|
||||
|
@ -28,7 +28,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: queue.h,v 1.1 2003/09/13 20:38:39 kapyar Exp $
|
||||
* $Id: queue.h,v 1.2 2003/09/27 13:45:01 kapyar Exp $
|
||||
*/
|
||||
|
||||
#ifndef _QUEUE_H
|
||||
|
@ -28,7 +28,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sig.h,v 1.1 2003/09/13 20:38:39 kapyar Exp $
|
||||
* $Id: sig.h,v 1.2 2003/09/27 13:45:01 kapyar Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SIG_H
|
||||
|
@ -28,7 +28,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sock.h,v 1.1 2003/09/13 20:38:45 kapyar Exp $
|
||||
* $Id: sock.h,v 1.2 2003/09/27 13:45:01 kapyar Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SOCKUTILS_H
|
||||
|
@ -28,7 +28,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: state.h,v 1.1 2003/09/13 20:38:45 kapyar Exp $
|
||||
* $Id: state.h,v 1.2 2003/09/27 13:45:01 kapyar Exp $
|
||||
*/
|
||||
|
||||
#ifndef _STATE_H
|
||||
|
Loading…
Reference in New Issue
Block a user