kopia lustrzana https://github.com/Hamlib/Hamlib
cleanup doxygen warnings
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1191 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.4
rodzic
9b7cabeae8
commit
c69f9b4168
|
@ -1,6 +1,6 @@
|
|||
## $Id: hamlib.cfg,v 1.5 2002-09-02 14:42:36 csete Exp $
|
||||
## $Id: hamlib.cfg,v 1.6 2002-09-24 21:42:56 fillods Exp $
|
||||
|
||||
PROJECT_NAME = "Hamlib"
|
||||
PROJECT_NAME = "Hamlib - the C library reference"
|
||||
|
||||
# TODO: replace ../ by $(top_srcdir) et al.
|
||||
|
||||
|
@ -16,11 +16,12 @@ MAN_EXTENSION = .3
|
|||
|
||||
# Input
|
||||
CASE_SENSE_NAMES = NO
|
||||
INPUT = index.doxygen \
|
||||
../src/rig.c \
|
||||
../src/rotator.c \
|
||||
../src/tones.c \
|
||||
../src/locator.c
|
||||
INPUT = index.doxygen \
|
||||
../src/rig.c \
|
||||
../src/rotator.c \
|
||||
../src/tones.c \
|
||||
../src/locator.c
|
||||
|
||||
#../c++/rigclass.cc
|
||||
|
||||
INCLUDE_PATH = ../include
|
||||
|
@ -35,6 +36,7 @@ EXTRACT_STATIC = NO
|
|||
SHOW_INCLUDE_FILES = NO
|
||||
INHERIT_DOCS = YES
|
||||
ENABLED_SECTIONS = ""
|
||||
PREDEFINED = DOXYGEN "DOC_HIDDEN"
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES # doxygen 1.2.6 option
|
||||
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
\author Frank Singleton
|
||||
|
||||
<H2>Preface</H2>
|
||||
<P>This document describes the \e Hamlib library API.
|
||||
<P>This document describes the \e Hamlib library API for 1.1.4.
|
||||
Each function of the API occuring in rig.c at the time of release
|
||||
is documented here. Every effort was made to ensure all arguments
|
||||
and return values are correct, but, as always, the source is definitive.
|
||||
Errors are bound to have occurred and others will be blamed.</P>
|
||||
|
||||
<H2>Documentation License</H2>
|
||||
<P> This documentation is free; you can redistribute it without
|
||||
|
@ -17,6 +21,9 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</P>
|
|||
|
||||
<H2>API links</H2>
|
||||
<UL>
|
||||
<LI>Page \ref hamlib explains the design of the general API.
|
||||
<LI>Page \ref rig explains the design of the Rig (radio) API.
|
||||
<LI>Page \ref rot explains the design of the Rotator API.
|
||||
</UL>
|
||||
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/**
|
||||
* \file src/locator.c
|
||||
* \ingroup hamlib
|
||||
* \brief Ham Radio Control Libraries interface
|
||||
* \author Stephane Fillod
|
||||
* \date 2000-2002
|
||||
|
@ -11,7 +12,7 @@
|
|||
* Hamlib Interface - locator and bearing conversion calls
|
||||
* Copyright (c) 2001-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: locator.c,v 1.4 2002-09-01 22:23:49 fillods Exp $
|
||||
* $Id: locator.c,v 1.5 2002-09-24 21:42:56 fillods Exp $
|
||||
*
|
||||
* Code to determine bearing and range was taken from the Great Circle,
|
||||
* by S. R. Sampson, N5OWK.
|
||||
|
@ -38,6 +39,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*! \page hamlib Hamlib general purpose API
|
||||
*
|
||||
* Here are grouped some often used functions, like locator conversion
|
||||
* routines.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -52,11 +59,15 @@
|
|||
#include <hamlib/rotator.h>
|
||||
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
|
||||
#define RADIAN (180.0 / M_PI)
|
||||
|
||||
/* arc length for 1 degree, 60 Nautical Miles */
|
||||
#define ARC_IN_KM 111.2
|
||||
|
||||
#endif /* !DOC_HIDDEN */
|
||||
|
||||
/**
|
||||
* \brief Convert DMS angle to decimal representation
|
||||
* \param degrees Degrees
|
||||
|
@ -215,14 +226,15 @@ void longlat2locator(double longitude, double latitude, char *locator)
|
|||
* \param distance The location where to store the distance
|
||||
* \param azimuth The location where to store the bearing
|
||||
*
|
||||
* Calculate the QRB between \a lat1,\a lat1 and
|
||||
* \a lon2,\a lat2, and return the distance in kilometers and
|
||||
* azimuth in decimal degrees for the short path.
|
||||
* Calculate the QRB between \a lat1,\a lat1 and \a lon2,\a lat2.
|
||||
*
|
||||
* This version also takes into consideration the two points
|
||||
* being close enough to be in the near-field, and the antipodal points,
|
||||
* which are easily calculated.
|
||||
*
|
||||
* \return the distance in kilometers and azimuth in decimal degrees
|
||||
* for the short path.
|
||||
*
|
||||
* \sa distance_long_path(), azimuth_long_path()
|
||||
*/
|
||||
int qrb(double lon1, double lat1, double lon2, double lat2,
|
||||
|
@ -324,14 +336,33 @@ int qrb(double lon1, double lat1, double lon2, double lat2,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Calculate the long path distance between two points.
|
||||
* \param distance The distance
|
||||
*
|
||||
* Calculate the long path (resp. short path) of a given distance.
|
||||
*
|
||||
* \return the distance in kilometers for the opposite path.
|
||||
*
|
||||
* \sa qrb()
|
||||
*/
|
||||
double distance_long_path(double distance)
|
||||
{
|
||||
return (ARC_IN_KM * 360.0) - distance;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Calculate the long path bearing between two points.
|
||||
* \param azimuth The bearing
|
||||
*
|
||||
* Calculate the long path (resp. short path) of a given bearing.
|
||||
*
|
||||
* \return the azimuth in decimal degrees for the opposite path.
|
||||
*
|
||||
* \sa qrb()
|
||||
*/
|
||||
double azimuth_long_path(double azimuth)
|
||||
{
|
||||
return 360.0-azimuth;
|
||||
}
|
||||
|
||||
|
||||
|
|
92
src/rig.c
92
src/rig.c
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* \file src/rig.c
|
||||
* \ingroup hamlib
|
||||
* \ingroup rig
|
||||
* \brief Ham Radio Control Libraries interface
|
||||
* \author Stephane Fillod
|
||||
* \author Frank Singleton
|
||||
|
@ -13,7 +13,7 @@
|
|||
* Hamlib Interface - main file
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton
|
||||
*
|
||||
* $Id: rig.c,v 1.62 2002-09-01 22:23:49 fillods Exp $
|
||||
* $Id: rig.c,v 1.63 2002-09-24 21:42:56 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
|
||||
|
@ -31,6 +31,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*! \page rig Rig (radio) interface
|
||||
*
|
||||
* Although the word rig can stand for lot of thinfs, we are
|
||||
* understanding it as general remote controllable radio equipment,
|
||||
* with a so-called tunable VFO.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \example ../tests/testrig.c
|
||||
* \anchor example_test_rig
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -59,12 +71,13 @@ const char hamlib_version[] = "Hamlib version " VERSION;
|
|||
* \brief Hamlib copyright notice
|
||||
*/
|
||||
const char hamlib_copyright[] =
|
||||
"Copyright (C) 2000, 2001, 2002 Stephane Fillod and Frank Singleton\n"
|
||||
"This is free software; see the source for copying conditions. "
|
||||
"There is NO\n warranty; not even for MERCHANTABILITY or FITNESS FOR A"
|
||||
"PARTICULAR PURPOSE.";
|
||||
"Copyright (C) 2000, 2001, 2002 Stephane Fillod and Frank Singleton\n"
|
||||
"This is free software; see the source for copying conditions. There is NO\n"
|
||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.";
|
||||
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
|
||||
#define DEFAULT_SERIAL_PORT "/dev/ttyS0"
|
||||
|
||||
#define CHECK_RIG_ARG(r) (!(r) || !(r)->caps || !(r)->state.comm_state)
|
||||
|
@ -101,28 +114,8 @@ static const char *rigerror_table[] = {
|
|||
"Communication bus collision",
|
||||
NULL,
|
||||
};
|
||||
/**
|
||||
* \internal
|
||||
*/
|
||||
#define ERROR_TBL_SZ (sizeof(rigerror_table)/sizeof(char *))
|
||||
|
||||
/**
|
||||
* \brief get string describing the error code
|
||||
* \param errnum The error code
|
||||
* \return the appropriate description string, ortherwise a NULL pointer
|
||||
* if the error code is unknown.
|
||||
*
|
||||
* Returns a string describing the error code passed in the argument \a errnum.
|
||||
*
|
||||
* \todo support gettext/localization
|
||||
*/
|
||||
const char *rigerror(int errnum)
|
||||
{
|
||||
errnum = abs(errnum);
|
||||
if (errnum > ERROR_TBL_SZ)
|
||||
return NULL;
|
||||
return rigerror_table[errnum];
|
||||
}
|
||||
#define ERROR_TBL_SZ (sizeof(rigerror_table)/sizeof(char *))
|
||||
|
||||
/*
|
||||
* track which rig is opened (with rig_open)
|
||||
|
@ -169,7 +162,7 @@ static int remove_opened_rig(RIG *rig)
|
|||
* The contents of the opened rig table
|
||||
* is processed in random order according to a function
|
||||
* pointed to by \a cfunc, whic is called with two arguments,
|
||||
* the first pointing to the #RIG handle, the second
|
||||
* the first pointing to the RIG handle, the second
|
||||
* to a data pointer \a data.
|
||||
* If \a data is not needed, then it can be set to NULL.
|
||||
* The processing of the opened rig table is stopped
|
||||
|
@ -190,11 +183,31 @@ int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
#endif /* !DOC_HIDDEN */
|
||||
|
||||
/**
|
||||
* \brief allocate a new #RIG handle
|
||||
* \brief get string describing the error code
|
||||
* \param errnum The error code
|
||||
* \return the appropriate description string, ortherwise a NULL pointer
|
||||
* if the error code is unknown.
|
||||
*
|
||||
* Returns a string describing the error code passed in the argument \a errnum.
|
||||
*
|
||||
* \todo support gettext/localization
|
||||
*/
|
||||
const char *rigerror(int errnum)
|
||||
{
|
||||
errnum = abs(errnum);
|
||||
if (errnum > ERROR_TBL_SZ)
|
||||
return NULL;
|
||||
return rigerror_table[errnum];
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief allocate a new RIG handle
|
||||
* \param rig_model The rig model for this new handle
|
||||
*
|
||||
* Allocates a new #RIG handle and initializes the associated data
|
||||
* Allocates a new \link ::RIG \endlink handle and initializes the associated data
|
||||
* for \a rig_model.
|
||||
*
|
||||
* \return a pointer to the #RIG handle otherwise NULL if memory allocation
|
||||
|
@ -3164,6 +3177,7 @@ int rig_set_conf(RIG *rig, token_t token, const char *val)
|
|||
* \param val The location where to store the value of config \a token
|
||||
*
|
||||
* Retrieves the value of a configuration paramter associated with \a token.
|
||||
* The location pointed to by val must be large enough to hold the value of the config.
|
||||
*
|
||||
* \return RIG_OK if the operation has been sucessful, otherwise
|
||||
* a negative value if an error occured (in which case, cause is
|
||||
|
@ -3605,6 +3619,7 @@ int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
|
|||
return retcode;
|
||||
}
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
/*
|
||||
* call on every ext_levels of a rig
|
||||
*/
|
||||
|
@ -3738,7 +3753,7 @@ int generic_restore_channel(RIG *rig, const channel_t *chan)
|
|||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
#endif /* !DOC_HIDDEN */
|
||||
|
||||
/**
|
||||
* \brief set channel data
|
||||
|
@ -3749,6 +3764,7 @@ int generic_restore_channel(RIG *rig, const channel_t *chan)
|
|||
* be the state of a VFO specified by \a chan->vfo, or a memory channel
|
||||
* specified with \a chan->vfo = RIG_VFO_MEM and \a chan->channel_num.
|
||||
* See #channel_t for more information.
|
||||
*
|
||||
* The rig_set_channel is supposed to have no impact on the current VFO
|
||||
* and memory number selected. Depending on backend and rig capabilities,
|
||||
* the chan struct may not be set completely.
|
||||
|
@ -3838,6 +3854,20 @@ int rig_set_channel(RIG *rig, const channel_t *chan)
|
|||
* be the state of a VFO specified by \a chan->vfo, or a memory channel
|
||||
* specified with \a chan->vfo = RIG_VFO_MEM and \a chan->channel_num.
|
||||
* See #channel_t for more information.
|
||||
*
|
||||
* Example:
|
||||
\code
|
||||
channel_t chan;
|
||||
int err;
|
||||
|
||||
chan->vfo = RIG_VFO_MEM;
|
||||
chan->channel_num = 10;
|
||||
err = rig_get_channel(rig, &chan);
|
||||
if (err != RIG_OK)
|
||||
error("get_channel failed: %s", rigerror(err));
|
||||
|
||||
\endcode
|
||||
*
|
||||
* The rig_get_channel is supposed to have no impact on the current VFO
|
||||
* and memory number selected. Depending on backend and rig capabilities,
|
||||
* the chan struct may not be filled in completely.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/**
|
||||
* \file src/rotator.c
|
||||
* \ingroup rot
|
||||
* \brief Ham Radio Control Libraries interface
|
||||
* \author Stephane Fillod
|
||||
* \date 2000-2001
|
||||
|
@ -11,7 +12,7 @@
|
|||
* Hamlib Interface - main file
|
||||
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
|
||||
*
|
||||
* $Id: rotator.c,v 1.6 2002-01-27 14:55:30 fillods Exp $
|
||||
* $Id: rotator.c,v 1.7 2002-09-24 21:42:56 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
|
||||
|
@ -29,6 +30,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*! \page rot Rotator interface
|
||||
*
|
||||
* Rotator can be any kind of azimuth or azimuth and elevation controlled
|
||||
* antenna system.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -48,6 +55,8 @@
|
|||
#include "token.h"
|
||||
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
|
||||
#define DEFAULT_SERIAL_PORT "/dev/rotator"
|
||||
|
||||
#define CHECK_ROT_ARG(r) (!(r) || !(r)->caps || !(r)->state.comm_state)
|
||||
|
@ -96,6 +105,7 @@ static int remove_opened_rot(ROT *rot)
|
|||
}
|
||||
return -RIG_EINVAL; /* Not found in list ! */
|
||||
}
|
||||
#endif /* !DOC_HIDDEN */
|
||||
|
||||
/**
|
||||
* \brief execs cfunc() on each opened rot
|
||||
|
|
Ładowanie…
Reference in New Issue