Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
6pm
blocklyscienceday
BoardMeta
BoardRunner
CircleCI
compstate-smallpeice2017
dfu-bootloader
dropdown
GitHub
Mainroad
MasterProcess
mixtape-smallpeice2017
motor-v4-fw
motor-v4-hw
Expand All @@ -23,6 +26,8 @@ sb2018-game-presentation
sb2018-rules
sb-techday
sb-vision
seqpacket
SourceBots
srcomp-kiosk
subgraph
sym
104 changes: 52 additions & 52 deletions content/codebase/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,71 +11,71 @@ This page contains a summary of the repositories on [GitHub][sb-github].

## Administration

| Name | GitHub Repository | More Info |
| ------------------------ | ---------------------------------------------------- | ---------- |
| bunfight-form | {{< github "sourcebots/bunfight-form" >}} | |
| compstate-smallpeice2017 | {{< github "sourcebots/compstate-smallpeice2017" >}} | |
| emails | {{< github "sourcebots/emails" >}} | |
| media-consent | {{< github "sourcebots/media-consent" >}} | |
| minutes | {{< github "sourcebots/minutes" >}} | |
| mixtape-smallpeice2017 | {{< github "sourcebots/mixtape-smallpeice2017" >}} | |
| sb-techday | {{< github "sourcebots/sb-techday" >}} | |
| sb2018-game-presentation | {{< github "sourcebots/sb2018-game-presentation" >}} | |
| sb2018-rules | {{< github "sourcebots/sb2018-rules" >}} | |
| wiki | {{< github "sourcebots/wiki" >}} | |
| Name | GitHub Repository |
| ------------------------ | ---------------------------------------------------- |
| bunfight-form | {{< github "sourcebots/bunfight-form" >}} |
| compstate-smallpeice2017 | {{< github "sourcebots/compstate-smallpeice2017" >}} |
| emails | {{< github "sourcebots/emails" >}} |
| media-consent | {{< github "sourcebots/media-consent" >}} |
| minutes | {{< github "sourcebots/minutes" >}} |
| mixtape-smallpeice2017 | {{< github "sourcebots/mixtape-smallpeice2017" >}} |
| sb-techday | {{< github "sourcebots/sb-techday" >}} |
| sb2018-game-presentation | {{< github "sourcebots/sb2018-game-presentation" >}} |
| sb2018-rules | {{< github "sourcebots/sb2018-rules" >}} |
| wiki | {{< github "sourcebots/wiki" >}} |

## Hardware
| Name | GitHub Repository | More Info |
| ----------- | --------------------------------------- | --------- |
| motor-v4-hw | {{< github "sourcebots/motor-v4-hw" >}} | |
| pcbmedals | {{< github "sourcebots/pcbmedals" >}} | |
| pkg | {{< github "sourcebots/pkg" >}} | |
| power-v4-hw | {{< github "sourcebots/power-v4-hw" >}} | |
| sym | {{< github "sourcebots/sym" >}} | |
| Name | GitHub Repository |
| ----------- | --------------------------------------- |
| motor-v4-hw | {{< github "sourcebots/motor-v4-hw" >}} |
| pcbmedals | {{< github "sourcebots/pcbmedals" >}} |
| pkg | {{< github "sourcebots/pkg" >}} |
| power-v4-hw | {{< github "sourcebots/power-v4-hw" >}} |
| sym | {{< github "sourcebots/sym" >}} |

## Media

| Name | GitHub Repository | More Info |
| -------------- | ------------------------------------------ | --------- |
| art | {{< github "sourcebots/art" >}} | |
| docs | {{< github "sourcebots/docs" >}} | |
| Mainroad | {{< github "sourcebots/Mainroad" >}} | |
| volunteer-docs | {{< github "sourcebots/volunteer-docs" >}} | |
| Name | GitHub Repository |
| -------------- | ------------------------------------------ |
| art | {{< github "sourcebots/art" >}} |
| docs | {{< github "sourcebots/docs" >}} |
| Mainroad | {{< github "sourcebots/Mainroad" >}} |
| volunteer-docs | {{< github "sourcebots/volunteer-docs" >}} |

## Misc

| Name | GitHub Repository | More Info |
| ----------------- | --------------------------------------------- | --------- |
| blocklyscienceday | {{< github "sourcebots/blocklyscienceday" >}} | |
| testing-repo | {{< github "sourcebots/testing-repo" >}} | |
| Name | GitHub Repository |
| ----------------- | --------------------------------------------- |
| blocklyscienceday | {{< github "sourcebots/blocklyscienceday" >}} |
| testing-repo | {{< github "sourcebots/testing-repo" >}} |

## Robot Code

