![]() |
Hamlib 4.7~git
|
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 confparams * | rot_confparam_lookup (ROT *rot, const char *name) |
Query a rotator configuration parameter token by its name. | |
hamlib_token_t | rot_token_lookup (ROT *rot, const char *name) |
Search for the token ID associated with a rotator configuration parameter token name. | |
int | rot_set_conf (ROT *rot, hamlib_token_t token, const char *val) |
Set a rotator configuration parameter. | |
int | rot_get_conf (ROT *rot, hamlib_token_t token, char *val) |
Query the value of a rotator configuration parameter. | |
int | rot_get_conf2 (ROT *rot, hamlib_token_t token, char *val, int val_len) |
int | rot_ext_func_foreach (ROT *rot, int(*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data) |
Executes cfunc on all the elements stored in the rot_caps::extfuncs table. | |
int | rot_ext_level_foreach (ROT *rot, int(*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data) |
Executes cfunc on all the elements stored in the rot_caps::extlevels extension levels table. | |
int | rot_ext_parm_foreach (ROT *rot, int(*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data) |
Executes cfunc on all the elements stored in the rot_caps::extparms extension parameters table. | |
const struct confparams * | rot_ext_lookup (ROT *rot, const char *name) |
Lookup an extension functions, levels, or parameters token by its name and return a pointer to the containing confparams structure member. | |
const struct confparams * | rot_ext_lookup_tok (ROT *rot, hamlib_token_t token) |
Searches for an extension levels, functions, or parameters token by its constant value and return a pointer to the confparams structure member. | |
hamlib_token_t | rot_ext_token_lookup (ROT *rot, const char *name) |
Simple search returning the extension token ID associated with name. | |
int | rot_set_level (ROT *rot, setting_t level, value_t val) |
Set a rotator level to a given value. | |
int | rot_get_level (ROT *rot, setting_t level, value_t *val) |
Query the value of a requested rotator level. | |
int | rot_set_parm (ROT *rot, setting_t parm, value_t val) |
Set a rotator parameter to a given value. | |
int | rot_get_parm (ROT *rot, setting_t parm, value_t *val) |
Query the value of a requested rotator parameter. | |
setting_t | rot_has_get_level (ROT *rot, setting_t level) |
Check which rotator level settings can be queried. | |
setting_t | rot_has_set_level (ROT *rot, setting_t level) |
Query the rotator levels that may be set. | |
setting_t | rot_has_get_parm (ROT *rot, setting_t parm) |
Check which rotator parameter settings can be queried. | |
setting_t | rot_has_set_parm (ROT *rot, setting_t parm) |
Query the rotator parameters that may be set. | |
setting_t | rot_has_get_func (ROT *rot, setting_t func) |
Check which rotator functions can be queried. | |
setting_t | rot_has_set_func (ROT *rot, setting_t func) |
Query support of rotator functions. | |
int | rot_set_func (ROT *rot, setting_t func, int status) |
Activate or deactivate functions of a rotator. | |
int | rot_get_func (ROT *rot, setting_t func, int *status) |
Query the status of functions of the rotator. | |
int | rot_set_ext_level (ROT *rot, hamlib_token_t token, value_t val) |
Set a rotator extension level to a given value. | |
int | rot_get_ext_level (ROT *rot, hamlib_token_t token, value_t *val) |
Query the value of a requested rotator extension level. | |
int | rot_set_ext_func (ROT *rot, hamlib_token_t token, int status) |
Activate or deactivate extension functions of a rotator. | |
int | rot_get_ext_func (ROT *rot, hamlib_token_t token, int *status) |
Query the status of extension functions of a rotator. | |
int | rot_set_ext_parm (ROT *rot, hamlib_token_t token, value_t val) |
Set a rotator extension parameter to a given value. | |
int | rot_get_ext_parm (ROT *rot, hamlib_token_t token, value_t *val) |
Query the value of a requested rotator extension parameter. | |
ROT * | rot_init (rot_model_t rot_model) |
Allocate a new ROT handle. | |
int | rot_open (ROT *rot) |
Open the communication channel to the rotator. | |
int | rot_close (ROT *rot) |
Close the communication channel to the rotator. | |
int | rot_cleanup (ROT *rot) |
Release a ROT handle and free associated memory. | |
int | rot_set_position (ROT *rot, azimuth_t azimuth, elevation_t elevation) |
Set the azimuth and elevation of the rotator. | |
int | rot_get_position (ROT *rot, azimuth_t *azimuth, elevation_t *elevation) |
Query the azimuth and elevation of the rotator. | |
int | rot_park (ROT *rot) |
Park the rotator. | |
int | rot_stop (ROT *rot) |
Stop the rotator. | |
int | rot_reset (ROT *rot, rot_reset_t reset) |
Reset the rotator. | |
int | rot_move (ROT *rot, int direction, int speed) |
Move the rotator in the specified direction and speed. | |
const char * | rot_get_info (ROT *rot) |
Get general information from the rotator. | |
int | rot_get_status (ROT *rot, rot_status_t *status) |
Query status flags of the rotator. | |
void * | rot_data_pointer (ROT *rot, rig_ptrx_t idx) |
Get the address of rotator data structure(s) |
#define HAMLIB_ROTSTATE | ( | r | ) |
Macro for application access to rot_state data structure using the ROT handle
Example code.
#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.
#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) |
Future use, ROT_FUNC items.
#define ROT_FUNC_NONE 0 |
Rotator Function Settings.
Various operating functions supported by a rotator.
STRING
used in the rotctl
and rotctld
utilities.
#define ROT_MODEL | ( | arg | ) |
#define ROT_MOVE_CCW ROT_MOVE_LEFT |
A macro that returns the flag for the counterclockwise direction.
This macro defines the value of the counterclockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_LEFT.
#define ROT_MOVE_CW ROT_MOVE_RIGHT |
A macro that returns the flag for the clockwise direction.
This macro defines the value of the clockwise direction which can be used with the rot_move() function. This value is equivalent to ROT_MOVE_RIGHT.
#define ROT_MOVE_DOWN (1<<2) |
A macro that returns the flag for the DOWN direction.
This macro defines the value of the DOWN direction which can be used with the rot_move() function.
#define ROT_MOVE_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.
#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.
#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.
#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.
#define ROT_MOVE_LEFT (1<<3) |
A macro that returns the flag for the LEFT direction.
This macro defines the value of the LEFT direction which can be used with the rot_move function.
#define ROT_MOVE_RIGHT (1<<4) |
A macro that returns the flag for the RIGHT direction.
This macro defines the value of the RIGHT direction which can be used with the rot_move() function.
#define ROT_MOVE_UP (1<<1) |
A macro that returns the flag for the UP direction.
This macro defines the value of the UP direction which can be used with the rot_move() function.
#define ROT_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.
#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.
#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.
#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.
#define ROT_RESET_ALL 1 |
A macro that returns the flag for the reset operation.
typedef float azimuth_t |
Type definition for azimuth.
The azimuth_t type is used as parameter for the rot_set_position() and rot_get_position() functions.
Unless specified otherwise, the unit of azimuth_t is decimal degrees.
typedef float elevation_t |
Type definition for elevation.
The elevation_t type is used as parameter for the rot_set_position() and rot_get_position() functions.
Unless specified otherwise, the unit of elevation_t is decimal degrees.
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.
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.
enum rot_level_e |
Rotator Level Settings.
Various operating levels supported by a rotator.
STRING
used in the rotctl
and rotctld
utilities.
Enumerator | |
---|---|
ROT_LEVEL_NONE | '' – No Level. |
ROT_LEVEL_SPEED |
|
ROT_LEVEL_63 | Future use, last level. |
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.
Enumerator | |
---|---|
ROT_PARM_NONE | '' – No Parm |
enum rot_status_t |
Rotator status flags.
enum rot_type_t |
int rot_cleanup | ( | ROT * | rot | ) |
Release a ROT handle and free associated memory.
rot | The ROT handle to be released. |
Releases a ROT handle for which the communication channel has been closed with rot_close().
RIG_OK | ROT handle successfully released. |
-RIG_EINVAL | rot is NULL or inconsistent. |
int rot_close | ( | ROT * | rot | ) |
Close the communication channel to the rotator.
rot | The ROT handle of the rotator to be closed. |
Closes the communication channel to a rotator for which ROT handle has been passed by argument that was previously opened with rot_open().
RIG_OK | Communication channel successfully closed. |
-RIG_EINVAL | rot is NULL or inconsistent. |
const struct confparams * rot_confparam_lookup | ( | ROT * | rot, |
const char * | name ) |
Query a rotator configuration parameter token by its name.
rot | The ROT handle. |
name | Configuration parameter token name string. |
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.
TODO: Should use Lex to speed it up, strcmp() hurts!
void * rot_data_pointer | ( | ROT * | rot, |
rig_ptrx_t | idx ) |
Get the address of rotator data structure(s)
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.
rot | The ROT handle. |
cfunc | Callback function of each rot_caps::extfunc. |
data | Cookie to be passed to the callback function cfunc. |
The callback cfunc is called until it returns a value which is not strictly positive.
RIG_OK | All extension functions elements successfully processed. |
-RIG_EINVAL | rot or cfunc is NULL or inconsistent. |
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.
rot | The ROT handle. |
cfunc | Callback function of each rot_caps::extlevels. |
data | Cookie to be passed to the callback function cfunc. |
The callback cfunc is called until it returns a value which is not strictly positive.
RIG_OK | All extension levels elements successfully processed. |
-RIG_EINVAL | rot or cfunc is NULL or inconsistent. |
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.
rot | The ROT handle. |
name | The extension functions, levels, or parameters token name. |
Searches the rot_caps::extlevels, rot_caps::extfuncs and the rot_caps::extparms tables in order for the token by its name.
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.
rot | The ROT handle. |
token | The token value (constant). |
Searches the rot_caps::extlevels, rot_caps::extfuncs, and the rot_caps::extparms tables in order for the token by its constant value.
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.
rot | The ROT handle. |
cfunc | callback function of each rot_caps::extparms. |
data | Cookie to be passed to the callback function cfunc. |
The callback function cfunc is called until it returns a value which is not strictly positive.
RIG_OK | All extension parameters elements successfully processed. |
-RIG_EINVAL | rot or cfunc is NULL or inconsistent. |
hamlib_token_t rot_ext_token_lookup | ( | ROT * | rot, |
const char * | name ) |
Simple search returning the extension token ID associated with name.
rot | The ROT handle. |
name | The token name string to search. |
int rot_get_conf | ( | ROT * | rot, |
hamlib_token_t | token, | ||
char * | val ) |
Query the value of a rotator configuration parameter.
rot | The ROT handle. |
token | The token of the parameter to query. |
val | The location where to store the value of the configuration token. |
Retrieves the value of a configuration parameter associated with token.
RIG_OK | Querying the parameter was successful. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_conf() capability is not available. |
int rot_get_ext_func | ( | ROT * | rot, |
hamlib_token_t | token, | ||
int * | status ) |
Query the status of extension functions of a rotator.
rot | The ROT handle. |
token | The extension function to query the status. |
status | The variable to store the extension function status. |
Retrieves the status (On or Off) of an extension function of the rotator. Upon return, status will hold the status of the extension function. The value pointed to by the status argument is not NULL for "On", or "Off" otherwise, much as TRUE or FALSE boolean definitions in the C language.
RIG_OK | The extension function status was queried successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_ext_func() capability is not available or token is not supported. |
int rot_get_ext_level | ( | ROT * | rot, |
hamlib_token_t | token, | ||
value_t * | val ) |
Query the value of a requested rotator extension level.
rot | The ROT handle. |
token | The extension level token. |
val | The location where to store the value of token. |
Query the val corresponding to the extension level token.
RIG_OK | The extension level was queried successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_ext_level() capability is not available. |
int rot_get_ext_parm | ( | ROT * | rot, |
hamlib_token_t | token, | ||
value_t * | val ) |
Query the value of a requested rotator extension parameter.
rot | The ROT handle. |
token | The extension parameter to query the status. |
val | The variable to store the extension parameter status. |
Query the val corresponding to the extension parameter token.
RIG_OK | The extension parameter was queried successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_ext_parm() capability is not available. |
Query the status of functions of the rotator.
rot | The ROT handle. |
func | The function to query the status. |
status | The variable to store the function status. |
Retrieves the status (On or Off) of a function of the rotator. Upon return, status will hold the status of the function. The value pointed to by the status argument is not NULL for "On", or "Off" otherwise, much as TRUE or FALSE boolean definitions in the C language.
RIG_OK | The function status was queried successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_func() capability is not available or func is not supported. |
const char * rot_get_info | ( | ROT * | rot | ) |
Get general information from the rotator.
rot | The ROT handle. |
Retrieves some general information from the rotator. This can include firmware revision, exact model name, or just nothing.
Query the value of a requested rotator level.
rot | The ROT handle. |
level | The requested level. |
val | The variable to store the level value. |
Query the val corresponding to the level.
RIG_OK | The query was successful. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_level() capability is not available. |
Query the value of a requested rotator parameter.
rot | The ROT handle. |
parm | The requested parameter. |
val | The variable to store the parm value. |
Query the val corresponding to the parm.
RIG_OK | The parameter was queried successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_parm() capability is not available. |
int rot_get_position | ( | ROT * | rot, |
azimuth_t * | azimuth, | ||
elevation_t * | elevation ) |
Query the azimuth and elevation of the rotator.
rot | The ROT handle. |
azimuth | The variable to store the current azimuth. |
elevation | The variable to store the current elevation |
Retrieves the current azimuth and elevation values of the rotator. The stored values are in decimal degrees.
Note: A given rotator may be capable of querying only the azimuth or only the elevation or both. The rotator backend should store a value of 0 in the unsupported variable.
RIG_OK | Either or both parameters queried and stored successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_position() capability is not available. |
int rot_get_status | ( | ROT * | rot, |
rot_status_t * | status ) |
Query status flags of the rotator.
rot | The ROT handle. |
status | The variable where the status flags will be stored. |
Query the active status flags from the rotator.
RIG_OK | The query was successful. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_status() capability is not available. |
Check which rotator functions can be queried.
rot | The ROT handle. |
func | The functions bitmap. |
Checks if a rotator supports a set of functions. Since func is an OR'ed bitwise argument, more than one function can be checked at the same time.
EXAMPLE:
Check which rotator level settings can be queried.
rot | The ROT handle. |
level | The level settings bitmap. |
Checks if a rotator is capable of getting a level setting. Since level is an OR'ed bitwise argument, more than one level can be checked at the same time.
EXAMPLE:
Check which rotator parameter settings can be queried.
rot | The ROT handle. |
parm | The parameter settings bitmap. |
Checks if a rotator is capable of getting a parameter setting. Since parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.
EXAMPLE:
Query support of rotator functions.
rot | The ROT handle. |
func | The functions bitmap. |
Checks if a rotator supports a set of functions. Since func is an OR'ed bitwise argument, more than one function can be checked at the same time.
EXAMPLE:
Query the rotator levels that may be set.
rot | The ROT handle. |
level | The level settings bitmap. |
Checks if a rotator can set a level setting. Since level is an OR'ed bitwise argument, more than one level can be checked at the same time.
EXAMPLE:
Query the rotator parameters that may be set.
rot | The ROT handle. |
parm | The parameter settings bitmap. |
Checks if a rotator can set a parameter setting. Since parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.
EXAMPLE:
ROT * rot_init | ( | rot_model_t | rot_model | ) |
Allocate a new ROT handle.
rot_model | The rotator model for this new handle. |
Allocates a new ROT handle and initializes the associated data for rot_model (see rotlist.h or rigctl -l).
int rot_move | ( | ROT * | rot, |
int | direction, | ||
int | speed ) |
Move the rotator in the specified direction and speed.
rot | The ROT handle. |
direction | Direction of movement. |
speed | Speed of movement. |
Move the rotator in the specified direction. The direction is one of ROT_MOVE_CCW, ROT_MOVE_CW, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_UP_LEFT, ROT_MOVE_CCW, ROT_MOVE_UP_RIGHT, ROT_MOVE_UP_CW, ROT_MOVE_DOWN_LEFT, ROT_MOVE_DOWN_CCW, ROT_MOVE_DOWN_RIGHT, ROT_MOVE_DOWN_CW. The speed is a value between 1 and 100 or ROT_SPEED_NOCHANGE.
RIG_OK | The rotator move was successful. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::move() capability is not available. |
int rot_open | ( | ROT * | rot | ) |
Open the communication channel to the rotator.
rot | The ROT handle of the rotator to be opened. |
Opens the communication channel to a rotator for which the ROT handle has been passed.
RIG_OK | Communication channel successfully opened. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENIMPL | Communication port type is not implemented yet. |
int rot_park | ( | ROT * | rot | ) |
Park the rotator.
rot | The ROT handle. |
Park the rotator in a predetermined position as implemented by the rotator hardware.
RIG_OK | The rotator was parked successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::park() capability is not available. |
int rot_reset | ( | ROT * | rot, |
rot_reset_t | reset ) |
Reset the rotator.
rot | The ROT handle. |
reset | The reset operation to perform |
Resets the rotator to a state determined by reset.
RIG_OK | The rotator was reset successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::reset() capability is not available. |
int rot_set_conf | ( | ROT * | rot, |
hamlib_token_t | token, | ||
const char * | val ) |
Set a rotator configuration parameter.
rot | The ROT handle. |
token | The token of the parameter to set. |
val | The value to set the parameter to. |
Sets a rotator configuration parameter to val.
RIG_OK | The parameter was set successfully. |
-RIG_EINVAL | rot is NULL or inconsistent or token is invalid. |
-RIG_ENAVAIL | rot_caps::set_conf() capability is not available. |
int rot_set_ext_func | ( | ROT * | rot, |
hamlib_token_t | token, | ||
int | status ) |
Activate or deactivate extension functions of a rotator.
rot | The ROT handle. |
token | The extension function to activate or deactivate. |
status | The status (On or Off) to set. |
Activate or deactivate an extension function of the rotator.
The status argument is a value that is not NULL for "activate", "deactivate" otherwise, much as TRUE or FALSE boolean definitions in the C language.
RIG_OK | The extension function status was set successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::get_ext_func() capability is not available. |
int rot_set_ext_level | ( | ROT * | rot, |
hamlib_token_t | token, | ||
value_t | val ) |
Set a rotator extension level to a given value.
rot | The ROT handle. |
token | The extension level token. |
val | The value of the extension level. |
Set extension level token to val.
RIG_OK | The extension level was set successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::set_ext_level() capability is not available. |
int rot_set_ext_parm | ( | ROT * | rot, |
hamlib_token_t | token, | ||
value_t | val ) |
Set a rotator extension parameter to a given value.
rot | The ROT handle. |
token | The extension parameter token. |
val | The value of the extension parameter. |
Set an extension parameter token to val.
RIG_OK | The extension parameter was set successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::set_ext_parm() capability is not available. |
Activate or deactivate functions of a rotator.
rot | The ROT handle. |
func | The function to activate or deactivate. |
status | The status (On or Off) to set. |
Activate or deactivate a function of the rotator.
The status argument is a value that is not NULL for "activate", "deactivate" otherwise, much as TRUE or FALSE boolean definitions in the C language.
RIG_OK | The function was activated or deactivated successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::set_func() capability is not available or func is not supported. |
Set a rotator level to a given value.
rot | The ROT handle. |
level | The level to set. |
val | The value of the level. |
Set level to val.
RIG_OK | Setting the level was successful. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::set_level() capability is not available. |
Set a rotator parameter to a given value.
rot | The ROT handle. |
parm | The parameter to set. |
val | The value of the parameter. |
Sets parm to val.
RIG_OK | The parameter was set successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::set_parm() capability is not available. |
int rot_set_position | ( | ROT * | rot, |
azimuth_t | azimuth, | ||
elevation_t | elevation ) |
Set the azimuth and elevation of the rotator.
rot | The ROT handle. |
azimuth | The azimuth to set in decimal degrees. |
elevation | The elevation to set in decimal degrees. |
Sets the azimuth and elevation of the rotator.
Note: A given rotator may be capable of setting only the azimuth or only the elevation or both. The rotator backend will ignore the unneeded parameter.
RIG_OK | Either or both parameters set successfully. |
-RIG_EINVAL | rot is NULL or inconsistent or either azimuth or elevation is out of range for this rotator. |
-RIG_ENAVAIL | rot_caps::set_position() capability is not available. |
int rot_stop | ( | ROT * | rot | ) |
Stop the rotator.
rot | The ROT handle. |
Stop the rotator. Command should be immediate.
RIG_OK | The rotator was stopped successfully. |
-RIG_EINVAL | rot is NULL or inconsistent. |
-RIG_ENAVAIL | rot_caps::stop() capability is not available. |
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.
rot | The ROT handle. |
cfunc | Pointer to the callback function(...). |
data | Data for the callback function. |
Start first with backend configuration parameters table, then finish with frontend configuration parameters table.
RIG_OK | The cfunc action completed successfully. |
-RIG_EINVAL | rot is NULL or inconsistent or cfunc is NULL. |
hamlib_token_t rot_token_lookup | ( | ROT * | rot, |
const char * | name ) |
Search for the token ID associated with a rotator configuration parameter token name.
rot | The ROT handle. |
name | Configuration parameter token name string. |
Searches the backend and frontend configuration parameters tables for the token ID.