2001-12-27 21:41:11 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Interface - list of known rotators
|
2002-11-12 00:11:54 +00:00
|
|
|
* Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton
|
2001-12-27 21:41:11 +00:00
|
|
|
*
|
2002-11-28 22:24:10 +00:00
|
|
|
* $Id: rotlist.h,v 1.6 2002-11-28 22:24:10 fillods Exp $
|
2001-12-27 21:41:11 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ROTLIST_H
|
|
|
|
#define _ROTLIST_H 1
|
|
|
|
|
|
|
|
#define ROT_MAKE_MODEL(a,b) ((a)*100+(b))
|
|
|
|
#define ROT_BACKEND_NUM(a) ((a)/100)
|
|
|
|
|
2002-11-09 13:09:02 +00:00
|
|
|
/*! \file rotlist.h
|
2002-11-12 00:11:54 +00:00
|
|
|
* \ingroup rot
|
2002-11-09 13:09:02 +00:00
|
|
|
* \brief Hamlib rotator model definitions.
|
|
|
|
*
|
|
|
|
* This file contains rotator model definitions for the Hamlib rotator API.
|
|
|
|
* Each distinct rotator type has a unique model number (ID) and is used
|
2002-11-12 00:11:54 +00:00
|
|
|
* by hamlib to identify and distinguish between the different hardware drivers.
|
|
|
|
* The exact model numbers can be acquired using the macros in this
|
2002-11-09 13:09:02 +00:00
|
|
|
* file. To obtain a list of supported rotator branches, one can use the statically
|
|
|
|
* defined ROT_BACKEND_LIST macro. To obtain a full list of supported rotators (including
|
|
|
|
* each model in every branch), the foreach_opened_rot() API function can be used.
|
|
|
|
*
|
|
|
|
* The model number, or ID, is used to tell hamlib, which rotator the client whishes to
|
|
|
|
* use. It is done with the rot_init() API call.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2001-12-27 21:41:11 +00:00
|
|
|
#define ROT_MODEL_NONE 0
|
|
|
|
|
2002-11-09 13:09:02 +00:00
|
|
|
/*! \def ROT_MODEL_DUMMY
|
|
|
|
* \brief A macro that returns the model number for the dummy backend.
|
|
|
|
*
|
|
|
|
* The dummy backend, as the name suggests, is a backend which performs
|
|
|
|
* no hardware operations and always behaves as one would expect. It can
|
|
|
|
* be thought of as a hardware simulator and is very usefull for testing
|
|
|
|
* client applications.
|
|
|
|
*/
|
2001-12-27 21:41:11 +00:00
|
|
|
#define ROT_DUMMY 0
|
|
|
|
#define ROT_BACKEND_DUMMY "dummy"
|
|
|
|
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* RPC Network pseudo-backend
|
|
|
|
*/
|
2002-11-09 13:09:02 +00:00
|
|
|
/*! \def ROT_MODEL_RPC
|
|
|
|
* \brief A macro that returns the model number of the RPC Network pseudo-backend.
|
|
|
|
*
|
|
|
|
* The RPC backend can be used to connect and send commands to a rotator server,
|
|
|
|
* \c rpc.rotd, running on a remote machine. Using this client/server scheme,
|
|
|
|
* several clients can control and monitor the same rotator hardware.
|
|
|
|
*/
|
2001-12-27 21:41:11 +00:00
|
|
|
#define ROT_RPC 1
|
|
|
|
#define ROT_BACKEND_RPC "rpcrot"
|
|
|
|
#define ROT_MODEL_RPC ROT_MAKE_MODEL(ROT_RPC, 1)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Easycomm
|
|
|
|
*/
|
2002-11-09 13:09:02 +00:00
|
|
|
/*! \def ROT_MODEL_EASYCOMM1
|
|
|
|
* \brief A macro that returns the model number of the EasyComm 1 backend.
|
|
|
|
*
|
|
|
|
* The EasyComm 1 backend can be used with rotators that support the
|
|
|
|
* EASYCOMM I Standard.
|
|
|
|
*/
|
|
|
|
/*! \def ROT_MODEL_EASYCOMM2
|
|
|
|
* \brief A macro that returns the model number of the EasyComm 2 backend.
|
|
|
|
*
|
|
|
|
* The EasyComm 2 backend can be used with rotators that support the
|
|
|
|
* EASYCOMM II Standard.
|
|
|
|
*/
|
2001-12-27 21:41:11 +00:00
|
|
|
#define ROT_EASYCOMM 2
|
|
|
|
#define ROT_BACKEND_EASYCOMM "easycomm"
|
2002-01-16 17:03:57 +00:00
|
|
|
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1)
|
|
|
|
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2)
|
2001-12-27 21:41:11 +00:00
|
|
|
|
2002-11-28 22:24:10 +00:00
|
|
|
/*! \def ROT_MODEL_FODTRACK
|
|
|
|
* \brief A macro that returns the model number of the Fodtrack backend.
|
|
|
|
*
|
|
|
|
* The Fodtrack backend can be used with rotators that support the
|
|
|
|
* FODTRACK Standard.
|
|
|
|
*/
|
|
|
|
#define ROT_FODTRACK 3
|
|
|
|
#define ROT_BACKEND_FODTRACK "fodtrack"
|
|
|
|
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1)
|
|
|
|
|
2002-11-09 13:09:02 +00:00
|
|
|
|
|
|
|
/*! \typedef typedef int rot_model_t
|
|
|
|
\brief Convenience type definition for rotator model.
|
|
|
|
*/
|
2001-12-27 21:41:11 +00:00
|
|
|
typedef int rot_model_t;
|
|
|
|
|
2002-11-09 13:09:02 +00:00
|
|
|
|
|
|
|
/*! \def ROT_BACKEND_LIST
|
|
|
|
* \brief Static list of rotator models.
|
|
|
|
*
|
|
|
|
* This is a NULL terminated list of available rotator backends. Each entry
|
|
|
|
* in the list consists of two fields: The branch number, which is an integer,
|
|
|
|
* and the branch name, which is a character string.
|
|
|
|
*/
|
2001-12-27 21:41:11 +00:00
|
|
|
#define ROT_BACKEND_LIST { \
|
|
|
|
{ ROT_DUMMY, ROT_BACKEND_DUMMY }, \
|
|
|
|
{ ROT_RPC, ROT_BACKEND_RPC }, \
|
2001-12-28 20:30:58 +00:00
|
|
|
{ ROT_EASYCOMM, ROT_BACKEND_EASYCOMM }, \
|
2002-11-28 22:24:10 +00:00
|
|
|
{ ROT_FODTRACK, ROT_BACKEND_FODTRACK }, \
|
2001-12-27 21:41:11 +00:00
|
|
|
{ 0, NULL }, /* end */ \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* struct rot_backend_list {
|
|
|
|
* rot_model_t model;
|
|
|
|
* const char *backend;
|
|
|
|
* } rot_backend_list[] = ROT_LIST;
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endif /* _ROTLIST_H */
|