Skip to content

Commit

Permalink
Conform to latest qx-json changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oblivioncth committed Jul 15, 2023
1 parent 787bbe9 commit b62f80f
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 128 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ project(QI-QMP

# Get helper scripts
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FetchOBCMake.cmake)
fetch_ob_cmake("v0.3")
fetch_ob_cmake("41edbf3bd556a3f9861eb179bdca8b2e5928ea73")

# Initialize project according to standard rules
include(OB/Project)
Expand Down Expand Up @@ -53,7 +53,7 @@ set(QI_QMP_QX_COMPONENTS

include(OB/FetchQx)
ob_fetch_qx(
REF "v0.5"
REF "a87499d7bb9ba6279b2db72ce3589e4c6fea7763"
COMPONENTS
${QI_QMP_QX_COMPONENTS}
)
Expand Down
57 changes: 5 additions & 52 deletions lib/include/qi-qmp/qmpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,53 +33,6 @@ class QI_QMP_QMPI_EXPORT Qmpi : public QObject
std::any context;
};

//-Class Variables-----------------------------------------------------------------------------------------------------------
private:
/*! @cond */
class JsonKeys
{
public:
static inline const QString GREETING = "QMP";
class Greeting
{
public:
static inline const QString VERSION = "version";
static inline const QString CAPABILITIES = "capabilities";
};

static inline const QString RETURN = "return";
static inline const QString ERROR = "error";
class Error
{
public:
static inline const QString CLASS = "class";
static inline const QString DESCRIPTION = "desc";
};

static inline const QString EVENT = "event";
class Event
{
public:
static inline const QString DATA = "data";
static inline const QString TIMESTAMP = "timestamp";
class Timestamp
{
public:
static inline const QString SECONDS = "seconds";
static inline const QString MICROSECONDS = "microseconds";
};
};

static inline const QString EXECUTE = "execute";
class Execute
{
public:
static inline const QString ARGUMENTS = "arguments";
};
};
/*! @endcond */
static inline const QString NEGOTIATION_COMMAND = "qmp_capabilities";

//-Instance Variables--------------------------------------------------------------------------------------------------------
private:
// Network
Expand Down Expand Up @@ -122,11 +75,11 @@ class QI_QMP_QMPI_EXPORT Qmpi : public QObject
void propagate();

// Message Processing
void processServerMessage(const QJsonObject& msg);
bool processGreetingMessage(const QJsonObject& greeting);
bool processReturnMessage(const QJsonObject& ret);
bool processErrorMessage(const QJsonObject& error);
bool processEventMessage(const QJsonObject& event);
void processServerMessage(const QJsonObject& jMsg);
bool processGreetingMessage(const QJsonObject& jGreeting);
bool processReturnMessage(const QJsonObject& jReturn);
bool processErrorMessage(const QJsonObject& jError);
bool processEventMessage(const QJsonObject& jEvent);

public:
// Info
Expand Down
Loading

0 comments on commit b62f80f

Please sign in to comment.