Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpComedi.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
* See the file LICENSE.txt at the root directory of this source
10
* distribution for additional information about the GNU GPL.
11
*
12
* For using ViSP with software that can not be combined with the GNU
13
* GPL, please contact Inria about acquiring a ViSP Professional
14
* Edition License.
15
*
16
* See https://visp.inria.fr for more information.
17
*
18
* This software was developed at:
19
* Inria Rennes - Bretagne Atlantique
20
* Campus Universitaire de Beaulieu
21
* 35042 Rennes Cedex
22
* France
23
*
24
* If you have questions regarding the use of this file, please contact
25
* Inria at visp@inria.fr
26
*
27
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
*
30
* Description:
31
* ATI Force torque interface.
32
*/
33
#ifndef _vpComedi_h_
34
#define _vpComedi_h_
35
36
#include <visp3/core/vpConfig.h>
37
38
#ifdef VISP_HAVE_COMEDI
39
40
#include <string>
41
42
#include <comedilib.h>
43
44
#include <visp3/core/vpColVector.h>
45
46
BEGIN_VISP_NAMESPACE
109
class
VISP_EXPORT
vpComedi
110
{
111
public
:
112
vpComedi
();
113
virtual
~vpComedi
();
114
116
117
void
close
();
119
comedi_t *
getHandler
()
const
{
return
m_handler
; }
122
std::vector<lsampl_t>
getMaxData
()
const
{
return
m_maxdata
; }
124
unsigned
int
getNChannel
()
const
{
return
m_nchannel
; }
125
126
vpColVector
getPhyData()
const
;
127
std::string getPhyDataUnits()
const
;
128
131
std::vector<comedi_range *>
getRangeInfo
()
const
{
return
m_range_info
; }
133
unsigned
int
getSubDevice
()
const
{
return
m_subdevice
; }
134
135
void
open();
136
142
void
setAnalogReference
(
const
unsigned
int
&aref) {
m_aref
= aref; }
143
148
void
setChannelNumbers
(
const
unsigned
int
&nchannel) {
m_nchannel
= nchannel; }
149
151
void
setDevice
(
const
std::string &device) {
m_device
= device; }
152
158
void
setRange
(
const
unsigned
int
&range) {
m_range
= range; }
160
void
setSubDevice
(
const
unsigned
int
&subdevice) {
m_subdevice
= subdevice; }
162
163
protected
:
164
std::vector<lsampl_t> getRawData()
const
;
165
166
protected
:
168
169
std::string
m_device
;
170
comedi_t *
m_handler
;
171
unsigned
int
m_subdevice
;
172
unsigned
int
m_range
;
173
unsigned
int
m_aref
;
174
unsigned
int
m_nchannel
;
175
std::vector<comedi_range *>
m_range_info
;
176
std::vector<lsampl_t>
m_maxdata
;
177
std::vector<unsigned int>
m_chanlist
;
179
};
180
END_VISP_NAMESPACE
181
#endif
182
#endif
vpColVector
Implementation of column vector and the associated operations.
Definition
vpColVector.h:191
vpComedi::vpComedi
vpComedi()
Definition
vpComedi.cpp:47
vpComedi::setChannelNumbers
void setChannelNumbers(const unsigned int &nchannel)
Definition
vpComedi.h:148
vpComedi::m_aref
unsigned int m_aref
Definition
vpComedi.h:173
vpComedi::m_maxdata
std::vector< lsampl_t > m_maxdata
Definition
vpComedi.h:176
vpComedi::setDevice
void setDevice(const std::string &device)
Set comedi device name. Default value is /dev/comedi0.
Definition
vpComedi.h:151
vpComedi::setSubDevice
void setSubDevice(const unsigned int &subdevice)
Set comedi analog input subdevice.
Definition
vpComedi.h:160
vpComedi::m_device
std::string m_device
Definition
vpComedi.h:169
vpComedi::getNChannel
unsigned int getNChannel() const
Get number of channels.
Definition
vpComedi.h:124
vpComedi::m_range
unsigned int m_range
Definition
vpComedi.h:172
vpComedi::m_range_info
std::vector< comedi_range * > m_range_info
Definition
vpComedi.h:175
vpComedi::getSubDevice
unsigned int getSubDevice() const
Get comedi subdevice.
Definition
vpComedi.h:133
vpComedi::getRangeInfo
std::vector< comedi_range * > getRangeInfo() const
Definition
vpComedi.h:131
vpComedi::m_subdevice
unsigned int m_subdevice
Definition
vpComedi.h:171
vpComedi::m_handler
comedi_t * m_handler
Definition
vpComedi.h:170
vpComedi::setAnalogReference
void setAnalogReference(const unsigned int &aref)
Definition
vpComedi.h:142
vpComedi::setRange
void setRange(const unsigned int &range)
Definition
vpComedi.h:158
vpComedi::m_nchannel
unsigned int m_nchannel
Definition
vpComedi.h:174
vpComedi::m_chanlist
std::vector< unsigned int > m_chanlist
Definition
vpComedi.h:177
vpComedi::getHandler
comedi_t * getHandler() const
Get native Comedi handler.
Definition
vpComedi.h:119
vpComedi::close
void close()
Definition
vpComedi.cpp:88
vpComedi::getMaxData
std::vector< lsampl_t > getMaxData() const
Definition
vpComedi.h:122
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
sensor
include
visp3
sensor
vpComedi.h
Generated by
1.17.0