Hamlib 4.7~git
Loading...
Searching...
No Matches
Rotator API

Files

file  rot_state.h
 Hamlib rotator data structures.
file  rotator.h
 Hamlib rotator data structures.
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_state
 Rotator state structure. More...
struct  rot_caps
 Rotator capability data structure. More...
struct  s_rot
 Master rotator structure. More...

Macros

#define HAMLIB_ROTSTATE(r)
#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 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_MODEL(arg)
#define rot_debug   rig_debug
 Convenience macro for generating debugging messages.

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.

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 confparamsrot_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 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.
const struct confparamsrot_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.
ROTrot_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

◆ HAMLIB_ROTSTATE

#define HAMLIB_ROTSTATE ( r)
Value:
((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE))
void * rot_data_pointer(ROT *rot, rig_ptrx_t idx)
Get the address of rotator data structure(s)
Definition rotator.c:1090
Rotator state structure.
Definition rot_state.h:54

Macro for application access to rot_state data structure using the ROT handle

Example code.

ROT *my_rot;
//Instantiate a rotator
my_rot = rot_init(ROT_MODEL_DUMMY); // your rot (rotator) model.
const struct rot_state *my_rs = HAMLIB_ROTSTATE(my_rot);
struct s_rot ROT
Main rotator handle type definition.
Definition rotator.h:63
#define HAMLIB_ROTSTATE(r)
Definition rot_state.h:113
ROT * rot_init(rot_model_t rot_model)
Allocate a new ROT handle.
Definition rotator.c:214
#define ROT_MODEL_DUMMY
A macro that returns the model number for DUMMY.
Definition rotlist.h:123

◆ 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

#define ROT_MODEL ( arg)
Value:
.rot_model=arg,.macro_name=#arg

Convenience macro to map the rot_model number and macro_name string from rotlist.h.

Used when populating a backend rot_caps structure.

◆ 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

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()
Here is the call graph for this function:

◆ 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()
Here is the call graph for this function:

◆ 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_data_pointer()

void * rot_data_pointer ( ROT * rot,
rig_ptrx_t idx )

Get the address of rotator data structure(s)

See also
amp_data_pointer(), 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
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.
Here is the call graph for this function:

◆ 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
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.
Here is the call graph for this function:

◆ 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!
Here is the call graph for this function:

◆ 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
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.
Here is the call graph for this function:

◆ 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
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.
Here is the call graph for this function:

◆ 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
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()
Here is the call graph for this function:

◆ rot_get_conf()

int rot_get_conf ( ROT * rot,
hamlib_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,
hamlib_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()
Here is the call graph for this function:

◆ 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
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()
Here is the call graph for this function:

◆ 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
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()
Here is the call graph for this function:

◆ 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()
Here is the call graph for this function:

◆ 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 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
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()
Here is the call graph for this function:

◆ 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()
Here is the call graph for this function:

◆ 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:1280
setting_t rot_has_get_func(ROT *rot, setting_t func)
Check which rotator functions can be queried.
Definition rot_settings.c:396
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:247
@ ROT_LEVEL_SPEED
Definition rotator.h:366
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:323
@ ROT_PARM_NONE
Definition rotator.h:397
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()
Here is the call graph for this function:

◆ 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:433
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()
Here is the call graph for this function:

◆ 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:285
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:360
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()
Here is the call graph for this function:

◆ 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, 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_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 successfully opened.
-RIG_EINVALrot is NULL or inconsistent.
-RIG_ENIMPLCommunication port type is not implemented yet.
See also
rot_init(), rot_close()
Here is the call graph for this function:

◆ 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,
hamlib_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()
Here is the call graph for this function:

◆ 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
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()
Here is the call graph for this function:

◆ 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
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()
Here is the call graph for this function:

◆ 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
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()
Here is the call graph for this function:

◆ 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()
Here is the call graph for this function:

◆ 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()
Here is the call graph for this function:

◆ 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()
Here is the call graph for this function:

◆ 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 degrees.
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(* cfunc )(const struct confparams *, rig_ptr_t),
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()

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
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()
Here is the call graph for this function: