git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@803 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.3
Stéphane Fillod, F8CFE 2001-12-26 23:44:09 +00:00
rodzic ea84762a1f
commit 264ecb1239
8 zmienionych plików z 1272 dodań i 97 usunięć

Wyświetl plik

@ -100,6 +100,11 @@ aclocal_DATA = hamlib.m4
EXTRA_DIST = PLAN TODO LICENSE hamlib.m4
SUBDIRS = include lib libltdl src @BACKEND_LIST@ c++ tcl tests doc
DIST_SUBDIRS = include lib libltdl src c++ tcl tests doc \
icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc \
rpcrig winradio
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@ -118,7 +123,6 @@ DIST_COMMON = README AUTHORS COPYING COPYING.LIB ChangeLog INSTALL \
aclocal.m4 compile config.guess config.sub configure \
configure.ac depcomp hamlib.spec.in install-sh ltmain.sh \
missing mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
.SUFFIXES:
@ -286,7 +290,7 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
for subdir in $(SUBDIRS); do \
for subdir in $(DIST_SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \

40
configure vendored
Wyświetl plik

@ -9870,20 +9870,22 @@ else
NET=net
fi
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc"
case "$host_os" in
linux-gnu*)
# Winradio only under Linux (until someone port it on other os)
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco winradio uniden tentec kachina jrc"
BACKEND_LIST="$BACKEND_LIST winradio"
;;
*)
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc"
esac
if test "${ac_cv_header_rpc_rpc_h}" = "yes" ; then
BACKEND_LIST="$BACKEND_LIST rpcrig"
fi
BACKENDLNK="-dlopen force"
# Preopen self for static version
BACKENDLNK="-dlpreopen self"
for be in ${BACKEND_LIST} ; do
BACKENDLNK="${BACKENDLNK} -dlopen ../${be}/libhamlib-${be}.la"
BACKENDEPS="${BACKENDEPS} ../${be}/libhamlib-${be}.la"
@ -9973,7 +9975,7 @@ DEFS=-DHAVE_CONFIG_H
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:9976: creating $CONFIG_STATUS" >&5
{ echo "$as_me:9978: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@ -10149,7 +10151,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
{ { echo "$as_me:10152: error: ambiguous option: $1
{ { echo "$as_me:10154: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@ -10168,7 +10170,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
-*) { { echo "$as_me:10171: error: unrecognized option: $1
-*) { { echo "$as_me:10173: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@ -10237,7 +10239,7 @@ do
"hamlib.spec" ) CONFIG_FILES="$CONFIG_FILES hamlib.spec" ;;
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
*) { { echo "$as_me:10240: error: invalid argument: $ac_config_target" >&5
*) { { echo "$as_me:10242: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@ -10510,7 +10512,7 @@ done; }
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:10513: creating $ac_file" >&5
{ echo "$as_me:10515: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@ -10528,7 +10530,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:10531: error: cannot find input file: $f" >&5
test -f "$f" || { { echo "$as_me:10533: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@ -10541,7 +10543,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:10544: error: cannot find input file: $f" >&5
{ { echo "$as_me:10546: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@ -10602,7 +10604,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
test x"$ac_file" != x- && { echo "$as_me:10605: creating $ac_file" >&5
test x"$ac_file" != x- && { echo "$as_me:10607: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@ -10613,7 +10615,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:10616: error: cannot find input file: $f" >&5
test -f "$f" || { { echo "$as_me:10618: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@ -10626,7 +10628,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:10629: error: cannot find input file: $f" >&5
{ { echo "$as_me:10631: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@ -10743,7 +10745,7 @@ cat >>$CONFIG_STATUS <<\EOF
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
{ echo "$as_me:10746: $ac_file is unchanged" >&5
{ echo "$as_me:10748: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@ -10905,7 +10907,7 @@ if test "$no_recursion" != yes; then
# parts of a large source tree are present.
test -d $srcdir/$ac_subdir || continue
{ echo "$as_me:10908: configuring in $ac_subdir" >&5
{ echo "$as_me:10910: configuring in $ac_subdir" >&5
echo "$as_me: configuring in $ac_subdir" >&6;}
case $srcdir in
.) ;;
@ -10927,7 +10929,7 @@ done; }
if test -d ./$ac_subdir; then :;
else
{ { echo "$as_me:10930: error: cannot create \`pwd\`/$ac_subdir" >&5
{ { echo "$as_me:10932: error: cannot create \`pwd\`/$ac_subdir" >&5
echo "$as_me: error: cannot create \`pwd\`/$ac_subdir" >&2;}
{ (exit 1); exit 1; }; }
fi
@ -10958,7 +10960,7 @@ echo "$as_me: error: cannot create \`pwd\`/$ac_subdir" >&2;}
elif test -f $ac_sub_srcdir/configure.in; then
ac_sub_configure=$ac_configure
else
{ echo "$as_me:10961: WARNING: no configuration information is in $ac_subdir" >&5
{ echo "$as_me:10963: WARNING: no configuration information is in $ac_subdir" >&5
echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2;}
ac_sub_configure=
fi
@ -10972,12 +10974,12 @@ echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2;}
ac_sub_cache_file=$ac_dots$cache_file ;;
esac
{ echo "$as_me:10975: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" >&5
{ echo "$as_me:10977: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" >&5
echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" >&6;}
# The eval makes quoting arguments work.
eval $ac_sub_configure $ac_sub_configure_args \
--cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ||
{ { echo "$as_me:10980: error: $ac_sub_configure failed for $ac_subdir" >&5
{ { echo "$as_me:10982: error: $ac_sub_configure failed for $ac_subdir" >&5
echo "$as_me: error: $ac_sub_configure failed for $ac_subdir" >&2;}
{ (exit 1); exit 1; }; }
fi

Wyświetl plik

@ -104,7 +104,7 @@ LDADD = ../src/libhamlib.la
DEPENDENCIES = ../src/libhamlib.la
# The RPC server
bin_PROGRAMS = rpc.rigd
sbin_PROGRAMS = rpc.rigd
rpc_rigd_DEPENDENCIES = $(DEPENDENCIES) @BACKENDEPS@
rpc_rigd_SOURCES = $(RPCRIG_SVC)
rpc_rigd_LDFLAGS = @BACKENDLNK@
@ -131,8 +131,8 @@ libhamlib_rpcrig_la_DEPENDENCIES = ../src/libhamlib.la
am_libhamlib_rpcrig_la_OBJECTS = rpcrig_xdr.lo rpcrig_clnt.lo \
rpcrig_backend.lo
libhamlib_rpcrig_la_OBJECTS = $(am_libhamlib_rpcrig_la_OBJECTS)
bin_PROGRAMS = rpc.rigd$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
sbin_PROGRAMS = rpc.rigd$(EXEEXT)
PROGRAMS = $(sbin_PROGRAMS)
am_rpc_rigd_OBJECTS = rpcrig_xdr.$(OBJEXT) rpcrig_svc.$(OBJEXT) \
rpcrig_proc.$(OBJEXT) rpcrigd.$(OBJEXT)
@ -207,30 +207,30 @@ clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
libhamlib-rpcrig.la: $(libhamlib_rpcrig_la_OBJECTS) $(libhamlib_rpcrig_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libhamlib_rpcrig_la_LDFLAGS) $(libhamlib_rpcrig_la_OBJECTS) $(libhamlib_rpcrig_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
$(mkinstalldirs) $(DESTDIR)$(sbindir)
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
uninstall-sbinPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
rm -f $(DESTDIR)$(sbindir)/$$f; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
rpc.rigd$(EXEEXT): $(rpc_rigd_OBJECTS) $(rpc_rigd_DEPENDENCIES)
@rm -f rpc.rigd$(EXEEXT)
$(LINK) $(rpc_rigd_LDFLAGS) $(rpc_rigd_OBJECTS) $(rpc_rigd_LDADD) $(LIBS)
@ -367,11 +367,9 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS)
install-binPROGRAMS: install-libLTLIBRARIES
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(man8dir)
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
install: install-am
install-exec: install-exec-am
@ -398,8 +396,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
clean-libtool mostlyclean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
@ -416,7 +414,7 @@ info-am:
install-data-am: install-man
install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
install-exec-am: install-libLTLIBRARIES install-sbinPROGRAMS
install-info: install-info-am
@ -433,24 +431,24 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
uninstall-libLTLIBRARIES uninstall-man
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES uninstall-man \
uninstall-sbinPROGRAMS
uninstall-man: uninstall-man8
.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libLTLIBRARIES clean-libtool distclean \
.PHONY: GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS distclean \
distclean-compile distclean-depend distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-libLTLIBRARIES install-man install-man8 \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
tags uninstall uninstall-am uninstall-binPROGRAMS \
info-am install install-am install-data install-data-am \
install-exec install-exec-am install-info install-info-am \
install-libLTLIBRARIES install-man install-man8 \
install-sbinPROGRAMS install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool tags uninstall uninstall-am \
uninstall-info-am uninstall-libLTLIBRARIES uninstall-man \
uninstall-man8
uninstall-man8 uninstall-sbinPROGRAMS
rpcrig.h: rpcrig.x

Wyświetl plik

@ -13,30 +13,193 @@
extern "C" {
#endif
typedef u_int vfo_x;
struct freq_s {
u_int f1;
u_int f2;
};
typedef struct freq_s freq_s;
/*
* Hamlib Interface - RPC definitions
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: rpcrig.h,v 1.2 2001-12-26 23:42:20 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <rpc/xdr.h>
typedef u_int model_x;
typedef int vfo_x;
typedef int64_t freq_x;
typedef u_int rmode_x;
typedef int pbwidth_x;
typedef u_long split_x;
typedef int ptt_x;
typedef int dcd_x;
typedef long vfo_op_x;
typedef long shortfreq_x;
typedef uint64_t setting_x;
struct mode_s {
rmode_x mode;
pbwidth_x width;
};
typedef struct mode_s mode_s;
struct value_s {
int i;
float f;
};
typedef struct value_s value_s;
struct freq_arg {
vfo_x vfo;
freq_x freq;
};
typedef struct freq_arg freq_arg;
struct freq_res {
int rigstatus;
union {
freq_s freq;
freq_x freq;
} freq_res_u;
};
typedef struct freq_res freq_res;
struct freq_arg {
struct mode_arg {
vfo_x vfo;
freq_s freq;
mode_s mw;
};
typedef struct freq_arg freq_arg;
typedef struct mode_arg mode_arg;
struct mode_res {
int rigstatus;
union {
mode_s mw;
} mode_res_u;
};
typedef struct mode_res mode_res;
struct vfo_res {
int rigstatus;
union {
vfo_x vfo;
} vfo_res_u;
};
typedef struct vfo_res vfo_res;
struct split_arg {
vfo_x vfo;
split_x split;
};
typedef struct split_arg split_arg;
struct split_res {
int rigstatus;
union {
split_x split;
} split_res_u;
};
typedef struct split_res split_res;
struct ptt_arg {
vfo_x vfo;
ptt_x ptt;
};
typedef struct ptt_arg ptt_arg;
struct ptt_res {
int rigstatus;
union {
ptt_x ptt;
} ptt_res_u;
};
typedef struct ptt_res ptt_res;
struct dcd_res {
int rigstatus;
union {
dcd_x dcd;
} dcd_res_u;
};
typedef struct dcd_res dcd_res;
struct setting_arg {
vfo_x vfo;
setting_x setting;
value_s val;
};
typedef struct setting_arg setting_arg;
struct val_res {
int rigstatus;
union {
value_s val;
} val_res_u;
};
typedef struct val_res val_res;
struct vfo_op_arg {
vfo_x vfo;
vfo_op_x op;
};
typedef struct vfo_op_arg vfo_op_arg;
struct rigstate_s {
int itu_region;
setting_x has_get_func;
setting_x has_set_func;
setting_x has_get_level;
setting_x has_set_level;
setting_x has_get_parm;
setting_x has_set_parm;
};
typedef struct rigstate_s rigstate_s;
struct rigstate_res {
int rigstatus;
union {
rigstate_s state;
} rigstate_res_u;
};
typedef struct rigstate_res rigstate_res;
#include <hamlib/rig.h>
#define freq_t2x(t, x) do { *(x) = (t); } while(0)
#define freq_x2t(x) ((freq_t)*(x))
#define setting_t2x(t, x) do { *(x) = (t); } while(0)
#define setting_x2t(x) ((setting_t)*(x))
static inline void mode_t2s(rmode_t modet, pbwidth_t widtht, mode_s *modes)
{
modes->mode = modet;
modes->width = widtht;
}
static inline void mode_s2t(mode_s *modes, rmode_t *modet, pbwidth_t *widtht)
{
*modet = modes->mode;
*widtht = modes->width;
}
#define RIGPROG 0x20000099
#define RIGVERS 1
@ -45,42 +208,214 @@ typedef struct freq_arg freq_arg;
#define GETMODEL 1
extern model_x * getmodel_1(void *, CLIENT *);
extern model_x * getmodel_1_svc(void *, struct svc_req *);
#define GETRIGSTATE 3
extern rigstate_res * getrigstate_1(void *, CLIENT *);
extern rigstate_res * getrigstate_1_svc(void *, struct svc_req *);
#define SETFREQ 10
extern int * setfreq_1(freq_arg *, CLIENT *);
extern int * setfreq_1_svc(freq_arg *, struct svc_req *);
#define GETFREQ 11
extern freq_res * getfreq_1(vfo_x *, CLIENT *);
extern freq_res * getfreq_1_svc(vfo_x *, struct svc_req *);
#define SETMODE 12
extern int * setmode_1(mode_arg *, CLIENT *);
extern int * setmode_1_svc(mode_arg *, struct svc_req *);
#define GETMODE 13
extern mode_res * getmode_1(vfo_x *, CLIENT *);
extern mode_res * getmode_1_svc(vfo_x *, struct svc_req *);
#define SETVFO 14
extern int * setvfo_1(vfo_x *, CLIENT *);
extern int * setvfo_1_svc(vfo_x *, struct svc_req *);
#define GETVFO 15
extern vfo_res * getvfo_1(vfo_x *, CLIENT *);
extern vfo_res * getvfo_1_svc(vfo_x *, struct svc_req *);
#define SETSPLITFREQ 16
extern int * setsplitfreq_1(freq_arg *, CLIENT *);
extern int * setsplitfreq_1_svc(freq_arg *, struct svc_req *);
#define GETSPLITFREQ 17
extern freq_res * getsplitfreq_1(vfo_x *, CLIENT *);
extern freq_res * getsplitfreq_1_svc(vfo_x *, struct svc_req *);
#define SETSPLITMODE 18
extern int * setsplitmode_1(mode_arg *, CLIENT *);
extern int * setsplitmode_1_svc(mode_arg *, struct svc_req *);
#define GETSPLITMODE 19
extern mode_res * getsplitmode_1(vfo_x *, CLIENT *);
extern mode_res * getsplitmode_1_svc(vfo_x *, struct svc_req *);
#define SETSPLIT 20
extern int * setsplit_1(split_arg *, CLIENT *);
extern int * setsplit_1_svc(split_arg *, struct svc_req *);
#define GETSPLIT 21
extern split_res * getsplit_1(vfo_x *, CLIENT *);
extern split_res * getsplit_1_svc(vfo_x *, struct svc_req *);
#define SETPTT 22
extern int * setptt_1(ptt_arg *, CLIENT *);
extern int * setptt_1_svc(ptt_arg *, struct svc_req *);
#define GETPTT 23
extern ptt_res * getptt_1(vfo_x *, CLIENT *);
extern ptt_res * getptt_1_svc(vfo_x *, struct svc_req *);
#define GETDCD 24
extern dcd_res * getdcd_1(vfo_x *, CLIENT *);
extern dcd_res * getdcd_1_svc(vfo_x *, struct svc_req *);
#define SETFUNC 25
extern int * setfunc_1(setting_arg *, CLIENT *);
extern int * setfunc_1_svc(setting_arg *, struct svc_req *);
#define GETFUNC 26
extern val_res * getfunc_1(setting_arg *, CLIENT *);
extern val_res * getfunc_1_svc(setting_arg *, struct svc_req *);
#define SETLEVEL 27
extern int * setlevel_1(setting_arg *, CLIENT *);
extern int * setlevel_1_svc(setting_arg *, struct svc_req *);
#define GETLEVEL 28
extern val_res * getlevel_1(setting_arg *, CLIENT *);
extern val_res * getlevel_1_svc(setting_arg *, struct svc_req *);
#define SETPARM 29
extern int * setparm_1(setting_arg *, CLIENT *);
extern int * setparm_1_svc(setting_arg *, struct svc_req *);
#define GETPARM 30
extern val_res * getparm_1(setting_arg *, CLIENT *);
extern val_res * getparm_1_svc(setting_arg *, struct svc_req *);
#define VFOOP 31
extern int * vfoop_1(vfo_op_arg *, CLIENT *);
extern int * vfoop_1_svc(vfo_op_arg *, struct svc_req *);
extern int rigprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define GETMODEL 1
extern model_x * getmodel_1();
extern model_x * getmodel_1_svc();
#define GETRIGSTATE 3
extern rigstate_res * getrigstate_1();
extern rigstate_res * getrigstate_1_svc();
#define SETFREQ 10
extern int * setfreq_1();
extern int * setfreq_1_svc();
#define GETFREQ 11
extern freq_res * getfreq_1();
extern freq_res * getfreq_1_svc();
#define SETMODE 12
extern int * setmode_1();
extern int * setmode_1_svc();
#define GETMODE 13
extern mode_res * getmode_1();
extern mode_res * getmode_1_svc();
#define SETVFO 14
extern int * setvfo_1();
extern int * setvfo_1_svc();
#define GETVFO 15
extern vfo_res * getvfo_1();
extern vfo_res * getvfo_1_svc();
#define SETSPLITFREQ 16
extern int * setsplitfreq_1();
extern int * setsplitfreq_1_svc();
#define GETSPLITFREQ 17
extern freq_res * getsplitfreq_1();
extern freq_res * getsplitfreq_1_svc();
#define SETSPLITMODE 18
extern int * setsplitmode_1();
extern int * setsplitmode_1_svc();
#define GETSPLITMODE 19
extern mode_res * getsplitmode_1();
extern mode_res * getsplitmode_1_svc();
#define SETSPLIT 20
extern int * setsplit_1();
extern int * setsplit_1_svc();
#define GETSPLIT 21
extern split_res * getsplit_1();
extern split_res * getsplit_1_svc();
#define SETPTT 22
extern int * setptt_1();
extern int * setptt_1_svc();
#define GETPTT 23
extern ptt_res * getptt_1();
extern ptt_res * getptt_1_svc();
#define GETDCD 24
extern dcd_res * getdcd_1();
extern dcd_res * getdcd_1_svc();
#define SETFUNC 25
extern int * setfunc_1();
extern int * setfunc_1_svc();
#define GETFUNC 26
extern val_res * getfunc_1();
extern val_res * getfunc_1_svc();
#define SETLEVEL 27
extern int * setlevel_1();
extern int * setlevel_1_svc();
#define GETLEVEL 28
extern val_res * getlevel_1();
extern val_res * getlevel_1_svc();
#define SETPARM 29
extern int * setparm_1();
extern int * setparm_1_svc();
#define GETPARM 30
extern val_res * getparm_1();
extern val_res * getparm_1_svc();
#define VFOOP 31
extern int * vfoop_1();
extern int * vfoop_1_svc();
extern int rigprog_1_freeresult ();
#endif /* K&R C */
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_vfo_x (XDR *, vfo_x*);
extern bool_t xdr_freq_s (XDR *, freq_s*);
extern bool_t xdr_model_x (XDR *, model_x*);
extern bool_t xdr_freq_res (XDR *, freq_res*);
extern bool_t xdr_vfo_x (XDR *, vfo_x*);
extern bool_t xdr_freq_x (XDR *, freq_x*);
extern bool_t xdr_rmode_x (XDR *, rmode_x*);
extern bool_t xdr_pbwidth_x (XDR *, pbwidth_x*);
extern bool_t xdr_split_x (XDR *, split_x*);
extern bool_t xdr_ptt_x (XDR *, ptt_x*);
extern bool_t xdr_dcd_x (XDR *, dcd_x*);
extern bool_t xdr_vfo_op_x (XDR *, vfo_op_x*);
extern bool_t xdr_shortfreq_x (XDR *, shortfreq_x*);
extern bool_t xdr_setting_x (XDR *, setting_x*);
extern bool_t xdr_mode_s (XDR *, mode_s*);
extern bool_t xdr_value_s (XDR *, value_s*);
extern bool_t xdr_freq_arg (XDR *, freq_arg*);
extern bool_t xdr_freq_res (XDR *, freq_res*);
extern bool_t xdr_mode_arg (XDR *, mode_arg*);
extern bool_t xdr_mode_res (XDR *, mode_res*);
extern bool_t xdr_vfo_res (XDR *, vfo_res*);
extern bool_t xdr_split_arg (XDR *, split_arg*);
extern bool_t xdr_split_res (XDR *, split_res*);
extern bool_t xdr_ptt_arg (XDR *, ptt_arg*);
extern bool_t xdr_ptt_res (XDR *, ptt_res*);
extern bool_t xdr_dcd_res (XDR *, dcd_res*);
extern bool_t xdr_setting_arg (XDR *, setting_arg*);
extern bool_t xdr_val_res (XDR *, val_res*);
extern bool_t xdr_vfo_op_arg (XDR *, vfo_op_arg*);
extern bool_t xdr_rigstate_s (XDR *, rigstate_s*);
extern bool_t xdr_rigstate_res (XDR *, rigstate_res*);
#else /* K&R C */
extern bool_t xdr_vfo_x ();
extern bool_t xdr_freq_s ();
extern bool_t xdr_model_x ();
extern bool_t xdr_freq_res ();
extern bool_t xdr_vfo_x ();
extern bool_t xdr_freq_x ();
extern bool_t xdr_rmode_x ();
extern bool_t xdr_pbwidth_x ();
extern bool_t xdr_split_x ();
extern bool_t xdr_ptt_x ();
extern bool_t xdr_dcd_x ();
extern bool_t xdr_vfo_op_x ();
extern bool_t xdr_shortfreq_x ();
extern bool_t xdr_setting_x ();
extern bool_t xdr_mode_s ();
extern bool_t xdr_value_s ();
extern bool_t xdr_freq_arg ();
extern bool_t xdr_freq_res ();
extern bool_t xdr_mode_arg ();
extern bool_t xdr_mode_res ();
extern bool_t xdr_vfo_res ();
extern bool_t xdr_split_arg ();
extern bool_t xdr_split_res ();
extern bool_t xdr_ptt_arg ();
extern bool_t xdr_ptt_res ();
extern bool_t xdr_dcd_res ();
extern bool_t xdr_setting_arg ();
extern bool_t xdr_val_res ();
extern bool_t xdr_vfo_op_arg ();
extern bool_t xdr_rigstate_s ();
extern bool_t xdr_rigstate_res ();
#endif /* K&R C */

Wyświetl plik

@ -5,6 +5,27 @@
#include <memory.h> /* for memset */
#include "rpcrig.h"
/*
* Hamlib Interface - RPC definitions
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: rpcrig_clnt.c,v 1.2 2001-12-26 23:44:09 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };
@ -24,6 +45,21 @@ getmodel_1(void *argp, CLIENT *clnt)
return (&clnt_res);
}
rigstate_res *
getrigstate_1(void *argp, CLIENT *clnt)
{
static rigstate_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETRIGSTATE,
(xdrproc_t) xdr_void, (caddr_t) argp,
(xdrproc_t) xdr_rigstate_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setfreq_1(freq_arg *argp, CLIENT *clnt)
{
@ -53,3 +89,303 @@ getfreq_1(vfo_x *argp, CLIENT *clnt)
}
return (&clnt_res);
}
int *
setmode_1(mode_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETMODE,
(xdrproc_t) xdr_mode_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
mode_res *
getmode_1(vfo_x *argp, CLIENT *clnt)
{
static mode_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETMODE,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_mode_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setvfo_1(vfo_x *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETVFO,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
vfo_res *
getvfo_1(vfo_x *argp, CLIENT *clnt)
{
static vfo_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETVFO,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_vfo_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setsplitfreq_1(freq_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETSPLITFREQ,
(xdrproc_t) xdr_freq_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
freq_res *
getsplitfreq_1(vfo_x *argp, CLIENT *clnt)
{
static freq_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETSPLITFREQ,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_freq_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setsplitmode_1(mode_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETSPLITMODE,
(xdrproc_t) xdr_mode_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
mode_res *
getsplitmode_1(vfo_x *argp, CLIENT *clnt)
{
static mode_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETSPLITMODE,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_mode_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setsplit_1(split_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETSPLIT,
(xdrproc_t) xdr_split_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
split_res *
getsplit_1(vfo_x *argp, CLIENT *clnt)
{
static split_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETSPLIT,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_split_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setptt_1(ptt_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETPTT,
(xdrproc_t) xdr_ptt_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
ptt_res *
getptt_1(vfo_x *argp, CLIENT *clnt)
{
static ptt_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETPTT,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_ptt_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
dcd_res *
getdcd_1(vfo_x *argp, CLIENT *clnt)
{
static dcd_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETDCD,
(xdrproc_t) xdr_vfo_x, (caddr_t) argp,
(xdrproc_t) xdr_dcd_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setfunc_1(setting_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETFUNC,
(xdrproc_t) xdr_setting_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
val_res *
getfunc_1(setting_arg *argp, CLIENT *clnt)
{
static val_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETFUNC,
(xdrproc_t) xdr_setting_arg, (caddr_t) argp,
(xdrproc_t) xdr_val_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setlevel_1(setting_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETLEVEL,
(xdrproc_t) xdr_setting_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
val_res *
getlevel_1(setting_arg *argp, CLIENT *clnt)
{
static val_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETLEVEL,
(xdrproc_t) xdr_setting_arg, (caddr_t) argp,
(xdrproc_t) xdr_val_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
setparm_1(setting_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SETPARM,
(xdrproc_t) xdr_setting_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
val_res *
getparm_1(setting_arg *argp, CLIENT *clnt)
{
static val_res clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, GETPARM,
(xdrproc_t) xdr_setting_arg, (caddr_t) argp,
(xdrproc_t) xdr_val_res, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
int *
vfoop_1(vfo_op_arg *argp, CLIENT *clnt)
{
static int clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, VFOOP,
(xdrproc_t) xdr_vfo_op_arg, (caddr_t) argp,
(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}

Wyświetl plik

@ -15,6 +15,27 @@
#ifndef SIG_PF
#define SIG_PF void(*)(int)
#endif
/*
* Hamlib Interface - RPC definitions
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: rpcrig_svc.c,v 1.2 2001-12-26 23:44:09 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
void
rigprog_1(struct svc_req *rqstp, register SVCXPRT *transp)
@ -22,6 +43,26 @@ rigprog_1(struct svc_req *rqstp, register SVCXPRT *transp)
union {
freq_arg setfreq_1_arg;
vfo_x getfreq_1_arg;
mode_arg setmode_1_arg;
vfo_x getmode_1_arg;
vfo_x setvfo_1_arg;
vfo_x getvfo_1_arg;
freq_arg setsplitfreq_1_arg;
vfo_x getsplitfreq_1_arg;
mode_arg setsplitmode_1_arg;
vfo_x getsplitmode_1_arg;
split_arg setsplit_1_arg;
vfo_x getsplit_1_arg;
ptt_arg setptt_1_arg;
vfo_x getptt_1_arg;
vfo_x getdcd_1_arg;
setting_arg setfunc_1_arg;
setting_arg getfunc_1_arg;
setting_arg setlevel_1_arg;
setting_arg getlevel_1_arg;
setting_arg setparm_1_arg;
setting_arg getparm_1_arg;
vfo_op_arg vfoop_1_arg;
} argument;
char *result;
xdrproc_t _xdr_argument, _xdr_result;
@ -38,6 +79,12 @@ rigprog_1(struct svc_req *rqstp, register SVCXPRT *transp)
local = (char *(*)(char *, struct svc_req *)) getmodel_1_svc;
break;
case GETRIGSTATE:
_xdr_argument = (xdrproc_t) xdr_void;
_xdr_result = (xdrproc_t) xdr_rigstate_res;
local = (char *(*)(char *, struct svc_req *)) getrigstate_1_svc;
break;
case SETFREQ:
_xdr_argument = (xdrproc_t) xdr_freq_arg;
_xdr_result = (xdrproc_t) xdr_int;
@ -50,6 +97,126 @@ rigprog_1(struct svc_req *rqstp, register SVCXPRT *transp)
local = (char *(*)(char *, struct svc_req *)) getfreq_1_svc;
break;
case SETMODE:
_xdr_argument = (xdrproc_t) xdr_mode_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setmode_1_svc;
break;
case GETMODE:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_mode_res;
local = (char *(*)(char *, struct svc_req *)) getmode_1_svc;
break;
case SETVFO:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setvfo_1_svc;
break;
case GETVFO:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_vfo_res;
local = (char *(*)(char *, struct svc_req *)) getvfo_1_svc;
break;
case SETSPLITFREQ:
_xdr_argument = (xdrproc_t) xdr_freq_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setsplitfreq_1_svc;
break;
case GETSPLITFREQ:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_freq_res;
local = (char *(*)(char *, struct svc_req *)) getsplitfreq_1_svc;
break;
case SETSPLITMODE:
_xdr_argument = (xdrproc_t) xdr_mode_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setsplitmode_1_svc;
break;
case GETSPLITMODE:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_mode_res;
local = (char *(*)(char *, struct svc_req *)) getsplitmode_1_svc;
break;
case SETSPLIT:
_xdr_argument = (xdrproc_t) xdr_split_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setsplit_1_svc;
break;
case GETSPLIT:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_split_res;
local = (char *(*)(char *, struct svc_req *)) getsplit_1_svc;
break;
case SETPTT:
_xdr_argument = (xdrproc_t) xdr_ptt_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setptt_1_svc;
break;
case GETPTT:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_ptt_res;
local = (char *(*)(char *, struct svc_req *)) getptt_1_svc;
break;
case GETDCD:
_xdr_argument = (xdrproc_t) xdr_vfo_x;
_xdr_result = (xdrproc_t) xdr_dcd_res;
local = (char *(*)(char *, struct svc_req *)) getdcd_1_svc;
break;
case SETFUNC:
_xdr_argument = (xdrproc_t) xdr_setting_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setfunc_1_svc;
break;
case GETFUNC:
_xdr_argument = (xdrproc_t) xdr_setting_arg;
_xdr_result = (xdrproc_t) xdr_val_res;
local = (char *(*)(char *, struct svc_req *)) getfunc_1_svc;
break;
case SETLEVEL:
_xdr_argument = (xdrproc_t) xdr_setting_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setlevel_1_svc;
break;
case GETLEVEL:
_xdr_argument = (xdrproc_t) xdr_setting_arg;
_xdr_result = (xdrproc_t) xdr_val_res;
local = (char *(*)(char *, struct svc_req *)) getlevel_1_svc;
break;
case SETPARM:
_xdr_argument = (xdrproc_t) xdr_setting_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) setparm_1_svc;
break;
case GETPARM:
_xdr_argument = (xdrproc_t) xdr_setting_arg;
_xdr_result = (xdrproc_t) xdr_val_res;
local = (char *(*)(char *, struct svc_req *)) getparm_1_svc;
break;
case VFOOP:
_xdr_argument = (xdrproc_t) xdr_vfo_op_arg;
_xdr_result = (xdrproc_t) xdr_int;
local = (char *(*)(char *, struct svc_req *)) vfoop_1_svc;
break;
default:
svcerr_noproc (transp);
return;

Wyświetl plik

@ -4,28 +4,27 @@
*/
#include "rpcrig.h"
bool_t
xdr_vfo_x (XDR *xdrs, vfo_x *objp)
{
register int32_t *buf;
if (!xdr_u_int (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_freq_s (XDR *xdrs, freq_s *objp)
{
register int32_t *buf;
if (!xdr_u_int (xdrs, &objp->f1))
return FALSE;
if (!xdr_u_int (xdrs, &objp->f2))
return FALSE;
return TRUE;
}
/*
* Hamlib Interface - RPC definitions
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: rpcrig_xdr.c,v 1.2 2001-12-26 23:44:09 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
bool_t
xdr_model_x (XDR *xdrs, model_x *objp)
@ -37,6 +36,142 @@ xdr_model_x (XDR *xdrs, model_x *objp)
return TRUE;
}
bool_t
xdr_vfo_x (XDR *xdrs, vfo_x *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_freq_x (XDR *xdrs, freq_x *objp)
{
register int32_t *buf;
if (!xdr_int64_t (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_rmode_x (XDR *xdrs, rmode_x *objp)
{
register int32_t *buf;
if (!xdr_u_int (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_pbwidth_x (XDR *xdrs, pbwidth_x *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_split_x (XDR *xdrs, split_x *objp)
{
register int32_t *buf;
if (!xdr_u_long (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_ptt_x (XDR *xdrs, ptt_x *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_dcd_x (XDR *xdrs, dcd_x *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_vfo_op_x (XDR *xdrs, vfo_op_x *objp)
{
register int32_t *buf;
if (!xdr_long (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_shortfreq_x (XDR *xdrs, shortfreq_x *objp)
{
register int32_t *buf;
if (!xdr_long (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_setting_x (XDR *xdrs, setting_x *objp)
{
register int32_t *buf;
if (!xdr_uint64_t (xdrs, objp))
return FALSE;
return TRUE;
}
bool_t
xdr_mode_s (XDR *xdrs, mode_s *objp)
{
register int32_t *buf;
if (!xdr_rmode_x (xdrs, &objp->mode))
return FALSE;
if (!xdr_pbwidth_x (xdrs, &objp->width))
return FALSE;
return TRUE;
}
bool_t
xdr_value_s (XDR *xdrs, value_s *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->i))
return FALSE;
if (!xdr_float (xdrs, &objp->f))
return FALSE;
return TRUE;
}
bool_t
xdr_freq_arg (XDR *xdrs, freq_arg *objp)
{
register int32_t *buf;
if (!xdr_vfo_x (xdrs, &objp->vfo))
return FALSE;
if (!xdr_freq_x (xdrs, &objp->freq))
return FALSE;
return TRUE;
}
bool_t
xdr_freq_res (XDR *xdrs, freq_res *objp)
{
@ -46,7 +181,7 @@ xdr_freq_res (XDR *xdrs, freq_res *objp)
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_freq_s (xdrs, &objp->freq_res_u.freq))
if (!xdr_freq_x (xdrs, &objp->freq_res_u.freq))
return FALSE;
break;
default:
@ -56,13 +191,211 @@ xdr_freq_res (XDR *xdrs, freq_res *objp)
}
bool_t
xdr_freq_arg (XDR *xdrs, freq_arg *objp)
xdr_mode_arg (XDR *xdrs, mode_arg *objp)
{
register int32_t *buf;
if (!xdr_vfo_x (xdrs, &objp->vfo))
return FALSE;
if (!xdr_freq_s (xdrs, &objp->freq))
if (!xdr_mode_s (xdrs, &objp->mw))
return FALSE;
return TRUE;
}
bool_t
xdr_mode_res (XDR *xdrs, mode_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_mode_s (xdrs, &objp->mode_res_u.mw))
return FALSE;
break;
default:
break;
}
return TRUE;
}
bool_t
xdr_vfo_res (XDR *xdrs, vfo_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_vfo_x (xdrs, &objp->vfo_res_u.vfo))
return FALSE;
break;
default:
break;
}
return TRUE;
}
bool_t
xdr_split_arg (XDR *xdrs, split_arg *objp)
{
register int32_t *buf;
if (!xdr_vfo_x (xdrs, &objp->vfo))
return FALSE;
if (!xdr_split_x (xdrs, &objp->split))
return FALSE;
return TRUE;
}
bool_t
xdr_split_res (XDR *xdrs, split_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_split_x (xdrs, &objp->split_res_u.split))
return FALSE;
break;
default:
break;
}
return TRUE;
}
bool_t
xdr_ptt_arg (XDR *xdrs, ptt_arg *objp)
{
register int32_t *buf;
if (!xdr_vfo_x (xdrs, &objp->vfo))
return FALSE;
if (!xdr_ptt_x (xdrs, &objp->ptt))
return FALSE;
return TRUE;
}
bool_t
xdr_ptt_res (XDR *xdrs, ptt_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_ptt_x (xdrs, &objp->ptt_res_u.ptt))
return FALSE;
break;
default:
break;
}
return TRUE;
}
bool_t
xdr_dcd_res (XDR *xdrs, dcd_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_dcd_x (xdrs, &objp->dcd_res_u.dcd))
return FALSE;
break;
default:
break;
}
return TRUE;
}
bool_t
xdr_setting_arg (XDR *xdrs, setting_arg *objp)
{
register int32_t *buf;
if (!xdr_vfo_x (xdrs, &objp->vfo))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->setting))
return FALSE;
if (!xdr_value_s (xdrs, &objp->val))
return FALSE;
return TRUE;
}
bool_t
xdr_val_res (XDR *xdrs, val_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_value_s (xdrs, &objp->val_res_u.val))
return FALSE;
break;
default:
break;
}
return TRUE;
}
bool_t
xdr_vfo_op_arg (XDR *xdrs, vfo_op_arg *objp)
{
register int32_t *buf;
if (!xdr_vfo_x (xdrs, &objp->vfo))
return FALSE;
if (!xdr_vfo_op_x (xdrs, &objp->op))
return FALSE;
return TRUE;
}
bool_t
xdr_rigstate_s (XDR *xdrs, rigstate_s *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->itu_region))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->has_get_func))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->has_set_func))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->has_get_level))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->has_set_level))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->has_get_parm))
return FALSE;
if (!xdr_setting_x (xdrs, &objp->has_set_parm))
return FALSE;
return TRUE;
}
bool_t
xdr_rigstate_res (XDR *xdrs, rigstate_res *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->rigstatus))
return FALSE;
switch (objp->rigstatus) {
case 0:
if (!xdr_rigstate_s (xdrs, &objp->rigstate_res_u.state))
return FALSE;
break;
default:
break;
}
return TRUE;
}

Wyświetl plik

@ -116,7 +116,7 @@ testfreq_LDFLAGS = @BACKENDLNK@
rigctl_LDFLAGS = @BACKENDLNK@
# rigmatrix needs also libgd
rigmatrix_LDFLAGS = -lgd -lz @BACKENDLNK@
testcpp_LDADD = ../c++/libhamlib++.la $(LDADD)
testcpp_LDADD = ../c++/libhamlib++.la
testcpp_LDFLAGS = @BACKENDLNK@
dumpcaps_DEPENDENCIES = $(DEPENDENCIES) @BACKENDEPS@