This commit is contained in:
Nav
2021-12-25 21:01:58 +00:00
parent 71842358ff
commit cacd81b1dc
42 changed files with 45 additions and 45 deletions

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class BreakpointRemovedOnTarget: public Event
{
public:
static inline EventType type = EventType::BREAKPOINT_REMOVED_ON_TARGET;
static constexpr EventType type = EventType::BREAKPOINT_REMOVED_ON_TARGET;
static inline const std::string name = "BreakpointRemovedOnTarget";
[[nodiscard]] EventType getType() const override {

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class BreakpointSetOnTarget: public Event
{
public:
static inline EventType type = EventType::BREAKPOINT_SET_ON_TARGET;
static constexpr EventType type = EventType::BREAKPOINT_SET_ON_TARGET;
static inline const std::string name = "BreakpointSetOnTarget";
[[nodiscard]] EventType getType() const override {

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class DebugServerThreadStateChanged: public Event
{
public:
static inline EventType type = EventType::DEBUG_SERVER_THREAD_STATE_CHANGED;
static constexpr EventType type = EventType::DEBUG_SERVER_THREAD_STATE_CHANGED;
static inline const std::string name = "DebugServerThreadStateChanged";
explicit DebugServerThreadStateChanged(ThreadState state): state(state) {};

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class DebugSessionFinished: public Event
{
public:
static inline EventType type = EventType::DEBUG_SESSION_FINISHED;
static constexpr EventType type = EventType::DEBUG_SESSION_FINISHED;
static inline const std::string name = "DebugSessionFinished";
[[nodiscard]] EventType getType() const override {

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class DebugSessionStarted: public Event
{
public:
static inline EventType type = EventType::DEBUG_SESSION_STARTED;
static constexpr EventType type = EventType::DEBUG_SESSION_STARTED;
static inline const std::string name = "DebugSessionStarted";
[[nodiscard]] EventType getType() const override {

View File

@@ -62,7 +62,7 @@ namespace Bloom::Events
QDateTime createdTimestamp = DateTime::currentDateTime();
std::optional<int> correlationId;
static inline EventType type = EventType::GENERIC;
static constexpr EventType type = EventType::GENERIC;
static inline const std::string name = "GenericEvent";
[[nodiscard]] virtual std::string getName() const {

View File

@@ -13,7 +13,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetDescriptorExtracted;
static inline EventType type = EventType::EXTRACT_TARGET_DESCRIPTOR;
static constexpr EventType type = EventType::EXTRACT_TARGET_DESCRIPTOR;
static inline const std::string name = "ExtractTargetDescriptor";
[[nodiscard]] EventType getType() const override {

View File

@@ -12,7 +12,7 @@ namespace Bloom::Events
public:
explicit InsightThreadStateChanged(ThreadState state): state(state) {};
static inline EventType type = EventType::INSIGHT_THREAD_STATE_CHANGED;
static constexpr EventType type = EventType::INSIGHT_THREAD_STATE_CHANGED;
static inline const std::string name = "InsightThreadStateChanged";
[[nodiscard]] EventType getType() const override {

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class MemoryRetrievedFromTarget: public Event
{
public:
static inline EventType type = EventType::MEMORY_RETRIEVED_FROM_TARGET;
static constexpr EventType type = EventType::MEMORY_RETRIEVED_FROM_TARGET;
static inline const std::string name = "MemoryRetrievedFromTarget";
Targets::TargetMemoryBuffer data;

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class MemoryWrittenToTarget: public Event
{
public:
static inline EventType type = EventType::MEMORY_WRITTEN_TO_TARGET;
static constexpr EventType type = EventType::MEMORY_WRITTEN_TO_TARGET;
static inline const std::string name = "MemoryWrittenToTarget";
MemoryWrittenToTarget() = default;

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class ProgramCounterSetOnTarget: public Event
{
public:
static inline EventType type = EventType::PROGRAM_COUNTER_SET_ON_TARGET;
static constexpr EventType type = EventType::PROGRAM_COUNTER_SET_ON_TARGET;
static inline const std::string name = "ProgramCounterSetOnTarget";
[[nodiscard]] EventType getType() const override {

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class RegistersRetrievedFromTarget: public Event
{
public:
static inline EventType type = EventType::REGISTERS_RETRIEVED_FROM_TARGET;
static constexpr EventType type = EventType::REGISTERS_RETRIEVED_FROM_TARGET;
static inline const std::string name = "RegistersRetrievedFromTarget";
Targets::TargetRegisters registers;

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class RegistersWrittenToTarget: public Event
{
public:
static inline EventType type = EventType::REGISTERS_WRITTEN_TO_TARGET;
static constexpr EventType type = EventType::REGISTERS_WRITTEN_TO_TARGET;
static inline const std::string name = "RegistersWrittenToTarget";
Targets::TargetRegisters registers;

View File

@@ -14,7 +14,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = BreakpointRemovedOnTarget;
static inline EventType type = EventType::REMOVE_BREAKPOINT_ON_TARGET;
static constexpr EventType type = EventType::REMOVE_BREAKPOINT_ON_TARGET;
static inline const std::string name = "RemoveBreakpointOnTarget";
Targets::TargetBreakpoint breakpoint;

View File

@@ -12,7 +12,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetControllerStateReported;
static inline EventType type = EventType::REPORT_TARGET_CONTROLLER_STATE;
static constexpr EventType type = EventType::REPORT_TARGET_CONTROLLER_STATE;
static inline const std::string name = "ReportTargetControllerState";
ReportTargetControllerState() {};

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class ResetTarget: public Event
{
public:
static inline EventType type = EventType::RESET_TARGET;
static constexpr EventType type = EventType::RESET_TARGET;
static inline const std::string name = "ResetTargetEvent";
[[nodiscard]] EventType getType() const override {

View File

@@ -13,7 +13,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetExecutionResumed;
static inline EventType type = EventType::RESUME_TARGET_EXECUTION;
static constexpr EventType type = EventType::RESUME_TARGET_EXECUTION;
static inline const std::string name = "ResumeTargetExecutionEvent";
std::optional<std::uint32_t> fromProgramCounter;

View File

@@ -14,7 +14,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = MemoryRetrievedFromTarget;
static inline EventType type = EventType::RETRIEVE_MEMORY_FROM_TARGET;
static constexpr EventType type = EventType::RETRIEVE_MEMORY_FROM_TARGET;
static inline const std::string name = "RetrieveMemoryFromTarget";
Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::RAM;
std::uint32_t startAddress = 0;

View File

@@ -13,7 +13,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = RegistersRetrievedFromTarget;
static inline EventType type = EventType::RETRIEVE_REGISTERS_FROM_TARGET;
static constexpr EventType type = EventType::RETRIEVE_REGISTERS_FROM_TARGET;
static inline const std::string name = "RetrieveRegistersFromTarget";
Targets::TargetRegisterDescriptors descriptors;

View File

@@ -12,7 +12,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = StackPointerRetrievedFromTarget;
static inline EventType type = EventType::RETRIEVE_STACK_POINTER_FROM_TARGET;
static constexpr EventType type = EventType::RETRIEVE_STACK_POINTER_FROM_TARGET;
static inline const std::string name = "RetrieveStackPointerFromTarget";
[[nodiscard]] EventType getType() const override {

View File

@@ -12,7 +12,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetPinStatesRetrieved;
static inline EventType type = EventType::RETRIEVE_TARGET_PIN_STATES;
static constexpr EventType type = EventType::RETRIEVE_TARGET_PIN_STATES;
static inline const std::string name = "RetrieveTargetPinStates";
int variantId = 0;

View File

@@ -14,7 +14,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = BreakpointSetOnTarget;
static inline EventType type = EventType::SET_BREAKPOINT_ON_TARGET;
static constexpr EventType type = EventType::SET_BREAKPOINT_ON_TARGET;
static inline const std::string name = "SetBreakpointOnTarget";
Targets::TargetBreakpoint breakpoint;

View File

@@ -13,7 +13,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = ProgramCounterSetOnTarget;
static inline EventType type = EventType::SET_PROGRAM_COUNTER_ON_TARGET;
static constexpr EventType type = EventType::SET_PROGRAM_COUNTER_ON_TARGET;
static inline const std::string name = "SetProgramCounterOnTarget";
std::uint32_t address = 0;

View File

@@ -13,7 +13,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetPinStatesRetrieved;
static inline EventType type = EventType::SET_TARGET_PIN_STATE;
static constexpr EventType type = EventType::SET_TARGET_PIN_STATE;
static inline const std::string name = "SetTargetPinState";
Targets::TargetPinDescriptor pinDescriptor;
Targets::TargetPinState pinState;

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class ShutdownApplication: public Event
{
public:
static inline EventType type = EventType::SHUTDOWN_APPLICATION;
static constexpr EventType type = EventType::SHUTDOWN_APPLICATION;
static inline const std::string name = "ShutdownApplicationEvent";
[[nodiscard]] EventType getType() const override {

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class ShutdownDebugServer: public Event
{
public:
static inline EventType type = EventType::SHUTDOWN_DEBUG_SERVER;
static constexpr EventType type = EventType::SHUTDOWN_DEBUG_SERVER;
static inline const std::string name = "ShutdownDebugServer";
[[nodiscard]] EventType getType() const override {

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class ShutdownTargetController: public Event
{
public:
static inline EventType type = EventType::SHUTDOWN_TARGET_CONTROLLER;
static constexpr EventType type = EventType::SHUTDOWN_TARGET_CONTROLLER;
static inline const std::string name = "ShutdownTargetControllerEvent";
[[nodiscard]] EventType getType() const override {

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class StackPointerRetrievedFromTarget: public Event
{
public:
static inline EventType type = EventType::STACK_POINTER_RETRIEVED_FROM_TARGET;
static constexpr EventType type = EventType::STACK_POINTER_RETRIEVED_FROM_TARGET;
static inline const std::string name = "StackPointerRetrievedFromTarget";
std::uint32_t stackPointer = 0;

View File

@@ -13,7 +13,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetExecutionResumed;
static inline EventType type = EventType::STEP_TARGET_EXECUTION;
static constexpr EventType type = EventType::STEP_TARGET_EXECUTION;
static inline const std::string name = "StepTargetExecution";
std::optional<std::uint32_t> fromProgramCounter;

View File

@@ -12,7 +12,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = TargetExecutionStopped;
static inline EventType type = EventType::STOP_TARGET_EXECUTION;
static constexpr EventType type = EventType::STOP_TARGET_EXECUTION;
static inline const std::string name = "StopTargetExecution";
[[nodiscard]] EventType getType() const override {

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class TargetControllerErrorOccurred: public Event
{
public:
static inline EventType type = EventType::TARGET_CONTROLLER_ERROR_OCCURRED;
static constexpr EventType type = EventType::TARGET_CONTROLLER_ERROR_OCCURRED;
static inline const std::string name = "TargetControllerErrorOccurred";
std::string errorMessage;

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class TargetControllerStateReported: public Event
{
public:
static inline EventType type = EventType::TARGET_CONTROLLER_STATE_REPORTED;
static constexpr EventType type = EventType::TARGET_CONTROLLER_STATE_REPORTED;
static inline const std::string name = "TargetControllerStateReported";
TargetControllerState state;

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class TargetControllerThreadStateChanged: public Event
{
public:
static inline EventType type = EventType::TARGET_CONTROLLER_THREAD_STATE_CHANGED;
static constexpr EventType type = EventType::TARGET_CONTROLLER_THREAD_STATE_CHANGED;
static inline const std::string name = "TargetControllerThreadStateChanged";
explicit TargetControllerThreadStateChanged(ThreadState state): state(state) {};

View File

@@ -10,7 +10,7 @@ namespace Bloom::Events
class TargetDescriptorExtracted: public Event
{
public:
static inline EventType type = EventType::TARGET_DESCRIPTOR_EXTRACTED;
static constexpr EventType type = EventType::TARGET_DESCRIPTOR_EXTRACTED;
static inline const std::string name = "TargetDescriptorExtracted";
Targets::TargetDescriptor targetDescriptor;

View File

@@ -9,7 +9,7 @@ namespace Bloom::Events
class TargetExecutionResumed: public Event
{
public:
static inline EventType type = EventType::TARGET_EXECUTION_RESUMED;
static constexpr EventType type = EventType::TARGET_EXECUTION_RESUMED;
static inline const std::string name = "TargetExecutionResumed";
TargetExecutionResumed() = default;

View File

@@ -11,7 +11,7 @@ namespace Bloom::Events
class TargetExecutionStopped: public Event
{
public:
static inline EventType type = EventType::TARGET_EXECUTION_STOPPED;
static constexpr EventType type = EventType::TARGET_EXECUTION_STOPPED;
static inline const std::string name = "TargetExecutionStopped";
std::uint32_t programCounter;
Targets::TargetBreakCause breakCause;

View File

@@ -11,7 +11,7 @@ namespace Bloom::Events
class TargetPinStatesRetrieved: public Event
{
public:
static inline EventType type = EventType::TARGET_PIN_STATES_RETRIEVED;
static constexpr EventType type = EventType::TARGET_PIN_STATES_RETRIEVED;
static inline const std::string name = "TargetPinStatesRetrieved";
int variantId = 0;
std::map<int, Targets::TargetPinState> pinSatesByNumber;

View File

@@ -15,7 +15,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = MemoryWrittenToTarget;
static inline EventType type = EventType::WRITE_MEMORY_TO_TARGET;
static constexpr EventType type = EventType::WRITE_MEMORY_TO_TARGET;
static inline const std::string name = "WriteMemoryToTarget";
Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::RAM;
std::uint32_t startAddress = 0;

View File

@@ -14,7 +14,7 @@ namespace Bloom::Events
public:
using TargetControllerResponseType = RegistersWrittenToTarget;
static inline EventType type = EventType::WRITE_REGISTERS_TO_TARGET;
static constexpr EventType type = EventType::WRITE_REGISTERS_TO_TARGET;
static inline const std::string name = "WriteRegistersToTarget";
Targets::TargetRegisters registers;