Loading...
Searching...
No Matches
Rotator API

## Files

file | rotator.h
| Hamlib rotator data structures.
file | rotlist.h
| Hamlib rotator model definitions.
file | rot_conf.c
| Rotator Configuration Interface.
file | rot_ext.c
| Rotator extension parameters and levels interface.
file | rot_settings.c
| Rotator functions/levels/parameters interface.
file | rotator.c
| Rotator interface.

## Data Structures

struct | rot_caps
| Rotator capability data structure. More...
struct | rot_state
| Rotator state structure. More...
struct | s_rot
| Master rotator structure. More...

## Macros

#define | NETROTCTL_RET "RPRT "
| The token in the netrotctl protocol for returning an error condition code.
#define | ROT_RESET_ALL 1
| A macro that returns the flag for the reset operation.
#define | ROT_TYPE_OTHER 0
| Other type of rotator.
#define | ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
| Azimuth only rotator.
#define | ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
| Elevation only rotator.
#define | ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
| Combination azimuth/elevation rotator.
#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_MOVE_UP_LEFT (1<<5)
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_UP_CCW ROT_MOVE_UP_LEFT
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_UP_RIGHT (1<<6)
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_UP_CW ROT_MOVE_UP_RIGHT
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_DOWN_LEFT (1 << 7)
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_DOWN_CCW ROT_MOVE_DOWN_LEFT
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_DOWN_RIGHT (1 << 8)
| A macro that returns the flag for the clockwise direction.
#define | ROT_MOVE_DOWN_CW ROT_MOVE_DOWN_RIGHT
| A macro that returns the flag for the clockwise direction.
#define | HAMLIB_MAX_ROTOR_STATUS 16
#define | ROT_SPEED_NOCHANGE (-1)
| Macro for not changing the rotator speed with move() function.
#define | ROT_FUNC_NONE 0
| Rotator Function Settings.
#define | ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63)
#define | rot_debug rig_debug
| Convenience macro for generating debugging messages.
#define | ROT_MODEL_NONE 0
| A macro that returns the model number for an unknown model.
#define | ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
| A macro that returns the model number for the DUMMY backend.
#define | ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)
| A macro that returns the model number for the NETROTCTL backend.
#define | ROT_MODEL_PSTROTATOR ROT_MAKE_MODEL(ROT_DUMMY, 3)
#define | ROT_MODEL_SATROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 4)
#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_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
| A macro that returns the model number of the EASYCOMM 3 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 ROTOREZ backend.
#define | ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2)
| A macro that returns the model number of the ROTORCARD 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_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4)
| A macro that returns the model number of the ERC backend.
#define | ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
| A macro that returns the model number of the RT21 backend.
#define | ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
| A macro that returns the model number of the RT21 backend.
#define | ROT_MODEL_YRC1 ROT_MAKE_MODEL(ROT_ROTOREZ, 6)
| A macro that returns the model number of the YRC-1 backend.
#define | ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)
| A macro that returns the model number of the SARTEK1 backend.
#define | ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1)
| A macro that returns the model number of the GS232A backend.
#define | ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */
| A macro that returns the model number of the GS232 backend.
#define | ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3)
| A macro that returns the model number of the GS232B backend.
#define | ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4)
| A macro that returns the model number of the F1TETRACKER backend.
#define | ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5)
| A macro that returns the model number of the GS23 backend.
#define | ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */
| A macro that returns the model number of the GS232 backend.
#define | ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7)
| A macro that returns the model number of the LVB backend.
#define | ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8)
| A macro that returns the model number of the ST2 backend.
#define | ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9)
| A macro that returns the model number of the GS232A_AZ Azimuth backend.
#define | ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10)
| A macro that returns the model number of the GS232A_EL Elevation backend.
#define | ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11)
| A macro that returns the model number of the GS232B_AZ Azimuth backend.
#define | ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)
| A macro that returns the model number of the GS232B_EL Elevation backend.
#define | ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13)
#define | ROT_ARRAYSOLUTIONS 7
#define | ROT_BACKEND ARRAYSOLUTIONS "arraysolutions"
#define | ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1)
#define | ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)
| A macro that returns the model number of the PCROTOR backend.
#define | ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
| A macro that returns the model number of the HD1780 backend.
#define | ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1)
| A macro that returns the model number of the ROT2PROG backend.
#define | ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)
| A macro that returns the model number of the ROT1PROG backend.
#define | ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)
| A macro that returns the model number of the SPID_MD01_ROT2PROG backend.
#define | ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)
| A macro that returns the model number of the RC2800 backend.
#define | ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2)
| A macro that returns the model number of the RC2800_EARLY_AZ backend.
#define | ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3)
| A macro that returns the model number of the RC2800_EARLY_AZEL backend.
#define | ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)
| A macro that returns the model number of the RCI_AZEL backend.
#define | ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)
| A macro that returns the model number of the RCI_AZ backend.
#define | ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)
| A macro that returns the model number of the IF100 backend.
#define | ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)
| A macro that returns the model number of the TS7400 backend.
#define | ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)
| A macro that returns the model number of the NEXSTAR backend.
#define | ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)
| A macro that returns the model number of the ETHER6 backend.
#define | ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)
| A macro that returns the model number of the CNCTRK backend.
#define | ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1)
| A macro that returns the model number of the PROSISTEL_D_AZ backend.
#define | ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2)
| A macro that returns the model number of the PROSISTEL_D_EL backend.
#define | ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3)
| A macro that returns the model number of the PROSISTEL_COMBI_TRACK_AZEL backend.
#define | ROT_MODEL_PROSISTEL_D_EL_CBOXAZ ROT_MAKE_MODEL(ROT_PROSISTEL, 4)
#define | ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1)
| A macro that returns the model number of the MEADE backend.
#define | ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1)
| A macro that returns the model number of the IOPTRON backend.
#define | ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1)
| A macro that returns the model number of the INDI backend.
#define | ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1)
| A macro that returns the model number of the SATEL backend.
#define | ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)
| A macro that returns the model number of the RADANT backend.
#define | ROT_ANDROIDSENSOR 23
#define | ROT_BACKEND_ANDROIDSENSOR "androidsensor"
#define | ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1)
#define | ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1)
| A macro that returns the model number of the ROT_MODEL_GRBLTRK_SER backend.
#define | ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2)
| A macro that returns the model number of the ROT_MODEL_GRBLTRK_NET backend.
#define | ROT_MODEL_FLIR ROT_MAKE_MODEL(ROT_FLIR, 1)
| A macro that returns the model number of the FLIR backend.
#define | ROT_MODEL_APEX_SHARED_LOOP ROT_MAKE_MODEL(ROT_APEX, 1)
| A macro that returns the model number of the APEX backend.
#define | ROT_MODEL_SAEBRTRACK ROT_MAKE_MODEL(ROT_SAEBRTRACK, 1)
| A macro that returns the model number of the SAEBRTRACK backend.
#define | ROT_MODEL_SKYWATCHER ROT_MAKE_MODEL(ROT_SKYWATCHER, 1)
| A macro that returns the model number of the SKYWATCHER backend.

