iCub-main
Loading...
Searching...
No Matches
icub-main
src
tools
controlBoardDumper
dumperThread.h
Go to the documentation of this file.
1
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3
/*
4
* Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
5
* Author: Francesco Nori
6
* email: francesco.nori@iit.it
7
* website: www.robotcub.org
8
* Permission is granted to copy, distribute, and/or modify this program
9
* under the terms of the GNU General Public License, version 2 or any
10
* later version published by the Free Software Foundation.
11
*
12
* A copy of the license can be found at
13
* http://www.robotcub.org/icub/license/gpl.txt
14
*
15
* This program is distributed in the hope that it will be useful, but
16
* WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18
* Public License for more details
19
*/
20
21
#include <string>
22
#include <cmath>
23
24
#include <yarp/os/Network.h>
25
#include <yarp/os/Port.h>
26
#include <yarp/os/Bottle.h>
27
#include <yarp/os/Time.h>
28
29
#include <yarp/os/PeriodicThread.h>
30
31
#include "
genericControlBoardDumper.h
"
32
33
class
boardDumperThread
:
public
PeriodicThread
34
{
35
public
:
36
void
setDevice
(PolyDriver *board_d, PolyDriver *debug_d,
int
rate, std::string portPrefix, std::string dataToDump,
bool
logOnDisk);
37
boardDumperThread
();
38
~boardDumperThread
();
39
bool
threadInit
();
40
void
setThetaMap
(
int
*,
int
);
41
void
threadRelease
();
42
void
run
();
43
void
setGetter
(
GetData
*);
44
45
private
:
46
PolyDriver *board_dd;
47
PolyDriver *debug_dd;
48
GetData
*getter;
49
Stamp stmp;
50
51
std::string portName;
52
Port *port;
53
FILE * logFile;
54
bool
logToFile;
55
56
IPositionControl *pos;
57
IVelocityControl *vel;
58
IEncoders *enc;
59
IMotorEncoders *imotenc;
60
IPidControl *pid;
61
IAmplifierControl *amp;
62
IControlLimits *lim;
63
ITorqueControl *trq;
64
IControlMode *cmod;
65
IInteractionMode *imod;
66
IMotor *imot;
67
68
int
numberOfJoints;
69
double
*data;
70
71
int
numberOfJointsRead;
72
double
*dataRead;
73
int
*dataMap;
74
75
};
76
GetData
Definition
genericControlBoardDumper.h:29
boardDumperThread
Definition
dumperThread.h:34
boardDumperThread::threadRelease
void threadRelease()
Definition
dumperThread.cpp:139
boardDumperThread::setThetaMap
void setThetaMap(int *, int)
Definition
dumperThread.cpp:76
boardDumperThread::setGetter
void setGetter(GetData *)
Definition
dumperThread.cpp:90
boardDumperThread::threadInit
bool threadInit()
Definition
dumperThread.cpp:95
boardDumperThread::setDevice
void setDevice(PolyDriver *board_d, PolyDriver *debug_d, int rate, std::string portPrefix, std::string dataToDump, bool logOnDisk)
Definition
dumperThread.cpp:31
boardDumperThread::boardDumperThread
boardDumperThread()
Definition
dumperThread.cpp:118
boardDumperThread::run
void run()
Definition
dumperThread.cpp:155
boardDumperThread::~boardDumperThread
~boardDumperThread()
Definition
dumperThread.cpp:72
genericControlBoardDumper.h
Generated on Wed Dec 18 2024 16:34:48 for iCub-main by
1.9.8