added uml diagramm
This commit is contained in:
@@ -12,8 +12,9 @@ namespace flippR_driver
|
||||
namespace output
|
||||
{
|
||||
|
||||
Lamp::Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name) :
|
||||
OutputItem(output_gpio_interface, address, name)
|
||||
Lamp::Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name, bool activated) :
|
||||
OutputItem(output_gpio_interface, address, name),
|
||||
activated(activated)
|
||||
{
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace output
|
||||
class Lamp : public OutputItem
|
||||
{
|
||||
public:
|
||||
Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name);
|
||||
Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name, bool activated = false);
|
||||
virtual ~Lamp();
|
||||
|
||||
void activate();
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace flippR_driver
|
||||
{
|
||||
namespace output {
|
||||
|
||||
Solenoid::Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name) :
|
||||
OutputItem(output_gpio_interface, address, name)
|
||||
Solenoid::Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name, std::chrono::milliseconds deactivation_time) :
|
||||
OutputItem(output_gpio_interface, address, name),
|
||||
deactivation_time(deactivation_time)
|
||||
{
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
|
||||
#include "OutputItem.h"
|
||||
|
||||
#include <future>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
@@ -20,14 +22,15 @@ namespace output
|
||||
class Solenoid : public OutputItem
|
||||
{
|
||||
public:
|
||||
Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name);
|
||||
Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
virtual ~Solenoid();
|
||||
|
||||
//muss task sein
|
||||
void trigger();
|
||||
|
||||
private:
|
||||
std::thread wait_thread;
|
||||
std::future<void> wait_thread;
|
||||
std::chrono::milliseconds deactivation_time;
|
||||
|
||||
void activate();
|
||||
void deactivate();
|
||||
|
||||
Reference in New Issue
Block a user