Controller is the backend of the simulation system. It coordinates all machines and devices to perform tasks, such as turning on/off the sytem, collecting status, etc.
There are two parts: server and client. All communication between server and client is via gRPC.
Server runs on a single machine and connects to all clients to act as central control. It:
- dispatches command to all clients
- collect component status from all clients
- serve http APIs to frontend/UI
Client runs on every machine and acts as worker for server. Based on configuration, it:
- loads components to control apps, devices, etc
- reports status of components to server.
-
Install Python 2.7
Choose X86 version regardless if OS is 64bit.
-
Install Make for Windows
2.1. Download and install from http://gnuwin32.sourceforge.net/packages/make.htm
2.2. Add "C:\Program Files (X86)\GnuWin32\bin" to System PATH
-
Install Microsoft Visual C++ Compiler for Python 2.7
https://www.microsoft.com/en-us/download/details.aspx?id=44266
-
Install all the dependencies:
make init
-
Build source code:
make build
To have server or client run automatically on reboot:
make install-clientmake install-serverTo run server or client manually:
make run-clientmake run-server