-
Notifications
You must be signed in to change notification settings - Fork 7
Software: Overview
The system software is made up of two main components: the web browser GUI or client, which is used to control and interact with the experiment, and the server-side software, which directly runs the experiment and its attached webserver. A software system diagram is shown below:
[Terminology] (https://github.com/szmoore/MCTX3420/wiki/Software:-Terminology)
The web GUI runs in a browser on the client PC and performs three main tasks:
- Remote interface
- Allows the user to control the experiment hardware remotely
- Data processing
- Allows the user to access and download experimental data and perform some simple processing
- Security
- Ensures that only authorised users can access the hardware
Any existing web browser can be used as a client - you can just manually type in the appropriate URL to control the system. You are also not restricted to using a certain browser, as any software that understands the HTTP protocol could be used. The GUI has been written in Javascript and HTML and provides a human-friendly interface to the server API functions which are used to interact with the system.
For more information on how to use the Web GUI, see here:
-
Using the web interface
- [Step-by-step guide] (https://github.com/szmoore/MCTX3420/wiki/Getting-Started:-Step-by-Step-Guide)
- [Running an experiment] (https://github.com/szmoore/MCTX3420/wiki/Getting-Started:-Run-an-Experiment)
- [Viewing previous experiments] (https://github.com/szmoore/MCTX3420/wiki/Getting-Started:-View-Old-Experiments)
- Data processing
The server also features some administrator functionality, including a user management system (i.e. logins with passwords) and a pin debugging system troubleshooting hardware issues.
- [User maganagement] (https://github.com/szmoore/MCTX3420/wiki/Getting-Started:-Admin-Functionality)
- [Pin debugging] (https://github.com/szmoore/MCTX3420/wiki/Getting-Started:-Pin-Debugging)
For more information on the actual GUI code, see here:
The server runs on the BeagleBone and performs four main tasks:
- Hardware control
- Reading input pins to get data from sensors and actuators
- Writing output pins to control actuators
- Camera control
- Taking images from the two cameras and performing the appropriate processing
- Data collection/transfer
- Recording sensor data, storing it, and transferring it to the server
- Getting actuator data, storing it, and implementing it in the system
- Server control
- Running a webserver to act as an remote interface between the user and the system
An existing HTTP server called Nginx runs on the system. Nginx has all the features of a standard HTTP server; it can provide web browsers with HTML files and JavaScript. Our server runs as a FastCGI process. Nginx has been configured to pass all requests to a URL starting in "/api" to our server through FastCGI, and the server sends the appropriate response to Nginx, which then relays it back to the client.
The server software runs within the BeagleBone's operating system, which is a distribution of Linux (Ubuntu). This operating system means it is relatively to modify files and code directly on the BeagleBone itself. Running the software inside the OS means that there can be occasional inconsistencies with program timing - however, these should not affect the server's operation.
For data storage, the server has a separate folder for each user in which their experiment data is stored. Each experiment has an "owner" (the user that ran it) which controls this data; a user can run multiple experiments, which are stored separately. Some users are also administrators with more advanced control over the server functionality.
For more information on directly using the server API, see here:
For more information on the actual server code, see here:
- Operating system
-
Server code
- [Data handling] (https://github.com/szmoore/MCTX3420/wiki/Software:-Data-Handling)
- [Pin access] (https://github.com/szmoore/MCTX3420/wiki/Software:-Pin-Access)
- [Sensors and actuators] (https://github.com/szmoore/MCTX3420/wiki/Software:-Sensors-&-Actuators)
- [Image processing] (https://github.com/szmoore/MCTX3420/wiki/Software:-Image-Processing)
Unfortunately the server setup process is not current automated. For a guide on how to setup and access the server if it is not currently running, see the pages below:
-
Installation
- [Operating system] (https://github.com/szmoore/MCTX3420/wiki/Software:-Operating-System)
- [Software prerequisites] (https://github.com/szmoore/MCTX3420/wiki/Software%3A-Required-packages-and-dependencies)
- [Server configuration] (https://github.com/szmoore/MCTX3420/wiki/Software%3A-Server-configuration)
-
Setup
- [Accessing the BeagleBone] (https://github.com/szmoore/MCTX3420/wiki/Software:-Accessing-the-BeagleBone)
- [Starting the server] (https://github.com/szmoore/MCTX3420/wiki/Software:-Starting-the-server)