nearly compiling
This commit is contained in:
@@ -11,7 +11,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Item::Item(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name) :
|
||||
Item::Item(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name) :
|
||||
address(address),
|
||||
name(name),
|
||||
gpio_interface(output_gpio_interface)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace items
|
||||
class Item : public IItem
|
||||
{
|
||||
public:
|
||||
Item(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name);
|
||||
Item(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name);
|
||||
virtual ~Item();
|
||||
|
||||
uint8_t get_address() override;
|
||||
@@ -34,7 +34,7 @@ protected:
|
||||
const uint8_t address;
|
||||
const std::string name;
|
||||
|
||||
const std::shared_ptr<utility::IOutputGPIOInterface> gpio_interface;
|
||||
const std::shared_ptr<IOutputGPIOInterface> gpio_interface;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Lamp::Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name)
|
||||
Lamp::Lamp(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name)
|
||||
:
|
||||
Item(output_gpio_interface, address, name),
|
||||
activated(false)
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace items
|
||||
class Lamp : public Item, ILamp, IDriverBoardItem
|
||||
{
|
||||
public:
|
||||
Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name);
|
||||
Lamp(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name);
|
||||
virtual ~Lamp() = default;
|
||||
|
||||
void activate();
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Solenoid::Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time):
|
||||
Solenoid::Solenoid(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time):
|
||||
Item(output_gpio_interface, address, name),
|
||||
deactivation_time(deactivation_time)
|
||||
{}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace items
|
||||
class Solenoid : public Item, ISolenoid, IDriverBoardItem
|
||||
{
|
||||
public:
|
||||
Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, u_int8_t address, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
Solenoid(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, u_int8_t address, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
virtual ~Solenoid() = default;
|
||||
|
||||
void trigger();
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Sound::Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time, u_int id) :
|
||||
Sound::Sound(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time, u_int id) :
|
||||
Item(output_gpio_interface, address, name),
|
||||
deactivation_time(deactivation_time),
|
||||
id(id)
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
u_int id;
|
||||
|
||||
public:
|
||||
Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time, u_int id);
|
||||
Sound(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time, u_int id);
|
||||
virtual ~Sound() = default;
|
||||
|
||||
virtual void play();
|
||||
@@ -40,6 +40,7 @@ private:
|
||||
std::chrono::milliseconds deactivation_time;
|
||||
|
||||
std::future<void> play_task;
|
||||
|
||||
private:
|
||||
virtual void playTask();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user