Fledge
An open source edge computing platform for industrial users
All Classes Functions Variables Pages
pythonreadingset.h
1 #ifndef _PYTHON_READING_SET_H_
2 #define _PYTHON_READING_SET_H_
3 /*
4  * Fledge Python Reading Set
5  *
6  * Copyright (c) 2021 Dianomic Systems
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Mark Riddoch
11  */
12 
13 #include <reading_set.h>
14 #include <Python.h>
15 
20 class PythonReadingSet : public ReadingSet {
21  public:
22  PythonReadingSet(PyObject *pySet);
23  ~PythonReadingSet() {};
24  PyObject *toPython(bool changeKeys = false);
25  private:
26  void setReadingAttr(Reading* newReading, PyObject *readingList, bool fillIfMissing);
27 };
28 #endif
A wrapper class for the ReadingSet class that allows conversion to and from Python objects...
Definition: pythonreadingset.h:20
An asset reading represented as a class.
Definition: reading.h:33
Reading set class.
Definition: reading_set.h:26
PyObject * toPython(bool changeKeys=false)
Convert the ReadingSet to a Python List.
Definition: pythonreadingset.cpp:146
PythonReadingSet(PyObject *pySet)
Construct PythonReadingSet from a python list object that contains a list of readings.
Definition: pythonreadingset.cpp:98