Hamlib  4.3
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Files | Data Structures | Macros | Typedefs | Enumerations | Functions
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. More...
 
#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. More...
 
#define ROT_MOVE_DOWN   (1<<2)
 A macro that returns the flag for the DOWN direction. More...
 
#define ROT_MOVE_LEFT   (1<<3)
 A macro that returns the flag for the LEFT direction. More...
 
#define ROT_MOVE_CCW   ROT_MOVE_LEFT
 A macro that returns the flag for the counterclockwise direction. More...
 
#define ROT_MOVE_RIGHT   (1<<4)
 A macro that returns the flag for the RIGHT direction. More...
 
#define ROT_MOVE_CW   ROT_MOVE_RIGHT
 A macro that returns the flag for the clockwise direction. More...
 
#define ROT_SPEED_NOCHANGE   (-1)
 Macro for not changing the rotator speed with move() function.
 
#define ROT_FUNC_NONE   0
 Rotator Function Settings. More...
 
#define ROT_FUNC_BIT63   CONSTANT_64BIT_FLAG (63)
 
#define rot_debug   rig_debug
 Convenience macro for generating debugging messages. More...
 
#define ROT_MODEL_NONE   0
 A macro that returns the model number for an unknown model. More...
 
#define ROT_MODEL_DUMMY   ROT_MAKE_MODEL(ROT_DUMMY, 1)
 A macro that returns the model number for the DUMMY backend. More...
 
#define ROT_MODEL_NETROTCTL   ROT_MAKE_MODEL(ROT_DUMMY, 2)
 A macro that returns the model number for the NETROTCTL backend. More...
 
#define ROT_MODEL_EASYCOMM1   ROT_MAKE_MODEL(ROT_EASYCOMM, 1)
 A macro that returns the model number of the EASYCOMM 1 backend. More...
 
#define ROT_MODEL_EASYCOMM2   ROT_MAKE_MODEL(ROT_EASYCOMM, 2)
 A macro that returns the model number of the EASYCOMM 2 backend. More...
 
#define ROT_MODEL_EASYCOMM3   ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
 A macro that returns the model number of the EASYCOMM 3 backend. More...
 
#define ROT_MODEL_FODTRACK   ROT_MAKE_MODEL(ROT_FODTRACK, 1)
 A macro that returns the model number of the FODTRACK backend. More...
 
#define ROT_MODEL_ROTOREZ   ROT_MAKE_MODEL(ROT_ROTOREZ, 1)
 A macro that returns the model number of the ROTOREZ backend. More...
 
#define ROT_MODEL_ROTORCARD   ROT_MAKE_MODEL(ROT_ROTOREZ, 2)
 A macro that returns the model number of the ROTORCARD backend. More...
 
#define ROT_MODEL_DCU   ROT_MAKE_MODEL(ROT_ROTOREZ, 3)
 A macro that returns the model number of the DCU backend. More...
 
#define ROT_MODEL_ERC   ROT_MAKE_MODEL(ROT_ROTOREZ, 4)
 A macro that returns the model number of the ERC backend. More...
 
#define ROT_MODEL_RT21   ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
 A macro that returns the model number of the RT21 backend. More...
 
#define ROT_MODEL_SARTEK1   ROT_MAKE_MODEL(ROT_SARTEK, 1)
 A macro that returns the model number of the SARTEK1 backend. More...
 
#define ROT_MODEL_GS232A   ROT_MAKE_MODEL(ROT_GS232A, 1)
 A macro that returns the model number of the GS232A backend. More...
 
#define ROT_MODEL_GS232_GENERIC   ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */
 A macro that returns the model number of the GS232 backend. More...
 
#define ROT_MODEL_GS232B   ROT_MAKE_MODEL(ROT_GS232A, 3)
 A macro that returns the model number of the GS232B backend. More...
 
#define ROT_MODEL_F1TETRACKER   ROT_MAKE_MODEL(ROT_GS232A, 4)
 A macro that returns the model number of the F1TETRACKER backend. More...
 
