INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

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-2009 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 <orcaice/subsystemthread.h>
00016 #include <orcaice/context.h>
00017 #include <hydrodll/dynamicload.h>
00018 // remote interface
00019 #include <orcaifaceimpl/gps.h>
00020 // hardware interface
00021 #include <hydrointerfaces/gps.h>
00022 
00023 namespace gps {
00024 
00025 class MainThread : public orcaice::SubsystemThread
00026 {
00027 
00028 public:
00029 
00030     MainThread( const orcaice::Context& context );
00031 
00032 private:
00033 
00034     // from SubsystemThread
00035     virtual void initialise();
00036     virtual void work();
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     
00049     // The library that contains the driver factory (must be declared first so it's destructed last!!!)
00050     std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> driverLib_;
00051     // Generic driver for the hardware
00052     std::auto_ptr<hydrointerfaces::Gps> driver_;
00053 
00054     // options
00055     bool publishWithoutFix_;
00056 
00057     orcaice::Context context_;
00058 };
00059 
00060 } // namespace
00061 
00062 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5