Details
-
User Story
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
None
-
None
Description
Overview
The C++ API will use a read-only value-based class with implicit sharing. No Q_OBJECT, no properties, no single-pointer-with-changing-data.
The app is free to keep these classes around as long as it likes.
Implementation Plan
Create a class that uses QSharedDataPointer or similar. This class will be instantiated in the middleware and pushed into the FIFO before being taken out by the app.
Notes
The QML API requires a QObject-based class so wrapper(s) will need to be created in the QML plugin.
Research Questions
What does example app code look like?
How can we unit test this?
How can we document this?
What does this hold? How does the backend/API handle this class?
I don't think this can hold a SensorData struct because that kills the ability to add a new sensor type without recompiling existing code. Maybe a set of concrete classes or something with templates can help out here?