![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class extends the 'Stdio' class for running a TShell Command Processor that provides the ability to 'restart' the TShell to be 'restarted'. More...
This concrete class extends the 'Stdio' class for running a TShell Command Processor that provides the ability to 'restart' the TShell to be 'restarted'.
NOTE: This class dynamically allocates memory and dynamically creates a Thread!
#include <Restartable.h>
Public Member Functions | |
| Restartable (Cpl::TShell::ProcessorApi &shell, const char *threadName="TShell", int threadPriority=CPL_SYSTEM_THREAD_PRIORITY_NORMAL+CPL_SYSTEM_THREAD_PRIORITY_LOWER, bool thisIsAStaticInstance=true) noexcept | |
| Constructor. | |
| void | launch (Cpl::Io::Input &infd, Cpl::Io::Output &outfd, bool enabledOnLaunch=true) noexcept |
| This method starts the Processor. | |
| void | restart () noexcept |
| This method is used to restart the shell. | |
| void | pleaseStop (bool stopThread=false) noexcept |
| This method is used to request that the TShell be stopped AND optionally that its thread to be terminated. | |
| bool | isRunning () noexcept |
| This method returns true when the shell is running. | |
Public Member Functions inherited from Cpl::TShell::Stdio | |
| Stdio (ProcessorApi &shell, const char *threadName="TShell", int threadPriority=CPL_SYSTEM_THREAD_PRIORITY_NORMAL+CPL_SYSTEM_THREAD_PRIORITY_LOWER, bool thisIsAStaticInstance=true) noexcept | |
| Constructor. | |
| ~Stdio () | |
| Destructor. | |
| void | launch (Cpl::Io::Input &infd, Cpl::Io::Output &outfd) noexcept |
| This method starts the Processor. | |
Additional Inherited Members | |
Protected Attributes inherited from Cpl::TShell::Stdio | |
| ProcessorApi & | m_shell |
| Command Processor to run. | |
| Cpl::System::Thread * | m_threadPtr |
| Thread that the shell runs in. | |
| int | m_priority |
| Thread priority to run the shell. | |
| const char * | m_name |
| Thread name for the shell. | |
| Cpl::System::Runnable * | m_runnablePtr |
| Runnable instance. | |
| bool | m_staticInstance |
| How I was created. | |
|
noexcept |
Constructor.
See Cpl::TShell::Stdio for additional details.
|
noexcept |
This method returns true when the shell is running.
|
noexcept |
|
noexcept |
This method is used to request that the TShell be stopped AND optionally that its thread to be terminated.
Note: The shell self terminates when a 'bye' command was issued by the user or a IO error on the shell's IO Streams are encounter. When the shell self terminates - the thread is placed into a blocking state, i.e. waiting for a call to restart().
|
noexcept |
This method is used to restart the shell.
This method can ONLY be called AFTER launch has been called.