1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! `CController` FFI declarations.
use std::ffi::{c_char, c_int};
use crate::EsHandle;
unsafe extern "C" {
/// Whether the controller reference is valid. Wraps `CController::IsValid`.
pub fn es_controller_is_valid(h: EsHandle) -> bool;
/// Callsign of the controller. Borrowed, NUL-terminated, ANSI.
/// Wraps `CController::GetCallsign`.
pub fn es_controller_callsign(h: EsHandle) -> *const c_char;
/// Position ID of the selected controller. Borrowed, NUL-terminated, ANSI.
/// Wraps `CController::GetPositionId`.
pub fn es_controller_position_id(h: EsHandle) -> *const c_char;
/// Whether the controller is identified in the position file.
/// Wraps `CController::GetPositionIdentified`.
pub fn es_controller_position_identified(h: EsHandle) -> bool;
/// Primary frequency of the controller (MHz), `199.980` if none.
/// Wraps `CController::GetPrimaryFrequency`.
pub fn es_controller_primary_frequency(h: EsHandle) -> f64;
/// Full name of the controller. Borrowed, NUL-terminated, ANSI.
/// Wraps `CController::GetFullName`.
pub fn es_controller_full_name(h: EsHandle) -> *const c_char;
/// Network rating id of the controller. Wraps `CController::GetRating`.
pub fn es_controller_rating(h: EsHandle) -> c_int;
/// Facility id of the controller. Wraps `CController::GetFacility`.
pub fn es_controller_facility(h: EsHandle) -> c_int;
/// Name of the sector file used by the controller. Borrowed,
/// NUL-terminated, ANSI. Wraps `CController::GetSectorFileName`.
pub fn es_controller_sector_file_name(h: EsHandle) -> *const c_char;
/// Whether the controller is accepted as a controller by the servers.
/// Wraps `CController::IsController`.
pub fn es_controller_is_controller(h: EsHandle) -> bool;
/// Center position of the controller, written to the `lat`/`lon`
/// out-params. Wraps `CController::GetPosition`.
pub fn es_controller_position(h: EsHandle, lat: *mut f64, lon: *mut f64);
/// Visibility range of the controller. Wraps `CController::GetRange`.
pub fn es_controller_range(h: EsHandle) -> c_int;
/// Breaking state of the controller. Wraps `CController::IsBreaking`.
pub fn es_controller_is_breaking(h: EsHandle) -> bool;
/// Whether the controller is ready for ongoing coordination.
/// Wraps `CController::IsOngoingAble`.
pub fn es_controller_is_ongoing_able(h: EsHandle) -> bool;
}