Home Reference Source Repository
import AUVSIClient from 'auvsisuas-client/src/auvsi-client.js'
public class | source

AUVSIClient

Client to interact with the AUVSI SUAS Interoperability Server.

Constructor Summary

Public Constructor
public

Create a new AUVSIClient.

Member Summary

Public Members
public get

Whether or not the client is currently logged in.

public get

The base URL of the interop server.

Method Summary

Public Methods
public

login(url: string, username: string, password: string, timeout: number): Promise<void, Error>

Log in to the interop server.

public

logout(): Promise<void, Error>

Log out of the interop server.

public

postTelemetry(telem: Telemetry, timeout: number): Promise<void, Error>

Post telemetry to the interop server.

Public Constructors

public constructor() source

Create a new AUVSIClient.

This does not handle logging in the server. To log in, see login.

Public Members

public get loggedIn: boolean source

Whether or not the client is currently logged in.

public get url: string source

The base URL of the interop server.

This will be an empty string if not logged in.

Public Methods

public login(url: string, username: string, password: string, timeout: number): Promise<void, Error> source

Log in to the interop server.

Params:

NameTypeAttributeDescription
url string

Interop url

username string

Interop username

password string

Interop password

timeout number
  • optional
  • default: 1000

Request timeout in ms

Return:

Promise<void, Error>

public logout(): Promise<void, Error> source

Log out of the interop server.

Return:

Promise<void, Error>

public postTelemetry(telem: Telemetry, timeout: number): Promise<void, Error> source

Post telemetry to the interop server.

Params:

NameTypeAttributeDescription
telem Telemetry

Telemetry to post

timeout number
  • optional
  • default: 10000

Request timeout in ms

Return:

Promise<void, Error>