[][src]Crate isis_ants_service

Kubos Service for interacting with ISIS Antenna Systems

Configuration

The service must be configured in /home/system/etc/config.toml with the following fields:

For example:

[isis-ants-service.addr]
ip = "0.0.0.0"
port = 8006

[isis-ants-service]
bus = "/dev/i2c-0"
primary = "0x31"
secondary = "0x32"
antennas = 4
wd_timeout = 10

Starting the Service

The service should be started automatically by its init script, but may also be started manually:

$ isis-ants-service
Kubos antenna systems service started
Listening on: 0.0.0.0:8006

Queries

Ping

Test query to verify service is running without attempting to communicate with the underlying subsystem

{
    ping: "pong"
}

ACK

Get the last run mutation

{
    ack: AckCommand
}

Errors

Get all errors encountered since the last time this field was queried

{
    errors: [String]
}

Power Status

Get the current power state and uptime of the system

{
    power {
        state: PowerState,
        uptime: Int
    }
}

Configuration

Get the current microcontroller which commands will be sent to

{
    config: ConfigureController
}

Telemetry

Get current telemetry information for the system

{
    telemetry {
        nominal {
            rawTemp: Int,
            uptime: Int,
            sysBurnActive: Boolean,
            sysIgnoreDeploy: Boolean,
            sysArmed: Boolean,
            ant1NotDeployed: Boolean,
            ant1StoppedTime: Boolean,
            ant1Active: Boolean,
            ant2NotDeployed: Boolean,
            ant2StoppedTime: Boolean,
            ant2Active: Boolean,
            ant3NotDeployed: Boolean,
            ant3StoppedTime: Boolean,
            ant3Active: Boolean,
            ant4NotDeployed: Boolean,
            ant4StoppedTime: Boolean,
            ant4Active: Boolean
        },
           debug {
            ant1ActivationCount: Int,
            ant1ActivationTime: Int,
            ant2ActivationCount: Int,
            ant2ActivationTime: Int,
            ant3ActivationCount: Int,
            ant3ActivationTime: Int,
            ant4ActivationCount: Int,
            ant4ActivationTime: Int,
        }
    }
}

Test Results

Get the test results of the last run test

Note: For this service, this actually just fetches the nominal and debug telemetry of the system, since there is no actual built-in test

{
    testResults{
        success,
        telemetryNominal{...},
        telemetryDebug{...}
    }
}

System Armed Status

Get the current armed/disarmed status of the system

{
    armStatus: ArmStatus
}

System deployment status

Get the current deployment status of the system

{
    deploymentStatus {
        status: DeploymentStatus,
        sysBurnActive: Boolean,
        sysIgnoreDeploy: Boolean,
        sysArmed: Boolean,
        ant1NotDeployed: Boolean,
        ant1StoppedTime: Boolean,
        ant1Active: Boolean,
        ant2NotDeployed: Boolean,
        ant2StoppedTime: Boolean,
        ant2Active: Boolean,
        ant3NotDeployed: Boolean,
        ant3StoppedTime: Boolean,
        ant3Active: Boolean,
        ant4NotDeployed: Boolean,
        ant4StoppedTime: Boolean,
        ant4Active: Boolean
}

Mutations

Errors

Get all errors encountered while processing this GraphQL request

Note: This will only return errors thrown by fields which have already been processed, so it is recommended that this field be specified last.

mutation {
    errors: [String]
}

No-Op

Execute a trivial command against the system

mutation {
    noop {
        errors: String,
        success: Boolean
   }
}

Set Power State

Control the power state of the system

mutation {
    controlPower(state: PowerState) {
        errors: String,
        success: Boolean,
        power: PowerState
    }
}

Configuration

Configure the system

mutation {
    configureHardware(config: ConfigureController) {
        errors: String,
        success: Boolean,
        config: ConfigureController
   }
}

System Self-Test

Run a system self-test

mutation {
    testHardware(test: TestType) {
        ... on IntegrationTestResults {
            errors: String,
            success: Boolean,
            telemetryNominal{...},
            telemetryDebug{...}
        }
        ... on HardwareTestResults {
            errors: "Not Implemented",
            success: true,
            data: Empty
        }
   }
}

Passthrough

Pass a custom command through to the system

mutation {
    issueRawCommand(command: String, rx_len: Int) {
        errors: String,
        success: Boolean,
        response: String
    }
}

Arm/Disarm

Arm/Disarm the system

mutation {
    arm(state: ArmState) {
        errors: String,
        success: Boolean
   }

Deploy Antennas

Deploy antenna/s

mutation {
    deploy(ant: DeployType = DeployType::All, force: Boolean = false, time: Int) {
        errors: String,
        success: Boolean
   }
}

Structs

AntennaStats

Antenna status data

ConfigureHardwareResponse

Response fields for 'configureHardware' mutation

ControlPowerResponse

Response fields for 'controlPower' mutation

GenericResponse

Common response fields structure for requests which don't return any specific data

GetDeployResponse

Response fields for 'deploymentStatus' query

GetPowerResponse

Response fields for 'power' query

HardwareTestResults

Response fields for 'testHardware(test: HARDWARE)' mutation

IntegrationTestResults

Response fields for 'testHardware(test: INTEGRATION)' mutation

RawCommandResponse

Response fields for 'issueRawCommand' mutation

Telemetry

Response fields for 'telemetry' query

TelemetryDebug

Debug telemetry data

TelemetryNominal

Nominal telemetry data

Enums

AckCommand

Return field for 'ack' query

ArmState

Input field for 'arm' mutation

ArmStatus

Return field for 'armStatus' query

ConfigureController

Input field for 'configureHardware' mutation

DeployType

Input field for 'deploy' mutation

DeploymentStatus

Enum for 'deployStatus' response field of 'deploymentStatus' query

PowerState

Input field for 'controlPower' mutation and response field for 'power' query

TestResults

Enum for the 'testHardware' mutation response union

TestType

Input field for 'testHardware' mutation

Type Definitions

ArmResponse

Response fields for 'arm' mutation

DeployResponse

Response fields for 'deploy' mutation

NoopResponse

Response fields for 'noop' mutation