HomeWaterLeaksDetection
PulseGenerator.h
Go to the documentation of this file.
1 #ifndef PULSE_GENERATOR_H
2 #define PULSE_GENERATOR_H
3 
4 #include "Arduino.h"
5 
6 #include "DateTime.h"
7 #include "Setup.h"
8 
9 //===============PulseGenerator class===================
10 
20 
21 //====================private data======================
22 private:
25  int outputPin;
26 
27  int value;
28  int pulseCount;
29 
31 
32 //==================public methods======================
33 public:
40 
46  void update();
47 
53  void reset();
54 };
55 
56 #endif
PulseGenerator::update
void update()
Updates the state of the output pin.
Definition: PulseGenerator.cpp:26
DateTime.h
PulseGenerator::value
int value
current state of the output pin (HIGH/LOW)
Definition: PulseGenerator.h:27
PulseGenerator
Definition: PulseGenerator.h:19
Setup.h
PulseGenerator::reset
void reset()
Resets the pulse generator.
Definition: PulseGenerator.cpp:14
PulseGenerator::pulseCount
int pulseCount
number of pulses that have been generated so far
Definition: PulseGenerator.h:28
time_t
unsigned long time_t
Referring to the data type unsigned long as time_t.
Definition: DateTime.h:20
PulseGenerator::delayLow
time_t delayLow
delay of the pulse in LOW state
Definition: PulseGenerator.h:24
PulseGenerator::delayHigh
time_t delayHigh
delay of the pulse in HIGH state
Definition: PulseGenerator.h:23
PulseGenerator::timeLastValueChange
time_t timeLastValueChange
time when the state of the pin changed for the last time
Definition: PulseGenerator.h:30
PulseGenerator::PulseGenerator
PulseGenerator(time_t delayHigh, time_t delayLow, int outputPin)
Creates an instance of the class.
Definition: PulseGenerator.cpp:3
PulseGenerator::outputPin
int outputPin
number of the pin where the pulses are generated
Definition: PulseGenerator.h:25