## Typedefs

typedef struct s_rot | ROT
| Main rotator handle type definition.
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 a rotator model.

## Enumerations

enum | rot_type_t { ROT_FLAG_AZIMUTH = (1 << 1) , ROT_FLAG_ELEVATION = (1 << 2) }
| Rotator type flags for bitmasks. More...

enum

rot_status_t {
ROT_STATUS_NONE = 0 , ROT_STATUS_BUSY = (1 << 0) , ROT_STATUS_MOVING = (1 << 1) , ROT_STATUS_MOVING_AZ = (1 << 2) ,
ROT_STATUS_MOVING_LEFT = (1 << 3) , ROT_STATUS_MOVING_RIGHT = (1 << 4) , ROT_STATUS_MOVING_EL = (1 << 5) , ROT_STATUS_MOVING_UP = (1 << 6) ,
ROT_STATUS_MOVING_DOWN = (1 << 7) , ROT_STATUS_LIMIT_UP = (1 << 8) , ROT_STATUS_LIMIT_DOWN = (1 << 9) , ROT_STATUS_LIMIT_LEFT = (1 << 10) ,
ROT_STATUS_LIMIT_RIGHT = (1 << 11) , ROT_STATUS_OVERLAP_UP = (1 << 12) , ROT_STATUS_OVERLAP_DOWN = (1 << 13) , ROT_STATUS_OVERLAP_LEFT = (1 << 14) ,
ROT_STATUS_OVERLAP_RIGHT = (1 << 16)
}

| Rotator status flags. More...
enum | rot_level_e { ROT_LEVEL_NONE = 0 , ROT_LEVEL_SPEED = (1 << 0) , ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63) }
| Rotator Level Settings. More...
enum | rot_parm_e { ROT_PARM_NONE = 0 }
| Rotator Parameters. More...

## Functions

