summaryrefslogtreecommitdiff
path: root/peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp')
-rw-r--r--peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp b/peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp
index 3d77c8a..18807e5 100644
--- a/peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp
+++ b/peripheral/sensors/edison_arduino/SensorDescriptionFactory.hpp
@@ -29,34 +29,35 @@ class SensorDescriptionFactory {
public:
/**
- * SensorDescriptionFactory constructor
- */
- SensorDescriptionFactory();
+ * Retrieve a sensor description of a certain type
+ * @param type sensor type
+ * @return pointer to a description data structure
+ */
+ static struct sensor_t const * getDescription(Sensor::Type type);
/**
- * get all available sensor descriptions
+ * Get all available sensor descriptions
* @return array of sensor description data structures
*/
- struct sensor_t const * getDescriptions();
+ static struct sensor_t const * getDescriptions();
/**
- * check if a sensor description has certain flags set
+ * Check if a sensor description has certain flags set
* @param handle sensor type identifier
* @param flags flags to check
* @return true if flags are set, false otherwise
*/
- bool areFlagsSet(int handle, uint32_t flags);
+ static bool areFlagsSet(int handle, uint32_t flags);
private:
/*
- * Retrieve a sensor description of a certain type
- * @param type sensor type
- * @return pointer to a description data structure
+ * Initialize static members
*/
- static struct sensor_t const * getDescription(Sensor::Type type);
+ static void init();
- struct sensor_t descriptions[Sensor::Type::kNumTypes];
+ static struct sensor_t descriptions[Sensor::Type::kNumTypes];
+ static bool initialized;
};
#endif // SENSOR_DESCRIPTION_FACTORY_HPP