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/multicameraserver/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/multiimage.h>
00020 
00021 // remote interface
00022 #include <orcaifaceimpl/multicamera.h>
00023 
00024 namespace multicameraserver {
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     // 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::MultiCameraImplPtr interface_;
00058 
00059     // The Network Image Interface Data Structure
00060     orca::MultiCameraDataPtr orcaData_;
00061 
00062     // The Network Image Interface Description Structure
00063     orca::MultiCameraDescriptionPtr descr_;
00064     
00065     // The Driver Interface Config Structure
00066     hydrointerfaces::MultiImage::Config config_;
00067 
00068     // The Driver Interface Data Structure
00069     hydrointerfaces::MultiImage::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::MultiImage> driver_;
00076 
00077 };
00078 
00079 } // namespace
00080 
00081 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5