#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "hamlib/rotator.h"
#include "serial.h"
#include "parallel.h"
#include "rot_conf.h"
#include "token.h"
Functions | |
| int | foreach_opened_rot (int(*cfunc)(ROT *, char *), char *data) |
| execs cfunc() on each opened rot | |
| ROT * | rot_init (rot_model_t rot_model) |
| allocate a new ROT handle | |
| int | rot_open (ROT *rot) |
| open the communication to the rot | |
| int | rot_close (ROT *rot) |
| close the communication to the rot | |
| int | rot_cleanup (ROT *rot) |
| release a rot handle and free associated memory | |
| int | rot_set_conf (ROT *rot, token_t token, const char *val) |
| set a rotator configuration parameter | |
| int | rot_get_conf (ROT *rot, token_t token, char *val) |
| get the value of a configuration parameter | |
| 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) |
| get the azimuth and elevation of the rotator | |
| int | rot_park (ROT *rot) |
| park the antenna | |
| 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 | |
| const char * | rot_get_info (ROT *rot) |
| get general information from the rotator | |
| int foreach_opened_rot | ( | int(*)(ROT *, char *) | cfunc, | |
| char * | data | |||
| ) |
execs cfunc() on each opened rot
| cfunc | The function to be executed on each rot | |
| data | Data pointer to be passed to cfunc() |
| int rot_cleanup | ( | ROT * | rot | ) |
release a rot handle and free associated memory
| rot | The ROT handle of the radio to be closed |
| int rot_close | ( | ROT * | rot | ) |
close the communication to the rot
| rot | The ROT handle of the rotator to be closed |
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 |
| const char* rot_get_info | ( | ROT * | rot | ) |
get general information from the rotator
| rot | The rot handle |
| 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 |
| ROT* rot_init | ( | rot_model_t | rot_model | ) |
allocate a new ROT handle
| rot_model | The rot model for this new handle |
| 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 |
| int rot_open | ( | ROT * | rot | ) |
open the communication to the rot
| rot | The ROT handle of the rotator to be opened |
| RIG_EINVAL | rot is NULL or unconsistent. | |
| RIG_ENIMPL | port type communication is not implemented yet. |
| int rot_park | ( | ROT * | rot | ) |
park the antenna
| rot | The rot handle |
| int rot_reset | ( | ROT * | rot, | |
| rot_reset_t | reset | |||
| ) |
reset the rotator
| rot | The rot handle | |
| reset | The reset operation to perform |
set a rotator configuration parameter
| rot | The rot handle | |
| token | The parameter | |
| val | The value to set the parameter to |
| 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 |
| int rot_stop | ( | ROT * | rot | ) |
stop the rotator
| rot | The rot handle |
1.5.1