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

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp, Ben Upcroft, Tom Burdick
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 DISPARITY_MAIN_THREAD_H
00012 #define DISPARITY_MAIN_THREAD_H 
00013 
00014 #include <memory>
00015 #include <gbxsickacfr/gbxiceutilacfr/buffer.h>
00016 #include <orcaice/subsystemthread.h>
00017 #include <orcaice/context.h>
00018 #include <hydrodll/dynamicload.h>
00019 
00020 // plugin interface
00021 #include <hydrointerfaces/disparity.h>
00022 
00023 // network interfaces
00024 #include <orcaifaceimpl/image.h>
00025 #include <orcaifaceimpl/multicamera.h>
00026 
00027 namespace disparity {
00028 
00029 class MainThread : public orcaice::SubsystemThread
00030 {
00031 public:
00032     MainThread( const orcaice::Context &context );
00033 
00034     bool hasPluginEventLoop() const;
00035     void executePluginEventLoop();
00036 
00037 private:
00038 
00039     // from SubsystemThread
00040     virtual void initialise();
00041     virtual void work();
00042     virtual void finalise();
00043 
00044     // initialize before running the thread, since this is a requirement 
00045     void init();
00046 
00047     // initialise the parameters for the Viewer
00048     void readSettings();
00049 
00050     // Setup algorithm plugin
00051     void initPluginInterface();
00052 
00053     // Loops until established
00054     void initNetworkInterface();
00055 
00056     // Setup data structures based on the incomingDescr_
00057     void initDataStructures();
00058 
00059     // context
00060     orcaice::Context context_;
00061     
00062     // incoming consumer object
00063     orcaifaceimpl::BufferedMultiCameraConsumerImplPtr incomingInterface_;
00064     
00065     // incoming data structure
00066     orca::MultiCameraDataPtr incomingData_;
00067 
00068     // incoming description structure
00069     orca::MultiCameraDescriptionPtr incomingDescr_;
00070 
00071     // incoming proxy object 
00072     orca::MultiCameraPrx incomingPrx_;
00073 
00074     // The Network Image Interface object
00075     orcaifaceimpl::ImageImplPtr outgoingInterface_;
00076 
00077     // The Network Image Interface Data Structure
00078     orca::ImageDataPtr outgoingData_;
00079 
00080     // The Network Image Interface Description Structure
00081     orca::ImageDescriptionPtr outgoingDescr_;
00082     
00083     // The Driver Interface Config Structure
00084     hydrointerfaces::Disparity::Config pluginConfig_;
00085 
00086     // The Driver Interface Data Structure
00087     hydrointerfaces::Disparity::Data pluginLeftData_;
00088     hydrointerfaces::Disparity::Data pluginRightData_;
00089     hydrointerfaces::Disparity::Data pluginOutputData_;
00090 
00091     // The library that contains the driver factory (must be declared first so it's destructed last!!!)
00092     std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> pluginLib_;
00093     
00094     // Generic driver for the hardware
00095     std::auto_ptr<hydrointerfaces::Disparity> pluginInterface_;
00096 
00097 };
00098 
00099 } // namespace
00100 
00101 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5