int | 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 configuration parameters table.
const struct confparams * | rot_confparam_lookup (ROT *rot, const char *name)
| Query a rotator configuration parameter token by its name.
hamlib_token_t | rot_token_lookup (ROT *rot, const char *name)
| Search for the token ID associated with a rotator configuration parameter token name.
int | rot_set_conf (ROT *rot, hamlib_token_t token, const char *val)
| Set a rotator configuration parameter.
int | rot_get_conf (ROT *rot, hamlib_token_t token, char *val)
| Query the value of a rotator configuration parameter.
int | rot_get_conf2 (ROT *rot, hamlib_token_t token, char *val, int val_len)
int | rot_ext_func_foreach (ROT *rot, int(*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
| Executes cfunc on all the elements stored in the rot_caps::extfuncs table.
int | rot_ext_level_foreach (ROT *rot, int(*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
| Executes cfunc on all the elements stored in the rot_caps::extlevels extension levels table.
int | rot_ext_parm_foreach (ROT *rot, int(*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
| Executes cfunc on all the elements stored in the rot_caps::extparms extension parameters table.
const struct confparams * | rot_ext_lookup (ROT *rot, const char *name)
| Lookup an extension functions, levels, or parameters token by its name and return a pointer to the containing confparams structure member.
const struct confparams * | rot_ext_lookup_tok (ROT *rot, hamlib_token_t token)
| Searches for an extension levels, functions, or parameters token by its constant value and return a pointer to the confparams structure member.
hamlib_token_t | rot_ext_token_lookup (ROT *rot, const char *name)
| Simple search returning the extension token ID associated with name.
int | rot_set_level (ROT *rot, setting_t level, value_t val)
| Set a rotator level to a given value.
int | rot_get_level (ROT *rot, setting_t level, value_t *val)
| Query the value of a requested rotator level.
int | rot_set_parm (ROT *rot, setting_t parm, value_t val)
| Set a rotator parameter to a given value.
int | rot_get_parm (ROT *rot, setting_t parm, value_t *val)
| Query the value of a requested rotator parameter.
setting_t | rot_has_get_level (ROT *rot, setting_t level)
| Check which rotator level settings can be queried.
setting_t | rot_has_set_level (ROT *rot, setting_t level)
| Query the rotator levels that may be set.
setting_t | rot_has_get_parm (ROT *rot, setting_t parm)
| Check which rotator parameter settings can be queried.
setting_t | rot_has_set_parm (ROT *rot, setting_t parm)
| Query the rotator parameters that may be set.
setting_t | rot_has_get_func (ROT *rot, setting_t func)
| Check which rotator functions can be queried.
setting_t | rot_has_set_func (ROT *rot, setting_t func)
| Query support of rotator functions.
int | rot_set_func (ROT *rot, setting_t func, int status)
| Activate or deactivate functions of a rotator.
int | rot_get_func (ROT *rot, setting_t func, int *status)
| Query the status of functions of the rotator.
int | rot_set_ext_level (ROT *rot, hamlib_token_t token, value_t val)
| Set a rotator extension level to a given value.
int | rot_get_ext_level (ROT *rot, hamlib_token_t token, value_t *val)
| Query the value of a requested rotator extension level.
int | rot_set_ext_func (ROT *rot, hamlib_token_t token, int status)
| Activate or deactivate extension functions of a rotator.
int | rot_get_ext_func (ROT *rot, hamlib_token_t token, int *status)
| Query the status of extension functions of a rotator.
int | rot_set_ext_parm (ROT *rot, hamlib_token_t token, value_t val)
| Set a rotator extension parameter to a given value.
int | rot_get_ext_parm (ROT *rot, hamlib_token_t token, value_t *val)
| Query the value of a requested rotator extension parameter.
ROT * | rot_init (rot_model_t rot_model)
| Allocate a new ROT handle.
int | rot_open (ROT *rot)
| Open the communication channel to the rotator.
int | rot_close (ROT *rot)
| Close the communication channel to the rotator.
int | rot_cleanup (ROT *rot)
| Release a ROT handle and free associated memory.
int | rot_set_position (ROT *rot, azimuth_t azimuth, elevation_t elevation)
| Set the azimuth and elevation of the rotator.
int | rot_get_position (ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
| Query the azimuth and elevation of the rotator.
int | rot_park (ROT *rot)
| Park the rotator.
int | rot_stop (ROT *rot)
| Stop the rotator.
int | rot_reset (ROT *rot, rot_reset_t reset)
| Reset the rotator.
int | rot_move (ROT *rot, int direction, int speed)
| Move the rotator in the specified direction and speed.
const char * | rot_get_info (ROT *rot)
| Get general information from the rotator.
int | rot_get_status (ROT *rot, rot_status_t *status)
| Query status flags of the rotator.
void * | rot_data_pointer (ROT *rot, rig_ptrx_t idx)
| Get the address of rotator data structure(s).

## Detailed Description

### Rotator interface

A rotator can be any kind of azimuth, elevation, or azimuth and elevation controlled antenna system or other such aiming equipment, e.g. telescopes, etc.

## Macro Definition Documentation

## rot_debug

#define rot_debug rig_debug

Convenience macro for generating debugging messages.

This is an alias of the rig_debug() function call and is used in the same manner.

## ROT_FUNC_BIT63

#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63)

Future use, ROT_FUNC items.

## ROT_FUNC_NONE

#define ROT_FUNC_NONE 0

Rotator Function Settings.

Various operating functions supported by a rotator.

`STRING` used in the `rotctl` and `rotctld` utilities.

See also
  rot_parse_func(), rot_strfunc() '' – No Function

## ROT_MODEL_APEX_SHARED_LOOP

#define ROT_MODEL_APEX_SHARED_LOOP ROT_MAKE_MODEL(ROT_APEX, 1)

A macro that returns the model number of the APEX backend.

The APEX backend can be used with APEX * rotators.

## ROT_MODEL_CNCTRK

#define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)

A macro that returns the model number of the CNCTRK backend.

The CNCTRK backend can be used with rotators that support the LinuxCNC running Axis GUI interface.

## ROT_MODEL_DCU

#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3)

A macro that returns the model number of the DCU backend.

The DCU backend can be used with rotators that support the DCU command set by Hy-Gain (currently the DCU-1).

## ROT_MODEL_DUMMY

#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 useful for testing client applications.

## ROT_MODEL_EASYCOMM1

#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1)

A macro that returns the model number of the EASYCOMM 1 backend.

The EASYCOMM1 backend can be used with rotators that support the EASYCOMM I Standard.

## ROT_MODEL_EASYCOMM2

#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2)

A macro that returns the model number of the EASYCOMM 2 backend.

The EASYCOMM2 backend can be used with rotators that support the EASYCOMM II Standard.

## ROT_MODEL_EASYCOMM3

#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)

A macro that returns the model number of the EASYCOMM 3 backend.

The EASYCOMM3 backend can be used with rotators that support the EASYCOMM III Standard.

## ROT_MODEL_ERC

#define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4)

A macro that returns the model number of the ERC backend.

The ERC backend can be used with rotators that support the DCU command set by DF9GR (currently the ERC).

## ROT_MODEL_ETHER6

#define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)

A macro that returns the model number of the ETHER6 backend.

The ETHER6 backend can be used with rotators that support the Ether6 protocol.

## ROT_MODEL_F1TETRACKER

#define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4)

A macro that returns the model number of the F1TETRACKER backend.

The F1TETRACKER backend can be used with rotators that support the F1TE Tracker protocol.

## ROT_MODEL_FLIR

#define ROT_MODEL_FLIR ROT_MAKE_MODEL(ROT_FLIR, 1)

A macro that returns the model number of the FLIR backend.

The FLIR backend can be used with FLIR and DirectedPercepition rotators using the PTU protocol (e.g. PTU-D48). Currently only the serial interface is supported and no ethernet.

## ROT_MODEL_FODTRACK

#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.

## ROT_MODEL_GRBLTRK_NET

#define ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2)

A macro that returns the model number of the ROT_MODEL_GRBLTRK_NET backend.

The GRBLTRK backend can be used with rotators that support the GRBL protocol.

## ROT_MODEL_GRBLTRK_SER

#define ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1)

A macro that returns the model number of the ROT_MODEL_GRBLTRK_SER backend.

The GRBLTRK backend can be used with rotators that support the GRBL protocol.

## ROT_MODEL_GS23

#define ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5)

A macro that returns the model number of the GS23 backend.

The GS23 backend can be used with rotators that support the GS-23 protocol.

## ROT_MODEL_GS232

#define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */

A macro that returns the model number of the GS232 backend.

The GS232 backend can be used with rotators that support the GS-232 protocol.

## ROT_MODEL_GS232_GENERIC

#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */

A macro that returns the model number of the GS232 backend.

The GS232_GENERIC backend can be used with rotators that support the generic (even if not coded correctly) GS-232 protocol.

## ROT_MODEL_GS232A

#define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1)

A macro that returns the model number of the GS232A backend.

The GS232A backend can be used with rotators that support the GS-232A protocol.

## ROT_MODEL_GS232A_AZ

#define ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9)

A macro that returns the model number of the GS232A_AZ Azimuth backend.

The GS232A_AZ backend can be used with azimuth rotators that support the GS-232A protocol.

## ROT_MODEL_GS232A_EL

#define ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10)

A macro that returns the model number of the GS232A_EL Elevation backend.

The GS232A_EL backend can be used with elevation rotators that support the GS-232A protocol.

## ROT_MODEL_GS232B

#define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3)

A macro that returns the model number of the GS232B backend.

The GS232B backend can be used with rotators that support the GS232B protocol.

## ROT_MODEL_GS232B_AZ

#define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11)

A macro that returns the model number of the GS232B_AZ Azimuth backend.

The GS232B_AZ backend can be used with azimuth rotators that support the GS-232B protocol.

## ROT_MODEL_GS232B_EL

#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)

A macro that returns the model number of the GS232B_EL Elevation backend.

The GS232B_EL backend can be used with elevation rotators that support the GS-232B protocol.

## ROT_MODEL_HD1780

#define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)

A macro that returns the model number of the HD1780 backend.

The HD1780 backend can be used with rotators that support the Heathkit HD-1780 protocol.

## ROT_MODEL_IF100

#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)

A macro that returns the model number of the IF100 backend.

The IF100 backend can be used with rotators that support the AMSAT IF-100 interface.

## ROT_MODEL_INDI

#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1)

A macro that returns the model number of the INDI backend.

The INDI backend can be used with rotators that support the INDI interface.

## ROT_MODEL_IOPTRON

#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1)

A macro that returns the model number of the IOPTRON backend.

The IOPTRON backend can be used with IOPTRON telescope mounts.

## ROT_MODEL_LVB

#define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7)

A macro that returns the model number of the LVB backend.

The LVB backend can be used with rotators that support the G6LVB AMSAT LVB Tracker GS-232 based protocol.

## ROT_MODEL_MEADE

#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1)

A macro that returns the model number of the MEADE backend.

The MEADE backend can be used with Meade telescope rotators like the DS-2000.

## ROT_MODEL_NETROTCTL

#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)

A macro that returns the model number for the NETROTCTL backend.

The NETROTCTL backend allows use of the rotctld daemon through the normal Hamlib API.

## ROT_MODEL_NEXSTAR

#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)

A macro that returns the model number of the NEXSTAR backend.

The NEXSTAR backend can be used with rotators that support the Celestron NexStar protocol and alike.

## ROT_MODEL_NONE

#define ROT_MODEL_NONE 0

A macro that returns the model number for an unknown model.

The none backend, as the name suggests, does nothing. It is mainly for internal use.

## ROT_MODEL_PCROTOR

#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)

A macro that returns the model number of the PCROTOR backend.

The PCROTOR backend is a member of the kit backend group that can be used with home brewed rotators.

## ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL

#define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3)

A macro that returns the model number of the PROSISTEL_COMBI_TRACK_AZEL backend.

The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that support the Prosistel combination azimuth and elevation protocol.

## ROT_MODEL_PROSISTEL_D_AZ

#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1)

A macro that returns the model number of the PROSISTEL_D_AZ backend.

The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel azimuth protocol.

## ROT_MODEL_PROSISTEL_D_EL

#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2)

A macro that returns the model number of the PROSISTEL_D_EL backend.

The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel elevation protocol.

## ROT_MODEL_RADANT

#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)

A macro that returns the model number of the RADANT backend.

The RADANT backend can be used with rotators that support the MS232 interface.

## ROT_MODEL_RC2800

#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)

A macro that returns the model number of the RC2800 backend.

The RC2800 backend can be used with rotators that support the M2 (M Squared) RC2800 protocol.

## ROT_MODEL_RC2800_EARLY_AZ

#define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2)

A macro that returns the model number of the RC2800_EARLY_AZ backend.

The RC2800_EARLY_AZ backend can be used with rotators that support the M2 (M Squared) RC2800 early azimuth protocol.

## ROT_MODEL_RC2800_EARLY_AZEL

#define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3)

A macro that returns the model number of the RC2800_EARLY_AZEL backend.

The RC2800_EARLY_AZEL backend can be used with rotators that support the M2 (M Squared) RC2800 early azimuth and elevation protocol.

## ROT_MODEL_RCI_AZ

#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)

A macro that returns the model number of the RCI_AZ backend.

The RCI_AZ backend can be used with rotators that support the ARS azimuth protocol.

## ROT_MODEL_RCI_AZEL

#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)

A macro that returns the model number of the RCI_AZEL backend.

The RCI_AZEL backend can be used with rotators that support the ARS azimuth and elevation protocol.

## ROT_MODEL_ROTORCARD

#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2)

A macro that returns the model number of the ROTORCARD backend.

The ROTORCARD backend can be used with Yaesu rotators that support the extended DCU command set by the Idiom Press Rotor Card board.

## ROT_MODEL_ROTOREZ

#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1)

A macro that returns the model number of the ROTOREZ backend.

The ROTOREZ backend can be used with Hy-Gain rotators that support the extended DCU command set by the Idiom Press Rotor-EZ board.

## ROT_MODEL_RT21 [1/2]

#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)

A macro that returns the model number of the RT21 backend.

The RT21 backend can be used with rotators that support the DCU command set by Green Heron (currently the RT-21).

## ROT_MODEL_RT21 [2/2]

#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)

A macro that returns the model number of the RT21 backend.

The RT21 backend can be used with rotators that support the DCU command set by Green Heron (currently the RT-21).

## ROT_MODEL_SAEBRTRACK

#define ROT_MODEL_SAEBRTRACK ROT_MAKE_MODEL(ROT_SAEBRTRACK, 1)

A macro that returns the model number of the SAEBRTRACK backend.

The SAEBRTRACK backend can be used with SAEBRTRACK * rotators.

## ROT_MODEL_SARTEK1

#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)

A macro that returns the model number of the SARTEK1 backend.

The SARTEK1 backend can be used with rotators that support the SARtek protocol.

## ROT_MODEL_SATEL

#define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1)

A macro that returns the model number of the SATEL backend.

The SATEL backend can be used with rotators that support the VE5FP interface.

## ROT_MODEL_SKYWATCHER

#define ROT_MODEL_SKYWATCHER ROT_MAKE_MODEL(ROT_SKYWATCHER, 1)

A macro that returns the model number of the SKYWATCHER backend.

The SKYWATCHER backend can be used with SKYWATCHER * rotators.

## ROT_MODEL_SPID_MD01_ROT2PROG

#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)

A macro that returns the model number of the SPID_MD01_ROT2PROG backend.

The SPID_MD01_ROT2PROG backend can be used with rotators that support the extended SPID ROT2PROG azimuth and elevation protocol.

## ROT_MODEL_SPID_ROT1PROG

#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)

A macro that returns the model number of the ROT1PROG backend.

The SPID_ROT1PROG backend can be used with rotators that support the SPID azimuth protocol.

## ROT_MODEL_SPID_ROT2PROG

#define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1)

A macro that returns the model number of the ROT2PROG backend.

The SPID_ROT2PROG backend can be used with rotators that support the SPID azimuth and elevation protocol.

## ROT_MODEL_ST2

#define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8)

A macro that returns the model number of the ST2 backend.

The ST2 backend can be used with rotators that support the Fox Delta ST2 GS-232 based protocol.

## ROT_MODEL_TS7400

#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)

A macro that returns the model number of the TS7400 backend.

The TS7400 backend supports an embedded ARM board using the TS-7400 Linux board. More information is at https://www.embeddedarm.com

## ROT_MODEL_YRC1

#define ROT_MODEL_YRC1 ROT_MAKE_MODEL(ROT_ROTOREZ, 6)

A macro that returns the model number of the YRC-1 backend.

The YRC1 backend can be used with rotators that support the DCU 2/3 command set

## ROT_MOVE_CCW

#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.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, ROT_MOVE_CW

## ROT_MOVE_CW

#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 which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_RIGHT.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT

## ROT_MOVE_DOWN

#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.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW

## ROT_MOVE_DOWN_CCW

#define ROT_MOVE_DOWN_CCW ROT_MOVE_DOWN_LEFT

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_DOWN_LEFT.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW

## ROT_MOVE_DOWN_CW

#define ROT_MOVE_DOWN_CW ROT_MOVE_DOWN_RIGHT

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_DOWN_RIGHT.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT,

## ROT_MOVE_DOWN_LEFT

#define ROT_MOVE_DOWN_LEFT (1 << 7)

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_DOWN_CCW.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW

## ROT_MOVE_DOWN_RIGHT

#define ROT_MOVE_DOWN_RIGHT (1 << 8)

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_DOWN_CW.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_CW

## ROT_MOVE_LEFT

#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.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW

## ROT_MOVE_RIGHT

#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.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_CW

## ROT_MOVE_UP

#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.

See also
  rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW

## ROT_MOVE_UP_CCW

#define ROT_MOVE_UP_CCW ROT_MOVE_UP_LEFT

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_UP_LEFT.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW

## ROT_MOVE_UP_CW

#define ROT_MOVE_UP_CW ROT_MOVE_UP_RIGHT

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_UP_RIGHT.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW

## ROT_MOVE_UP_LEFT

#define ROT_MOVE_UP_LEFT (1<<5)

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_UP_CCW.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW

## ROT_MOVE_UP_RIGHT

#define ROT_MOVE_UP_RIGHT (1<<6)

A macro that returns the flag for the clockwise direction.

This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_UP_CW.

See also
  rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, ROT_MOVE_CW, ROT_MOVE_UP_LEFT, ROT_MOVE_UP_CCW, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW

## ROT_RESET_ALL

#define ROT_RESET_ALL 1

A macro that returns the flag for the reset operation.

See also
  rot_reset(), rot_reset_t

## Typedef Documentation

## azimuth_t

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.

## elevation_t

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.

## ROT

typedef struct s_rot ROT

Main rotator handle type definition.

The ROT handle is returned by rot_init() and is passed as a parameter to every rotator specific API call.

rot_cleanup() must be called when this handle is no longer needed.

## rot_reset_t

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.

## Enumeration Type Documentation

## rot_level_e

enum rot_level_e

Rotator Level Settings.

Various operating levels supported by a rotator.

`STRING` used in the `rotctl` and `rotctld` utilities.

See also
  rot_parse_level(), rot_strlevel()

Enumerator
ROT_LEVEL_NONE | '' – No Level.
ROT_LEVEL_SPEED | `SPEED` – Rotation speed, arg int (default range 1-100 if not specified).
ROT_LEVEL_63 | Future use, last level.

## rot_parm_e

enum rot_parm_e

Rotator Parameters.

Parameters are settings that are not related to core rotator functionality, i.e. antenna rotation.

`STRING` used in the `rotctl` and `rotctld` utilities.

See also
  rot_parse_parm(), rot_strparm()

Enumerator
ROT_PARM_NONE | '' – No Parm

## rot_status_t

enum rot_status_t

Rotator status flags.

Enumerator
ROT_STATUS_NONE | '' – No status.
ROT_STATUS_BUSY | Rotator is busy, not accepting commands.
ROT_STATUS_MOVING | Rotator is currently moving (direction type not specified).
ROT_STATUS_MOVING_AZ | Azimuth rotator is currently moving (direction not specified).
ROT_STATUS_MOVING_LEFT | Azimuth rotator is currently moving left.
ROT_STATUS_MOVING_RIGHT | Azimuth rotator is currently moving right.
ROT_STATUS_MOVING_EL | Elevation rotator is currently moving (direction not specified).
ROT_STATUS_MOVING_UP | Elevation rotator is currently moving up.
ROT_STATUS_MOVING_DOWN | Elevation rotator is currently moving down.
ROT_STATUS_LIMIT_UP | The elevation rotator has reached its limit to move up.
ROT_STATUS_LIMIT_DOWN | The elevation rotator has reached its limit to move down.
ROT_STATUS_LIMIT_LEFT | The azimuth rotator has reached its limit to move left (CCW).
ROT_STATUS_LIMIT_RIGHT | The azimuth rotator has reached its limit to move right (CW).
ROT_STATUS_OVERLAP_UP | The elevation rotator has rotated up past 360 degrees.
ROT_STATUS_OVERLAP_DOWN | The elevation rotator has rotated down past 0 degrees.
ROT_STATUS_OVERLAP_LEFT | The azimuth rotator has rotated left (CCW) past 0 degrees.
ROT_STATUS_OVERLAP_RIGHT | The azimuth rotator has rotated right (CW) past 360 degrees.

## rot_type_t

enum rot_type_t

Rotator type flags for bitmasks.

Enumerator
ROT_FLAG_AZIMUTH | Azimuth
ROT_FLAG_ELEVATION | Elevation

## Function Documentation

## rot_cleanup()

int rot_cleanup | ( | ROT * | rot | ) |

Release a ROT handle and free associated memory.

Parameters

  rot | The ROT handle to be released.

Releases a ROT handle for which the communication channel has been closed with rot_close().

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | ROT handle successfully released.
  RIG_EINVAL | rot is NULL or inconsistent.

See also
  rot_init(), rot_close()

## rot_close()

int rot_close | ( | ROT * | rot | ) |

Close the communication channel to the rotator.

Parameters

  rot | The ROT handle of the rotator to be closed.

Closes the communication channel to a rotator for which ROT handle has been passed by argument that was previously opened with rot_open().

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | Communication channel successfully closed.
  RIG_EINVAL | rot is NULL or inconsistent.

See also
  rot_cleanup(), rot_open()

## rot_confparam_lookup()

const struct confparams * rot_confparam_lookup | ( | ROT * | rot,
|  | const char * | name )

Query a rotator configuration parameter token by its name.

Parameters

  rot | The ROT handle.
  name | Configuration parameter token name string.

Returns
  confparams or NULL

Use this function to get a pointer to the token in the confparams structure. Searches the backend config params table first, then falls back to the frontend config params table.

Returns
  A pointer to the token in the confparams structure or NULL if rot is NULL or inconsistent or if name is not found (how can the caller know which occurred?).

See also
  rot_token_lookup()

TODO: Should use Lex to speed it up, strcmp() hurts!

## rot_data_pointer()

void * rot_data_pointer | ( | ROT * | rot,
|  | rig_ptrx_t | idx )

Get the address of rotator data structure(s).

See also
  rig_data_pointer

## rot_ext_func_foreach()

int rot_ext_func_foreach | ( | ROT * | rot,
|  | int(* | cfunc )(ROT *, const struct confparams *, rig_ptr_t),
|  | rig_ptr_t | data )

Executes cfunc on all the elements stored in the rot_caps::extfuncs table.

Parameters

  rot | The ROT handle.
  cfunc | Callback function of each rot_caps::extfunc.
  data | Cookie to be passed to the callback function cfunc.

The callback cfunc is called until it returns a value which is not strictly positive.

Returns
  A zero value means a normal end of iteration, or a negative value which means an abnormal end.

Return values

  RIG_OK | All extension functions elements successfully processed.
  RIG_EINVAL | rot or cfunc is NULL or inconsistent.

## rot_ext_level_foreach()

int rot_ext_level_foreach | ( | ROT * | rot,
|  | int(* | cfunc )(ROT *, const struct confparams *, rig_ptr_t),
|  | rig_ptr_t | data )

Executes cfunc on all the elements stored in the rot_caps::extlevels extension levels table.

Parameters

  rot | The ROT handle.
  cfunc | Callback function of each rot_caps::extlevels.
  data | Cookie to be passed to the callback function cfunc.

The callback cfunc is called until it returns a value which is not strictly positive.

Returns
  A zero value which means a normal end of iteration, or a negative value which means an abnormal end.

Return values

  RIG_OK | All extension levels elements successfully processed.
  RIG_EINVAL | rot or cfunc is NULL or inconsistent.

## rot_ext_lookup()

const struct confparams * rot_ext_lookup | ( | ROT * | rot,
|  | const char * | name )

Lookup an extension functions, levels, or parameters token by its name and return a pointer to the containing confparams structure member.

Parameters

  rot | The ROT handle.
  name | The extension functions, levels, or parameters token name.

Searches the rot_caps::extlevels, rot_caps::extfuncs and the rot_caps::extparms tables in order for the token by its name.

Note
  As this function is called by rot_ext_token_lookup(), it can be considered a lower level API.

Returns
  A pointer to the containing confparams structure member or NULL if nothing found or if rot is NULL or inconsistent.

See also
  rot_ext_token_lookup()

Todo
  Should use Lex to speed it up, strcmp() hurts!

## rot_ext_lookup_tok()

const struct confparams * rot_ext_lookup_tok | ( | ROT * | rot,
|  | hamlib_token_t | token )

Searches for an extension levels, functions, or parameters token by its constant value and return a pointer to the confparams structure member.

Parameters

  rot | The ROT handle.
  token | The token value (constant).

Searches the rot_caps::extlevels, rot_caps::extfuncs, and the rot_caps::extparms tables in order for the token by its constant value.

Returns
  A pointer to the containing confparams structure member or NULL if nothing found or if rot is NULL or inconsistent.

## rot_ext_parm_foreach()

int rot_ext_parm_foreach | ( | ROT * | rot,
|  | int(* | cfunc )(ROT *, const struct confparams *, rig_ptr_t),
|  | rig_ptr_t | data )

Executes cfunc on all the elements stored in the rot_caps::extparms extension parameters table.

Parameters

  rot | The ROT handle.
  cfunc | callback function of each rot_caps::extparms.
  data | Cookie to be passed to the callback function cfunc.

The callback function cfunc is called until it returns a value which is not strictly positive.

Returns
  A zero value which means a normal end of iteration, or a negative value which means an abnormal end.

Return values

  RIG_OK | All extension parameters elements successfully processed.
  RIG_EINVAL | rot or cfunc is NULL or inconsistent.

## rot_ext_token_lookup()

hamlib_token_t rot_ext_token_lookup | ( | ROT * | rot,
|  | const char * | name )

Simple search returning the extension token ID associated with name.

Parameters

  rot | The ROT handle.
  name | The token name string to search.

Note
  As this function calls rot_ext_lookup(), it can be considered a higher level API.

Returns
  The token ID or RIG_CONF_END if there is a lookup failure.

See also
  rot_ext_lookup()

## rot_get_conf()

int rot_get_conf | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | char * | val )

Query the value of a rotator configuration parameter.

Parameters

  rot | The ROT handle.
  token | The token of the parameter to query.
  val | The location where to store the value of the configuration token.

Retrieves the value of a configuration parameter associated with token.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | Querying the parameter was successful.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_conf() capability is not available.

See also
  rot_set_conf()

## rot_get_ext_func()

int rot_get_ext_func | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | int * | status )

Query the status of extension functions of a rotator.

Parameters

  rot | The ROT handle.
  token | The extension function to query the status.
  status | The variable to store the extension function status.

Retrieves the status (On or Off) of an extension function of the rotator. Upon return, status will hold the status of the extension function. The value pointed to by the status argument is not NULL for "On", or "Off" otherwise, much as TRUE or FALSE boolean definitions in the C language.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The extension function status was queried successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_ext_func() capability is not available or token is not supported.

See also
  rot_set_ext_func()

## rot_get_ext_level()

int rot_get_ext_level | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | value_t * | val )

Query the value of a requested rotator extension level.

Parameters

  rot | The ROT handle.
  token | The extension level token.
  val | The location where to store the value of token.

Query the val corresponding to the extension level token.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The extension level was queried successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_ext_level() capability is not available.

See also
  rot_set_ext_level()

## rot_get_ext_parm()

int rot_get_ext_parm | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | value_t * | val )

Query the value of a requested rotator extension parameter.

Parameters

  rot | The ROT handle.
  token | The extension parameter to query the status.
  val | The variable to store the extension parameter status.

Query the val corresponding to the extension parameter token.

Note
  val can be any type defined by value_t.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The extension parameter was queried successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_ext_parm() capability is not available.

See also
  rot_set_ext_parm()

## rot_get_func()

int rot_get_func | ( | ROT * | rot,
|  | setting_t | func,
|  | int * | status )

Query the status of functions of the rotator.

Parameters

  rot | The ROT handle.
  func | The function to query the status.
  status | The variable to store the function status.

Retrieves the status (On or Off) of a function of the rotator. Upon return, status will hold the status of the function. The value pointed to by the status argument is not NULL for "On", or "Off" otherwise, much as TRUE or FALSE boolean definitions in the C language.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The function status was queried successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_func() capability is not available or func is not supported.

See also
  rot_set_func()

## rot_get_info()

const char * rot_get_info | ( | ROT * | rot | ) |

Get general information from the rotator.

Parameters

  rot | The ROT handle.

Retrieves some general information from the rotator. This can include firmware revision, exact model name, or just nothing.

Returns
  A pointer to static memory containing an ASCII nul terminated string (C string) if the operation has been successful, otherwise NULL if rot is NULL or inconsistent or the rot_caps::get_info() capability is not available.

## rot_get_level()

int rot_get_level | ( | ROT * | rot,
|  | setting_t | level,
|  | value_t * | val )

Query the value of a requested rotator level.

Parameters

  rot | The ROT handle.
  level | The requested level.
  val | The variable to store the level value.

Query the val corresponding to the level.

Note
  val can be any type defined by value_t.
  As this function calls rot_has_get_level(), this may be considered a higher level API.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The query was successful.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_level() capability is not available.

See also
  rot_has_get_level(), rot_set_level()

## rot_get_parm()

int rot_get_parm | ( | ROT * | rot,
|  | setting_t | parm,
|  | value_t * | val )

Query the value of a requested rotator parameter.

Parameters

  rot | The ROT handle.
  parm | The requested parameter.
  val | The variable to store the parm value.

Query the val corresponding to the parm.

Note
  val can be any type defined by value_t.
  As this function calls rot_has_get_parm(), this may be considered a higher level API.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The parameter was queried successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_parm() capability is not available.

See also
  rot_has_get_parm(), rot_set_parm()

## rot_get_position()

int rot_get_position | ( | ROT * | rot,
|  | azimuth_t * | azimuth,
|  | elevation_t * | elevation )

Query the azimuth and elevation of the rotator.

Parameters

  rot | The ROT handle.
  azimuth | The variable to store the current azimuth.
  elevation | The variable to store the current elevation

Retrieves the current azimuth and elevation values of the rotator. The stored values are in decimal degrees.

Note: A given rotator may be capable of querying only the azimuth or only the elevation or both. The rotator backend should store a value of 0 in the unsupported variable.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | Either or both parameters queried and stored successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_position() capability is not available.

See also
  rot_set_position()

## rot_get_status()

int rot_get_status | ( | ROT * | rot,
|  | rot_status_t * | status )

Query status flags of the rotator.

Parameters

  rot | The ROT handle.
  status | The variable where the status flags will be stored.

Query the active status flags from the rotator.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The query was successful.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_status() capability is not available.

## rot_has_get_func()

setting_t rot_has_get_func | ( | ROT * | rot,
|  | setting_t | func )

Check which rotator functions can be queried.

Parameters

  rot | The ROT handle.
  func | The functions bitmap.

Checks if a rotator supports a set of functions. Since func is an OR'ed bitwise argument, more than one function can be checked at the same time.

EXAMPLE:

if (rot_has_get_func(my_rig, RIG_FUNC_NONE))
do_something();
RIG_FUNC_NONE
#define RIG_FUNC_NONE
Rig Function Settings.
Definition rig.h:1250
rot_has_get_func
setting_t rot_has_get_func(ROT *rot, setting_t func)
Check which rotator functions can be queried.
Definition rot_settings.c:397

Note
  As this function is called by rot_get_func(), this may be considered a lower level API.

Returns
  A bit map of supported functions that can be retrieved, otherwise 0 if none supported or rot is NULL or inconsistent.

See also
  rot_get_func(), rot_has_set_func()

## rot_has_get_level()

setting_t rot_has_get_level | ( | ROT * | rot,
|  | setting_t | level )

Check which rotator level settings can be queried.

Parameters

  rot | The ROT handle.
  level | The level settings bitmap.

Checks if a rotator is capable of getting a level setting. Since level is an OR'ed bitwise argument, more than one level can be checked at the same time.

EXAMPLE:

if (rot_has_get_level(my_rot, ROT_LEVEL_SPEED))
my_get_speed(&my_speed);
rot_has_get_level
setting_t rot_has_get_level(ROT *rot, setting_t level)
Check which rotator level settings can be queried.
Definition rot_settings.c:248
ROT_LEVEL_SPEED
@ ROT_LEVEL_SPEED
Definition rotator.h:386

Note
  As this function is called by rot_get_level(), this may be considered a lower level API.

Returns
  A bit map of supported level settings that can be retrieved, otherwise 0 if none supported or rot is NULL or inconsistent.

See also
  rot_get_level(), rot_has_set_level()

## rot_has_get_parm()

setting_t rot_has_get_parm | ( | ROT * | rot,
|  | setting_t | parm )

Check which rotator parameter settings can be queried.

Parameters

  rot | The ROT handle.
  parm | The parameter settings bitmap.

Checks if a rotator is capable of getting a parameter setting. Since parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.

EXAMPLE:

if (rot_has_get_parm(my_rot, ROT_PARM_NONE))
my_get_parms(&parms);
rot_has_get_parm
setting_t rot_has_get_parm(ROT *rot, setting_t parm)
Check which rotator parameter settings can be queried.
Definition rot_settings.c:324
ROT_PARM_NONE
@ ROT_PARM_NONE
Definition rotator.h:417

Note
  As this function is called by rot_get_parm(), this may be considered a lower level API.

Returns
  A bit map of supported parameter settings that can be retrieved, otherwise 0 if none supported or rot is NULL or inconsistent.

See also
  rot_get_parm(), rot_has_set_parm()

## rot_has_set_func()

setting_t rot_has_set_func | ( | ROT * | rot,
|  | setting_t | func )

Query support of rotator functions.

Parameters

  rot | The ROT handle.
  func | The functions bitmap.

Checks if a rotator supports a set of functions. Since func is an OR'ed bitwise argument, more than one function can be checked at the same time.

EXAMPLE:

if (rot_has_set_func(my_rig, RIG_FUNC_NONE))
do_this_func(my_func);
rot_has_set_func
setting_t rot_has_set_func(ROT *rot, setting_t func)
Query support of rotator functions.
Definition rot_settings.c:434

Note
  As this function is called by rot_set_func(), this may be considered a lower level API.

Returns
  A bit map of supported functions that can be set, otherwise 0 if none supported or rot is NULL or inconsistent.

See also
  rot_set_func(), rot_has_get_func()

## rot_has_set_level()

setting_t rot_has_set_level | ( | ROT * | rot,
|  | setting_t | level )

Query the rotator levels that may be set.

Parameters

  rot | The ROT handle.
  level | The level settings bitmap.

Checks if a rotator can set a level setting. Since level is an OR'ed bitwise argument, more than one level can be checked at the same time.

EXAMPLE:

if (rot_has_set_level(my_rot, ROT_LEVEL_SPEED))
my_set_speed(MEDIUM);
rot_has_set_level
setting_t rot_has_set_level(ROT *rot, setting_t level)
Query the rotator levels that may be set.
Definition rot_settings.c:286

Note
  As this function is called by rot_set_level(), this may be considered a lower level API.

Returns
  A bit map of supported level settings that can be set, otherwise 0 if none supported or rot is NULL or inconsistent.

See also
  rot_set_level(), rot_has_get_level()

## rot_has_set_parm()

setting_t rot_has_set_parm | ( | ROT * | rot,
|  | setting_t | parm )

Query the rotator parameters that may be set.

Parameters

  rot | The ROT handle.
  parm | The parameter settings bitmap.

Checks if a rotator can set a parameter setting. Since parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.

EXAMPLE:

if (rot_has_set_parm(my_rig, ROT_PARM_NONE))
my_set_parm(parameter);
rot_has_set_parm
setting_t rot_has_set_parm(ROT *rot, setting_t parm)
Query the rotator parameters that may be set.
Definition rot_settings.c:361

Note
  As this function is called by rot_set_parm(), this may be considered a lower level API.

Returns
  A bit map of supported parameter settings that can be set, otherwise 0 if none supported or rot is NULL or inconsistent.

See also
  rot_set_parm(), rot_has_get_parm()

## rot_init()

ROT * rot_init | ( | rot_model_t | rot_model | ) |

Allocate a new ROT handle.

Parameters

  rot_model | The rotator model for this new handle.

Allocates a new ROT handle and initializes the associated data for rot_model (see rotlist.h or rigctl -l).

Returns
  a pointer to the ROT handle otherwise NULL if memory allocation failed or rot_model is unknown, e.g. backend autoload failed.

See also
  rot_cleanup(), rot_open()

Todo
  Read the Preferences here!

## rot_move()

int rot_move | ( | ROT * | rot,
|  | int | direction,
|  | int | speed )

Move the rotator in the specified direction and speed.

Parameters

  rot | The ROT handle.
  direction | Direction of movement.
  speed | Speed of movement.

Move the rotator in the specified direction. The direction is one of ROT_MOVE_CCW, ROT_MOVE_CW, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_UP_LEFT, ROT_MOVE_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW. The speed is a value between 1 and 100 or ROT_SPEED_NOCHANGE.

Return values

  RIG_OK | The rotator move was successful.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::move() capability is not available.

See also
  rot_stop()

## rot_open()

int rot_open | ( | ROT * | rot | ) |

Open the communication channel to the rotator.

Parameters

  rot | The ROT handle of the rotator to be opened.

Opens the communication channel to a rotator for which the ROT handle has been passed.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | Communication channel successfully opened.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENIMPL | Communication port type is not implemented yet.

See also
  rot_init(), rot_close()

## rot_park()

int rot_park | ( | ROT * | rot | ) |

Park the rotator.

Parameters

  rot | The ROT handle.

Park the rotator in a predetermined position as implemented by the rotator hardware.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The rotator was parked successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::park() capability is not available.

## rot_reset()

int rot_reset | ( | ROT * | rot,
|  | rot_reset_t | reset )

Reset the rotator.

Parameters

  rot | The ROT handle.
  reset | The reset operation to perform

Resets the rotator to a state determined by reset.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The rotator was reset successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::reset() capability is not available.

## rot_set_conf()

int rot_set_conf | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | const char * | val )

Set a rotator configuration parameter.

Parameters

  rot | The ROT handle.
  token | The token of the parameter to set.
  val | The value to set the parameter to.

Sets a rotator configuration parameter to val.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The parameter was set successfully.
  RIG_EINVAL | rot is NULL or inconsistent or token is invalid.
  RIG_ENAVAIL | rot_caps::set_conf() capability is not available.

See also
  rot_get_conf()

## rot_set_ext_func()

int rot_set_ext_func | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | int | status )

Activate or deactivate extension functions of a rotator.

Parameters

  rot | The ROT handle.
  token | The extension function to activate or deactivate.
  status | The status (On or Off) to set.

Activate or deactivate an extension function of the rotator.

The status argument is a value that is not NULL for "activate", "deactivate" otherwise, much as TRUE or FALSE boolean definitions in the C language.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The extension function status was set successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::get_ext_func() capability is not available.

See also
  rot_get_ext_func()

## rot_set_ext_level()

int rot_set_ext_level | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | value_t | val )

