[][src]Crate novatel_oem6_service

Kubos Service for interacting with a NovAtel OEM6 High Precision GNSS Receiver

Configuration

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

For example:

[novatel-oem6-service]
bus = "/dev/ttyS4"

[novatel-oem6-service.addr]
ip = "127.0.0.1"
port = 8082

Starting the Service

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

$ novatel-oem6-service
Kubos OEM6 service started
Listening on: 10.63.1.20:8082

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 of the system

Note: uptime is included as an available field in order to conform to the Kubos Service Outline, but cannot be implemented for this device, so the value will be 1 if the device is on and 0 if the device is off

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

Configuration

Get the current configuration of the system

Stretch goal: implement the LOGLIST command

{
    config: "Not Implemented"
}

Test Results

Get the test results of the last run test

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

System Status

Get the current system status and errors

{
    systemStatus {
       errors: Vec<String>,
       status: Vec<String>
    }
}

Lock Status

Get current status of position information gathering

{
    lockStatus {
        positionStatus: SolutionStatus,
          positionType: PosVelType,
          time {
            ms: Int,
              week: Int
          },
        timeStatus: RefTimeStatus,
        velocityStatus: SolutionStatus,
          velocityType: PosVelType
    }
}

Lock Information

Get the last known good position information

{
    lockInfo {
       position: Vec<Float>,
       time {
           ms: Int,
           week: Int
       },
       velocity: Vec<Float>
    }
}

Telemetry

Get current telemetry information for the system

{
    telemetry{
        debug {
            components: [{
                bootVersion: String,
                compType: Int,
                compileDate: String,
                compileTime: String,
                hwVersion: String,
                model: String,
                serialNum: String,
                swVersion: String,
            }],
            numComponents: Int
        },
        nominal{
            lockInfo {...},
            lockStatus {...},
            systemStatus: {
               errors: Vec<String>,
               status: Vec<String>
            }
        }
    }
}

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

Note: Power control of the GPS device will be done by the GPSRM service

mutation {
    controlPower: "Not Implemented"
}

Configuration

Configure the system

mutation {
    configureHardware(config: [{option: ConfigOption, hold: Boolean, interval: Float, offset: Float},...]) {
        config: String
        errors: String,
        success: Boolean,
    }
}

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) {
        errors: String,
        success: Boolean,
        response: String
    }
}

Structs

ConfigStruct

Input structure for 'configureHardware' mutation

ConfigureHardwareResponse

Response fields for 'configureHardware' mutation

GenericResponse

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

GetPowerResponse

Response fields for 'power' query

HardwareTestResults

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

IntegrationTestResults

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

LockInfo

Current system lock information. Used in the response fields of the lockInfo query

LockStatus

Response fields for lockStatus query

OEMTime

Time structure for lockStatus and lockInfo response fields

ReceiverStatus

Receiver status

SystemStatus

Response fields for systemStatus query

Telemetry

Response fields for telemetry query

TelemetryNominal

Response fields for 'telemetry(telem: NOMINAL)' query

VersionComponent

System component data

VersionInfo

Version information about the device, returned as the telemetryDebug response field

Enums

AckCommand

Return field for 'ack' query

ConfigOption

Input field for 'configureHardware' mutation

PosVelType

Enum for the positionType and velocityType response fields of the lockStatus query

PowerState

Response field for 'power' query

RefTimeStatus

Enum for the TimeStatus response field of the lockStatus query

SolutionStatus

Enum for the positionStatus and velocityStatus response fields of the lockStatus query

TestResults

Enum for the 'testHardware' mutation response union

TestType

Input field for 'testHardware' mutation