Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-01-09 21:10:49 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-01-09 21:10:49 +0300
commit651f821e18bbb2a53f0c951babe50b481be30cd9 (patch)
treedd73fda5339cd3f7dbf1ac20c8b7f10554feeca6 /src/ObjectModel/ObjectModel.h
parent0e047b2d7e5ebc59441a6796d62059b7bf9da368 (diff)
More work on object model
Added facility to acquire a read lock around access to an array Partially implemented Heaters and Sensors in the model
Diffstat (limited to 'src/ObjectModel/ObjectModel.h')
-rw-r--r--src/ObjectModel/ObjectModel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ObjectModel/ObjectModel.h b/src/ObjectModel/ObjectModel.h
index bde3eabd..75d3a723 100644
--- a/src/ObjectModel/ObjectModel.h
+++ b/src/ObjectModel/ObjectModel.h
@@ -133,6 +133,7 @@ private:
class ObjectModelArrayDescriptor
{
public:
+ ReadWriteLock *lockPointer;
size_t (*GetNumElements)(const ObjectModel*, const ObjectExplorationContext&) noexcept;
ExpressionValue (*GetElement)(const ObjectModel*, ObjectExplorationContext&) noexcept;
};
@@ -159,9 +160,12 @@ protected:
// Report an entire array as JSON
bool ReportArrayAsJson(OutputBuffer *buf, ObjectExplorationContext& context, const ObjectModelArrayDescriptor *omad, const char *filter) const THROWS_GCODE_EXCEPTION;
- // Get the value of an object
+ // Get the value of an object via the table
ExpressionValue GetObjectValue(const StringParser& sp, ObjectExplorationContext& context, uint8_t tableNumber, const char *idString) const THROWS_GCODE_EXCEPTION;
+ // Get the value of an object that we hold
+ ExpressionValue GetObjectValue(const StringParser& sp, ObjectExplorationContext& context, ExpressionValue val, const char *idString) const THROWS_GCODE_EXCEPTION;
+
// Get the object model table entry for the current level object in the query
const ObjectModelTableEntry *FindObjectModelTableEntry(uint8_t tableNumber, const char *idString) const noexcept;