+/**
+ * Resumes a paused sensor.
+ * @param s - The Sensor to resume
+ */
+void Sensor_Resume(Sensor *s)
+{
+ if (!s->record_data)
+ {
+ s->record_data = true;
+ pthread_create(&(s->thread), NULL, Sensor_Loop, (void*)(s));
+ }
+}
+
+/**
+ * Stop a Sensor from recording DataPoints. Blocks until it has stopped.
+ * @param s - The Sensor to stop
+ */
+void Sensor_Stop(Sensor * s)
+{
+ Sensor_Pause(s);
+ Data_Close(&(s->data_file)); // Close DataFile
+ s->newest_data.time_stamp = 0;
+ s->newest_data.value = 0;
+}
+