Data Structures | |
struct | rot_caps |
Rotator data structure. More... | |
struct | rot_state |
Live data and customized fields. More... | |
struct | rot |
This is the master data structure, acting as a handle for the controlled rotator. More... | |
Files | |
file | rot_conf.c |
Rotator Configuration Interface. | |
file | rotator.c |
Rotator interface. | |
file | rotator.h |
Hamlib rotator data structures. | |
file | rotlist.h |
Hamlib rotator model definitions. | |
Defines | |
#define | NETROTCTL_RET "RPRT " |
Token in the netrotctl protocol for returning error code. | |
#define | ROT_RESET_ALL 1 |
A macro that returns the flag for the reset operation. | |
#define | ROT_FLAG_AZIMUTH (1<<1) |
A macro that returns the azimuth flag. | |
#define | ROT_FLAG_ELEVATION (1<<2) |
A macro that returns the elevation flag. | |
#define | ROT_MOVE_UP (1<<1) |
A macro that returns the flag for the UP direction. | |
#define | ROT_MOVE_DOWN (1<<2) |
A macro that returns the flag for the DOWN direction. | |
#define | ROT_MOVE_LEFT (1<<3) |
A macro that returns the flag for the LEFT direction. | |
#define | ROT_MOVE_CCW ROT_MOVE_LEFT |
A macro that returns the flag for the counterclockwise direction. | |
#define | ROT_MOVE_RIGHT (1<<4) |
A macro that returns the flag for the RIGHT direction. | |
#define | ROT_MOVE_CW ROT_MOVE_RIGHT |
A macro that returns the flag for the clockwise direction. | |
#define | rot_debug rig_debug |
Convenience definition for debug level. | |
#define | ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) |
A macro that returns the model number for the dummy backend. | |
#define | ROT_MODEL_RPC ROT_MAKE_MODEL(ROT_RPC, 1) |
A macro that returns the model number of the RPC Network pseudo-backend. | |
#define | ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1) |
A macro that returns the model number of the EasyComm 1 backend. | |
#define | ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2) |
A macro that returns the model number of the EasyComm 2 backend. | |
#define | ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) |
A macro that returns the model number of the Fodtrack backend. | |
#define | ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1) |
A macro that returns the model number of the Rotor-EZ backend. | |
#define | ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) |
A macro that returns the model number of the Rotor Card backend. | |
#define | ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3) |
A macro that returns the model number of the DCU backend. | |
#define | ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) |
A macro that returns the model number of the SARtek-1 backend. | |
#define | ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) |
A macro that returns the model number of the GS-232A backend. | |
#define | ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) |
A macro that returns the model number of the PcRotor/WA6UFQ backend. | |
#define | ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1) |
A macro that returns the model number of the HD 1780 backend. | |
#define | ROT_BACKEND_LIST |
Static list of rotator models. | |
Typedefs | |
typedef struct rot | ROT |
Rotator structure definition (see rot for details). | |
typedef float | elevation_t |
Type definition for elevation. | |
typedef float | azimuth_t |
Type definition for azimuth. | |
typedef int | rot_reset_t |
Type definition for rotator reset. | |
typedef int | rot_model_t |
Convenience type definition for rotator model. | |
Functions | |
int | frontrot_set_conf (ROT *rot, token_t token, const char *val) |
Set rotator state info from alpha input. | |
int | frontrot_get_conf (ROT *rot, token_t token, char *val) |
Get data from rotator state in alpha form. | |
int HAMLIB_API | rot_token_foreach (ROT *rot, int(*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data) |
Executes cfunc on all the elements stored in the conf table. | |
struct confparams *HAMLIB_API | rot_confparam_lookup (ROT *rot, const char *name) |
lookup conf token by its name, return pointer to confparams struct. | |
token_t HAMLIB_API | rot_token_lookup (ROT *rot, const char *name) |
Simple lookup returning token id associated with name. | |
int | foreach_opened_rot (int(*cfunc)(ROT *, rig_ptr_t), rig_ptr_t data) |
execs cfunc() on each opened rot | |
ROT *HAMLIB_API | rot_init (rot_model_t rot_model) |
allocate a new ROT handle | |
int HAMLIB_API | rot_open (ROT *rot) |
open the communication to the rot | |
int HAMLIB_API | rot_close (ROT *rot) |
close the communication to the rot | |
int HAMLIB_API | rot_cleanup (ROT *rot) |
release a rot handle and free associated memory | |
int HAMLIB_API | rot_set_conf (ROT *rot, token_t token, const char *val) |
set a rotator configuration parameter | |
int HAMLIB_API | rot_get_conf (ROT *rot, token_t token, char *val) |
get the value of a configuration parameter | |
int HAMLIB_API | rot_set_position (ROT *rot, azimuth_t azimuth, elevation_t elevation) |
set the azimuth and elevation of the rotator | |
int HAMLIB_API | rot_get_position (ROT *rot, azimuth_t *azimuth, elevation_t *elevation) |
get the azimuth and elevation of the rotator | |
int HAMLIB_API | rot_park (ROT *rot) |
park the antenna | |
int HAMLIB_API | rot_stop (ROT *rot) |
stop the rotator | |
int HAMLIB_API | rot_reset (ROT *rot, rot_reset_t reset) |
reset the rotator | |
int HAMLIB_API | rot_move (ROT *rot, int direction, int speed) |
move the rotator in the specified direction | |
const char *HAMLIB_API | rot_get_info (ROT *rot) |
get general information from the rotator |
Rotator can be any kind of azimuth or azimuth and elevation controlled antenna system.
#define ROT_BACKEND_LIST |
{ \
{ ROT_DUMMY, ROT_BACKEND_DUMMY }, \
{ ROT_RPC, ROT_BACKEND_RPC }, \
{ ROT_EASYCOMM, ROT_BACKEND_EASYCOMM }, \
{ ROT_FODTRACK, ROT_BACKEND_FODTRACK }, \
{ ROT_ROTOREZ, ROT_BACKEND_ROTOREZ }, \
{ ROT_SARTEK, ROT_BACKEND_SARTEK }, \
{ ROT_GS232A, ROT_BACKEND_GS232A }, \
{ ROT_KIT, ROT_BACKEND_KIT }, \
{ ROT_HEATHKIT, ROT_BACKEND_HEATHKIT }, \
{ 0, NULL }, /* end */ \
}
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.
#define rot_debug rig_debug |
#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3) |
A macro that returns the model number of the DCU backend.
The Rotor-EZ backend can be used with rotators that support the DCU command set by Hy-Gain (currently the DCU-1).
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) |
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.
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1) |
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.
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2) |
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.
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) |
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_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) |
A macro that returns the model number of the GS-232A backend.
The GS-232A backend can be used with rotators that support the GS-232A protocol.
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) |
A macro that returns the model number of the PcRotor/WA6UFQ backend.
The kit backend can be used with home brewed rotators.
#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) |
A macro that returns the model number of the Rotor Card backend.
The Rotor-EZ backend can be used with Yaesu rotators that support the extended DCU command set by Idiom Press Rotor Card board.
#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1) |
A macro that returns the model number of the Rotor-EZ backend.
The Rotor-EZ backend can be used with Hy-Gain rotators that support the extended DCU command set by Idiom Press Rotor-EZ board.
#define ROT_MODEL_RPC ROT_MAKE_MODEL(ROT_RPC, 1) |
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, rpc.rotd
, running on a remote machine. Using this client/server scheme, several clients can control and monitor the same rotator hardware.
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) |
A macro that returns the model number of the SARtek-1 backend.
The sartek backend can be used with rotators that support the SARtek protocol.
#define ROT_MOVE_CCW ROT_MOVE_LEFT |
A macro that returns the flag for the counterclockwise direction.
This macro defines the value of the counterclockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_LEFT .
#define ROT_MOVE_CW ROT_MOVE_RIGHT |
A macro that returns the flag for the clockwise direction.
This macro defines the value of the clockwise direction wich can be used with the rot_move() function. This value is equivalent to ROT_MOVE_RIGHT .
#define ROT_MOVE_DOWN (1<<2) |
A macro that returns the flag for the DOWN direction.
This macro defines the value of the DOWN direction which can be used with the rot_move() function.
#define ROT_MOVE_LEFT (1<<3) |
A macro that returns the flag for the LEFT direction.
This macro defines the value of the LEFT direction which can be used with the rot_move function.
#define ROT_MOVE_RIGHT (1<<4) |
A macro that returns the flag for the RIGHT direction.
This macro defines the value of the RIGHT direction which can be used with the rot_move() function.
#define ROT_MOVE_UP (1<<1) |
A macro that returns the flag for the UP direction.
This macro defines the value of the UP direction which can be used with the rot_move() function.
#define ROT_RESET_ALL 1 |
A macro that returns the flag for the reset operation.
typedef float azimuth_t |
Type definition for azimuth.
The azimuth_t type is used as parameter for the rot_set_position() and rot_get_position() functions.
Unless specified otherwise, the unit of azimuth_t is decimal degrees.
typedef float elevation_t |
Type definition for elevation.
The elevation_t type is used as parameter for the rot_set_position() and rot_get_position() functions.
Unless specified otherwise, the unit of elevation_t is decimal degrees.
typedef int rot_reset_t |
Type definition for rotator reset.
The rot_reset_t type is used as parameter for the rot_reset() API function.
int foreach_opened_rot | ( | int(*)(ROT *, rig_ptr_t) | cfunc, | |
rig_ptr_t | data | |||
) |
execs cfunc() on each opened rot
cfunc | The function to be executed on each rot | |
data | Data pointer to be passed to cfunc() |
Calls cfunc() function for each opened rot. The contents of the opened rot table is processed in random order according to a function pointed to by cfunc, whic is called with two arguments, the first pointing to the ROT handle, the second to a data pointer data. If data is not needed, then it can be set to NULL. The processing of the opened rot table is stopped when cfunc() returns 0.
Get data from rotator state in alpha form.
rot | non-null | |
token | TOK_... specifying which data to get | |
val | result non-null |
Set rotator state info from alpha input.
rot | ||
token | TOK_... specifying which info to set | |
val | input |
assumes rot!=NULL, val!=NULL
int HAMLIB_API rot_cleanup | ( | ROT * | rot | ) |
release a rot handle and free associated memory
Releases a rot struct which port has eventualy been closed already with rot_close().
int HAMLIB_API rot_close | ( | ROT * | rot | ) |
close the communication to the rot
Closes communication to a rotator which ROT handle has been passed by argument that was previously open with rot_open().
struct confparams* HAMLIB_API rot_confparam_lookup | ( | ROT * | rot, | |
const char * | name | |||
) | [read] |
lookup conf token by its name, return pointer to confparams struct.
rot | ||
name |
lookup backend config table first, then fall back to frontend. TODO: should use Lex to speed it up, strcmp hurts!
get the value of a configuration parameter
rot | The rot handle | |
token | The parameter | |
val | The location where to store the value of config token |
Retrieves the value of a configuration paramter associated with token.
const char* HAMLIB_API rot_get_info | ( | ROT * | rot | ) |
get general information from the rotator
Retrieves some general information from the rotator. This can include firmware revision, exact model name, or just nothing.
int HAMLIB_API rot_get_position | ( | ROT * | rot, | |
azimuth_t * | azimuth, | |||
elevation_t * | elevation | |||
) |
get the azimuth and elevation of the rotator
rot | The rot handle | |
azimuth | The location where to store the current azimuth | |
elevation | The location where to store the current elevation |
Retrieves the current azimuth and elevation of the rotator.
ROT* HAMLIB_API rot_init | ( | rot_model_t | rot_model | ) |
allocate a new ROT handle
rot_model | The rot model for this new handle |
Allocates a new ROT handle and initializes the associated data for rot_model.
int HAMLIB_API rot_move | ( | ROT * | rot, | |
int | direction, | |||
int | speed | |||
) |
int HAMLIB_API rot_open | ( | ROT * | rot | ) |
open the communication to the rot
Opens communication to a rotator which ROT handle has been passed by argument.
RIG_EINVAL | rot is NULL or unconsistent. | |
RIG_ENIMPL | port type communication is not implemented yet. |
int HAMLIB_API rot_park | ( | ROT * | rot | ) |
int HAMLIB_API rot_reset | ( | ROT * | rot, | |
rot_reset_t | reset | |||
) |
set a rotator configuration parameter
Sets a configuration parameter.
int HAMLIB_API rot_set_position | ( | ROT * | rot, | |
azimuth_t | azimuth, | |||
elevation_t | elevation | |||
) |
set the azimuth and elevation of the rotator
Sets the azimuth and elevation of the rotator.
int HAMLIB_API rot_stop | ( | ROT * | rot | ) |
int HAMLIB_API rot_token_foreach | ( | ROT * | rot, | |
int(*)(const struct confparams *, rig_ptr_t) | cfunc, | |||
rig_ptr_t | data | |||
) |
Executes cfunc on all the elements stored in the conf table.
rot | non-null | |
cfunc | function(..) | |
data | start first with backend conf table, then finish with frontend table |
Hamlib documentation for version 1.2.9 -- Thu Feb 18 15:20:49 2010
Project page: http://hamlib.org