|
SBB Host
Host communication with the self balancing bike.
|
A configuration file for the source code. More...
#include "dirs.h"Go to the source code of this file.
Macros | |
| #define | VERSION "0.1" |
| App version. More... | |
| #define | AUTHOR_COPYRIGHT "Stefano Lovato" |
| Author copyright list. More... | |
| #define | APP_COMMENTS "This is an application to stream the input & output data from the self-balancing bike, as well as to read the datalog file" |
| App description. More... | |
| #define | LICTYPE "MIT License" |
| License type. More... | |
| #define | WEBSITE "https://www.dii.unipd.it/" |
| Website. More... | |
| #define | WEBSITE_LABEL "DII UniPd website" |
| Website label. More... | |
| #define | LIST_AUTHOR "Stefano Lovato" |
| App author. More... | |
| #define | SIGNALS_NAMES |
| Default signal names (if unable to load them from the configuration file). More... | |
| #define | CONTROL_NAMES "Curr ref", "Throttle" |
| Default control names (if unable to load them from the configuration file). More... | |
| #define | CONTROL_MIN -1, -1 |
| Default control minimum values (if unable to load them from the configuration file). More... | |
| #define | CONTROL_MAX +1, +1 |
| Default control maximum values (if unable to load them from the configuration file). More... | |
| #define | CONTROL_VAL +0, 0 |
| Default control values (if unable to load them from the configuration file). More... | |
| #define | CONFIG_FILE "sbbhost-config.ini" |
| #define | DEFCONFIG_FILE CONFIG_FILE_LINUX |
| Name of the configuration file. More... | |
| #define | LASTCONFIG_FILE ".sbbhost.def" |
| Save here the last configuration file used. More... | |
| #define | PACKET_SIZE 64 |
| Size of the data packet (do not change unless necessary. More... | |
| #define | MAX_MISSING_PACKETS 100 |
| Default maximum missing packets (if unable to load it from the configuration file). More... | |
| #define | NULL_PORT -1 |
| Null serial port. More... | |
| #define | MAX_PORT 128 |
| Max port number of serial communication. More... | |
| #define | MAX_LOGGED_SAMPLES 500*60*60 |
| Max number of logged data element. More... | |
| #define | FILENAME_MAXSIZE 128 |
| Max length of the logged-data file name. More... | |
| #define | FILENAME_FORMAT_STRING "log_%04d-%02d-%02d_%02d-%02d-%02d" |
| Default format for the logged-data file name. More... | |
| #define | FILENAME_FORMAT_ENTRIES time.getYear(), time.getMonth(), time.getDay(), time.getHour(), time.getMin(), time.getSec() |
| Entries for the default format of the logged-data file name. More... | |
| #define | NULL_ID -1 |
| Null log ID. More... | |
| #define | NAN_VAL 0xffc00000 |
| NaN val sent when controls not enabled. More... | |
| #define | BAUD 115200 |
| Defalt baudrate of serial communication (if unable to load it from the configuration file). More... | |
| #define | SOCKET_IP "192.168.0.1" |
| Default IP. More... | |
| #define | SOCKET_PORT 1234 |
| Default port. More... | |
| #define | APP_NAME "SBB Host" |
| App name. More... | |
| #define | RUN_BUTLABEL "Run" |
| Run button label - not used. More... | |
| #define | STOP_BUTLABEL "Stop" |
| Stop button label - not used. More... | |
| #define | RUN_BUTICON "media-playback-start-symbolic" |
| Run button symbol. More... | |
| #define | STOP_BUTICON "media-playback-stop-symbolic" |
| Stop button symbol. More... | |
| #define | LOG_BUTLABEL "Log" |
| Log button label. More... | |
| #define | STREAM_LABEL "Stream" |
| Stream tab label. More... | |
| #define | PLOT_LABEL "Plot" |
| Plot tab label. More... | |
| #define | STREAM_PAGE 0 |
| Stream tab page id. More... | |
| #define | PLOT_PAGE 1 |
| Plot tab page id. More... | |
| #define | MAINWIN_WIDTH 1080 |
| Default main window width (if unable to load it from the configuration file). More... | |
| #define | MAINWIN_HEIGHT 720 |
| Default main window height (if unable to load it from the configuration file). More... | |
| #define | MARGIN 10 |
| Margin between widgets. More... | |
| #define | MESSDIALOG_WIDTH 400 |
| Default message dialog window width (if unable to load it from the configuration file). More... | |
| #define | MESSDIALOG_HEIGHT 200 |
| Default message dialog window height (if unable to load it from the configuration file). More... | |
| #define | SETTINGWIN_WIDTH 500 |
| Default setting window width (if unable to load it from the configuration file). More... | |
| #define | SETTINGWIN_HEIGHT 400 |
| Default setting window height (if unable to load it from the configuration file). More... | |
| #define | SETTINGWIN_NAME "Settings" |
| Setting window name. More... | |
| #define | STREAMSETTINGS_LABEL "Stream settings" |
| Stream setting tab label. More... | |
| #define | PLOTSETTINGS_LABEL "Plot settings" |
| Plot setting tab label. More... | |
| #define | HOSTCTRLWIN_NAME "Host control" |
| Host-control window name. More... | |
| #define | TOOLBAR_XML TOOLBAR_XML_LINUX |
| Toolbar XML file name. More... | |
| #define | SAVE_FILE_LABEL "Please select a *.sbb/*.dat/*.mat file to save to" |
| File>SaveAs label. More... | |
| #define | OPEN_FILE_LABEL "Please select a *.sbb file to open" |
| File>Open label. More... | |
| #define | LOAD_CFG_LABEL "Please select a *.ini file to load" |
| Load config label. More... | |
| #define | SETFOLDER_LABEL "Please select a folder to use as default" |
| File>SetFolder label. More... | |
| #define | FILE_START_FLAG "file://" |
| Header when drag & drop a file into the application. More... | |
| #define | FILE_END_FLAG "\r\n" |
| Terminator when drag & drop a file into the application. More... | |
| #define | FILE_EXT ".sbb" |
| Logged-data file extension (SBB stands for self-balancing-bike). More... | |
| #define | FILE_CSV ".dat" |
| File extension of DAT files. More... | |
| #define | FILE_MAT ".mat" |
| File extension of MAT files. More... | |
| #define | FILE_INI ".ini" |
| File extension of INI files. More... | |
| #define | FILE_EXT_LABEL "sbb files" |
| Logged-data file label. More... | |
| #define | FILE_CSV_LABEL "dat files" |
| File label for DAT files. More... | |
| #define | FILE_MAT_LABEL "mat files" |
| File label for MAT files. More... | |
| #define | FILE_INI_LABEL "ini files" |
| File label for INI files. More... | |
| #define | FILE_SEP '/' |
| File separator (for Linux). More... | |
| #define | STREAMTREE_FRAMELABEL "Signals" |
| Frame label of the stream tree. More... | |
| #define | STREAMTIME_FORMAT "%02d:%02d:%02d" |
| String format of stream time label. More... | |
| #define | STREAMTIME_UPDATE_MS 1000 |
| Update rate of stream time label. More... | |
| #define | UPDATE_FPS 8 |
| Default frame rate of the stream graph (if unable to load it from the configuration file). More... | |
| #define | LABEL_SCALE 0.66 |
| Default graph label scale (if unable to load it from the configuration file). More... | |
| #define | TICK_SCALE 0.66 |
| Default tick scale (if unable to load it from the configuration file). More... | |
| #define | DARKMODE 0 |
| Default darkmode enable (if unable to load it from the configuration file). More... | |
| #define | WINDOW_SAMPLES 1000 |
| Default samples to show in the stream graph (if unable to load it from the configuration file). More... | |
| #define | FORWARD_SAMPES 200 |
| Default foward samples to show in the stream graph (if unable to load it from the configuration file). More... | |
| #define | LINE_WIDTH 0.50 |
| Default line width of graph(if unable to load it from the configuration file). More... | |
| #define | GRAPH_OFFSETX 0.05 |
| Default graph offset x (if unable to load it from the configuration file). More... | |
| #define | GRAPH_OFFSETY 0.05 |
| Default graph offset y (if unable to load it from the configuration file). More... | |
| #define | GRAPH_WIDTH 0.925 |
| Default graph width (if unable to load it from the configuration file). More... | |
| #define | GRAPH_HEIGHT 0.875 |
| Default graph height (if unable to load it from the configuration file). More... | |
| #define | STREAM_GRAPH_DECIM 5 |
| Default stram graph decimation (if unable to load it from the configuration file). More... | |
| #define | PLOT_GRAPH_DECIM 2 |
| Default plot graph decimation (if unable to load it from the configuration file). More... | |
| #define | SETTING_LABEL_WIDTH 150 |
| Width for labels in the setting window. More... | |
| #define | SETTING_ENTRY_WIDTH 150 |
| Width for entries in the setting window. More... | |
| #define | STREAMTREE_MINWIDTH 75 |
| Minimum width of the stream tree. More... | |
| #define | PLOTTREE_MINWIDTH 75 |
| Minimum width of the plot tree. More... | |
| #define | STREAMGRAPH_MINWIDTH 50 |
| Minimum width f the stream graph. More... | |
| #define | PLOTGRAPH_MINWIDTH 50 |
| Minimum width f the plot graph. More... | |
| #define | STREAMPANED_POS_DEF 200 |
| Default position of the stream paned. More... | |
| #define | PLOTPANED_POS_DEF 300 |
| Default position of the plot paned. More... | |
| #define | INVALID_CHARS '/', '\\', '<', '>', '"', '|', '?', '*', '[', ']', ',', ';', '.', ':' |
| List of invalid char for file names. More... | |
| #define | SAMPLE_PLOTID 0 |
| Plot ID of sample-domain plot. More... | |
| #define | FFT_PLOTID 1 |
| Plot ID of the spectra plot. More... | |
| #define | PSD_PLOTID 2 |
| Plot ID of power-spectra-density plot. More... | |
| #define | FRF_PLOTID 3 |
| Plot ID of frequency-response-function plot. More... | |
| #define | DOC_FILE "start ..\\..\\docs\\html\\index.html" |
| Documentation main file. More... | |
| #define | EXIT_DEFAULT 0x00 |
| Default exit flag (no issues). More... | |
| #define | EXIT_LOSTCONNECTION 0x01 |
| Lost-connection exit flag. More... | |
| #define | EXIT_MISSINGPACKET 0x02 |
| Missing-packet exit flag. More... | |
| #define | EXIT_NOSERIALPORT 0x03 |
| No-serial-port-found exit flag. More... | |
| #define | EXIT_MULTIPLEPORT 0x04 |
| Multiple-serial-ports-found exit flag. More... | |
| #define | EXIT_UNABLECONNECT 0x05 |
| Unable-to-connect exit flag. More... | |
| #define | EXIT_CONNECTIONOK 0x06 |
| Connection-ok exit flag. More... | |
| #define | EXIT_NOLOGDATA 0x07 |
| No-logged-data exit flag. More... | |
| #define | EXIT_SAVEUNKNOWISS 0x08 |
| Unknown-issue-during-save exit flag. More... | |
| #define | EXIT_OPENUNKNOWISS 0x09 |
| Unknown-issue-during-open exit flag. More... | |
| #define | EXIT_ALLSAVED 0x0A |
| All-logged-data-saved exit flag. More... | |
| #define | EXIT_UNEXPECTED 0x0B |
| Unexpected-error exit flag. More... | |
| #define | EXIT_INVALIDHEADER 0x0C |
| Invalid-header exit flag. More... | |
| #define | EXIT_INVALIDTERMIN 0x0D |
| Invalid-terminator exit flag. More... | |
| #define | EXIT_MAXLOGGEDDATA 0x0E |
| Max-logged-data exit flag. More... | |
| #define | EXIT_INVALIFILEEXT 0x0F |
| Invalid-file-extension exit flag. More... | |
| #define | EXIT_INVALIDFILE 0x10 |
| Invalid-file exit flag. More... | |
| #define | EXIT_UNSELECTEDLOG 0x11 |
| Unselected-logged-data exit flag. More... | |
| #define | EXIT_TOOSELECTEDLOG 0x12 |
| Too-selected-logged-data exit flag. More... | |
| #define | EXIT_RESTART_APP_ON_CFG 0x13 |
| Restart app on load config flag. More... | |
| #define | EXIT_NOCONNECTION 0x14 |
| No connection (no IP). More... | |
| #define | EXIT_INVALIDIP 0x15 |
| Invalid IP spefified. More... | |
| #define | EXIT_INVALIDIP_SETTINGS 0x16 |
| Invalid IP specified in settings. More... | |
| #define | WARNING_BEEP 0 |
| Not used in Linux. More... | |
| #define | INFO_BEEP 0 |
| Not used in Linux. More... | |
| #define | ERROR_BEEP 0 |
| Not used in Linux. More... | |
| #define | GSETTINGS_SCHEMA_DIR_KEY "GSETTINGS_SCHEMA_DIR" |
| Key of the GSettings environment variable. More... | |
| #define | GSETTINGS_SCHEMA_DIR_VAL "./" |
| Default GSettings path (not used in Linux). More... | |
A configuration file for the source code.
Configuration file with defines and macros for the source code of the SBB Host application. This includes applicaton information (authors, version, etc...), default signal and control names, (default) settings for the SBBHostApp and SBBHostCore, appearance settings for the windows (e.g. see SettingsDialog, HostControl) and graph, default file extensions used, values for the exit flag for warnings and errors, and settings for local environment variables.
| #define APP_COMMENTS "This is an application to stream the input & output data from the self-balancing bike, as well as to read the datalog file" |
App description.
| #define APP_NAME "SBB Host" |
App name.
| #define AUTHOR_COPYRIGHT "Stefano Lovato" |
Author copyright list.
| #define BAUD 115200 |
Defalt baudrate of serial communication (if unable to load it from the configuration file).
| #define CONFIG_FILE "sbbhost-config.ini" |
| #define CONTROL_MAX +1, +1 |
Default control maximum values (if unable to load them from the configuration file).
| #define CONTROL_MIN -1, -1 |
Default control minimum values (if unable to load them from the configuration file).
| #define CONTROL_NAMES "Curr ref", "Throttle" |
Default control names (if unable to load them from the configuration file).
| #define CONTROL_VAL +0, 0 |
Default control values (if unable to load them from the configuration file).
| #define DARKMODE 0 |
Default darkmode enable (if unable to load it from the configuration file).
| #define DEFCONFIG_FILE CONFIG_FILE_LINUX |
Name of the configuration file.
| #define DOC_FILE "start ..\\..\\docs\\html\\index.html" |
Documentation main file.
| #define ERROR_BEEP 0 |
Not used in Linux.
| #define EXIT_ALLSAVED 0x0A |
All-logged-data-saved exit flag.
| #define EXIT_CONNECTIONOK 0x06 |
Connection-ok exit flag.
| #define EXIT_DEFAULT 0x00 |
Default exit flag (no issues).
| #define EXIT_INVALIDFILE 0x10 |
Invalid-file exit flag.
| #define EXIT_INVALIDHEADER 0x0C |
Invalid-header exit flag.
| #define EXIT_INVALIDIP 0x15 |
Invalid IP spefified.
| #define EXIT_INVALIDIP_SETTINGS 0x16 |
Invalid IP specified in settings.
| #define EXIT_INVALIDTERMIN 0x0D |
Invalid-terminator exit flag.
| #define EXIT_INVALIFILEEXT 0x0F |
Invalid-file-extension exit flag.
| #define EXIT_LOSTCONNECTION 0x01 |
Lost-connection exit flag.
| #define EXIT_MAXLOGGEDDATA 0x0E |
Max-logged-data exit flag.
| #define EXIT_MISSINGPACKET 0x02 |
Missing-packet exit flag.
| #define EXIT_MULTIPLEPORT 0x04 |
Multiple-serial-ports-found exit flag.
| #define EXIT_NOCONNECTION 0x14 |
No connection (no IP).
| #define EXIT_NOLOGDATA 0x07 |
No-logged-data exit flag.
| #define EXIT_NOSERIALPORT 0x03 |
No-serial-port-found exit flag.
| #define EXIT_OPENUNKNOWISS 0x09 |
Unknown-issue-during-open exit flag.
| #define EXIT_RESTART_APP_ON_CFG 0x13 |
Restart app on load config flag.
| #define EXIT_SAVEUNKNOWISS 0x08 |
Unknown-issue-during-save exit flag.
| #define EXIT_TOOSELECTEDLOG 0x12 |
Too-selected-logged-data exit flag.
| #define EXIT_UNABLECONNECT 0x05 |
Unable-to-connect exit flag.
| #define EXIT_UNEXPECTED 0x0B |
Unexpected-error exit flag.
| #define EXIT_UNSELECTEDLOG 0x11 |
Unselected-logged-data exit flag.
| #define FFT_PLOTID 1 |
Plot ID of the spectra plot.
| #define FILE_CSV ".dat" |
File extension of DAT files.
| #define FILE_CSV_LABEL "dat files" |
File label for DAT files.
| #define FILE_END_FLAG "\r\n" |
Terminator when drag & drop a file into the application.
| #define FILE_EXT ".sbb" |
Logged-data file extension (SBB stands for self-balancing-bike).
| #define FILE_EXT_LABEL "sbb files" |
Logged-data file label.
| #define FILE_INI ".ini" |
File extension of INI files.
| #define FILE_INI_LABEL "ini files" |
File label for INI files.
| #define FILE_MAT ".mat" |
File extension of MAT files.
| #define FILE_MAT_LABEL "mat files" |
File label for MAT files.
| #define FILE_SEP '/' |
File separator (for Linux).
| #define FILE_START_FLAG "file://" |
Header when drag & drop a file into the application.
| #define FILENAME_FORMAT_ENTRIES time.getYear(), time.getMonth(), time.getDay(), time.getHour(), time.getMin(), time.getSec() |
Entries for the default format of the logged-data file name.
| #define FILENAME_FORMAT_STRING "log_%04d-%02d-%02d_%02d-%02d-%02d" |
Default format for the logged-data file name.
| #define FILENAME_MAXSIZE 128 |
Max length of the logged-data file name.
| #define FORWARD_SAMPES 200 |
Default foward samples to show in the stream graph (if unable to load it from the configuration file).
| #define FRF_PLOTID 3 |
Plot ID of frequency-response-function plot.
| #define GRAPH_HEIGHT 0.875 |
Default graph height (if unable to load it from the configuration file).
| #define GRAPH_OFFSETX 0.05 |
Default graph offset x (if unable to load it from the configuration file).
| #define GRAPH_OFFSETY 0.05 |
Default graph offset y (if unable to load it from the configuration file).
| #define GRAPH_WIDTH 0.925 |
Default graph width (if unable to load it from the configuration file).
| #define GSETTINGS_SCHEMA_DIR_KEY "GSETTINGS_SCHEMA_DIR" |
Key of the GSettings environment variable.
| #define GSETTINGS_SCHEMA_DIR_VAL "./" |
Default GSettings path (not used in Linux).
| #define HOSTCTRLWIN_NAME "Host control" |
Host-control window name.
| #define INFO_BEEP 0 |
Not used in Linux.
| #define INVALID_CHARS '/', '\\', '<', '>', '"', '|', '?', '*', '[', ']', ',', ';', '.', ':' |
List of invalid char for file names.
| #define LABEL_SCALE 0.66 |
Default graph label scale (if unable to load it from the configuration file).
| #define LASTCONFIG_FILE ".sbbhost.def" |
Save here the last configuration file used.
| #define LICTYPE "MIT License" |
License type.
| #define LINE_WIDTH 0.50 |
Default line width of graph(if unable to load it from the configuration file).
| #define LIST_AUTHOR "Stefano Lovato" |
App author.
| #define LOAD_CFG_LABEL "Please select a *.ini file to load" |
Load config label.
| #define LOG_BUTLABEL "Log" |
Log button label.
| #define MAINWIN_HEIGHT 720 |
Default main window height (if unable to load it from the configuration file).
| #define MAINWIN_WIDTH 1080 |
Default main window width (if unable to load it from the configuration file).
| #define MARGIN 10 |
Margin between widgets.
| #define MAX_LOGGED_SAMPLES 500*60*60 |
Max number of logged data element.
| #define MAX_MISSING_PACKETS 100 |
Default maximum missing packets (if unable to load it from the configuration file).
| #define MAX_PORT 128 |
Max port number of serial communication.
| #define MESSDIALOG_HEIGHT 200 |
Default message dialog window height (if unable to load it from the configuration file).
| #define MESSDIALOG_WIDTH 400 |
Default message dialog window width (if unable to load it from the configuration file).
| #define NAN_VAL 0xffc00000 |
NaN val sent when controls not enabled.
| #define NULL_ID -1 |
Null log ID.
| #define NULL_PORT -1 |
Null serial port.
| #define OPEN_FILE_LABEL "Please select a *.sbb file to open" |
File>Open label.
| #define PACKET_SIZE 64 |
Size of the data packet (do not change unless necessary.
| #define PLOT_GRAPH_DECIM 2 |
Default plot graph decimation (if unable to load it from the configuration file).
| #define PLOT_LABEL "Plot" |
Plot tab label.
| #define PLOT_PAGE 1 |
Plot tab page id.
| #define PLOTGRAPH_MINWIDTH 50 |
Minimum width f the plot graph.
| #define PLOTPANED_POS_DEF 300 |
Default position of the plot paned.
| #define PLOTSETTINGS_LABEL "Plot settings" |
Plot setting tab label.
| #define PLOTTREE_MINWIDTH 75 |
Minimum width of the plot tree.
| #define PSD_PLOTID 2 |
Plot ID of power-spectra-density plot.
| #define RUN_BUTICON "media-playback-start-symbolic" |
Run button symbol.
| #define RUN_BUTLABEL "Run" |
Run button label - not used.
| #define SAMPLE_PLOTID 0 |
Plot ID of sample-domain plot.
| #define SAVE_FILE_LABEL "Please select a *.sbb/*.dat/*.mat file to save to" |
File>SaveAs label.
| #define SETFOLDER_LABEL "Please select a folder to use as default" |
File>SetFolder label.
| #define SETTING_ENTRY_WIDTH 150 |
Width for entries in the setting window.
| #define SETTING_LABEL_WIDTH 150 |
Width for labels in the setting window.
| #define SETTINGWIN_HEIGHT 400 |
Default setting window height (if unable to load it from the configuration file).
| #define SETTINGWIN_NAME "Settings" |
Setting window name.
| #define SETTINGWIN_WIDTH 500 |
Default setting window width (if unable to load it from the configuration file).
| #define SIGNALS_NAMES |
Default signal names (if unable to load them from the configuration file).
| #define SOCKET_IP "192.168.0.1" |
Default IP.
| #define SOCKET_PORT 1234 |
Default port.
| #define STOP_BUTICON "media-playback-stop-symbolic" |
Stop button symbol.
| #define STOP_BUTLABEL "Stop" |
Stop button label - not used.
| #define STREAM_GRAPH_DECIM 5 |
Default stram graph decimation (if unable to load it from the configuration file).
| #define STREAM_LABEL "Stream" |
Stream tab label.
| #define STREAM_PAGE 0 |
Stream tab page id.
| #define STREAMGRAPH_MINWIDTH 50 |
Minimum width f the stream graph.
| #define STREAMPANED_POS_DEF 200 |
Default position of the stream paned.
| #define STREAMSETTINGS_LABEL "Stream settings" |
Stream setting tab label.
| #define STREAMTIME_FORMAT "%02d:%02d:%02d" |
String format of stream time label.
| #define STREAMTIME_UPDATE_MS 1000 |
Update rate of stream time label.
| #define STREAMTREE_FRAMELABEL "Signals" |
Frame label of the stream tree.
| #define STREAMTREE_MINWIDTH 75 |
Minimum width of the stream tree.
| #define TICK_SCALE 0.66 |
Default tick scale (if unable to load it from the configuration file).
| #define TOOLBAR_XML TOOLBAR_XML_LINUX |
Toolbar XML file name.
| #define UPDATE_FPS 8 |
Default frame rate of the stream graph (if unable to load it from the configuration file).
| #define VERSION "0.1" |
App version.
| #define WARNING_BEEP 0 |
Not used in Linux.
| #define WEBSITE "https://www.dii.unipd.it/" |
Website.
| #define WEBSITE_LABEL "DII UniPd website" |
Website label.
| #define WINDOW_SAMPLES 1000 |
Default samples to show in the stream graph (if unable to load it from the configuration file).