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 Project Download Mailing lists
|
components/imageserver/mainthread.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Tom Burdick, 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 #ifndef MAIN_THREAD_H 00011 #define MAIN_THREAD_H 00012 00013 #include <memory> 00014 #include <orcaice/subsystemthread.h> 00015 #include <orcaice/context.h> 00016 #include <hydrodll/dynamicload.h> 00017 00018 // plugin interface 00019 #include <hydrointerfaces/image.h> 00020 00021 // remote interface 00022 #include <orcaifaceimpl/image.h> 00023 00024 namespace imageserver { 00025 00026 // 00027 // @brief the main executing loop of this image component. 00028 // 00029 class MainThread : public orcaice::SubsystemThread 00030 { 00031 00032 public: 00033 00034 MainThread( const orcaice::Context &context ); 00035 00036 private: 00037 // from SubsystemThread 00038 virtual void initialise(); 00039 virtual void work(); 00040 00041 // Setup Hardware 00042 void initHardwareInterface(); 00043 00044 // Loops until established 00045 void initNetworkInterface(); 00046 00047 // Read Data from the Driver 00048 void readData(); 00049 00050 // Read Settings from Config File 00051 void readSettings(); 00052 00053 // Context 00054 orcaice::Context context_; 00055 00056 // The Network Image Interface object 00057 orcaifaceimpl::ImageImplPtr interface_; 00058 00059 // The Network Image Interface Data Structure 00060 orca::ImageDataPtr orcaData_; 00061 00062 // The Network Image Interface Description Structure 00063 orca::ImageDescriptionPtr descr_; 00064 00065 // The Driver Interface Config Structure 00066 hydrointerfaces::Image::Config config_; 00067 00068 // The Driver Interface Data Structure 00069 hydrointerfaces::Image::Data hydroData_; 00070 00071 // The library that contains the driver factory (must be declared first so it's destructed last!!!) 00072 std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> driverLib_; 00073 00074 // Generic driver for the hardware 00075 std::auto_ptr<hydrointerfaces::Image> driver_; 00076 00077 00078 }; 00079 00080 } // namespace 00081 00082 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)