56 lines
1018 B
C++
56 lines
1018 B
C++
/*
|
|
* Display.h
|
|
*
|
|
* Created on: Aug 2, 2018
|
|
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
|
|
*/
|
|
|
|
#ifndef FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_DISPLAY_H_
|
|
#define FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_DISPLAY_H_
|
|
|
|
#include "output/items/OutputDisplay.h"
|
|
|
|
#include <array>
|
|
|
|
namespace flippR_driver
|
|
{
|
|
namespace output
|
|
{
|
|
namespace items
|
|
{
|
|
namespace detail
|
|
{
|
|
|
|
class Display : public virtual items::OutputDisplay
|
|
{
|
|
public:
|
|
Display(const uint8_t & address, const uint8_t & id);
|
|
virtual ~Display() = default;
|
|
|
|
void write_score(const unsigned int & score, const unsigned int & length);
|
|
void write_content(std::string & content, const unsigned int & length);
|
|
|
|
std::string get_content() const override;
|
|
uint8_t get_address() const override;
|
|
uint8_t get_id() const override;
|
|
|
|
private:
|
|
std::string fit_score_string(std::string & score_string, const unsigned int & length);
|
|
|
|
public:
|
|
std::string content;
|
|
|
|
protected:
|
|
const uint8_t id;
|
|
const uint8_t address;
|
|
|
|
};
|
|
|
|
}
|
|
}
|
|
} /* namespace output */
|
|
}
|
|
|
|
|
|
#endif
|