#define ROT_MODEL_GS23   ROT_MAKE_MODEL(ROT_GS232A, 5)
 A macro that returns the model number of the GS23 backend. More...
 
#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. More...
 
#define ROT_MODEL_LVB   ROT_MAKE_MODEL(ROT_GS232A, 7)
 A macro that returns the model number of the LVB backend. More...
 
#define ROT_MODEL_ST2   ROT_MAKE_MODEL(ROT_GS232A, 8)
 A macro that returns the model number of the ST2 backend. More...
 
#define ROT_MODEL_GS232A_AZ   ROT_MAKE_MODEL(ROT_GS232A, 9)
 A macro that returns the model number of the GS232A_AZ Azimuth backend. More...
 
#define ROT_MODEL_GS232A_EL   ROT_MAKE_MODEL(ROT_GS232A, 10)
 A macro that returns the model number of the GS232A_EL Elevation backend. More...
 
#define ROT_MODEL_GS232B_AZ   ROT_MAKE_MODEL(ROT_GS232A, 11)
 A macro that returns the model number of the GS232B_AZ Azimuth backend. More...
 
#define ROT_MODEL_GS232B_EL   ROT_MAKE_MODEL(ROT_GS232A, 12)
 A macro that returns the model number of the GS232B_EL Elevation backend. More...
 
#define ROT_MODEL_PCROTOR   ROT_MAKE_MODEL(ROT_KIT, 1)
 A macro that returns the model number of the PCROTOR backend. More...
 
#define ROT_MODEL_HD1780   ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
 A macro that returns the model number of the HD1780 backend. More...
 
#define ROT_MODEL_SPID_ROT2PROG   ROT_MAKE_MODEL(ROT_SPID, 1)
 A macro that returns the model number of the ROT2PROG backend. More...
 
#define ROT_MODEL_SPID_ROT1PROG   ROT_MAKE_MODEL(ROT_SPID, 2)
 A macro that returns the model number of the ROT1PROG backend. More...
 
#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. More...
 
#define ROT_MODEL_RC2800   ROT_MAKE_MODEL(ROT_M2, 1)
 A macro that returns the model number of the RC2800 backend. More...
 
#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. More...
 
#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. More...
 
#define ROT_MODEL_RCI_AZEL   ROT_MAKE_MODEL(ROT_ARS, 1)
 A macro that returns the model number of the RCI_AZEL backend. More...
 
#define ROT_MODEL_RCI_AZ   ROT_MAKE_MODEL(ROT_ARS, 2)
 A macro that returns the model number of the RCI_AZ backend. More...
 
#define ROT_MODEL_IF100   ROT_MAKE_MODEL(ROT_AMSAT, 1)
 A macro that returns the model number of the IF100 backend. More...
 
#define ROT_MODEL_TS7400   ROT_MAKE_MODEL(ROT_TS7400, 1)
 A macro that returns the model number of the TS7400 backend. More...
 
#define ROT_MODEL_NEXSTAR   ROT_MAKE_MODEL(ROT_CELESTRON, 1)
 A macro that returns the model number of the NEXSTAR backend. More...
 
#define ROT_MODEL_ETHER6   ROT_MAKE_MODEL(ROT_ETHER6, 1)
 A macro that returns the model number of the ETHER6 backend. More...
 
#define ROT_MODEL_CNCTRK   ROT_MAKE_MODEL(ROT_CNCTRK, 1)
 A macro that returns the model number of the CNCTRK backend. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#define ROT_MODEL_MEADE   ROT_MAKE_MODEL(ROT_MEADE, 1)
 A macro that returns the model number of the MEADE backend. More...
 
#define ROT_MODEL_IOPTRON   ROT_MAKE_MODEL(ROT_IOPTRON, 1)
 A macro that returns the model number of the IOPTRON backend. More...
 
#define ROT_MODEL_INDI   ROT_MAKE_MODEL(ROT_INDI, 1)
 A macro that returns the model number of the INDI backend. More...
 
#define ROT_MODEL_SATEL   ROT_MAKE_MODEL(ROT_SATEL, 1)
 A macro that returns the model number of the SATEL backend. More...
 
