Class for the core (C) events. More...
#include <core.h>
Public Types | |
enum class | States { idle , execution , unknown } |
Possible types of core states. More... | |
enum class | Events { idle , execute , set_frequence , unknown } |
Possible types of core events. More... | |
Public Member Functions | |
Core (States state=States::unknown) | |
Constructor of the class Core. More... | |
ErrorCodes | doStateTransition (Events core_event) |
Transitions the current state depending on the event. More... | |
bool | isIdle () const |
Checks, if the current core is in the state idle. More... | |
bool | isStateUnknown () const |
Checks, if the current core is in the state unknown. More... | |
Static Public Member Functions | |
static std::string | eventToString (Events ev) |
Converts the enum Events into string. More... | |
static Events | stringToEvent (const std::string &str) |
Converts a string into the enum Events. More... | |
Class for the core (C) events.
Core events indicate if interrupts are suspended on a core.
|
strong |
|
strong |
btf::Core::Core | ( | States | state = States::unknown | ) |
Constructor of the class Core.
ErrorCodes btf::Core::doStateTransition | ( | Events | core_event | ) |
Transitions the current state depending on the event.
[in] | core_event | Events enum that triggered the state transition. |
|
static |
Converts the enum Events into string.
[in] | ev | Events enum that will be converted. |
bool btf::Core::isIdle | ( | ) | const |
Checks, if the current core is in the state idle.
bool btf::Core::isStateUnknown | ( | ) | const |
Checks, if the current core is in the state unknown.
|
static |
Converts a string into the enum Events.
[in] | str | String that will be converted. |