orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

components/gps/mainthread.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Mathew Ridley, Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef MAIN_THREAD_H
00012 #define MAIN_THREAD_H
00013 
00014 #include <memory>
00015 #include <gbxsickacfr/gbxiceutilacfr/subsystemthread.h>
00016 #include <orcaice/context.h>
00017 #include <hydrodll/dynamicload.h>
00018 // remote interface
00019 #include <orcaifaceimpl/gpsImpl.h>
00020 // hardware interface
00021 #include <hydrointerfaces/gps.h>
00022 
00023 namespace gps {
00024 
00025 
00026 class MainThread : public gbxsickacfr::gbxiceutilacfr::SubsystemThread
00027 {
00028 
00029 public:
00030 
00031     MainThread( const orcaice::Context& context );
00032 
00033     // from SubsystemThread
00034     virtual void walk();
00035 
00036 private:
00037 
00038     // Tries repeatedly to instantiate the driver
00039     void initHardwareDriver();
00040 
00041     // Loops until established
00042     void initNetworkInterface();
00043 
00044     orca::GpsDescription descr_;
00045     orcaifaceimpl::GpsImplPtr gpsInterface_;
00046 
00047     hydrointerfaces::Gps::Config config_;
00048     void reportBogusValues( orca::GpsData        &gpsData );
00049     
00050     // The library that contains the driver factory (must be declared first so it's destructed last!!!)
00051     std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> driverLib_;
00052     // Generic driver for the hardware
00053     std::auto_ptr<hydrointerfaces::Gps> driver_;
00054 
00055     orcaice::Context context_;
00056 };
00057 
00058 } // namespace
00059 
00060 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5