Loading...
Searching...
No Matches
rot_state.h
Go to the documentation of this file.
/*
* Hamlib Interface - Rotator state structure
* Copyright (c) 2000-2025 The Hamlib Group
* Copyright (c) 2025 George Baltz
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#ifndef _ROT_STATE_H
#define _ROT_STATE_H 1
__BEGIN_DECLS
struct rot_state {
/*
* overridable fields
*/
azimuth_t min_az;
azimuth_t max_az;
elevation_t min_el;
elevation_t max_el;
int south_zero;
azimuth_t az_offset;
elevation_t el_offset;
setting_t has_get_func;
setting_t has_set_func;
setting_t has_get_level;
setting_t has_set_level;
setting_t has_get_parm;
setting_t has_set_parm;
rot_status_t has_status;
gran_t level_gran[RIG_SETTING_MAX];
gran_t parm_gran[RIG_SETTING_MAX];
/*
* non overridable fields, internal use
*/
hamlib_port_t_deprecated rotport_deprecated;
hamlib_port_t_deprecated rotport2_deprecated;
int comm_state;
rig_ptr_t priv;
rig_ptr_t obj;
int current_speed;
hamlib_port_t rotport;
hamlib_port_t rotport2;
rig_ptr_t *pstrotator_handler_priv_data;
deferred_config_header_t config_queue;
};
__END_DECLS
#if defined(IN_HAMLIB)
#define ROTSTATE(r) (&(r)->state)
#endif
#define HAMLIB_ROTSTATE(r) ((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE))
#endif /* _ROT_STATE_H */
hamlib_port_t_deprecated
struct hamlib_port_deprecated hamlib_port_t_deprecated
hamlib_port_t
struct hamlib_port hamlib_port_t
Port definition.
setting_t
uint64_t setting_t
Setting bit mask.
Definition rig.h:1223
RIG_SETTING_MAX
#define RIG_SETTING_MAX
Maximum # of rig settings.
Definition rig.h:1229
gran_t
struct gran gran_t
gran_t type
Definition rig.h:1760
rot_status_t
rot_status_t
Rotator status flags.
Definition rotator.h:324
elevation_t
float elevation_t
Type definition for elevation.
Definition rotator.h:74
azimuth_t
float azimuth_t
Type definition for azimuth.
Definition rotator.h:85
rot_state
Rotator state structure.
Definition rot_state.h:54
rot_state::obj
rig_ptr_t obj
Definition rot_state.h:86
rot_state::priv
rig_ptr_t priv
Definition rot_state.h:85
rot_state::config_queue
deferred_config_header_t config_queue
Definition rot_state.h:92
rot_state::has_set_parm
setting_t has_set_parm
Definition rot_state.h:71
rot_state::level_gran
gran_t level_gran[RIG_SETTING_MAX]
Definition rot_state.h:75
rot_state::az_offset
azimuth_t az_offset
Definition rot_state.h:63
rot_state::has_set_func
setting_t has_set_func
Definition rot_state.h:67
rot_state::rotport_deprecated
hamlib_port_t_deprecated rotport_deprecated
Definition rot_state.h:81
rot_state::max_az
azimuth_t max_az
Definition rot_state.h:59
rot_state::has_status
rot_status_t has_status
Definition rot_state.h:73
rot_state::current_speed
int current_speed
Definition rot_state.h:88
rot_state::pstrotator_handler_priv_data
rig_ptr_t * pstrotator_handler_priv_data
Definition rot_state.h:91
rot_state::rotport2
hamlib_port_t rotport2
Definition rot_state.h:90
rot_state::rotport2_deprecated
hamlib_port_t_deprecated rotport2_deprecated
Definition rot_state.h:82
rot_state::has_get_parm
setting_t has_get_parm
Definition rot_state.h:70
rot_state::min_az
azimuth_t min_az
Definition rot_state.h:58
rot_state::rotport
hamlib_port_t rotport
Definition rot_state.h:89
rot_state::has_get_func
setting_t has_get_func
Definition rot_state.h:66
rot_state::has_get_level
setting_t has_get_level
Definition rot_state.h:68
rot_state::comm_state
int comm_state
Definition rot_state.h:84
rot_state::min_el
elevation_t min_el
Definition rot_state.h:60
rot_state::max_el
elevation_t max_el
Definition rot_state.h:61
rot_state::has_set_level
setting_t has_set_level
Definition rot_state.h:69
rot_state::parm_gran
gran_t parm_gran[RIG_SETTING_MAX]
Definition rot_state.h:76
rot_state::el_offset
elevation_t el_offset
Definition rot_state.h:64
rot_state::south_zero
int south_zero
Definition rot_state.h:62