getter function for current state

This commit is contained in:
Robin Müller 2021-08-05 16:02:17 +02:00
parent c8472beb5f
commit 4202205182
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 5 additions and 0 deletions

View File

@ -156,6 +156,10 @@ int CommandExecutor::getLastError() const {
return this->lastError;
}
CommandExecutor::States CommandExecutor::getCurrentState() const {
return state;
}
ReturnValue_t CommandExecutor::executeBlocking() {
while(fgets(readVec.data(), readVec.size(), currentCmdFile) != nullptr) {
std::string output(readVec.data());

View File

@ -97,6 +97,7 @@ public:
*/
ReturnValue_t close();
States getCurrentState() const;
int getLastError() const;
void printLastError(std::string funcName) const;