39 lines
676 B
C++
39 lines
676 B
C++
/*
|
|
* Lamp.h
|
|
*
|
|
* Created on: Aug 2, 2018
|
|
* Author: rhetenor
|
|
*/
|
|
|
|
#ifndef _SRC_OUTPUT_LAMP_H_
|
|
#define _SRC_OUTPUT_LAMP_H_
|
|
|
|
#include "OutputItem.h"
|
|
#include "../../../include/output/output_items/ILamp.h"
|
|
|
|
namespace flippR_driver
|
|
{
|
|
namespace output
|
|
{
|
|
namespace items
|
|
{
|
|
|
|
class Lamp : public OutputItem, ILamp
|
|
{
|
|
public:
|
|
Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin, std::string name, bool activated = false);
|
|
virtual ~Lamp() = default;
|
|
|
|
void activate();
|
|
void deactivate();
|
|
bool is_activated();
|
|
|
|
private:
|
|
bool activated;
|
|
};
|
|
|
|
}
|
|
} /* namespace output */
|
|
}
|
|
#endif
|