Trait isis_ants_api::IAntS [−][src]
pub trait IAntS { fn new(
bus: &str,
primary: u8,
secondary: u8,
ant_count: u8,
timeout: u32
) -> AntSResult<Self>
where
Self: Sized; fn configure(&self, config: KANTSController) -> AntSResult<()>; fn reset(&self) -> AntSResult<()>; fn arm(&self) -> AntSResult<()>; fn disarm(&self) -> AntSResult<()>; fn deploy(
&self,
antenna: KANTSAnt,
force: bool,
timeout: u8
) -> AntSResult<()>; fn auto_deploy(&self, timeout: u8) -> AntSResult<()>; fn cancel_deploy(&self) -> AntSResult<()>; fn get_deploy(&self) -> AntSResult<DeployStatus>; fn get_uptime(&self) -> AntSResult<u32>; fn get_system_telemetry(&self) -> AntSResult<AntsTelemetry>; fn get_activation_count(&self, antenna: KANTSAnt) -> AntSResult<u8>; fn get_activation_time(&self, antenna: KANTSAnt) -> AntSResult<u16>; fn watchdog_kick(&self) -> AntSResult<()>; fn watchdog_start(&self) -> AntSResult<()>; fn watchdog_stop(&self) -> AntSResult<()>; fn passthrough(&self, tx: &[u8], rx_in: &mut [u8]) -> AntSResult<()>; }
Trait used to represent the AntS object. Allows for mock objects to be created for unit tests
Required Methods
fn new(
bus: &str,
primary: u8,
secondary: u8,
ant_count: u8,
timeout: u32
) -> AntSResult<Self> where
Self: Sized,
bus: &str,
primary: u8,
secondary: u8,
ant_count: u8,
timeout: u32
) -> AntSResult<Self> where
Self: Sized,
Construct a new AntS instance
fn configure(&self, config: KANTSController) -> AntSResult<()>
Configure which microcontroller should be used to control the system
fn reset(&self) -> AntSResult<()>
Perform a software reset of the microcontrollers
fn arm(&self) -> AntSResult<()>
Arm the system for deployment
fn disarm(&self) -> AntSResult<()>
Disable deployment
fn deploy(&self, antenna: KANTSAnt, force: bool, timeout: u8) -> AntSResult<()>
Deploy one antenna
fn auto_deploy(&self, timeout: u8) -> AntSResult<()>
Automatically deploy all antennas
fn cancel_deploy(&self) -> AntSResult<()>
Cancel all current deployment actions
fn get_deploy(&self) -> AntSResult<DeployStatus>
Get the current deployment status of the system
fn get_uptime(&self) -> AntSResult<u32>
Get the system uptime
fn get_system_telemetry(&self) -> AntSResult<AntsTelemetry>
Get the system telemetry data
fn get_activation_count(&self, antenna: KANTSAnt) -> AntSResult<u8>
Get an antenna's activation count
fn get_activation_time(&self, antenna: KANTSAnt) -> AntSResult<u16>
Get the amount of time spent attempting to deploy an antenna
fn watchdog_kick(&self) -> AntSResult<()>
Kick the hardware watchdog
fn watchdog_start(&self) -> AntSResult<()>
Start automatic watchdog kicking
fn watchdog_stop(&self) -> AntSResult<()>
Stop automatic watchdog kicking
fn passthrough(&self, tx: &[u8], rx_in: &mut [u8]) -> AntSResult<()>
Pass a data packet directly through to the device
Implementors
impl IAntS for AntS