SBB Host
Host communication with the self balancing bike.
Loading...
Searching...
No Matches
Params Class Reference

A class for the application setting parameters. More...

#include <Params.h>

Public Member Functions

 Params (int def_port)
 Constructor. More...
 
 ~Params ()
 Destructor. More...
 

Public Attributes

int conn_type = SERIAL
 Connection type. Default is SERIAL. More...
 
int port
 Current serial port used. Default is NULL_PORT. More...
 
int baud
 Current baudrate used. More...
 
int socket_port
 Socket port. Default is 9876. More...
 
std::string socket_ip
 Socket IP address. Default is "192.168.1.0". More...
 
unsigned int header
 Header used for the host communication. More...
 
unsigned int terminator
 Terminator used for the host communication. More...
 
int timeout
 Timeout used for the host communication. More...
 
int max_missing_packets
 Max missing packets during signal streaming. More...
 
int window_samples
 Samples shown in the stream graph. More...
 
int forward_samples
 Foward samples shown in the stream graph. More...
 
int stream_graph_decim
 Stream graph decimation. More...
 
int plot_graph_decim
 Plot graph decimation. More...
 
int fps
 Frame rate of the stream graph. More...
 
int num_of_signals
 Number of signals. More...
 
int num_of_controls
 Number of controls. More...
 
std::vector< std::string > signals
 Name of signals. More...
 
std::vector< std::string > controls
 Name of controls. More...
 
std::vector< double > control_min
 Minimum values of controls. More...
 
std::vector< double > control_max
 Maximum values of controls. More...
 
std::vector< double > control_val
 Default values of controls. More...
 
std::string gsettings_dir
 GSetting directory. More...
 
int use_darkmode
 
int mainWin_width
 Main window width. More...
 
int mainWin_height
 Main window height. More...
 
int messageDialog_width
 Message dialog width.. More...
 
int messageDialog_height
 Message dialog height. More...
 
int settingsDialog_width
 Setting dialog width. More...
 
int settingsDialog_height
 Setting dialog height. More...
 
double label_scale
 Graph label scale. More...
 
double tick_scale
 Graph tick scale. More...
 
double line_width
 Graph line width. More...
 
double graph_width
 Graph width. More...
 
double graph_height
 Graph height. More...
 
double graph_offsetx
 Graph x offset. More...
 
double graph_offsety
 Graph y offset. More...
 

Static Public Attributes

static constexpr int SERIAL = 0
 USB/Serial connection constant. More...
 
static constexpr int TCP = 1
 TCP/IP connection constant. More...
 
static constexpr int UDP = 2
 UDP/Broadcast connection constant. More...
 

Detailed Description

A class for the application setting parameters.

Class containing the parameters for the SBB Host Application. Most of the parameters are from the configuration file of by default from config.h. This is only a container, no function members exists.

See also
SBBHostApp SBBHostCore SettingsDialog
Author
Stefano Lovato
Date
2022

Constructor & Destructor Documentation

◆ Params()

Params::Params ( int  def_port)

Constructor.

Default constructor.

Parameters
def_portThe default value for port.

◆ ~Params()

Params::~Params ( )

Destructor.

Default destructor.

Member Data Documentation

◆ baud

int Params::baud

Current baudrate used.

◆ conn_type

int Params::conn_type = SERIAL

Connection type. Default is SERIAL.

◆ control_max

std::vector<double> Params::control_max

Maximum values of controls.

◆ control_min

std::vector<double> Params::control_min

Minimum values of controls.

◆ control_val

std::vector<double> Params::control_val

Default values of controls.

◆ controls

std::vector<std::string> Params::controls

Name of controls.

◆ forward_samples

int Params::forward_samples

Foward samples shown in the stream graph.

◆ fps

int Params::fps

Frame rate of the stream graph.

◆ graph_height

double Params::graph_height

Graph height.

◆ graph_offsetx

double Params::graph_offsetx

Graph x offset.

◆ graph_offsety

double Params::graph_offsety

Graph y offset.

◆ graph_width

double Params::graph_width

Graph width.

◆ gsettings_dir

std::string Params::gsettings_dir

GSetting directory.

◆ header

unsigned int Params::header

Header used for the host communication.

◆ label_scale

double Params::label_scale

Graph label scale.

◆ line_width

double Params::line_width

Graph line width.

◆ mainWin_height

int Params::mainWin_height

Main window height.

◆ mainWin_width

int Params::mainWin_width

Main window width.

◆ max_missing_packets

int Params::max_missing_packets

Max missing packets during signal streaming.

◆ messageDialog_height

int Params::messageDialog_height

Message dialog height.

◆ messageDialog_width

int Params::messageDialog_width

Message dialog width..

◆ num_of_controls

int Params::num_of_controls

Number of controls.

◆ num_of_signals

int Params::num_of_signals

Number of signals.

◆ plot_graph_decim

int Params::plot_graph_decim

Plot graph decimation.

◆ port

int Params::port

Current serial port used. Default is NULL_PORT.

◆ SERIAL

constexpr int Params::SERIAL = 0
staticconstexpr

USB/Serial connection constant.

◆ settingsDialog_height

int Params::settingsDialog_height

Setting dialog height.

◆ settingsDialog_width

int Params::settingsDialog_width

Setting dialog width.

◆ signals

std::vector<std::string> Params::signals

Name of signals.

◆ socket_ip

std::string Params::socket_ip

Socket IP address. Default is "192.168.1.0".

◆ socket_port

int Params::socket_port

Socket port. Default is 9876.

◆ stream_graph_decim

int Params::stream_graph_decim

Stream graph decimation.

◆ TCP

constexpr int Params::TCP = 1
staticconstexpr

TCP/IP connection constant.

◆ terminator

unsigned int Params::terminator

Terminator used for the host communication.

◆ tick_scale

double Params::tick_scale

Graph tick scale.

◆ timeout

int Params::timeout

Timeout used for the host communication.

◆ UDP

constexpr int Params::UDP = 2
staticconstexpr

UDP/Broadcast connection constant.

◆ use_darkmode

int Params::use_darkmode

◆ window_samples

int Params::window_samples

Samples shown in the stream graph.