Set a rotator extension level to a given value.

Parameters

  rot | The ROT handle.
  token | The extension level token.
  val | The value of the extension level.

Set extension level token to val.

Note
  val can be any type defined by value_t.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The extension level was set successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::set_ext_level() capability is not available.

See also
  rot_get_ext_level()

## rot_set_ext_parm()

int rot_set_ext_parm | ( | ROT * | rot,
|  | hamlib_token_t | token,
|  | value_t | val )

Set a rotator extension parameter to a given value.

Parameters

  rot | The ROT handle.
  token | The extension parameter token.
  val | The value of the extension parameter.

Set an extension parameter token to val.

Note
  val can be any type defined by value_t.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The extension parameter was set successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::set_ext_parm() capability is not available.

See also
  rot_get_ext_parm()

## rot_set_func()

int rot_set_func | ( | ROT * | rot,
|  | setting_t | func,
|  | int | status )

Activate or deactivate functions of a rotator.

Parameters

  rot | The ROT handle.
  func | The function to activate or deactivate.
  status | The status (On or Off) to set.

Activate or deactivate a function of the rotator.

The status argument is a value that is not NULL for "activate", "deactivate" otherwise, much as TRUE or FALSE boolean definitions in the C language.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The function was activated or deactivated successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::set_func() capability is not available or func is not supported.

