Namespace for the user interface. More...
Functions | |
void | configfromUserInput (std::string &casterName, std::string &serialPortName) |
Function to ask the user to define the config parameters. | |
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, the function returns 0, otherwise it returns 1. | |
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. | |
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. | |
void | padMessage (std::string &message, int padding) |
Function to pad a message with a certain number of dashes on each side. | |
Variables | |
int | WINDOW_WIDTH = 80 |
The width of the terminal interface. | |
Namespace for the user interface.
void petitpoucet::ui::configfromUserInput | ( | std::string & | casterName, |
std::string & | serialPortName | ||
) |
Function to ask the user to define the config parameters.
casterName | The reference to the name of the caster. |
serialPortName | The reference to the name of the serial port. |
int petitpoucet::ui::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, the function returns 0, otherwise it returns 1.
option1 | The first option. |
option2 | The second option. |
message | The message to display to the user to explain the choice presented. |
void petitpoucet::ui::interfaceForInstantaneousPosition | ( | int | minimumSNR, |
petitpoucet::serverinterface::PPServerOptions | options, | ||
std::string | casterName, | ||
std::string | serialPortName, | ||
petitpoucet::serverinterface::CoordinateSystem | coordinateSystem | ||
) |
User interface for getting the instantaneous position.
allowableSNR | The minimum signal to noise ratio to trigger the instantaneous position recording. |
options | The options for the server. |
casterName | The name of the caster. |
serialPortName | The name of the serial port. |
coordinateSystem | The coordinate system to use. |
void petitpoucet::ui::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.
minimumSNR | The minimum signal to noise ratio to trigger the instantaneous position recording. |
options | The options for the server. |
casterName | The name of the caster. |
serialPortName | The name of the serial port. |
coordinateSystem | The coordinate system to use. |
void petitpoucet::ui::padMessage | ( | std::string & | message, |
int | padding | ||
) |
Function to pad a message with a certain number of dashes on each side.
message | The message to pad. |
padding | The number of dashes to add on each side. |
int petitpoucet::ui::WINDOW_WIDTH = 80 |
The width of the terminal interface.