#define ROT_MODEL_RADANT   ROT_MAKE_MODEL(ROT_RADANT, 1)
 A macro that returns the model number of the RADANT backend. More...
 

Typedefs

typedef struct s_rot ROT
 Main rotator handle type definition. More...
 
typedef float elevation_t
 Type definition for elevation. More...
 
typedef float azimuth_t
 Type definition for azimuth. More...
 
typedef int rot_reset_t
 Type definition for rotator reset. More...
 
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. More...
 
const struct confparamsrot_confparam_lookup (ROT *rot, const char *name)
 Query a rotator configuration parameter token by its name. More...
 
token_t rot_token_lookup (ROT *rot, const char *name)
 Search for the token ID associated with a rotator configuration parameter token name. More...
 
int rot_set_conf (ROT *rot, token_t token, const char *val)
 Set a rotator configuration parameter. More...
 
int rot_get_conf (ROT *rot, token_t token, char *val)
 Query the value of a rotator configuration parameter. More...
 
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. More...
 
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. More...
 
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. More...
 
const struct confparamsrot_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. More...
 
const struct confparamsrot_ext_lookup_tok (ROT *rot, 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. More...
 
token_t rot_ext_token_lookup (ROT *rot, const char *name)
 Simple search returning the extension token ID associated with name. More...
 
int rot_set_level (ROT *rot, setting_t level, value_t val)
 Set a rotator level to a given value. More...
 
int rot_get_level (ROT *rot, setting_t level, value_t *val)
 Query the value of a requested rotator level. More...
 
int rot_set_parm (ROT *rot, setting_t parm, value_t val)
 Set a rotator parameter to a given value. More...
 
int rot_get_parm (ROT *rot, setting_t parm, value_t *val)
 Query the value of a requested rotator parameter. More...
 
setting_t rot_has_get_level (ROT *rot, setting_t level)
 Check which rotator level settings can be queried. More...
 
setting_t rot_has_set_level (ROT *rot, setting_t level)
 Query the rotator levels that may be set. More...
 
setting_t rot_has_get_parm (ROT *rot, setting_t parm)
 Check which rotator parameter settings can be queried. More...
 
setting_t rot_has_set_parm (ROT *rot, setting_t parm)
 Query the rotator parameters that may be set. More...
 
setting_t rot_has_get_func (ROT *rot, setting_t func)
 Check which rotator functions can be queried. More...
 
setting_t rot_has_set_func (ROT *rot, setting_t func)
 Query support of rotator functions. More...
 
int rot_set_func (ROT *rot, setting_t func, int status)
 Activate or deactivate functions of a rotator. More...
 
int rot_get_func (ROT *rot, setting_t func, int *status)
 Query the status of functions of the rotator. More...
 
int rot_set_ext_level (ROT *rot, token_t token, value_t val)
 Set a rotator extension level to a given value. More...
 
int rot_get_ext_level (ROT *rot, token_t token, value_t *val)
 Query the value of a requested rotator extension level. More...
 
int rot_set_ext_func (ROT *rot, token_t token, int status)
 Activate or deactivate extension functions of a rotator. More...
 
int rot_get_ext_func (ROT *rot, token_t token, int *status)
 Query the status of extension functions of a rotator. More...
 
int rot_set_ext_parm (ROT *rot, token_t token, value_t val)
 Set a rotator extension parameter to a given value. More...
 
int rot_get_ext_parm (ROT *rot, token_t token, value_t *val)
 Query the value of a requested rotator extension parameter. More...
 
ROTrot_init (rot_model_t rot_model)
 Allocate a new ROT handle. More...
 
int rot_open (ROT *rot)
 Open the communication channel to the rotator. More...
 
int rot_close (ROT *rot)
 Close the communication channel to the rotator. More...
 
int rot_cleanup (ROT *rot)
 Release a ROT handle and free associated memory. More...
 
int rot_set_position (ROT *rot, azimuth_t azimuth, elevation_t elevation)
 Set the azimuth and elevation of the rotator. More...
 
int rot_get_position (ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
 Query the azimuth and elevation of the rotator. More...
 
int rot_park (ROT *rot)
 Park the rotator. More...
 
int rot_stop (ROT *rot)
 Stop the rotator. More...
 
int rot_reset (ROT *rot, rot_reset_t reset)
 Reset the rotator. More...
 
int rot_move (ROT *rot, int direction, int speed)
 Move the rotator in the specified direction and speed. More...
 
const char * rot_get_info (ROT *rot)
 Get general information from the rotator. More...
 
int rot_get_status (ROT *rot, rot_status_t *status)
 Query status flags of the rotator. More...
 

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_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_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_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

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

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

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
rotThe 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_OKROT handle successfully released.
RIG_EINVALrot 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
rotThe 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_OKCommunication channel successfully closed.
RIG_EINVALrot 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
rotThe ROT handle.
nameConfiguration 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_ext_func_foreach()

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

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

Parameters
rotThe ROT handle.
cfuncCallback function of each rot_caps::extfunc.
dataCookie 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_OKAll extension functions elements successfully processed.
RIG_EINVALrot or cfunc is NULL or inconsistent.

◆ rot_ext_level_foreach()

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

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

Parameters
rotThe ROT handle.
cfuncCallback function of each rot_caps::extlevels.
dataCookie 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_OKAll extension levels elements successfully processed.
RIG_EINVALrot 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
rotThe ROT handle.
nameThe 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,
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
rotThe ROT handle.
tokenThe 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(*)(ROT *, const struct confparams *, rig_ptr_t)  cfunc,
rig_ptr_t  data 
)

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

Parameters
rotThe ROT handle.
cfunccallback function of each rot_caps::extparms.
dataCookie 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_OKAll extension parameters elements successfully processed.
RIG_EINVALrot or cfunc is NULL or inconsistent.

◆ rot_ext_token_lookup()

token_t rot_ext_token_lookup ( ROT rot,
const char *  name 
)

Simple search returning the extension token ID associated with name.

Parameters
rotThe ROT handle.
nameThe 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,
token_t  token,
char *  val 
)

