00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef RCSSCREEN
00017 #define RCSSCREEN
00018
00019 #include <curses.h>
00020 #include "Parameters.hh"
00021 #include "GraphPlot2D.hh"
00022
00023
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
00031 #define ARCS_PHASE_START 10
00032 #define ARCS_PHASE_RUN 11
00033 #define ARCS_PHASE_EXIT 12
00034
00035 class ARCSscreen {
00036
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);
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);
00075
00076 public:
00077 ARCSscreen(void);
00078 ~ARCSscreen(void);
00079 void PrintValue(VariableParams* VarParams);
00080 int CommandInput(int phase);
00081 void Start(void);
00082 void Stop(void);
00083 };
00084
00085 #endif
00086