INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         
thread.h
1 /*
2  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
3  * http://gearbox.sf.net/
4  * Copyright (c) 2004-2010 Alex Brooks, Alexei Makarenko, Tobias Kaupp
5  *
6  * This distribution is licensed to you under the terms described in
7  * the LICENSE file included in this distribution.
8  *
9  */
10 
11 #ifndef GBXICEUTILACFR_THREAD_H
12 #define GBXICEUTILACFR_THREAD_H
13 
14 #include <IceUtil/Thread.h>
15 #include <gbxutilacfr/stoppable.h>
16 // this is not needed for implementation of this class.
17 // it's included for convenience of users of Thread class.
18 #include <gbxsickacfr/gbxiceutilacfr/threadutils.h>
19 
20 namespace gbxiceutilacfr {
21 
72 class Thread : public IceUtil::Thread, public gbxutilacfr::Stoppable
73 {
74 public:
75 
76  Thread();
77 
80  void stop();
81 
82  // from gbxutilacfr::Stoppable
84  virtual bool isStopping();
85 
87  bool isStarted();
88 
92  bool isActive() { return !isStopping(); };
93 
94 protected:
95 
100  void waitForStop();
101 
102 private:
103  bool isStopping_;
104 };
106 typedef IceUtil::Handle<gbxiceutilacfr::Thread> ThreadPtr;
107 
110 void stop( gbxiceutilacfr::Thread* thread );
111 
114 void stopAndJoin( gbxiceutilacfr::Thread* thread );
115 
118 inline void stop( const gbxiceutilacfr::ThreadPtr& thread )
119 { stop(thread.get()); }
120 
123 inline void stopAndJoin( const gbxiceutilacfr::ThreadPtr& thread )
124 { stopAndJoin(thread.get()); }
125 
126 } // end namespace
127 
128 #endif
Data structure returned by read()
Definition: gbxsickacfr/driver.h:49
int numberOfSamples
number of samples in a scan
Definition: gbxsickacfr/driver.h:44
bool readRme
Read PGRME sentence.
Definition: gbxgarminacfr/driver.h:51
@ PgRme
Contents of PGRME message.
Definition: nmeamessages.h:26
Minimum information to configure the receiver in INS mode.
Definition: gbxnovatelacfr/driver.h:36
virtual bool isStopping()
Returns TRUE if the thread is in Stopping state, FALSE otherwise.
Definition: thread.cpp:40
A trivial implementation of the status API which does not assemble information.
Definition: trivialstatus.h:40
double speed
Horizontal velocity [metres/second].
Definition: nmeamessages.h:128
bool readGga
Read GPGGA sentence.
Definition: gbxgarminacfr/driver.h:47
@ BestGpsVel
GenericData is really BestGpsVelData.
Definition: gbxnovatelacfr/driver.h:297
Gps velocity information.
Definition: gbxnovatelacfr/driver.h:386
Configuration structure.
Definition: gbxsickacfr/driver.h:23
void read(Data &data)
Definition: gbxsickacfr/driver.cpp:574
std::string toString() const
Returns human-readable configuration description.
Definition: gbxgarminacfr/driver.cpp:55
void waitForStop()
Definition: thread.cpp:48
bool isStarted()
Returns TRUE if the thread is in Started state, FALSE otherwise.
Definition: thread.cpp:24
double fieldOfView
field of viewe [rad]
Definition: gbxsickacfr/driver.h:40
double maxRange
maximum range [m]
Definition: gbxsickacfr/driver.h:38
std::string device
Serial device. e.g. "/dev/ttyS0".
Definition: gbxsickacfr/driver.h:32
IceUtil::Handle< gbxiceutilacfr::Thread > ThreadPtr
A smart pointer to the thread class.
Definition: thread.h:106
Utility namespace (part of SICK-ACFR driver)
Definition: buffer.h:21
double longitude
Longitude [degrees].
Definition: nmeamessages.h:82
Novatel GPS/INS driver.
Definition: gbxnovatelacfr/driver.cpp:96
Definition: nmeamessages.h:58
FixType fixType
Definition: nmeamessages.h:90
void stopAndJoin(gbxiceutilacfr::Thread *thread)
Definition: thread.cpp:74
std::string device
Serial device. e.g. "/dev/ttyS0".
Definition: gbxgarminacfr/driver.h:41
INS position/velocity/attitude information.
Definition: gbxnovatelacfr/driver.h:312
@ BestGpsPos
GenericData is really BestGpsPosData.
Definition: gbxnovatelacfr/driver.h:295
Gps position information.
Definition: gbxnovatelacfr/driver.h:352
std::string warnings
if 'haveWarnings' is set, 'warnings' will contain diagnostic information.
Definition: gbxsickacfr/driver.h:61
int baudRate
Baud rate.
Definition: gbxsickacfr/driver.h:34
All the information needed to configure the driver.
Definition: gbxnovatelacfr/driver.h:87
bool readRmc
Read GPRMC sentence.
Definition: gbxgarminacfr/driver.h:53
Definition: gbxgarminacfr/driver.h:88
Vector track and speed over ground data structure.
Definition: nmeamessages.h:108
int satellites
Number of satellites.
Definition: nmeamessages.h:93
@ GpVtg
Contents of PGVTG message.
Definition: nmeamessages.h:24
the idea is to create one of these guys (with a valid Config), and then treat it as a data-source,...
Definition: gbxnovatelacfr/driver.h:449
Configuration structure.
Definition: gbxgarminacfr/driver.h:24
@ RawImu
GenericData is really RawImuData.
Definition: gbxnovatelacfr/driver.h:299
A simple implementation of the tracer API which prints to cout.
Definition: trivialtracer.h:36
Raw IMU information.
Definition: gbxnovatelacfr/driver.h:410
SICK driver.
Definition: gbxsickacfr/driver.h:66
double horizontalPositionError
Horizontal position error: one standard deviation [metres)].
Definition: nmeamessages.h:158
A minor extention of the IceUtil::Thread class.
Definition: thread.h:73
bool ignoreUnknown
Definition: gbxgarminacfr/driver.h:58
double minRange
minimum range [m]
Definition: gbxsickacfr/driver.h:36
void stop(gbxiceutilacfr::Thread *thread)
Definition: thread.cpp:55
std::string protocol
Serial Protocol: Garmin or NMEA.
Definition: gbxgarminacfr/driver.h:44
@ InsPva
GenericData is really InsPvaData.
Definition: gbxnovatelacfr/driver.h:293
An abstract interface class representing an stoppable activity.
Definition: stoppable.h:61
bool readVtg
Read GPVTG sentence.
Definition: gbxgarminacfr/driver.h:49
double latitude
Latitude [degrees].
Definition: nmeamessages.h:80
Definition: nmeamessages.h:138
bool isActive()
Definition: thread.h:92
Minimum information needed to configure the receiver in GPS only mode.
Definition: gbxnovatelacfr/driver.h:64
@ GpGga
Contents of PGGGA message.
Definition: nmeamessages.h:22
double startAngle
starting angle [rad]
Definition: gbxsickacfr/driver.h:42
void stop()
Definition: thread.cpp:32
 

Generated for GearBox by  doxygen 1.4.5