Hamlib
4.1
|
Files | |
file | rot_conf.c |
Rotator Configuration Interface. | |
file | rot_ext.c |
Extension request parameter interface for rotators. | |
file | rot_settings.c |
rotator func/level/parm interface | |
file | rotator.c |
Rotator interface. | |
file | rotator.h |
Hamlib rotator data structures. | |
file | rotlist.h |
Hamlib rotator model definitions. | |
Data Structures | |
struct | rot_state |
Live data and customized fields. More... | |
struct | s_rot |
This is the master data structure, acting as a handle for the controlled rotator. More... | |
struct | rot_caps |
Rotator data structure. More... | |
Macros | |
#define | NETROTCTL_RET "RPRT " |
Token in the netrotctl protocol for returning error code. | |
#define | ROT_RESET_ALL 1 |
A macro that returns the flag for the reset operation. More... | |
#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_STATUS_N(n) (1u<<(n)) |
#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 definition for debug level. 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 Network 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 Rotor-EZ backend. More... | |
#define | ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) |
A macro that returns the model number of the Rotor Card 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 SARtek-1 backend. More... | |
#define | ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) |
A macro that returns the model number of the GS-232A backend. More... | |
#define | ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */ |
A macro that returns the model number of the GS-232 backend. More... | |
#define | ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3) |
A macro that returns the model number of the GS-232B 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 TRACKER backend. More... | |
#define | ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8) |
A macro that returns the model number of the Fox Delta ST2 backend. More... | |
#define | ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9) |
#define | ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10) |
#define | ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11) |
#define | ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12) |
#define | ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) |
A macro that returns the model number of the PcRotor/WA6UFQ backend. More... | |
#define | ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1) |
A macro that returns the model number of the HD 1780 backend. | |
#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 MD-01/02 (ROT2PROG protocol) 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) |
#define | ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3) |
#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 IF-100 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 azimuth backend. | |
#define | ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) |
A macro that returns the model number of the PROSISTEL D elevation backend. | |
#define | ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3) |
#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... | |
Typedefs | |
typedef struct s_rot | ROT |
Rotator structure definition (see rot for details). | |
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 rotator model. | |
Enumerations | |
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 | frontrot_set_conf (ROT *rot, token_t token, const char *val) |
Set rotator state info from alpha input. More... | |
int | frontrot_get_conf (ROT *rot, token_t token, char *val) |
Get data from rotator state in alpha form. More... | |
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 conf table. More... | |
const struct confparams * | rot_confparam_lookup (ROT *rot, const char *name) |
lookup conf token by its name, return pointer to confparams struct. More... | |
token_t | rot_token_lookup (ROT *rot, const char *name) |
Simple lookup returning token id associated with 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) |
get the value of a 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 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 extlevels 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 extparms table. More... | |
const struct confparams * | rot_ext_lookup (ROT *rot, const char *name) |
lookup ext token by its name, return pointer to confparams struct. More... | |
const struct confparams * | rot_ext_lookup_tok (ROT *rot, token_t token) |
lookup ext token, return pointer to confparams struct. More... | |
token_t | rot_ext_token_lookup (ROT *rot, const char *name) |
Simple lookup returning token id associated with name. More... | |
int | rot_set_level (ROT *rot, setting_t level, value_t val) |
set a rotator level setting More... | |
int | rot_get_level (ROT *rot, setting_t level, value_t *val) |
get the value of a level More... | |
int | rot_set_parm (ROT *rot, setting_t parm, value_t val) |
set a rotator parameter More... | |
int | rot_get_parm (ROT *rot, setting_t parm, value_t *val) |
get the value of a parameter More... | |
setting_t | rot_has_get_level (ROT *rot, setting_t level) |
check retrieval ability of level settings More... | |
setting_t | rot_has_set_level (ROT *rot, setting_t level) |
check settable ability of level settings More... | |
setting_t | rot_has_get_parm (ROT *rot, setting_t parm) |
check retrieval ability of parameter settings More... | |
setting_t | rot_has_set_parm (ROT *rot, setting_t parm) |
check settable ability of parameter settings More... | |
setting_t | rot_has_get_func (ROT *rot, setting_t func) |
check ability of rotator functions More... | |
setting_t | rot_has_set_func (ROT *rot, setting_t func) |
check ability of rotator functions More... | |
int | rot_set_func (ROT *rot, setting_t func, int status) |
activate/de-activate functions of rotator More... | |
int | rot_get_func (ROT *rot, setting_t func, int *status) |
get the status of functions of the rotator More... | |
int | rot_set_ext_level (ROT *rot, token_t token, value_t val) |
set a rotator level extra parameter More... | |
int | rot_get_ext_level (ROT *rot, token_t token, value_t *val) |
get the value of a level extra parameter More... | |
int | rot_set_ext_func (ROT *rot, token_t token, int status) |
set a rotator function extra parameter More... | |
int | rot_get_ext_func (ROT *rot, token_t token, int *status) |
get the value of a function extra parameter More... | |
int | rot_set_ext_parm (ROT *rot, token_t token, value_t val) |
set a rotator parm extra parameter More... | |
int | rot_get_ext_parm (ROT *rot, token_t token, value_t *val) |
get the value of a parm extra parameter More... | |
int | foreach_opened_rot (int(*cfunc)(ROT *, rig_ptr_t), rig_ptr_t data) |
execs cfunc() on each opened rot More... | |
ROT * | rot_init (rot_model_t rot_model) |
allocate a new ROT handle More... | |
int | rot_open (ROT *rot) |
open the communication to the rot More... | |
int | rot_close (ROT *rot) |
close the communication to the rot 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) |
get the azimuth and elevation of the rotator More... | |
int | rot_park (ROT *rot) |
park the antenna 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 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) |
get status flags from the rotator More... | |
#define rot_debug rig_debug |
Convenience definition for debug level.
This is just as convenience definition of the rotator debug level, and is the same as for the rig debug level.
#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) |
available
for future ROT_FUNC items
#define ROT_FUNC_NONE 0 |
Rotator Function Settings.
Various operating functions supported by a rotator.
STRING
used in rotctl/rotctld
#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.
#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3) |
A macro that returns the model number of the DCU backend.
The Rotor-EZ backend can be used with rotators that support the DCU command set by Hy-Gain (currently the DCU-1).
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) |
A macro that returns the model number for the dummy backend.
The dummy backend, as the name suggests, is a backend which performs no hardware operations and always behaves as one would expect. It can be thought of as a hardware simulator and is very useful for testing client applications.
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1) |
A macro that returns the model number of the EasyComm 1 backend.
The EasyComm 1 backend can be used with rotators that support the EASYCOMM I Standard.
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2) |
A macro that returns the model number of the EasyComm 2 backend.
The EasyComm 2 backend can be used with rotators that support the EASYCOMM II Standard.
#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4) |
A macro that returns the model number of the EasyComm 3 backend.
The EasyComm 3 backend can be used with rotators that support the EASYCOMM III Standard.
#define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4) |
A macro that returns the model number of the ERC backend.
The Rotor-EZ backend can be used with rotators that support the DCU command set by DF9GR (currently the ERC).
#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 and alike.
#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 F1TETRACKER protocol.
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) |
A macro that returns the model number of the Fodtrack backend.
The Fodtrack backend can be used with rotators that support the FODTRACK Standard.
#define ROT_MODEL_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 GS23 protocol.
#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 GS232 protocol.
#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */ |
A macro that returns the model number of the GS-232 backend.
The GS-232 backend can be used with rotators that support the generic (even if not coded correctly) GS-232 protocol.
#define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) |
A macro that returns the model number of the GS-232A backend.
The GS-232A backend can be used with rotators that support the GS-232A protocol.
#define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3) |
A macro that returns the model number of the GS-232B backend.
The GS-232B backend can be used with rotators that support the GS-232B protocol.
#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1) |
A macro that returns the model number of the IF-100 backend.
The AMSAT backend can be used with rotators that support, among other, the IF-100 interface.
#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1) |
A macro that returns the model number of the INDI backend.
#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1) |
A macro that returns the model number of the IOPTRON backend.
The IOPTRON backen can be used with IOPTRON telescope mounts
#define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7) |
A macro that returns the model number of the LVB TRACKER backend.
The AMSAT LVB TRACKER backend can be used with rotators that support the AMSAT LVB TRACKER GS232 based protocol.
#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1) |
A macro that returns the model number of the MEADE backend.
The MEADE backen can be used with Meade telescope rotators like DS-2000
#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2) |
A macro that returns the model number for the Network backend.
This backend allows use of the rotctld daemon through the normal Hamlib API.
#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1) |
A macro that returns the model number of the NEXSTAR backend.
The CELESTRON backend can be used with rotators that support the Celestron protocol and alike.
#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...mainly for internal use
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) |
A macro that returns the model number of the PcRotor/WA6UFQ backend.
The kit backend can be used with home brewed rotators.
#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1) |
A macro that returns the model number of the RC2800 backend.
The M2 backend can be used with rotators that support the RC2800 protocol and alike.
#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2) |
A macro that returns the model number of the RCI_AZ backend.
The ARS backend can be used with rotators that support the ARS protocol.
#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1) |
A macro that returns the model number of the RCI_AZEL backend.
The ARS backend can be used with rotators that support the ARS protocol.
#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) |
A macro that returns the model number of the Rotor Card backend.
The Rotor-EZ backend can be used with Yaesu rotators that support the extended DCU command set by Idiom Press Rotor Card board.
#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1) |
A macro that returns the model number of the Rotor-EZ backend.
The Rotor-EZ backend can be used with Hy-Gain rotators that support the extended DCU command set by Idiom Press Rotor-EZ board.
#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) |
A macro that returns the model number of the RT21 backend.
The Rotor-EZ backend can be used with rotators that support the DCU command set by Green Heron (currently the RT-21).
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) |
A macro that returns the model number of the SARtek-1 backend.
The sartek backend can be used with rotators that support the SARtek protocol.
#define ROT_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.
#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3) |
A macro that returns the model number of the MD-01/02 (ROT2PROG protocol) backend.
The SPID backend can be used with rotators that support the SPID protocol.
#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2) |
A macro that returns the model number of the ROT1PROG backend.
The SPID backend can be used with rotators that support the SPID protocol.
#define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1) |
A macro that returns the model number of the ROT2PROG backend.
The SPID backend can be used with rotators that support the SPID protocol.
#define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8) |
A macro that returns the model number of the Fox Delta ST2 backend.
The Fox Delta ST2 backend can be used with rotators that support the Fox Delta ST2 GS232 based protocol.
#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1) |
A macro that returns the model number of the TS7400 backend.
The TS-7400 backend supports and embedded ARM board using the TS-7400 Linux board. More information is at http://www.embeddedarm.com
#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_LEFT (1<<3) |
A macro that returns the flag for the LEFT direction.
This macro defines the value of the LEFT direction which can be used with the rot_move function.
#define ROT_MOVE_RIGHT (1<<4) |
A macro that returns the flag for the RIGHT direction.
This macro defines the value of the RIGHT direction which can be used with the rot_move() function.
#define ROT_MOVE_UP (1<<1) |
A macro that returns the flag for the UP direction.
This macro defines the value of the UP direction which can be used with the rot_move() function.
#define ROT_RESET_ALL 1 |
A macro that returns the flag for the reset operation.
typedef float azimuth_t |
Type definition for azimuth.
The azimuth_t type is used as parameter for the rot_set_position() and rot_get_position() functions.
Unless specified otherwise, the unit of azimuth_t is decimal degrees.
typedef float elevation_t |
Type definition for elevation.
The elevation_t type is used as parameter for the rot_set_position() and rot_get_position() functions.
Unless specified otherwise, the unit of elevation_t is decimal degrees.
typedef int rot_reset_t |
Type definition for rotator reset.
The rot_reset_t type is used as parameter for the rot_reset() API function.
enum rot_level_e |
Rotator Level Settings.
Various operating levels supported by a rotator.
STRING
used in rotctl
Enumerator | |
---|---|
ROT_LEVEL_NONE | '' – No Level |
ROT_LEVEL_SPEED |
|
ROT_LEVEL_63 |
|
enum rot_parm_e |
Rotator Parameters.
Parameters are settings that are not related to core rotator functionality (= antenna rotation).
STRING
used in rotctl
Enumerator | |
---|---|
ROT_PARM_NONE | '' – No Parm |
enum rot_status_t |
Rotator status flags.
int foreach_opened_rot | ( | int(*)(ROT *, rig_ptr_t) | cfunc, |
rig_ptr_t | data | ||
) |
execs cfunc() on each opened rot
cfunc | The function to be executed on each rot |
data | Data pointer to be passed to cfunc() |
Calls cfunc() function for each opened rot. The contents of the opened rot table is processed in random order according to a function pointed to by cfunc, which is called with two arguments, the first pointing to the ROT handle, the second to a data pointer data.
If data is not needed, then it can be set to NULL. The processing of the opened rot table is stopped when cfunc() returns 0.
Get data from rotator state in alpha form.
rot | non-null |
token | TOK_... specifying which data to get |
val | result non-null |
Set rotator state info from alpha input.
rot | |
token | TOK_... specifying which info to set |
val | input |
assumes rot!=NULL, val!=NULL
int rot_cleanup | ( | ROT * | rot | ) |
release a rot handle and free associated memory
rot | The ROT handle of the radio to be closed |
Releases a rot struct which port has eventually been closed already with rot_close().
int rot_close | ( | ROT * | rot | ) |
close the communication to the rot
rot | The ROT handle of the rotator to be closed |
Closes communication to a rotator which ROT handle has been passed by argument that was previously open with rot_open().
const struct confparams* rot_confparam_lookup | ( | ROT * | rot, |
const char * | name | ||
) |
lookup conf token by its name, return pointer to confparams struct.
rot | |
name |
lookup backend config table first, then fall back to frontend. TODO: should use Lex to speed it up, strcmp hurts!
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 extfuncs table.
rot | The rotator handle |
cfunc | callback function of each extfunc |
data | cookie to be passed to cfunc callback |
The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rot_ext_func_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 extlevels table.
rot | The rotator handle |
cfunc | callback function of each extlevel |
data | cookie to be passed to cfunc callback |
The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rot_ext_level_foreach.
const struct confparams* rot_ext_lookup | ( | ROT * | rot, |
const char * | name | ||
) |
lookup ext token by its name, return pointer to confparams struct.
rot | |
name |
Lookup extlevels table, then extfuncs, then extparms.
Returns NULL if nothing found
TODO: should use Lex to speed it up, strcmp hurts!
const struct confparams* rot_ext_lookup_tok | ( | ROT * | rot, |
token_t | token | ||
) |
lookup ext token, return pointer to confparams struct.
rot | |
token |
lookup extlevels table first, then extfuncs, then fall back to extparms.
Returns NULL if nothing found
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 extparms table.
rot | The rotator handle |
cfunc | callback function of each extparm |
data | cookie to be passed to cfunc callback |
The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rot_ext_parm_foreach.
Simple lookup returning token id associated with name.
rot | |
name |
get the value of a configuration parameter
rot | The rot handle |
token | The parameter |
val | The location where to store the value of config token |
Retrieves the value of a configuration parameter associated with token.
get the value of a function extra parameter
rig | The rotator handle |
token | The parameter |
status | The location where to store the value of token |
Retrieves the value of a function extra parameter associated with token.
get the value of a level extra parameter
rig | The rotator handle |
token | The parameter |
val | The location where to store the value of token |
Retrieves the value of a level extra parameter associated with token.
get the value of a parm extra parameter
rig | The rotator handle |
token | The parameter |
val | The location where to store the value of token |
Retrieves the value of a parm extra parameter associated with token.
get the status of functions of the rotator
rig | The rotator handle |
func | The function to get the status |
status | The location where to store the function status |
Retrieves the status (on/off) of a function of the rotator. Upon return, status will hold the status of the function, The value pointer to by the status argument is a non null value for "on", "off" otherwise, much as TRUE/FALSE definitions in C language.
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.
get the value of a level
rig | The rotator handle |
level | The level setting |
val | The location where to store the value of level |
Retrieves the value of a level. The level value val can be a float or an integer. See value_t for more information.
get the value of a parameter
rig | The rotator handle |
parm | The parameter |
val | The location where to store the value of parm |
Retrieves the value of a parm. The parameter value val can be a float or an integer. See value_t for more information.
int rot_get_position | ( | ROT * | rot, |
azimuth_t * | azimuth, | ||
elevation_t * | elevation | ||
) |
get the azimuth and elevation of the rotator
rot | The rot handle |
azimuth | The location where to store the current azimuth |
elevation | The location where to store the current elevation |
Retrieves the current azimuth and elevation of the rotator.
int rot_get_status | ( | ROT * | rot, |
rot_status_t * | status | ||
) |
get status flags from the rotator
rot | The rot handle |
status | a pointer to a rot_status_t variable that will receive the status flags |
Gets the active status flags from the rotator.
check ability of rotator functions
rig | The rotator handle |
func | The functions |
Checks if a rotator supports a set of functions. Since the func is an OR'ed bitwise argument, more than one function can be checked at the same time.
EXAMPLE: if (rot_has_get_func(my_rig, RIG_FUNC_NONE))
check retrieval ability of level settings
rig | The rotator handle |
level | The level settings |
Checks if a rotator is capable of getting a level setting. Since the level is an OR'ed bitwise argument, more than one level can be checked at the same time.
EXAMPLE: if (rot_has_get_level(my_rig, RIG_LEVEL_SPEED))
check retrieval ability of parameter settings
rig | The rotator handle |
parm | The parameter settings |
Checks if a rotator is capable of getting a parm setting. Since the parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.
EXAMPLE: if (rot_has_get_parm(my_rig, ROT_PARM_NONE))
check ability of rotator functions
rig | The rotator handle |
func | The functions |
Checks if a rotator supports a set of functions. Since the func is an OR'ed bitwise argument, more than one function can be checked at the same time.
EXAMPLE: if (rot_has_set_func(my_rig, RIG_FUNC_NONE))
check settable ability of level settings
rig | The rotator handle |
level | The level settings |
Checks if a rotator can set a level setting. Since the level is an OR'ed bitwise argument, more than one level can be check at the same time.
EXAMPLE: if (rot_has_set_level(my_rig, ROT_LEVEL_SPEED))
check settable ability of parameter settings
rig | The rotator handle |
parm | The parameter settings |
Checks if a rotator can set a parameter setting. Since the parm is an OR'ed bitwise argument, more than one parameter can be check at the same time.
EXAMPLE: if (rot_has_set_parm(my_rig, RIG_PARM_NONE))
ROT* rot_init | ( | rot_model_t | rot_model | ) |
allocate a new ROT handle
rot_model | The rot model for this new handle |
Allocates a new ROT handle and initializes the associated data for rot_model.
int rot_move | ( | ROT * | rot, |
int | direction, | ||
int | speed | ||
) |
move the rotator in the specified direction
rot | The rot handle |
direction | Direction of movement |
speed | Speed of movement |
Move the rotator in the specified direction. The speed is a value between 1 and 100.
int rot_open | ( | ROT * | rot | ) |
open the communication to the rot
rot | The ROT handle of the rotator to be opened |
Opens communication to a rotator which ROT handle has been passed by argument.
RIG_EINVAL | rot is NULL or inconsistent. |
RIG_ENIMPL | port type communication is not implemented yet. |
int rot_park | ( | ROT * | rot | ) |
park the antenna
rot | The rot handle |
Park the antenna.
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.
set a rotator configuration parameter
rot | The rot handle |
token | The parameter |
val | The value to set the parameter to |
Sets a configuration parameter.
set a rotator function extra parameter
rig | The rotator handle |
token | The parameter |
status | The value to set the parameter to |
Sets a function extra parameter.
set a rotator level extra parameter
rig | The rotator handle |
token | The parameter |
val | The value to set the parameter to |
Sets an level extra parameter.
set a rotator parm extra parameter
rig | The rotator handle |
token | The parameter |
val | The value to set the parameter to |
Sets an parm extra parameter.
activate/de-activate functions of rotator
rig | The rotator handle |
func | The function to activate |
status | The status (on or off) to set to |
Activate/de-activate a function of the radio.
The status argument is a non null value for "activate", "de-activate" otherwise, much as TRUE/FALSE definitions in C language.
set a rotator level setting
rig | The rotator handle |
level | The level setting |
val | The value to set the level setting to |
Sets the level of a setting. The level value val can be a float or an integer. See value_t for more information.
set a rotator parameter
rig | The rotator handle |
parm | The parameter |
val | The value to set the parameter |
Sets a parameter. The parameter value val can be a float or an integer. See value_t for more information.
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 to |
elevation | The elevation to set to |
Sets the azimuth and elevation of the rotator.
int rot_stop | ( | ROT * | rot | ) |
stop the rotator
rot | The rot handle |
Stop the rotator.
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 conf table.
rot | non-null |
cfunc | function(..) |
data | start first with backend conf table, then finish with frontend table |
Hamlib documentation for version 4.1 -- Mon Feb 1 2021 08:00:28
Project page: http://www.hamlib.org