| Module Name | GitHub Repository | Presentation | More Info |
| -------------- | ------------------------------------------ | ------------ | --------- |
| dfu-bootloader | {{< github "sourcebots/dfu-bootloader" >}} | | |
| motor-v4-fw | {{< github "sourcebots/motor-v4-fw" >}} | | |
| pi-image | {{< github "sourcebots/pi-image" >}} | | |
| powerman | {{< github "sourcebots/powerman" >}} | | |
| power-v4-fw | {{< github "sourcebots/power-v4-fw" >}} | | |
| robot-api | {{< github "sourcebots/robot-api" >}} | | |
| robotd | {{< github "sourcebots/robotd" >}} | | |
| runusb | {{< github "sourcebots/runusb" >}} | | |
| sb-vision | {{< github "sourcebots/sb-vision" >}} | | |
| servo-firmware | {{< github "sourcebots/servo-firmware" >}} | | |
| simulator | {{< github "sourcebots/simulator" >}} | | |
| zone-script | {{< github "sourcebots/zone-script" >}} | | |
| Module Name | GitHub Repository | Presentation |
| -------------- | ------------------------------------------ | ------------ |
| dfu-bootloader | {{< github "sourcebots/dfu-bootloader" >}} | |
| motor-v4-fw | {{< github "sourcebots/motor-v4-fw" >}} | |
| pi-image | {{< github "sourcebots/pi-image" >}} | |
| powerman | {{< github "sourcebots/powerman" >}} | |
| power-v4-fw | {{< github "sourcebots/power-v4-fw" >}} | |
| robot-api | {{< github "sourcebots/robot-api" >}} | |
| robotd | {{< github "sourcebots/robotd" >}} | |
| runusb | {{< github "sourcebots/runusb" >}} | |
| sb-vision | {{< github "sourcebots/sb-vision" >}} | |
| servo-firmware | {{< github "sourcebots/servo-firmware" >}} | |
| simulator | {{< github "sourcebots/simulator" >}} | |
| zone-script | {{< github "sourcebots/zone-script" >}} | |

## Utilities

| Name | GitHub Repository | More Info |
| ------------- | ----------------------------------------- | --------- |
| Arturo | {{< github "sourcebots/Arturo" >}} | |
| barcode-gen | {{< github "sourcebots/barcode-gen" >}} | |
| kit-testing | {{< github "sourcebots/kit-testing" >}} | |
| marker-to-pdf | {{< github "sourcebots/marker-to-pdf" >}} | |
| pcb-util | {{< github "sourcebots/pcb-util" >}} | |
| srcomp-kiosk | {{< github "sourcebots/srcomp-kiosk" >}} | |
| tools | {{< github "sourcebots/tools" >}} | |
| Name | GitHub Repository |
| ------------- | ----------------------------------------- |
| Arturo | {{< github "sourcebots/Arturo" >}} |
| barcode-gen | {{< github "sourcebots/barcode-gen" >}} |
| kit-testing | {{< github "sourcebots/kit-testing" >}} |
| marker-to-pdf | {{< github "sourcebots/marker-to-pdf" >}} |
| pcb-util | {{< github "sourcebots/pcb-util" >}} |
| srcomp-kiosk | {{< github "sourcebots/srcomp-kiosk" >}} |
| tools | {{< github "sourcebots/tools" >}} |

[sb-github]: https://github.com/sourcebots
36 changes: 36 additions & 0 deletions content/codebase/robotd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: RobotD
---

{{% notice info %}}
This page details information about how the code works that is beyond the scope of the README file. The information is not guaranteed to be completely up to date, but is intended to give a general overview of the structure and workings of the module.
{{% /notice %}}

RobotD runs a master process which monitors for robot peripherals. For each peripheral it finds, it opens a UNIX seqpacket socket in `/var/robotd/<type>/<id>`.

You can find out more about how to use it at the GitHub page: {{< github "sourcebots/robotd" >}}.

## Diagram of RobotD

{{<mermaid>}}
graph TB
subgraph ""
BoardMeta --> Board
Board --> Camera
Board --> Motor
Board --> Servo
Board --> Game
Board --> Power
end
subgraph ""
MasterProcess -.-> BoardRunner
BoardRunner -.-> Connection
BoardRunner -.-> Board
end
{{</mermaid>}}

This diagram represents a simplified structure of the classes inside robotD and how they interact with each other. More information on the individual classes can be found below.

## Classes

{{% display_classes "robotd" %}}
20 changes: 20 additions & 0 deletions data/codebase/robotd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
classes:
- class:
name: BoardMeta
file: devices_base.py
inherits: type
subclasses:
- Board
description: This is a MetaClass that manages the creation of Boards. It creates a list of all boards that have been defined in `BoardMeta.BOARDS`.
- class:
name: Board
file: devices_base.py
subclasses:
- Camera
- MotorBoard
- etc
description: This class defines a generic device with empty methods. Subclasses of `Board` define how to detect these boards and how to interact with them. It is created using a MetaClass `BoardMeta`. It is worth noting that `Board` is likely to be renamed in the future as not all peripherals are boards
- class:
name: Connection
file: master.py
description: This class provides an abstraction around the socket such that `robot-api` can communicate with the `Board` classes using
28 changes: 28 additions & 0 deletions layouts/shortcodes/display_classes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{ with (index .Site.Data.codebase (.Get 0)) }}
{{ range .classes }}
<h3> {{ .class.name }} </h3>
<table>
<tr>
<td>File:</td>
<td>{{ .class.file }}</td>
</tr>
{{ if isset .class "inherits" }}
<tr>
<td>Inherits From:</td>
<td><code>{{ .class.inherits }}</code></td>
</tr>
{{ end }}
{{ if isset .class "subclasses" }}
<tr>
<td>Subclasses:</td>
<td>
{{ range .class.subclasses }}
<code>{{ . }}</code>&nbsp;
{{ end }}
</td>
</tr>
{{ end }}
</table>
<p> {{ .class.description | markdownify | safeHTML }} </p>
{{ end }}
{{ end }}