Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Server #7

Closed
1 of 6 tasks
atar13 opened this issue Oct 3, 2023 · 0 comments · Fixed by #55
Closed
1 of 6 tasks

HTTP Server #7

atar13 opened this issue Oct 3, 2023 · 0 comments · Fixed by #55
Assignees

Comments

@atar13
Copy link
Member

atar13 commented Oct 3, 2023

🚀 Feature

We need an HTTP server to communicate with the Ground Control Station.

This server will be listening for the following information from the GCS:

  • Mission initialization information (flight boundary, static waypoints)
  • Verified Airdrop Bottle matches (once the human GCS operator has verified the bottle matches on the ground)
  • Autonomous takeoff command

Eventually these routes will call other functions and kick off parts of the mission. For now it's fine to just receive the data and unmarshal it to a C++ struct.

  • Need to decide on an HTTP server library
  • Need to create data types that are shared between the OBC and GCS. These should be generated from the protobuf files that will be created by this issue Create protobuf for data shared between GCS/OBC #3
  • Need to create the following three routes
  • initializeMission
    • Take in mission data
      • flight boundary
      • airdrop boundary
      • mission waypoints
  • uploadVerifiedAirdropTargets
    • Take in target information once targets have been verified by GCS operator
      • Should be a list of targets
      • every target should have:
      • bottle id
      • character color
      • shape color
      • character type
      • shape type
      • target latitude
      • target longitude
  • autonomousTakeoff
    • Need to determine what data is required
  • Perform validation on input data for each route
    • If there's some malformed data that's receive, the route should return an HTTP 400 error

Documentation

Create a page under obc on the wiki called http server. Enumerate each route and specify how their input body data should look like (or link to the protobuf message definition). Also specify the usage instructions for URL parameters, if there are any. If there is a response returned, explain it. Each route should have the possible HTTP status codes that can be returned by the route. If there are any headers expected, explain them as well.

For input request body, give an example of valid input in JSON. Also, give an examples of invalid input.

Show an example of how the response body would look like as well.

Testing

Create a mock HTTP Client that communicates with the server you spin up in the test functions. The mock client will try to make HTTP requests to the server and verify that the response received is correct.

@Tyler-Lentz Tyler-Lentz self-assigned this Jan 17, 2024
atar13 added a commit that referenced this issue Feb 26, 2024
 #7 11.79 The following packages have unmet dependencies:
#7 11.89  graphicsmagick-libmagick-dev-compat : Conflicts: libmagick++-dev
#7 11.89                                        Conflicts: libmagickcore-dev
#7 11.90 E: Unable to correct problems, you have held broken packages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants