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

 

         

bicycle/netthread.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 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 
00011 #ifndef NETWORK_THREAD_H
00012 #define NETWORK_THREAD_H
00013 
00014 #include <orcaice/subsystemthread.h>
00015 #include <orcaice/context.h>
00016 #include <gbxsickacfr/gbxiceutilacfr/notify.h>
00017 
00018 #include <orcaifaceimpl/odometry2d.h>
00019 #include <orcaifaceimpl/drivebicycleImpl.h>
00020 #include "hwthread.h"
00021 
00022 namespace bicycle
00023 {
00024 
00025 //
00026 // Handles network interface
00027 //
00028 class NetThread : public orcaice::SubsystemThread,
00029                   public gbxiceutilacfr::NotifyHandler<orca::DriveBicycleCommand>
00030 {
00031 public:
00032 
00033     NetThread( HwThread                      &HwThread,
00034                 const orca::VehicleDescription &descr,
00035                 const orcaice::Context         &context );
00036 
00037     // from NotifyHandler
00038     virtual void handleData( const orca::DriveBicycleCommand& command );
00039 
00040 private:
00041     // from SubsystemThread
00042     virtual void initialise();
00043     virtual void work();
00044 
00045     void limit( hydrointerfaces::Bicycle::Command &cmd );
00046 
00047     // external interfaces
00048     orcaifaceimpl::Odometry2dImplPtr           odometry2dI_;
00049     orcaifaceimpl::DriveBicycleImplPtr         driveBicycleI_;
00050 
00051     HwThread &HwThread_;
00052 
00053     // a copy of the current speed
00054     double currentSpeed_;
00055 
00056     orca::VehicleDescription descr_;
00057 
00058     // redundant but casted description of the control
00059     IceUtil::Handle<orca::VehicleControlVelocityBicycleDescription>
00060         controlDescr_;
00061 
00062     // component current context
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