Query the value of a rotator configuration parameter.

Parameters
rotThe ROT handle.
tokenThe token of the parameter to query.
valThe 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_OKQuerying the parameter was successful.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_caps::get_conf() capability is not available.
See also
rot_set_conf()

◆ rot_get_ext_func()

int rot_get_ext_func ( ROT rot,
token_t  token,
int *  status 
)

Query the status of extension functions of a rotator.

Parameters
rotThe ROT handle.
tokenThe extension function to query the status.
statusThe 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_OKThe extension function status was queried successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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,
token_t  token,
value_t val 
)

Query the value of a requested rotator extension level.

Parameters
rotThe ROT handle.
tokenThe extension level token.
valThe 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_OKThe extension level was queried successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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,
token_t  token,
value_t val 
)

Query the value of a requested rotator extension parameter.

Parameters
rotThe ROT handle.
tokenThe extension parameter to query the status.
valThe 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_OKThe extension parameter was queried successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
funcThe function to query the status.
statusThe 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_OKThe function status was queried successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe 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 inconsisten 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
rotThe ROT handle.
levelThe requested level.
valThe 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_OKThe query was successful.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
parmThe requested parameter.
valThe 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_OKThe parameter was queried successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
azimuthThe variable to store the current azimuth.
elevationThe 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_OKEither or both parameters queried and stored successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
statusThe 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_OKThe query was successful.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
funcThe 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:

do_something();
#define RIG_FUNC_NONE
Rig Function Settings.
Definition: rig.h:1075
setting_t rot_has_get_func(ROT *rot, setting_t func)
Check which rotator functions can be queried.
Definition: rot_settings.c:404
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
rotThe ROT handle.
levelThe 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:

my_get_speed(&my_speed);
setting_t rot_has_get_level(ROT *rot, setting_t level)
Check which rotator level settings can be queried.
Definition: rot_settings.c:255
@ ROT_LEVEL_SPEED
Definition: rotator.h:263
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
rotThe ROT handle.
parmThe 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:

