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:

enumerator ANTS_OK

Requested function completed successfully.

enumerator ANTS_ERROR

Generic error.

enumerator ANTS_ERROR_CONFIG

Configuration error.

enumerator ANTS_ERROR_NOT_IMPLEMENTED

Requested function has not been implemented for the subsystem.

enum KANTSController

Antenna microcontrollers.

Values:

enumerator PRIMARY

Issue commands using the primary microcontroller.

enumerator SECONDARY

Issue commands using the secondary microcontroller (if available)

enum KANTSAnt

System Antennas.

Values:

enumerator ANT_1

Antenna 1.

enumerator ANT_2

Antenna 2.

enumerator ANT_3

Antenna 3.

enumerator ANT_4

Antenna 4.

Functions

KANTSStatus k_ants_init(char *bus, uint8_t primary, uint8_t secondary, uint8_t ant_count, uint32_t timeout)

Initialize the antenna interface.

Parameters
  • bus[in] I2C bus device the antenna systems device is connected to

  • primary[in] The I2C address of the device’s primary microcontroller

  • secondary[in] The I2C address of the device’s secondary/redundant microcontroller

  • ant_count[in] The number of antennas that the device can deploy

  • timeout[in] The watchdog timeout interval (in seconds)

Returns

KANTSStatus ANTS_OK if OK, error otherwise

void k_ants_terminate(void)

Terminate the antenna interface.

KANTSStatus k_ants_configure(KANTSController config)

Configure the antenna.

Parameters

config[in] Microntroller to use for system commanding

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_reset(void)

Reset both of the antenna’s microcontrollers.

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_arm(void)

Arm the antenna.

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_disarm(void)

Disarm the antenna.

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_deploy(KANTSAnt antenna, bool override, uint8_t timeout)

Deploy an antenna.

Parameters
  • antenna[in] Antenna to deploy

  • override[in] Indicates whether system should ignore previous successful deployment

  • timeout[in] Maximum time, in seconds, system should spend deploying the antenna

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_auto_deploy(uint8_t timeout)

Automatically deploy each antenna in sequence.

Parameters

timeout[in] Maximum time, in seconds, system should spend deploying a single antenna

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_cancel_deploy(void)

Cancel all current deployment actions.

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_get_deploy_status(uint16_t *resp)

Get current deployment status.

Parameters

resp[out] Pointer to storage for data

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_get_uptime(uint32_t *uptime)

Get system uptime.

Parameters

uptime[out] Pointer to storage for data

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_get_system_telemetry(ants_telemetry *telem)

Get the current system telemetry.

Parameters

telem[out] Pointer to ants_telemetry structure

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_get_activation_count(KANTSAnt antenna, uint8_t *count)

Get an antenna’s activation count.

Parameters
  • antenna[in] Antenna to query

  • count[out] Number of times antenna deployment has been attempted

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_get_activation_time(KANTSAnt antenna, uint16_t *time)

Get an antenna’s activation time.

Parameters
  • antenna[in] Antenna to query

  • time[out] Amount of time spent deploying antenna in 50ms steps

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_watchdog_kick(void)

Kick the AntS’s watchdogs once.

Returns

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.

Returns

KANTSStatus ANTS_OK if OK, error otherwise

KANTSStatus k_ants_watchdog_stop(void)

Stop the watchdog thread.

Returns

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.

Parameters
  • tx[in] Pointer to command packet to send

  • tx_len[in] Size of command packet

  • rx[out] Pointer to storage for command response

  • rx_len[in] Expected length of command response

Returns

KANTSStatus ANTS_OK if OK, error otherwise

struct ants_telemetry
#include <ants-api.h>

System telemetry fields returned from k_ants_get_system_telemetry.

Public Members

uint16_t raw_temp

Current temperature (raw value)

uint16_t deploy_status

Current deployment status flags.

uint32_t uptime

System uptime (in seconds)