fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/akshell/cmds.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     cmds.h  -  description
00003 
00004     begin                : Wed Jan 3 2001
00005     copyright            : (C) 2001 by A Kopmann
00006     email                : kopmann@hpe.fzk.de
00007     status               :
00008     test                 :
00009     history              :
00010  ***************************************************************************/
00011 
00012 
00013 
00014 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00015 #pragma once
00016 #endif
00017 #ifndef _INC_CMDS_3924F59F03E2_INCLUDED
00018 #define _INC_CMDS_3924F59F03E2_INCLUDED
00019 
00020 
00021 #include <cstdio>
00022 #include <cstring>
00023 
00024 
00025 class shell;
00026 
00055 class cmds {
00056 public:
00057   cmds();
00058 
00059   virtual ~cmds();
00060 
00062   void setShell(shell *sh);
00063 
00065   virtual void init(FILE *fout);
00066   
00072   virtual int interprete(FILE * fin, FILE * fout, char *line);
00073 
00089   int readUnsignedLong(FILE *fin, FILE * fout, unsigned long *data, int n);
00090 
00091 
00109   int readUnsignedShort(FILE *fin, FILE * fout, unsigned short *data, int n, bool hex = true);
00110 
00111   
00112   virtual void fprintf(FILE *fout, const char *msg, ...);
00113 
00114   
00115 protected:
00116 
00117   char *name;
00118 
00119   char *description;
00120 
00121   shell *sh;
00122 
00123 };
00124 
00125 #endif /* _INC_CMDS_3924F59F03E2_INCLUDED */
00126