Serial Studio 1.1.6
A dashboard software for your embedded projects
|
#include <Frame.h>
Public Member Functions | |
~Frame () | |
void | clear () |
QString | title () const |
int | groupCount () const |
QVector< Group > & | groups () |
bool | read (const QJsonObject &object) |
Q_INVOKABLE const JSON::Group & | getGroup (const int index) const |
bool | isValid () const |
Private Attributes | |
QString | m_title |
QVector< Group > | m_groups |
The Frame class.
The frame class represents a complete frame, including the groups & datasets that compose it. This class allows Serial Studio to build the user interface dinamically from the received data.
The process of building a frame and representing it in Serial Studio is: 1) Physical device sends data 2) I/O driver receives data 3) I/O manager processes the data and separates the frames 4) JSON generator creates a JSON file with the data contained in each frame. 5) UI dashboard class receives the JSON file. 6) TimerEvents class notifies the UI dashboard that the user interface should be re-generated. 7) UI dashboard feeds JSON data to this class. 8) This class creates a model of the JSON data with the values of the latest frame. 9) UI dashboard updates the widgets with the C++ model provided by this class.
JSON::Frame::~Frame | ( | ) |
Destructor function, free memory used by the Group
objects before destroying an instance of this class.
void JSON::Frame::clear | ( | ) |
const JSON::Group & JSON::Frame::getGroup | ( | const int | index | ) | const |
int JSON::Frame::groupCount | ( | ) | const |
Returns the number of groups contained in the frame.
QVector< JSON::Group > & JSON::Frame::groups | ( | ) |
Returns a vector of pointers to the Group
objects associated to this frame.
|
inline |
bool JSON::Frame::read | ( | const QJsonObject & | object | ) |
Reads the frame information and all its asociated groups (and datatsets) from the given JSON object
.
true
on success, false
on failure QString JSON::Frame::title | ( | ) | const |
Returns the title of the frame.
|
private |
|
private |