/*
 * Lamp.h
 *
 *  Created on: Aug 2, 2018
 *      Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
 */

#ifndef _SRC_OUTPUT_LAMP_H_
#define _SRC_OUTPUT_LAMP_H_

#include "output/items/Lamp.h"
#include "output/items/detail/Item.h"
#include "output/items/detail/DriverBoardItem.h"

namespace flippR_driver
{
namespace output
{

class DriverBoardPinController;

namespace items
{
namespace detail
{

class Lamp : public detail::DriverBoardItem, public detail::Item, public items::Lamp
{
public:
  Lamp(std::shared_ptr<DriverBoardPinController> pin_controller, const uint8_t & address, const uint8_t & pin_base, const std::string & name);
  ~Lamp() override = default;

  void activate() override;
  void deactivate() override;
  bool is_activated() override;
  std::chrono::milliseconds get_activation_time() const override;

private:
  const std::shared_ptr<DriverBoardPinController> pin_controller;
  bool activated;
  std::chrono::milliseconds activation_time;
};

}
}
} /* namespace output */
}
#endif
