Skip to content

Commit e23ddee

Browse files
feat: Add a rust modules overview page for the frontend (#9)
* begin work on rust modules overview: documented commands module here * fill in mission and telemetry modules * fix: Change ordering of pages within sidebar * fix: Typo in misssions * fix: Replaced mentions of functions with the actual function name --------- Co-authored-by: Brandon Tseng <86759315+PlainOlSoapBar@users.noreply.github.com>
1 parent faec7ea commit e23ddee

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

src/content/docs/gcs/User Interface/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ User Interface documentation for the 2024-2025 year.
99

1010
## Table of Contents
1111

12+
- [Rust Modules Overview](./rust-modules)
13+
1214
### UI Components
1315

1416
Learn how certain Vue components used for our user interface work.
@@ -37,4 +39,4 @@ Learn how to bundle external binaries with the application during the build proc
3739

3840
For a visual of the User Interface in action, check out the 2024-2025 Demo Day recordings.
3941

40-
[Part 1](https://youtu.be/hWrshAnqU7k?si=-gDGsa-l9ElE-Cla) | [Part 2](https://youtu.be/ADPfVVWi9rs?si=g7kCkTnSg2Ifr4Br)
42+
[Part 1](https://youtu.be/hWrshAnqU7k?si=-gDGsa-l9ElE-Cla) | [Part 2](https://youtu.be/ADPfVVWi9rs?si=g7kCkTnSg2Ifr4Br)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Rust Modules Overview
3+
sidebar:
4+
order: 2
5+
---
6+
7+
Since we are developing this app using **Tauri**, the frontend has the ability to interact with Rust modules on the backend. This page briefly describes the function of these modules and how the UI interacts with them.
8+
9+
## Commands
10+
11+
This module publishes commands to [RabbitMQ](/gcs/vehicle-integration/rabbitmq/).
12+
13+
Using this module, the frontend is able to issue zone and mission updates, as well as send an emergency stop signal to all vehicles. Currently, the `send_mission_update` is unused, and the `send_zone_update` command is only used by the backend when starting a mission.
14+
15+
All commands require a vehicle ID to be specified (in the case of the emergency stop command, "ALL" may be used to stop all vehicles). When sending a mission update, a mission ID must be provided, and when sending a zone update, a zone ID and pair of geographical coordinates must be provided.
16+
17+
## Mission
18+
19+
This module handles the backend state of missions. It exposes an API that allows you to add, rename, and delete missions, stages, and zones. You can also transition stages, update the stage area, set the auto mode of vehicles, get mission data, and start the mission. Additionally, whenever the mission data is changed, it'll fire an `on_updated` event containing the new data for the mission being updated. There also exists a function `get_mission_data` to get the current state for specific mission, though it currently appears unused.
20+
21+
Currently, the [Mission Store](../state-management/mission-frontend) is responsibile for managing the state of missions on the frontend. The functions listed here call their rust module counterparts under-the-hood, so it is preferred that you use the [Mission Store functions](../state-management/mission-frontend#functions) when interacting with the Mission module.
22+
23+
## Telemetry
24+
25+
This module handles publishing and consuming telemetry sent through [RabbitMQ](/gcs/vehicle-integration/rabbitmq/).
26+
27+
Whenever telemetry receives an update, it'll fire an `on_updated` event containing any new vehicle telemetry data. It currently only exposes methods for getting current telemetry and getting the default telemetry data. As with the Mission Module, the [Telemetry Store](../state-management/telemetry-frontend) is responsibile for managing the state of telemetry on the frontend. As such, it is recommended that you utilize the [Telemetry Store functions](../state-management/telemetry-frontend#functions) to get new telemetry data.

0 commit comments

Comments
 (0)