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

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 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 <gbxsickacfr/gbxiceutilacfr/subsystemthread.h>
00015 #include <orcaice/context.h>
00016 #include <hydrodll/dynamicload.h>
00017 // remote interface
00018 #include <orcaifaceimpl/cameraImpl.h>
00019 // hardware interface
00020 #include <hydrointerfaces/camera.h>
00021 
00022 namespace cameraserver {
00023 
00024 //
00025 // @brief the main executing loop of this camera component.
00026 //
00027 class MainThread : public gbxsickacfr::gbxiceutilacfr::SubsystemThread
00028 {
00029 
00030 public:
00031 
00032     MainThread( const orcaice::Context &context );
00033 
00034     // from SubsystemThread
00035     virtual void walk();
00036 
00037 private:
00038 
00039     // Tries repeatedly to instantiate the driver
00040     void initHardwareDriver();
00041 
00042     // Loops until established
00043     void initNetworkInterface();
00044 
00045     void readData();
00046 
00047     // The camera interface objects
00048     orcaifaceimpl::CameraImplPtr cameraInterface_;
00049 
00050     hydrointerfaces::Camera::Config config_;
00051     
00052     orca::CameraDescriptionSequence descrs_;
00053 
00054     // space for data
00055     orca::CameraDataSequence           orcaCameraData_;
00056     hydrointerfaces::Camera::Data      hydroCameraData_;
00057 
00058     // The library that contains the driver factory (must be declared first so it's destructed last!!!)
00059     std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> driverLib_;
00060     // Generic driver for the hardware
00061     std::auto_ptr<hydrointerfaces::Camera> driver_;
00062     
00063     orcaice::Context context_;
00064 };
00065 
00066 } // namespace
00067 
00068 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5