UniSet
2.8.0
extensions
LogicProcessor
TA2D.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 TA2D_H_
18
#define TA2D_H_
19
// --------------------------------------------------------------------------
20
#include "Element.h"
21
// --------------------------------------------------------------------------
22
namespace
uniset
23
{
24
// ---------------------------------------------------------------------------
25
// "A2D"(analog to discrete)
26
// Преобразование аналогового датчика в дискретный по заданному значению. (Value=XXX --> True).
27
// Может быть один вход и много выходов.
28
class
TA2D
:
29
public
Element
30
{
31
32
public
:
33
TA2D
( Element::ElementID
id
,
long
filterValue = 1 );
34
virtual
~
TA2D
();
35
37
virtual
void
setIn
(
size_t
num,
long
value )
override
;
38
39
virtual
long
getOut()
const override
;
40
virtual
std::string getType()
const override
41
{
42
return
"A2D"
;
43
}
44
45
void
setFilterValue(
long
value );
46
47
protected
:
48
TA2D
(): myout(
false
) {};
49
50
bool
myout;
51
long
fvalue = { 1 };
52
53
private
:
54
};
55
// --------------------------------------------------------------------------
56
}
// end of namespace uniset
57
// ---------------------------------------------------------------------------
58
#endif
59
// ---------------------------------------------------------------------------
uniset::TA2D
Definition:
TA2D.h:28
uniset
Definition:
CommonEventLoop.h:14
uniset::TA2D::setIn
virtual void setIn(size_t num, long value) override
Definition:
TA2D.cc:39
uniset::Element
Definition:
Element.h:39
Документация по UniSet. Последние изменения: Вс 25 Окт 2020 00:02:12. Создано системой
1.8.17