ARCSscreen.hh
00001 // ARCS逕サ髱「謠冗判繧ッ繝ゥ繧ケ
00002 // 2011/02/09 Yuki YOKOKURA
00003 //
00004 // Advanced Robot Control System 逕ィ逕サ髱「縺ョ謠冗判繧定。後>縺セ縺吶��
00005 //
00006 // Copyright (C) 2011 Yuki YOKOKURA
00007 // This program is free software;
00008 // you can redistribute it and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 3 of the License, or any later version.
00010 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00011 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012 // See the GNU General Public License for more details <http://www.gnu.org/licenses/>.
00013 // Besides, you can negotiate about other options of licenses instead of GPL.
00014 // If you would like to get other licenses, please contact us<yuki@katsura.sd.keio.ac.jp>.
00015 
00016 #ifndef RCSSCREEN
00017 #define RCSSCREEN
00018 
00019 #include <curses.h>
00020 #include "Parameters.hh"
00021 #include "GraphPlot2D.hh"
00022 
00023 // ARCS謖�莉、螳夂セゥ
00024 #define ARCS_ID_START           0
00025 #define ARCS_ID_EXIT            1
00026 #define ARCS_ID_STOP            2
00027 #define ARCS_ID_SAVEEXIT        3
00028 #define ARCS_ID_DISCEXIT        4
00029 
00030 // ARCS迥カ諷句ョ夂セゥ
00031 #define ARCS_PHASE_START        10
00032 #define ARCS_PHASE_RUN          11
00033 #define ARCS_PHASE_EXIT         12
00034 
00035 class ARCSscreen {
00036         // RCS逕サ髱「謠冗判繧ッ繝ゥ繧ケ
00037         private:
00038                 ARCSscreen(const ARCSscreen&);                                  // 繧ウ繝斐�シ繧ウ繝ウ繧ケ繝医Λ繧ッ繧ソ菴ソ逕ィ遖∵ュ「
00039                 const ARCSscreen& operator=(const ARCSscreen&); // 莉」蜈・貍皮ョ怜ュ蝉スソ逕ィ遖∵ュ「
00040                 FrameGraphics* FG;                                              // 繝輔Ξ繝シ繝�繝舌ャ繝輔ぃ縺ク縺ョ繝昴う繝ウ繧ソ
00041                 GraphPlot2D* GraphA;                                    // 繧ー繝ゥ繝柊縺ク縺ョ繝昴う繝ウ繧ソ
00042                 GraphPlot2D* GraphB;                                    // 繧ー繝ゥ繝稗縺ク縺ョ繝昴う繝ウ繧ソ
00043                 void AddHLine(int X1, int X2, int Y);   // 豌エ蟷ウ鄂ォ邱壹�ョ謠冗判
00044                 void AddVLine(int Y1, int Y2, int X);   // 蝙ら峩鄂ォ邱壹�ョ謠冗判
00045                 void PrintScreen(void);                                 // 逕サ髱「縺ョ謠冗判繧定。後≧  菴�縺玲焚蛟、縺ョ謠冗判縺ッ陦後o縺ェ縺�
00046                 void OperationIndic(bool SW);
00047                 void StorageIndic(bool SW);
00048                 void NetLinkIndic(bool SW);
00049                 enum CMD_ID {
00050                         CMD_ON,
00051                         CMD_OFF,
00052                         CMD_DISABLE
00053                 };
00054                 enum TEXT_COLOR {
00055                         WHITE_BLACK=1,
00056                         BLACK_CYAN,
00057                         CYAN_BLACK,
00058                         WHITE_BLUE,
00059                         BLUE_BLACK,
00060                         WHITE_RED,
00061                         BLACK_YELLOW,
00062                         BLACK_GREEN,
00063                         GREEN_BLACK,
00064                         RED_BLACK
00065                 };
00066                 void StartCommand(enum CMD_ID command);
00067                 void ExitCommand(enum CMD_ID command);
00068                 void StopCommand(enum CMD_ID command);
00069                 void DiscExitCommand(enum CMD_ID command);
00070                 void SaveExitCommand(enum CMD_ID command);
00071                 void CommandPrint(int phase, int* count);
00072                 void CommandPrintInit(int phase, int* count);
00073                 void StatusIndic(int y, int x, double Iref, double Irat, double Imax);
00074                 void MessageText(const char* Text, int color);  // ARCS逕サ髱「荳�逡ェ荳九↓繝。繝�繧サ繝シ繧ク繧定。ィ遉コ縺吶k髢「謨ー
00075         
00076         public:
00077                 ARCSscreen(void);                                                       // 逕サ髱「謠冗判縺ョ蛻晄悄蛹悶→貅門y繧定。後≧
00078                 ~ARCSscreen(void);                                                      // RCS逕サ髱「陦ィ遉コ縺ョ豸亥悉
00079                 void PrintValue(VariableParams* VarParams);     // 謨ー蛟、縺ィ繧ー繝ゥ繝輔�ョ謠冗判繧定。後≧
00080                 int CommandInput(int phase);
00081                 void Start(void);
00082                 void Stop(void);
00083 };
00084 
00085 #endif
00086 
 All Classes Files