|
VT100 Terminal App
Circle VT100 module documentation
|
Cooperative task responsible for configuration persistence and lookup. More...
#include <TConfig.h>
Public Member Functions | |
| CTConfig (void) | |
| Construct the configuration task with default values. | |
| ~CTConfig (void) | |
| Release configuration resources. | |
| boolean | Initialize (void) |
| Initialize the configuration task and load defaults. | |
| void | Run () override |
| Scheduler entry point to service configuration events. | |
| boolean | LoadFromFile (void) |
| Load configuration from persistent storage if present. | |
| boolean | SaveToFile (void) |
| Save current configuration values to persistent storage. | |
| unsigned int | GetLineEndingMode (void) const |
| Retrieve the line ending mode (0=LF, 1=CRLF, 2=CR). | |
| void | SetLineEndingMode (unsigned int mode) |
| Update the configured line ending mode. | |
| unsigned int | GetBaudRate (void) const |
| Retrieve the configured serial baud rate. | |
| void | SetBaudRate (unsigned int baudRate) |
| Set the serial baud rate. | |
| boolean | GetCursorBlock (void) const |
| Check whether the cursor is configured as block style. | |
| void | SetCursorBlock (boolean block) |
| Change cursor style. | |
| boolean | GetCursorBlinking (void) const |
| Check whether the cursor is configured to blink. | |
| void | SetCursorBlinking (boolean blinking) |
| Toggle cursor blinking behavior. | |
| boolean | GetVTTestEnabled (void) const |
| Check whether the VT test runner is enabled. | |
| void | SetVTTestEnabled (boolean enabled) |
| Enable or disable the VT test runner. | |
| boolean | GetVT52ModeEnabled (void) const |
| Check whether VT52 emulation mode is enabled. | |
| void | SetVT52ModeEnabled (boolean enabled) |
| Enable or disable VT52 emulation mode. | |
| unsigned int | GetLogOutput (void) const |
| Retrieve the configured log output bitmask. | |
| void | SetLogOutput (unsigned int logOutput) |
| Update the log output bitmask. | |
| const char * | GetLogFileName (void) const |
| Retrieve the configured log file name. | |
| void | SetLogFileName (const char *pFileName) |
| Set the configured log file name. | |
| EColorSelection | GetTextColor (void) const |
| Retrieve the configured text color index. | |
| void | SetTextColor (EColorSelection color) |
| Set the configured text color index. | |
| EColorSelection | GetBackgroundColor (void) const |
| Retrieve the configured background color index. | |
| void | SetBackgroundColor (EColorSelection color) |
| Set the configured background color index. | |
| EFontSelection | GetFontSelection (void) const |
| Retrieve the configured font selection. | |
| void | SetFontSelection (EFontSelection selection) |
| Set the active font selection. | |
| unsigned int | GetBuzzerVolume (void) const |
| Retrieve the buzzer volume setting in percent. | |
| void | SetBuzzerVolume (unsigned int volume) |
| Adjust the buzzer volume setting. | |
| unsigned int | GetKeyClick (void) const |
| Check whether key click feedback is enabled. | |
| void | SetKeyClick (boolean enabled) |
| Enable or disable key click feedback. | |
| unsigned int | GetSwitchTxRx (void) const |
| Check whether TX/RX wiring is swapped. | |
| void | SetSwitchTxRx (boolean enabled) |
| Enable or disable TX/RX swap mode. | |
| unsigned int | GetWlanHostAutoStart (void) const |
| Check whether WLAN host mode auto-start is enabled. | |
| void | SetWlanHostAutoStart (boolean enabled) |
| Enable or disable WLAN host mode auto-start on telnet connect. | |
| unsigned int | GetKeyRepeatDelayMs (void) const |
| Retrieve key repeat delay in milliseconds. | |
| boolean | GetKeyAutoRepeatEnabled (void) const |
| Check whether keyboard auto-repeat is enabled. | |
| void | SetKeyAutoRepeatEnabled (boolean enabled) |
| Enable or disable keyboard auto-repeat. | |
| void | SetKeyRepeatDelayMs (unsigned int delayMs) |
| Set key repeat delay. | |
| unsigned int | GetKeyRepeatRateCps (void) const |
| Retrieve key repeat rate in characters per second. | |
| void | SetKeyRepeatRateCps (unsigned int rateCps) |
| Set key repeat rate. | |
| boolean | GetScreenInverted (void) const |
| Check whether screen colors are inverted (screen mode). | |
| void | SetScreenInverted (boolean inverted) |
| Enable or disable screen color inversion. | |
| boolean | GetSmoothScrollEnabled (void) const |
| Check whether smooth scrolling animation is enabled. | |
| void | SetSmoothScrollEnabled (boolean enabled) |
| Enable or disable smooth scrolling animation. | |
| boolean | GetWrapAroundEnabled (void) const |
| Check whether automatic line wrap-around is enabled. | |
| void | SetWrapAroundEnabled (boolean enabled) |
| Enable or disable automatic line wrap-around. | |
| unsigned int | GetSerialDataBits (void) const |
| Retrieve configured UART data bits. | |
| void | SetSerialDataBits (unsigned int dataBits) |
| Set UART data bits. | |
| unsigned int | GetSerialParityMode (void) const |
| Retrieve configured UART parity mode. | |
| void | SetSerialParityMode (unsigned int parityMode) |
| Set UART parity mode. | |
| boolean | GetSoftwareFlowControl (void) const |
| Query whether software flow control (XON/XOFF) is enabled. | |
| void | SetSoftwareFlowControl (boolean enabled) |
| Enable or disable software flow control. | |
| boolean | GetMarginBellEnabled (void) const |
| Query whether margin bell is enabled. | |
| void | SetMarginBellEnabled (boolean enabled) |
| Enable or disable margin bell. | |
| void | ResolveLogOutputs (bool &screen, bool &file, bool &wlan) const |
| Decode the log output bitmask into individual booleans. | |
| const char * | GetLineEndingModeString (void) const |
| Obtain a textual description of the current line ending mode. | |
| void | logConfig (void) const |
| Emit the active configuration to the logger. | |
| bool | IsTabStop (unsigned int column) const |
| Query whether a tab stop is set at the specified column. | |
| void | SetTabStop (unsigned int column, bool enabled) |
| Set or clear a tab stop at the specified column. | |
| void | InitDefaultTabStops (unsigned int columns=TabStopsMax) |
| Reset tab stops to default 8-column positions. | |
Static Public Member Functions | |
| static CTConfig * | Get (void) |
| Access the singleton configuration task. | |
Static Public Attributes | |
| static constexpr unsigned int | TabStopsMax = 160U |
Cooperative task responsible for configuration persistence and lookup.
The configuration task boots with defaults, optionally loads the persisted file, and offers getters/setters for every tunable VT100 parameter. Other subsystems depend on CTConfig to discover active fonts, color themes, serial behavior, and logging destinations. It also provides helper utilities to decode bitmasks and emit state summaries for diagnostics.
|
static |
Access the singleton configuration task.
|
inline |
Retrieve the configured background color index.
|
inline |
Retrieve the configured serial baud rate.
|
inline |
Retrieve the buzzer volume setting in percent.
|
inline |
Check whether the cursor is configured to blink.
|
inline |
Check whether the cursor is configured as block style.
|
inline |
Retrieve the configured font selection.
|
inline |
Check whether keyboard auto-repeat is enabled.
|
inline |
Check whether key click feedback is enabled.
|
inline |
Retrieve key repeat delay in milliseconds.
|
inline |
Retrieve key repeat rate in characters per second.
|
inline |
Retrieve the line ending mode (0=LF, 1=CRLF, 2=CR).
| const char * CTConfig::GetLineEndingModeString | ( | void | ) | const |
Obtain a textual description of the current line ending mode.
|
inline |
Retrieve the configured log file name.
|
inline |
Retrieve the configured log output bitmask.
|
inline |
Query whether margin bell is enabled.
|
inline |
Check whether screen colors are inverted (screen mode).
|
inline |
Retrieve configured UART data bits.
|
inline |
Retrieve configured UART parity mode.
|
inline |
Check whether smooth scrolling animation is enabled.
|
inline |
Query whether software flow control (XON/XOFF) is enabled.
|
inline |
Check whether TX/RX wiring is swapped.
|
inline |
Retrieve the configured text color index.
|
inline |
Check whether VT52 emulation mode is enabled.
|
inline |
Check whether the VT test runner is enabled.
|
inline |
Check whether WLAN host mode auto-start is enabled.
|
inline |
Check whether automatic line wrap-around is enabled.
| void CTConfig::InitDefaultTabStops | ( | unsigned int | columns = TabStopsMax | ) |
Reset tab stops to default 8-column positions.
| boolean CTConfig::Initialize | ( | void | ) |
Initialize the configuration task and load defaults.
| bool CTConfig::IsTabStop | ( | unsigned int | column | ) | const |
Query whether a tab stop is set at the specified column.
| boolean CTConfig::LoadFromFile | ( | void | ) |
Load configuration from persistent storage if present.
| void CTConfig::ResolveLogOutputs | ( | bool & | screen, |
| bool & | file, | ||
| bool & | wlan | ||
| ) | const |
Decode the log output bitmask into individual booleans.
| screen | TRUE if screen logging is enabled (output). |
| file | TRUE if file logging is enabled (output). |
| wlan | TRUE if WLAN logging is enabled (output). |
| boolean CTConfig::SaveToFile | ( | void | ) |
Save current configuration values to persistent storage.
| void CTConfig::SetBackgroundColor | ( | EColorSelection | color | ) |
Set the configured background color index.
| color | New background color selection. |
| void CTConfig::SetBaudRate | ( | unsigned int | baudRate | ) |
Set the serial baud rate.
| baudRate | Desired baud rate. |
| void CTConfig::SetBuzzerVolume | ( | unsigned int | volume | ) |
Adjust the buzzer volume setting.
| volume | Volume percent (0-100). |
| void CTConfig::SetCursorBlinking | ( | boolean | blinking | ) |
Toggle cursor blinking behavior.
| blinking | TRUE to enable blinking. |
| void CTConfig::SetCursorBlock | ( | boolean | block | ) |
Change cursor style.
| block | TRUE to select block cursor, FALSE for underline. |
| void CTConfig::SetFontSelection | ( | EFontSelection | selection | ) |
Set the active font selection.
| selection | Font selection enum value. |
| void CTConfig::SetKeyAutoRepeatEnabled | ( | boolean | enabled | ) |
Enable or disable keyboard auto-repeat.
| enabled | TRUE to enable auto-repeat. |
| void CTConfig::SetKeyClick | ( | boolean | enabled | ) |
Enable or disable key click feedback.
| enabled | TRUE to enable click feedback. |
| void CTConfig::SetKeyRepeatDelayMs | ( | unsigned int | delayMs | ) |
Set key repeat delay.
| delayMs | Delay in milliseconds. |
| void CTConfig::SetKeyRepeatRateCps | ( | unsigned int | rateCps | ) |
Set key repeat rate.
| rateCps | Rate in characters per second. |
| void CTConfig::SetLineEndingMode | ( | unsigned int | mode | ) |
Update the configured line ending mode.
| mode | New mode value (0=LF, 1=CRLF, 2=CR). |
| void CTConfig::SetLogFileName | ( | const char * | pFileName | ) |
Set the configured log file name.
| pFileName | Null-terminated file name. |
| void CTConfig::SetLogOutput | ( | unsigned int | logOutput | ) |
Update the log output bitmask.
| logOutput | Bitmask selecting log destinations. |
| void CTConfig::SetMarginBellEnabled | ( | boolean | enabled | ) |
Enable or disable margin bell.
| enabled | TRUE to enable margin bell. |
| void CTConfig::SetScreenInverted | ( | boolean | inverted | ) |
Enable or disable screen color inversion.
| inverted | TRUE to swap foreground/background colors. |
| void CTConfig::SetSerialDataBits | ( | unsigned int | dataBits | ) |
Set UART data bits.
| dataBits | Data bits (7 or 8). |
| void CTConfig::SetSerialParityMode | ( | unsigned int | parityMode | ) |
Set UART parity mode.
| parityMode | Parity mode (0=none, 1=even, 2=odd). |
| void CTConfig::SetSmoothScrollEnabled | ( | boolean | enabled | ) |
Enable or disable smooth scrolling animation.
| enabled | TRUE to enable smooth scrolling. |
| void CTConfig::SetSoftwareFlowControl | ( | boolean | enabled | ) |
Enable or disable software flow control.
| enabled | TRUE to enable software flow control. |
| void CTConfig::SetSwitchTxRx | ( | boolean | enabled | ) |
Enable or disable TX/RX swap mode.
| enabled | TRUE to swap the wiring. |
| void CTConfig::SetTabStop | ( | unsigned int | column, |
| bool | enabled | ||
| ) |
Set or clear a tab stop at the specified column.
| void CTConfig::SetTextColor | ( | EColorSelection | color | ) |
Set the configured text color index.
| color | New text color selection. |
| void CTConfig::SetVT52ModeEnabled | ( | boolean | enabled | ) |
Enable or disable VT52 emulation mode.
| enabled | TRUE to enable VT52 mode. |
| void CTConfig::SetVTTestEnabled | ( | boolean | enabled | ) |
Enable or disable the VT test runner.
| enabled | TRUE to enable tests. |
| void CTConfig::SetWlanHostAutoStart | ( | boolean | enabled | ) |
Enable or disable WLAN host mode auto-start on telnet connect.
| enabled | TRUE to auto-enable host mode for new sessions. |
| void CTConfig::SetWrapAroundEnabled | ( | boolean | enabled | ) |
Enable or disable automatic line wrap-around.
| enabled | TRUE to wrap to next line at right margin. |