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

 

         

termncursesuser.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
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 TERM_NCURSES_USER_DRIVER_H
00012 #define TERM_NCURSES_USER_DRIVER_H
00013 
00014 #include <gbxsickacfr/gbxiceutilacfr/safethread.h>
00015 #include <orcaice/context.h>
00016 #include <hydroiceutil/eventqueue.h>
00017 #include "../user.h"
00018 #include "../network.h"
00019 
00020 #include <curses.h>
00021 #include <form.h>
00022 
00023 namespace tracermon
00024 {
00025 
00026 class TermNcursesUser : public gbxsickacfr::gbxiceutilacfr::SafeThread, public tracermon::User
00027 {
00028 public:
00029 
00030     TermNcursesUser( const orcaice::Context & context );
00031     virtual ~TermNcursesUser();
00032 
00033     // from Thread
00034     virtual void walk();
00035 
00036     // from User
00037     virtual void enable( Network* network );
00038 
00039     virtual void newTraceMessage( const orca::TracerData & data );
00040     virtual void newLocalTrace( const std::string& msg );
00041 
00042     virtual void previousField();
00043     virtual void nextField();
00044     virtual void valueUp();
00045     virtual void valueDown();
00046     virtual void action();
00047 
00048     virtual void newVerbosityLevel( int error, int warn, int info, int debug );
00049     
00050 private:
00051 
00052     Network* network_;
00053     hydroiceutil::EventQueuePtr events_;
00054    
00055     orcaice::Context context_;
00056 
00057     gbxsickacfr::gbxiceutilacfr::SafeThread* inputMainThread_;
00058 
00059     // obscure ncurses stuff
00060     WINDOW* mainwin_;
00061     WINDOW* statuswin_;
00062     WINDOW* menuwin_;
00063     FIELD*  menufields_[16];
00064     FORM*   menuform_;
00065 
00066     // gui state
00067     int menuPos_;
00068     int menuCurrState_[4];
00069     int menuNewState_[4];
00070 
00071     // utilities
00072     void displayTrace( const orca::TracerData & data );
00073     void displayLocalTrace( const std::string& msg );
00074 };
00075 
00076 } // namespace
00077 
00078 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5