[][src]Crate isis_ants_api

Kubos API for interacting with ISIS Antenna Systems

All work is done against an instantiated AntS struct.

Examples

use isis_ants_api::*;
use std::thread::sleep;
use std::time::Duration;

// Create a new AntS connection
let ants = AntS::new("/dev/i2c-0", 0x31, 0x32, 4, 10).unwrap();

// Configure it to run commands against the secondary controller
ants.configure(KANTSController::Secondary)?;

// Prepare the system for deployment
ants.arm()?;

// Auto-deploy the antennas with a five second timeout for each
ants.auto_deploy(5)?;

// Give deployment a moment to run
sleep(Duration::from_secs(5));

// Get the current deployment status
let deploy = ants.get_deploy()?;
println!("Antenna 1 deployed: {}", !deploy.ant_1_not_deployed);
println!("Antenna 2 deployment active: {}", deploy.ant_2_active);

Structs

AntS

Structure for interacting with an ISIS Antenna System

AntsTelemetry

System telemetry fields returned from get_system_telemetry

DeployStatus

Current deployment status returned from get_deploy

Enums

AntsError

Common Error for AntS Actions

KANTSAnt

Specific antenna to control

KANTSController

Antenna microcontroller which any commands should be run against

Traits

IAntS

Trait used to represent the AntS object. Allows for mock objects to be created for unit tests

Type Definitions

AntSResult

Custom result type for antenna operations