2002-01-16 16:45:11 +00:00
|
|
|
%/*
|
|
|
|
% * Hamlib Interface - RPC definitions
|
2002-09-13 07:01:54 +00:00
|
|
|
% * Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton
|
2002-01-16 16:45:11 +00:00
|
|
|
% * Contributed by Francois Retief <fgretief@sun.ac.za>
|
|
|
|
% *
|
|
|
|
% *
|
2011-08-23 02:54:01 +00:00
|
|
|
% * This library is free software; you can redistribute it and/or
|
|
|
|
% * modify it under the terms of the GNU Lesser General Public
|
|
|
|
% * License as published by the Free Software Foundation; either
|
|
|
|
% * version 2.1 of the License, or (at your option) any later version.
|
|
|
|
% *
|
|
|
|
% * This library 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
|
|
|
|
% * Lesser General Public License for more details.
|
|
|
|
% *
|
|
|
|
% * You should have received a copy of the GNU Lesser General Public
|
|
|
|
% * License along with this library; if not, write to the Free Software
|
|
|
|
% * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-01-16 16:45:11 +00:00
|
|
|
% *
|
|
|
|
% */
|
|
|
|
|
2011-02-27 21:19:47 +00:00
|
|
|
% #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
|
|
|
|
% /* rpcgen produces code containing unused variables. hush that... */
|
|
|
|
% # pragma GCC diagnostic ignored "-Wunused-variable"
|
|
|
|
% #endif
|
|
|
|
|
2002-01-16 16:45:11 +00:00
|
|
|
/* This gets stuffed into the source files. */
|
|
|
|
#if RPC_HDR
|
2002-09-13 07:01:54 +00:00
|
|
|
%#ifdef HAVE_CONFIG_H
|
|
|
|
%#include "config.h"
|
|
|
|
%#endif
|
2002-01-16 16:45:11 +00:00
|
|
|
%#include <rpc/xdr.h>
|
|
|
|
%#include <hamlib/rotator.h>
|
|
|
|
#endif
|
|
|
|
|
2005-03-28 09:37:24 +00:00
|
|
|
%#if __APPLE__
|
|
|
|
%static int _rpcsvcdirty;
|
|
|
|
%#endif
|
|
|
|
|
2002-01-16 16:45:11 +00:00
|
|
|
/* ************************************************************************* */
|
|
|
|
|
|
|
|
typedef unsigned int model_x;
|
|
|
|
typedef float azimuth_x;
|
|
|
|
typedef float elevation_x;
|
|
|
|
typedef unsigned int rot_reset_x;
|
|
|
|
|
|
|
|
/* ************************************************************************* */
|
|
|
|
|
|
|
|
struct position_arg {
|
|
|
|
azimuth_x az;
|
|
|
|
elevation_x el;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct move_s {
|
|
|
|
int direction;
|
|
|
|
int speed;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ************************************************************************* */
|
|
|
|
|
|
|
|
struct position_s {
|
|
|
|
azimuth_x az;
|
|
|
|
elevation_x el;
|
|
|
|
};
|
|
|
|
union position_res switch (int rotstatus) {
|
|
|
|
case 0:
|
|
|
|
position_s pos;
|
|
|
|
default:
|
|
|
|
void;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ************************************************************************* */
|
|
|
|
|
|
|
|
struct rotstate_s {
|
|
|
|
azimuth_x az_min;
|
|
|
|
azimuth_x az_max;
|
|
|
|
elevation_x el_min;
|
|
|
|
elevation_x el_max;
|
|
|
|
};
|
|
|
|
union rotstate_res switch (int rotstatus) {
|
|
|
|
case 0:
|
|
|
|
rotstate_s state;
|
|
|
|
default:
|
|
|
|
void;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ************************************************************************* */
|
|
|
|
|
|
|
|
program ROTPROG {
|
|
|
|
version ROTVERS {
|
|
|
|
model_x GETMODEL(void) = 1;
|
|
|
|
rotstate_res GETROTSTATE(void) = 3;
|
|
|
|
|
|
|
|
int SETPOSITION(position_s) = 10;
|
|
|
|
position_res GETPOSITION(void) = 11;
|
|
|
|
int STOP(void) = 12;
|
|
|
|
int RESET(rot_reset_x) = 13;
|
2011-08-21 23:35:37 +00:00
|
|
|
int PARK(void) = 14;
|
2002-01-16 16:45:11 +00:00
|
|
|
int MOVE(move_s) = 15;
|
|
|
|
} = 1;
|
|
|
|
} = 0x20000999;
|
|
|
|
|
|
|
|
/* ************************************************************************* */
|
|
|
|
/* end of file */
|
|
|
|
|