Remove unsused Actions definition

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Grzegorz Rychlik 2019-11-15 15:47:24 +01:00
parent 944de76fd0
commit 205b4e785f
2 changed files with 0 additions and 79 deletions

View File

@ -8,7 +8,6 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::C3::Core::Profiler::Action::ActionId MWR::C3::Core::Profiler::Action::m_LastActionId = 0;
std::mutex MWR::C3::Core::Profiler::Profile::m_Mutex;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -1425,28 +1424,6 @@ MWR::C3::Core::Profiler::Gateway::Connector::Connector(std::weak_ptr<Profiler> o
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::C3::Core::Profiler::Action::Action(CommandSeqNo commandSeqNo, State state, std::string stateComment)
: BaseAction(state, stateComment)
, m_ActionId(++m_LastActionId)
, m_CommandSeqNo(commandSeqNo)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::C3::Core::Profiler::SubAction::SubAction(std::string description, State state, std::string stateComment)
: BaseAction(state, stateComment)
, m_Description(description)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::C3::Core::Profiler::BaseAction::BaseAction(State state, std::string stateComment)
: m_State(state)
, m_StateComment(stateComment)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::C3::Core::Profiler::Profile::Profile(Gateway& gateway)
: m_Gateway(gateway)

View File

@ -539,62 +539,6 @@ namespace MWR::C3::Core
protected:
std::optional<Gateway> m_Gateway; ///< The "virtual gateway object".
// Forward declaration.
struct SubAction;
/// Base for all Actions.
struct BaseAction
{
enum State
{
Unknown = 0, ///< E.g. uninitialized.
Planned = 1, ///< Scheduled.
Cancelled = 2, ///< Cancelled by user (information from Controller).
Pendning = 3, ///< In progress.
Succeeded = 4, ///< Done.
Failed = 5, ///< Couldn't be done.
Abandoned = 6, ///< By Profiler (e.g. dependent on previous action which has failed).
} m_State = State::Unknown;
std::string m_StateComment; ///< E.g. error text.
/// Public ctor.
/// @param state initial state.
/// @param stateComment initial state comment.
BaseAction(State state, std::string stateComment);
// Identifier typedefs.
using ActionId = std::uint32_t; ///< ID typedef.
using CommandSeqNo = std::uint32_t; ///< Command sequence number given by Controller.
std::vector<std::pair<std::string, SubAction>> m_SubActions; ///< For Scenarios.
};
/// Non-root Actions.
struct SubAction : BaseAction
{
/// Public ctor.
/// @param description a short summary of what is being done in this step.
/// @param state initial state.
/// @param stateComment initial state comment.
SubAction(std::string description, State state = State::Planned, std::string stateComment = OBF(""));
std::string m_Description; ///< Short summary of what is being done in this step.
};
/// Root-Action.
struct Action : BaseAction
{
/// Public ctor.
/// @param commandSeqNo Command sequence number given by Controller.
/// @param state initial state.
/// @param stateComment initial state comment.
Action(CommandSeqNo commandSeqNo, State state = State::Unknown, std::string stateComment = OBF(""));
static ActionId m_LastActionId; ///< Global counter for Action IDs.
ActionId m_ActionId; ///< ID given by Profiler for Command requested by Controller.
CommandSeqNo m_CommandSeqNo; ///< Command sequence number given by Controller.
};
mutable std::mutex m_AccessMutex; ///< Mutex for synchronization.
/// Contains hashes of binders. This allows to call: auto tsConnectorhash = GetBinderTo(hashBeacona);. First hash in pair is Peripheral hash and second one is corresponding Connector.