Skip to content

Commit

Permalink
Merge pull request #77 from thanasipantazides/main
Browse files Browse the repository at this point in the history
Documentation updates
  • Loading branch information
thanasipantazides authored Dec 3, 2024
2 parents f488c48 + a812e5b commit 9a9048d
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 88 deletions.
148 changes: 76 additions & 72 deletions README.md

Large diffs are not rendered by default.

Binary file added doc/assets/formatter_layout.pdf
Binary file not shown.
Binary file added doc/assets/software_layers.pdf
Binary file not shown.
6 changes: 4 additions & 2 deletions doc/breathe/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Some default parameters are defined in ``Parameters.h``, and the bulk of configu

Here is the network configuration:

.. image:: ../../assets/formatter_layout.svg
.. image:: ../../assets/formatter_layout.pdf

An overview of the system configuration data can be found here:

Expand All @@ -65,7 +65,9 @@ Class reference

The software is abstracted like this, with lower layers constraining and configuring the behavior of higher layers:

.. image:: ../../assets/software_layers.svg
.. image:: ../../assets/software_layers.pdf

An element in brackets like ``[SystemManager]`` means there's an array of them.

.. toctree::
:maxdepth: 2
Expand Down
24 changes: 13 additions & 11 deletions util/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# util

This folder includes some high-level utilities for Formatter actions.
This folder includes some convenient utilities for Formatter actions.

## Contents:
A typical workflow is to pull from GitHub, modify some code on your laptop, try to build it, and if that works, push it over an Ethernet cable to the Formatter using [update_formatter.sh](update_formatter.sh). Then you can build the code on the Formatter (Raspberry Pi) and test it out. Maybe you find Ethernet connection issues! Then you can use some of the Python scripts to send dummy packets and validate Ethernet interfaces. The files in this `util/` folder help with that development workflow.

## Shell scripts
1. [update_formatter.sh](update_formatter.sh) will push code you have on a computer over an Ethernet connection to the Formatter. A typical workflow is to write some code This script will not push build, bin, doc, or log folders over to the Formatter. It uses `rsync`.
2. [build_doc.sh](build_doc.sh) is used to build all the autodoc-type documentation (from docstrings in the code). This builds both PDF (LaTeX) and HTML docs in `foxsi-4matter/doc/breathe/build/`.
3. [copy_remote_logs.sh](copy_remote_logs.sh) will copy all the log fils on the Formatter into the `foxsi-4matter/log/formatter/` folder on this machine.
4. [delete_logs.sh](delete_logs.sh) deletes the logs in the `log/` folder. This doesn't do anything remotely—if you want to delete logs from the Formatter instead of your laptop, you'll need to `ssh` and run it there.
5. [assign_all_loopbacks.sh](assign_all_loopbacks.sh) will add all loopback IP addresses on your laptop. So you can send loopback not just from 127.0.0.1, but up to 127.0.0.255. This is used for mock testing in the `foxsimile` emulator. If you're doing stuff with `foxsimile` you'll need to run this first.

## Python scripts
A lot of these have to do with network testing between the GSE and Formatter. They contain hardcoded IP addresses/ports. These may or may not match the configuration in foxsi4-commands/systems.json.

1. [spipower.py](spipower.py) is a Python script to control (via command line) the MAX7317 serial-to-parallel chip on the power distribution board. You can use this to enable/disable power output from the board to specific subsystems.
2. [monitortemp.py](monitortemp.py) is a Python script that prints the Raspberry Pi's CPU temperature to the command line at 5-second intervals.
3. [udpecho.py](udpecho.py) is a Python script that echoes received UDP packets back to the sender.
4. [udpgarbage.py](udpgarbage.py) is a Python script that continuously transmits roughly 18 Mbps of garbage data to the ground station.

## [spipower.py](spipower.py)

This script is intended to be used with the Power Distribution board developed at UMN. To use, connect Raspberry Pi SPI0 (GPIOs 8-11, pins 24, 21, 19, 23) to the Power Distribution board. Run this script and follow the command prompt to turn systems on and off.

## [monitortemp.py](monitortemp.py)

This script prints out the CPU temperature every 5 seconds.
4. [udpgarbage.py](udpgarbage.py) is a Python script that continuously transmits roughly 18 Mbps of garbage data to the ground station IP address.
4 changes: 3 additions & 1 deletion util/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ echo "running doxygen..."
doxygen
echo "running sphinx..."
source doc/env/bin/activate
sphinx-build -M html doc/breathe/source doc/breathe/build
cd doc/breathe
sphinx-build -M html source build
sphinx-build -M latexpdf source build
echo "opening docs..."
open doc/breathe/build/html/index.html
4 changes: 2 additions & 2 deletions util/udpgarbage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)

# multicast group address and port
mcast_grp = '224.1.1.0'
mcast_port = 3000
mcast_grp = '224.1.1.118'
mcast_port = 9999

while True:
# make some random data to transmit
Expand Down

0 comments on commit 9a9048d

Please sign in to comment.