Skip to content

LiveDashServer structure

Audun Wigum Arbo edited this page May 22, 2018 · 8 revisions

This page contains an overview of the structure of the LiveDash backend.

The main project

The main code of the project is located within the LiveDashServer folder. These are the most imporant files inside this folder:

  • Program.cs - The entry point and static main class of the application
  • Server.cs - A wrapper around the WebSocket server which keeps track of all clients
  • Client.cs - Represents a web application user, and wraps around a WebSocket client
  • ForwarderConnection.cs - Used to receive data from Analyze, which forwards data directly from the car
  • ForwarderMessage.cs - Represents a message sent from Analyze, which contains a set of data values
  • DataSimulator.cs - Generates fake data for sending to client when there is no Analyze instance connected

Calculated channels

The ICalculatedChannel interface serves as a base for calculated channels. Calculated channels take one or more data channels as input. It acts as a data channel which produces values calculated from the input channels.

The CalculatedChannelEuclidian implements this interface. It takes the euclidian distance (vector length) of two input channels. It's mainly used for channel pairs like velocity in the x and y direction

Extension classes

  • StreamExtensions - Contains extensions methods for the Stream class
  • TaskExtensions - Contains extensions methods for the Task class

External tools

The repository contains some files used by various external tools:

  • .gitmodules - Defines the git submodules for this repository. It is used to include the WebSoketListener project.
  • .travis.yml - The config file for Travis CI, see Continuous Integration (CI).
  • *.DotSettings files - Configuration files for ReSharper, see Tools.
  • LiveDashServer/nlog.config - The configuration file for NLog, see Tools.
  • LiveDashServer/NLog.xsd - A XML schema used by the IDE to auto-complete when editing the nlog.config file.
  • LiveDashServer/docfx.json - The configuration file for DocFX, see Tools.

Test project

The LiveDashServer.Tests folder contains all the test classes and methods for the project.

WebSocketListener

The WebSocketListener folder is the source of the web socket library that is used for the project. The project has been forked from the original source, and modified to better support mocking. This is a Git submodule.

Clone this wiki locally