ISIS Antenna System API¶
Deployment Status Flags
-
SYS_BURN_ACTIVE
¶ Antenna system independent burn is active.
-
SYS_IGNORE_DEPLOY
¶ Antenna system is ignoring the deployment switches.
-
SYS_ARMED
¶ Antenna system is armed.
-
ANT_1_NOT_DEPLOYED
¶ Antenna 1 is not deployed.
-
ANT_1_STOPPED_TIME
¶ Antenna 1 deployment time limit was reached.
-
ANT_1_ACTIVE
¶ Antenna 1 deployment system is active.
-
ANT_2_NOT_DEPLOYED
¶ Antenna 2 is not deployed.
-
ANT_2_STOPPED_TIME
¶ Antenna 2 deployment time limit was reached.
-
ANT_2_ACTIVE
¶ Antenna 2 deployment system is active.
-
ANT_3_NOT_DEPLOYED
¶ Antenna 3 is not deployed.
-
ANT_3_STOPPED_TIME
¶ Antenna 3 deployment time limit was reached.
-
ANT_3_ACTIVE
¶ Antenna 3 deployment system is active.
-
ANT_4_NOT_DEPLOYED
¶ Antenna 4 is not deployed.
-
ANT_4_STOPPED_TIME
¶ Antenna 4 deployment time limit was reached.
-
ANT_4_ACTIVE
¶ Antenna 4 deployment system is active.
Enums
-
enum
KANTSStatus
¶ Antenna function return values.
Values:
-
ANTS_OK
¶ Requested function completed successfully.
-
ANTS_ERROR
¶ Generic error.
-
ANTS_ERROR_CONFIG
¶ Configuration error.
-
ANTS_ERROR_NOT_IMPLEMENTED
¶ Requested function has not been implemented for the subsystem.
-
Functions
-
KANTSStatus
k_ants_init
(KI2CNum bus, uint8_t primary, uint8_t secondary, uint8_t ant_count, uint32_t timeout)¶ Initialize the antenna interface.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
- Parameters
bus
: I2C bus the antenna systems device is connected toprimary
: The I2C address of the device’s primary microcontrollersecondary
: The I2C address of the device’s secondary/redundant microcontrollerant_count
: The number of antennas that the device can deploytimeout
: The watchdog timeout interval (in seconds)
-
void
k_ants_terminate
(void)¶ Terminate the antenna interface.
-
KANTSStatus
k_ants_configure
(KANTSController config)¶ Configure the antenna.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
- Parameters
config
: Microntroller to use for system commanding
-
KANTSStatus
k_ants_reset
(void)¶ Reset both of the antenna’s microcontrollers.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
-
KANTSStatus
k_ants_arm
(void)¶ Arm the antenna.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
-
KANTSStatus
k_ants_disarm
(void)¶ Disarm the antenna.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
-
KANTSStatus
k_ants_deploy
(KANTSAnt antenna, bool override, uint8_t timeout)¶ Deploy an antenna.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
- Parameters
antenna
: Antenna to deployoverride
: Indicates whether system should ignore previous successful deploymenttimeout
: Maximum time, in seconds, system should spend deploying the antenna
-
KANTSStatus
k_ants_auto_deploy
(uint8_t timeout)¶ Automatically deploy each antenna in sequence.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
- Parameters
timeout
: Maximum time, in seconds, system should spend deploying a single antenna
-
KANTSStatus
k_ants_cancel_deploy
(void)¶ Cancel all current deployment actions.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise
-
KANTSStatus
k_ants_get_deploy_status
(uint16_t *resp)¶ Get current deployment status.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise - Parameters
resp
: Pointer to storage for data
-
KANTSStatus
k_ants_get_uptime
(uint32_t *uptime)¶ Get system uptime.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise - Parameters
uptime
: Pointer to storage for data
-
KANTSStatus
k_ants_get_system_telemetry
(ants_telemetry *telem)¶ Get the current system telemetry.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise - Parameters
telem
: Pointer to ants_telemetry structure
-
KANTSStatus
k_ants_get_activation_count
(KANTSAnt antenna, uint8_t *count)¶ Get an antenna’s activation count.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise - Parameters
antenna
: Antenna to querycount
: Number of times antenna deployment has been attempted
-
KANTSStatus
k_ants_get_activation_time
(KANTSAnt antenna, uint16_t *time)¶ Get an antenna’s activation time.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise - Parameters
antenna
: Antenna to querytime
: Amount of time spent deploying antenna in 50ms steps
-
KANTSStatus
k_ants_watchdog_kick
(void)¶ Kick the AntS’s watchdogs once.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise
-
KANTSStatus
k_ants_watchdog_start
(void)¶ Start a thread to kick the AntS’s watchdogs at an interval of (timeout/3) seconds.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise
-
KANTSStatus
k_ants_watchdog_stop
(void)¶ Stop the watchdog thread.
- Return
- KANTSStatus
ANTS_OK
if OK, error otherwise
-
KANTSStatus
k_ants_passthrough
(const uint8_t *tx, int tx_len, uint8_t *rx, int rx_len)¶ Pass a command packet directly through to the antenna.
Useful for executing commands which have not been implemented in either the generic or specific antenna APIs.
- Return
- KANTSStatus ANTS_OK if OK, error otherwise
- Parameters
tx
: Pointer to command packet to sendtx_len
: Size of command packetrx
: Pointer to storage for command responserx_len
: Expected length of command response
-
struct
ants_telemetry
¶ - #include <ants-api.h>
System telemetry fields returned from k_ants_get_system_telemetry.