See also
  rot_get_func()

## rot_set_level()

int rot_set_level | ( | ROT * | rot,
|  | setting_t | level,
|  | value_t | val )

Set a rotator level to a given value.

Parameters

  rot | The ROT handle.
  level | The level to set.
  val | The value of the level.

Set level to val.

Note
  val can be any type defined by value_t.
  As this function calls rot_has_set_level(), this may be considered a higher level API.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | Setting the level was successful.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::set_level() capability is not available.

See also
  rot_has_set_level(), rot_get_level()

## rot_set_parm()

int rot_set_parm | ( | ROT * | rot,
|  | setting_t | parm,
|  | value_t | val )

Set a rotator parameter to a given value.

Parameters

  rot | The ROT handle.
  parm | The parameter to set.
  val | The value of the parameter.

Sets parm to val.

Note
  val can be any type defined by value_t.
  As this function calls rot_has_set_parm(), this may be considered a higher level API.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The parameter was set successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::set_parm() capability is not available.

See also
  rot_has_set_parm(), rot_get_parm()

## rot_set_position()

int rot_set_position | ( | ROT * | rot,
|  | azimuth_t | azimuth,
|  | elevation_t | elevation )

Set the azimuth and elevation of the rotator.

Parameters

  rot | The ROT handle.
  azimuth | The azimuth to set in decimal degrees.
  elevation | The elevation to set in decimal degrees.