my_get_parms(&parms);
setting_t rot_has_get_parm(ROT *rot, setting_t parm)
Check which rotator parameter settings can be queried.
Definition: rot_settings.c:331
@ ROT_PARM_NONE
Definition: rotator.h:294
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
rotThe ROT handle.
funcThe 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:

do_this_func(my_func);
setting_t rot_has_set_func(ROT *rot, setting_t func)
Query support of rotator functions.
Definition: rot_settings.c:441
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
rotThe ROT handle.
levelThe 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:

my_set_speed(MEDIUM);
setting_t rot_has_set_level(ROT *rot, setting_t level)
Query the rotator levels that may be set.
Definition: rot_settings.c:293
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
rotThe ROT handle.
parmThe 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:

my_set_parm(parameter);
setting_t rot_has_set_parm(ROT *rot, setting_t parm)
Query the rotator parameters that may be set.
Definition: rot_settings.c:368
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_modelThe 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
rotThe ROT handle.
directionDirection of movement.
speedSpeed 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, or ROT_MOVE_DOWN. The speed is a value between 1 and 100 or ROT_SPEED_NOCHANGE.

Return values
RIG_OKThe rotator move was successful.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe 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_OKCommunication channel succesfully opened.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENIMPLCommunication port type is not implemented yet.
See also
rot_init(), rot_close()

◆ rot_park()

int rot_park ( ROT rot)

Park the rotator.

Parameters
rotThe 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_OKThe rotator was parked successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_caps::park() capability is not available.

◆ rot_reset()

int rot_reset ( ROT rot,
rot_reset_t  reset 
)

Reset the rotator.

Parameters
rotThe ROT handle.
resetThe 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_OKThe rotator was reset successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_caps::reset() capability is not available.

◆ rot_set_conf()

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

Set a rotator configuration parameter.

Parameters
rotThe ROT handle.
tokenThe token of the parameter to set.
valThe 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_OKThe parameter was set successfully.
RIG_EINVALrot is NULL or inconsistent or token is invalid.
RIG_ENAVAILrot_caps::set_conf() capability is not available.
See also
rot_get_conf()

◆ rot_set_ext_func()

int rot_set_ext_func ( ROT rot,
token_t  token,
int  status 
)

Activate or deactivate extension functions of a rotator.

Parameters
rotThe ROT handle.
tokenThe extension function to activate or deactivate.
statusThe 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_OKThe extension function status was set successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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,
token_t  token,
value_t  val 
)

Set a rotator extension level to a given value.

Parameters
rotThe ROT handle.
tokenThe extension level token.
valThe 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_OKThe extension level was set successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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,
token_t  token,
value_t  val 
)

Set a rotator extension parameter to a given value.

Parameters
rotThe ROT handle.
tokenThe extension parameter token.
valThe 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_OKThe extension parameter was set successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
funcThe function to activate or deactivate.
statusThe 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_OKThe function was activated or deactivated successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
levelThe level to set.
valThe 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_OKSetting the level was successful.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
parmThe parameter to set.
valThe 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_OKThe parameter was set successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_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
rotThe ROT handle.
azimuthThe azimuth to set in decimal degress.
elevationThe 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_OKEither or both parameters set successfully.
RIG_EINVALrot is NULL or inconsistent or either azimuth or elevation is out of range for this rotator.
RIG_ENAVAILrot_caps::set_position() capability is not available.
See also
rot_get_position()

◆ rot_stop()

int rot_stop ( ROT rot)

Stop the rotator.

Parameters
rotThe 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_OKThe rotator was stopped successfully.
RIG_EINVALrot is NULL or inconsistent.
RIG_ENAVAILrot_caps::stop() capability is not available.
See also
rot_move()

◆ rot_token_foreach()

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

Parameters
rotThe ROT handle.
cfuncPointer to the callback function(...).
dataData 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_OKThe cfunc action completed successfully.
RIG_EINVALrot is NULL or inconsistent or cfunc is NULL.

◆ rot_token_lookup()

token_t rot_token_lookup ( ROT rot,
const char *  name 
)

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

Parameters
rotThe ROT handle.
nameConfiguration 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()