UniSet
2.45.1
extensions
LogicProcessor
TDelay.h
1
/*
2
* Copyright (c) 2015 Pavel Vainerman.
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as
6
* published by the Free Software Foundation, version 2.1.
7
*
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Lesser Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
//--------------------------------------------------------------------------
17
#ifndef TDelay_H_
18
#define TDelay_H_
19
// --------------------------------------------------------------------------
20
#include "PassiveTimer.h"
21
#include "Element.h"
22
// --------------------------------------------------------------------------
23
namespace
uniset
24
{
25
// ---------------------------------------------------------------------------
26
// "ON" delay element
27
// Сбрасывается без задержки.. а срабатывает с задержкой.
28
// с одним входом
29
class
TDelay:
30
public
Element
31
{
32
33
public
:
34
TDelay( Element::ElementID
id
, timeout_t delayMS = 0 );
35
virtual
~TDelay();
36
37
virtual
void
tick
()
override
;
38
virtual
void
setIn(
size_t
num,
long
value )
override
;
39
virtual
long
getOut()
const override
;
40
virtual
std::string getType()
const override
41
{
42
return
"Delay"
;
43
}
44
45
void
setDelay( timeout_t timeMS );
46
timeout_t getDelay()
const
;
47
48
protected
:
49
TDelay(): myout(
false
), delay(0) {};
50
51
bool
myout;
52
PassiveTimer
pt;
53
timeout_t delay;
54
55
private
:
56
};
57
// --------------------------------------------------------------------------
58
}
// end of namespace uniset
59
// ---------------------------------------------------------------------------
60
#endif
61
// ---------------------------------------------------------------------------
62
uniset::PassiveTimer
Пассивный таймер
Определения
PassiveTimer.h:94
uniset::TDelay::tick
virtual void tick() override
Определения
TDelay.cc:78
uniset
Определения
Calibration.h:27
Документация по UniSet. Последние изменения:
. Создано системой
1.16.1