stratos_ground-station

command module
Version: v0.0.0-...-921d6d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2021 License: MIT Imports: 7 Imported by: 0

README

Stratos - Ground Station

TODO: describe the project

Contributing

Requirements

The following languages need to be installed to be able to run and build the project.

  • Go / Golang (min version: v1.16)
    Run go version to get your current version
  • Docker (optional)
    Only required to build the binaries (executable files).
  • NodeJS
Run

There are 3 different ways to run the program. You can either run only the frontend, run only the backend with pre-built frontend files or run the backend with hot reload of the frontend.

1. With hot reload of frontend (recommended)
The application will run in a dedicated window.
Steps
  1. Follow steps 1 to 4 descibed in Frontend only.
  2. Open a second terminal in the project root directory.
  3. Start the application: go run -tags dev .

Note 1: changes made to the frontend (in /dashboard) will automatically be reflected in the application window.
Note 2: only repeat steps 2 and 3 to see changes made to the backend.

2. Without hot reload
The application will run in a dedicated window.
Steps
  1. Open a terminal in the project's root directory.
  2. Move to the frontend directory: cd ./dashboard
  3. Build the frontend: npm run build
  4. Move back to the project's root directory: cd ..
  5. Start the application: go run .

Note 1: only repeat step 6 to see changes made to the backend.
Note 2: repeat all steps to see changes made to the frontend (in /dashboard).

3. Frontend only
Only the frontend development server will be running so no data will be provided from the backend.
Steps
  1. Open a terminal in the project root directory.
  2. Move to the frontend directory: cd ./dashboard
  3. Start the development server: npm run serve
  4. Wait for the application to be ready.
    frontend-serve-ready
  5. Open a browser and go to localhost:8080.
Mage

Once this is done, you need to install Mage. To do so open a terminal and execute the following commands or follow the instructions here:

On Windows:

git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go

On MacOS:

brew install mage
Build

The project uses Mage to make it easier to run and build the project.
Here are the principal mage targets/commands:
(run mage -l to list all available targets)

mage or mage build
Builds and compiles the project into a binary.
mage clean
Clean the project by removing built binaries, node_modules directory and other generated files.

Structure

/acquisition
Contains the backend. (data acquisition, data transformation, etc.)
/cmd (TODO)
Contains the code reading arguements passed from the CLI.
(CLI: Command Line Interface)
/config (TODO)
Contains the code reading the configuration from a file.
/dashboard
Contains the frontend. (VueJS)

TODOs

  • CLI (/cmd): read args from command line. (see spf13/cobra)
  • Config (/config): read configurations from files. ( see spf13/viper)
  • Backend (/acquisition)
    • Data acquisition: read data received by the RF module.
    • Transform data: transform raw data into a human readable form.
    • Save data: save transformed data into a file.
    • Read data: add the possibility to read data from a file.
    • Tests: create unit tests.
      • Data acquisition: test functions of the data acquisition.
      • Transfrom data: test functions tranforming the data.
      • Save data: test functions saving data into files.
      • Read data: test functions reading data from files.
  • Controller (/controller)
    • Bindings: create bindings allowing the frontend to call Go functions.
    • Dispatch: create functions to send data to frontend.
    • Tests: create unit tests.
      • Bindings: test bindings functions.
      • Dispatch: test dispatch functions.
  • Frontend (/dashboard)
    • Data reception: create the functions receiving the data from the backend.
    • Tests: create unit tests.
      • Data reception: test the functions used to receive the data from the backend.
      • Other: test other functions of the frontend.

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL