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/cameraserver/mainthread.h

00001 /*
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/camera.h>
00023 
00024 namespace cameraserver {
00025 
00026 //
00027 // @brief the main executing loop of this camera component.
00028 //
00029 class MainThread : public orcaice::SubsystemThread
00030 {
00031 
00032 public:
00033 
00034     MainThread( const orcaice::Context &context );
00035 
00036 private:
00037 
00038     // from SubsystemThread
00039     virtual void initialise();
00040     virtual void work();
00041 
00042     // Setup Hardware
00043     void initHardwareInterface();
00044 
00045     // Loops until established
00046     void initNetworkInterface();
00047 
00048     // Read Data from the Driver
00049     void readData();
00050 
00051     // Read Settings from Config File
00052     void readSettings();
00053 
00054     // Context
00055     orcaice::Context context_;
00056 
00057     // The Network Image Interface object
00058     orcaifaceimpl::CameraImplPtr interface_;
00059 
00060     // The Network Image Interface Data Structure
00061     orca::ImageDataPtr orcaData_;
00062 
00063     // The Network Image Interface Description Structure
00064     orca::CameraDescriptionPtr descr_;
00065     
00066     // The Driver Interface Config Structure
00067     hydrointerfaces::Image::Config config_;
00068 
00069     // The Driver Interface Data Structure
00070     hydrointerfaces::Image::Data hydroData_;
00071 
00072     // The library that contains the driver factory (must be declared first so it's destructed last!!!)
00073     std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> driverLib_;
00074     
00075     // Generic driver for the hardware
00076     std::auto_ptr<hydrointerfaces::Image> driver_;
00077 
00078 };
00079 
00080 } // namespace
00081 
00082 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5