Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
rtt
extras
dev
AnalogOutInterface.hpp
Go to the documentation of this file.
1
/***************************************************************************
2
tag: Peter Soetens Thu Oct 10 16:16:56 CEST 2002 AnalogOutInterface.hpp
3
4
AnalogOutInterface.hpp - description
5
-------------------
6
begin : Thu October 10 2002
7
copyright : (C) 2002 Peter Soetens
8
email : peter.soetens@mech.kuleuven.ac.be
9
10
***************************************************************************
11
* This library is free software; you can redistribute it and/or *
12
* modify it under the terms of the GNU General Public *
13
* License as published by the Free Software Foundation; *
14
* version 2 of the License. *
15
* *
16
* As a special exception, you may use this file as part of a free *
17
* software library without restriction. Specifically, if other files *
18
* instantiate templates or use macros or inline functions from this *
19
* file, or you compile this file and link it with other files to *
20
* produce an executable, this file does not by itself cause the *
21
* resulting executable to be covered by the GNU General Public *
22
* License. This exception does not however invalidate any other *
23
* reasons why the executable file might be covered by the GNU General *
24
* Public License. *
25
* *
26
* This library is distributed in the hope that it will be useful, *
27
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
28
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
29
* Lesser General Public License for more details. *
30
* *
31
* You should have received a copy of the GNU General Public *
32
* License along with this library; if not, write to the Free Software *
33
* Foundation, Inc., 59 Temple Place, *
34
* Suite 330, Boston, MA 02111-1307 USA *
35
* *
36
***************************************************************************/
37
/* Klaas Gadeyne, Mon August 11 2003
38
- Added "channel" param to lowest(), highest(), resolution() calls (these
39
are mostly configurable on a per channel basis. If not, there's
40
no problem
41
- In comedi, this is also done for their "binary"-counterpoles. I
42
don't know if this is necessary
43
44
Klaas Gadeyne, Wed August 20 2003
45
- Added rangeSet() and arefSet() methods, that allready existed in
46
the comedi implementations of these interfaces
47
*/
48
49
#ifndef ANALOGOUTINTERFACE_HPP
50
#define ANALOGOUTINTERFACE_HPP
51
52
#include "
NameServer.hpp
"
53
#include "
NameServerRegistrator.hpp
"
54
#include "../../rtt-config.h"
55
56
namespace
RTT
57
{
namespace
dev {
58
59
68
class
RTT_API
AnalogOutInterface
69
:
private
NameServerRegistrator
<AnalogOutInterface*>
70
{
71
public
:
72
77
enum
AnalogReference
{ Ground = 0,
78
Common
,
79
Differential
,
80
Other
81
};
82
86
AnalogOutInterface
()
87
{}
88
93
AnalogOutInterface
(
const
std::string& name )
94
:
NameServerRegistrator
<
AnalogOutInterface
*>( nameserver, name, this )
95
{}
96
97
virtual
~AnalogOutInterface
()
98
{}
99
107
virtual
void
rangeSet(
unsigned
int
chan,
108
unsigned
int
range) = 0;
109
117
virtual
void
arefSet(
unsigned
int
chan,
118
unsigned
int
aref) = 0;
119
124
virtual
int
rawWrite(
unsigned
int
chan,
int
value ) = 0;
125
129
virtual
int
rawRead(
unsigned
int
chan,
int
& value ) = 0;
130
134
virtual
unsigned
int
rawRange()
const
= 0;
135
140
virtual
int
write(
unsigned
int
chan,
double
value ) = 0;
141
145
virtual
int
read(
unsigned
int
chan,
double
& value ) = 0;
146
151
virtual
double
lowest(
unsigned
int
chan)
const
= 0;
152
157
virtual
double
highest(
unsigned
int
chan)
const
= 0;
158
162
virtual
double
resolution(
unsigned
int
chan)
const
= 0;
163
167
virtual
unsigned
int
nbOfChannels()
const
= 0;
168
173
unsigned
int
binaryRange
()
const
{
return
rawRange(); }
174
179
int
binaryLowest
()
const
{
return
0; }
180
185
int
binaryHighest
()
const
{
return
rawRange(); }
186
191
static
NameServer<AnalogOutInterface*>
nameserver
;
192
};
193
}}
194
195
#endif
RTT::dev::AnalogOutInterface::AnalogOutInterface
AnalogOutInterface(const std::string &name)
Definition:
AnalogOutInterface.hpp:93
RTT::dev::AnalogOutInterface::AnalogOutInterface
AnalogOutInterface()
Definition:
AnalogOutInterface.hpp:86
RTT::dev::AnalogOutInterface::~AnalogOutInterface
virtual ~AnalogOutInterface()
Definition:
AnalogOutInterface.hpp:97
RTT::dev::AnalogOutInterface::binaryHighest
int binaryHighest() const
Definition:
AnalogOutInterface.hpp:185
RTT::dev::NameServer< AnalogOutInterface * >
RTT::dev::AnalogOutInterface::nameserver
static NameServer< AnalogOutInterface * > nameserver
Definition:
AnalogOutInterface.hpp:191
NameServer.hpp
RTT::dev::NameServerRegistrator
Utility class to register a given object with a nameserver, and deregister upon destruction.
Definition:
NameServerRegistrator.hpp:56
RTT::dev::AnalogOutInterface::binaryRange
unsigned int binaryRange() const
Definition:
AnalogOutInterface.hpp:173
NameServerRegistrator.hpp
RTT::dev::AnalogOutInterface::Common
Definition:
AnalogOutInterface.hpp:78
RTT::dev::AnalogOutInterface
Definition:
AnalogOutInterface.hpp:68
RTT::dev::AnalogOutInterface::AnalogReference
AnalogReference
Definition:
AnalogOutInterface.hpp:77
RTT
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition:
Activity.cpp:53
RTT::dev::AnalogOutInterface::binaryLowest
int binaryLowest() const
Definition:
AnalogOutInterface.hpp:179
RTT::dev::AnalogOutInterface::Differential
Definition:
AnalogOutInterface.hpp:79
rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:19