Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/isobus_virtual_terminal_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ namespace isobus
return (StateMachineState::Connected == state);
}

VirtualTerminalClient::StateMachineState VirtualTerminalClient::get_state() const
{
return state;
}

void VirtualTerminalClient::terminate()
{
if (initialized)
Expand Down
4 changes: 4 additions & 0 deletions src/isobus_virtual_terminal_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ namespace isobus
/// @returns true if cconnected, false otherwise
bool get_is_connected() const;

/// @brief Returns the current state machine state
/// @returns The current internal state machine state
StateMachineState get_state() const;

/// @brief Terminates the client and joins the worker thread if applicable
void terminate();

Expand Down