Petit Poucet
 
Loading...
Searching...
No Matches
TerminalInterface.hh
Go to the documentation of this file.
1#include <string> // for operator+, to_string
2#include <iostream>
3#include <fstream>
4#include <atomic>
5#include <chrono>
6#include <mutex>
7#include <thread>
8#include <numeric>
9#include <vector>
10
11
12#include "ftxui/component/captured_mouse.hpp"
13#include "ftxui/component/component.hpp"
14#include "ftxui/component/component_base.hpp"
15#include "ftxui/component/component_options.hpp"
16#include "ftxui/component/screen_interactive.hpp"
17#include "ftxui/dom/elements.hpp"
18#include "ftxui/screen/color.hpp"
19
20#include "../Server/ServerInterface.hh"
21
25namespace petitpoucet::ui
26{
32 void configfromUserInput(std::string &casterName, std::string &serialPortName);
33
40 int giveChoiceTwoOptions(std::string option1, std::string option2, std::string &message);
41
50 void interfaceForInstantaneousPosition(int minimumSNR, petitpoucet::serverinterface::PPServerOptions options, std::string casterName, std::string serialPortName, petitpoucet::serverinterface::CoordinateSystem coordinateSystem);
51
60 void interfaceForPositionOverTime(int minimumSNR, petitpoucet::serverinterface::PPServerOptions options, std::string casterName, std::string serialPortName, petitpoucet::serverinterface::CoordinateSystem coordinateSystem);
61
65 int WINDOW_WIDTH = 80;
66
72 void padMessage(std::string &message, int padding);
73} // namespace petitpoucet::ui
This class stores the options for the PPServer when setup by PPServerInterface::SetupServer.
Definition ServerInterface.hh:53
CoordinateSystem
Enum for the different coordinate systems. Destined to be expanded.
Definition ServerInterface.hh:44
Namespace for the user interface.
Definition TerminalInterface.cc:4
void configfromUserInput(std::string &casterName, std::string &serialPortName)
Function to ask the user to define the config parameters.
Definition TerminalInterface.cc:5
int giveChoiceTwoOptions(std::string option1, std::string option2, std::string &message)
Function to ask the user to choose between two options. If the user chooses the first option,...
Definition TerminalInterface.cc:36
void interfaceForPositionOverTime(int minimumSNR, petitpoucet::serverinterface::PPServerOptions options, std::string casterName, std::string serialPortName, petitpoucet::serverinterface::CoordinateSystem coordinateSystem)
User interface for getting the position over time, where the user triggers and stops the measurment.
Definition TerminalInterface.cc:174
void padMessage(std::string &message, int padding)
Function to pad a message with a certain number of dashes on each side.
Definition TerminalInterface.cc:387
void interfaceForInstantaneousPosition(int minimumSNR, petitpoucet::serverinterface::PPServerOptions options, std::string casterName, std::string serialPortName, petitpoucet::serverinterface::CoordinateSystem coordinateSystem)
User interface for getting the instantaneous position.
Definition TerminalInterface.cc:69
int WINDOW_WIDTH
The width of the terminal interface.
Definition TerminalInterface.hh:65