#pragma once
#include "PowerSwitched_Device.hpp"
#include <stdio.h>
#include <string>

enum class BError : uint8_t
{
	NONE = 0,
	NOT_CONFIGURED,
	WAITING_FOR_DATA,
	OUT_OF_RANGE,
	UNKNOWN_ERROR,
	NUM_ERRORS
};
class BellowsPosition
{
  public:
	BellowsPosition(std::string id, const float lowLim_mm, const float highLim_mm);

	virtual BError start() = 0;

	virtual BError stop() = 0;

	virtual BError sleep() = 0;

	virtual BError getPosition_pctFull(float& percentOfFull) = 0;

	void logLine(std::string comment);

	virtual const std::string getEngFileHeader() = 0;

  protected:
	virtual ~BellowsPosition() = default;

	const std::string_view engFileHeader1_ = "dateTime_Z\tstate\tcomment\tposition";
	const std::string_view engFileHeader2_ = "text\ttext\ttext\t0.0";

	const std::string_view moduleID_;

	const float lowLim_mm_, highLim_mm_;
};