Sets the azimuth and elevation of the rotator.

Note: A given rotator may be capable of setting only the azimuth or only the elevation or both. The rotator backend will ignore the unneeded parameter.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | Either or both parameters set successfully.
  RIG_EINVAL | rot is NULL or inconsistent or either azimuth or elevation is out of range for this rotator.
  RIG_ENAVAIL | rot_caps::set_position() capability is not available.

See also
  rot_get_position()

## rot_stop()

int rot_stop | ( | ROT * | rot | ) |

Stop the rotator.

Parameters

  rot | The ROT handle.

Stop the rotator. Command should be immediate.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The rotator was stopped successfully.
  RIG_EINVAL | rot is NULL or inconsistent.
  RIG_ENAVAIL | rot_caps::stop() capability is not available.

See also
  rot_move()

## rot_token_foreach()

int 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 configuration parameters table.

Parameters

  rot | The ROT handle.
  cfunc | Pointer to the callback function(...).
  data | Data for the callback function.

Start first with backend configuration parameters table, then finish with frontend configuration parameters table.

Returns
  RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values

  RIG_OK | The cfunc action completed successfully.
  RIG_EINVAL | rot is NULL or inconsistent or cfunc is NULL.

## rot_token_lookup()

hamlib_token_t rot_token_lookup | ( | ROT * | rot,
|  | const char * | name )

Search for the token ID associated with a rotator configuration parameter token name.

Parameters

  rot | The ROT handle.
  name | Configuration parameter token name string.

Searches the backend and frontend configuration parameters tables for the token ID.

Returns
  The token ID value or RIG_CONF_END if the lookup failed.

See also
  rot_confparam_lookup()