API Docs for: 1.0.0
Show:

Telemetry Class

A basic telemetry server. Should probably be hooked up with a DB.

Constructor

Telemetry

()

Methods

handleGet

(
  • request
  • response
)

Handles a get request to the server. SHOULD get data from server, return it to client for data viz or analysis.

Parameters:

  • request Object

    the http request to the server

  • response Object

    the response we'll send back to the client

handlePost

(
  • request
  • response
)

Handles a post request to the server. Generally, writes data to log file. In the future, this should probably log data in a database.

Parameters:

  • request Object

    the http request sent to the server

  • response Object

    a response object we'll write to and return

readTDataFromFile

(
  • tdata
)

Reads telemetry data from a file (specified by LOG_FILE_PATH) and returns it to client in a response. Set the global READ_DATA = readTDataFromFile to read data in this way.

Parameters:

  • tdata Object

    the response we will eventually send back

writeTDataToFile

(
  • tdata
)

Writes telemetry data to a log file (specified by LOG_FILE_PATH). Set the global WRITE_DATA = writeTDataToFile to log data in this way.

Parameters:

  • tdata Object

    the telemetry data object to stringify and write to file