server/parserImpl.h

00001 /*
00002  * Copyright Ian Burnett 2005, 2006.
00003  *
00004  * This file is part of Ian's Interactive LCD controller (IILC).
00005  * 
00006  * IILC is free software; you can redistribute it and/or modify it under
00007  * the terms of the GNU General Public License as published by the Free
00008  * Software Foundation; either version 2 of the License, or (at your
00009  * option) any later version.
00010  *
00011  * IILC is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License along
00017  * with IILC; if not, write to the Free Software Foundation, Inc.,
00018  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
00019  */
00020 
00021 #if !defined(__PARSER_H__)
00022 #define __PARSER_H__
00023 
00024 #include "lcd.h"
00025 #include "config.h"
00026 
00027 #define PARSER_MODULE_ENTITY_FAN   1
00028 #define PARSER_MODULE_ENTITY_TEMP  2
00029 #define PARSER_MODULE_ENTITY_LED   3
00030 
00031 
00032 int yyparse(void);
00033 
00034 int yylex(void);
00035 
00036 int yyerror(char * err);
00037 
00038 int parserParse(LPCONFIG_FILE * ppFile,
00039                 const char * pszFileName);
00040 
00041 /* ------------------------------------------------------------------------ */
00042 /*                                                                          */
00043 /* Functions used by the parser to read in the configuration                */
00044 /*                                                                          */
00045 /* ------------------------------------------------------------------------ */
00046 
00047 /* ----------------- Device entity ----------------- */
00048 
00049 void parserDeviceBegin(char * pszDevice);
00050 
00051 void parserDeviceSetClass(char * pszClass);
00052 
00053 void parserDeviceSetPort(char * pszPort);
00054 
00055 int  parserDeviceObjectCreate(int object_id, 
00056                               char * pszName, 
00057                               enum displayObjectType type, 
00058                               LPCONFIG_OBJECT * ppObject);
00059 
00060 int parserDeviceObjectFind(LPCONFIG_DEVICE pDevice, 
00061                            enum displayObjectType type,
00062                            int object_id,
00063                            LPCONFIG_OBJECT * ppObject);
00064 
00065 void parserDeviceObjectUse(enum displayObjectType type,
00066                            int id,
00067                            char * pszName);
00068 
00069 void parserDeviceEnd(void);
00070 
00071 
00072 /* ----------------- Display entity ----------------- */
00073 
00074 void parserDisplayBegin(const char * pszDisplay);
00075 
00076 void parserDisplayEnd();
00077 
00078 void parserDisplaySetDevice(const char * pszDevice);
00079 
00080 
00081 
00082 /* ----------------- Module entity ----------------- */
00083 
00084 void parserModuleBegin(char * pszModule);
00085 
00086 void parserModuleSetLibrary(char * pszLibrary);
00087 
00088 void parserModuleControlObject(enum displayObjectType object_type, 
00089                                int object_id);
00090 
00091 void parserModuleReportObject(enum displayObjectType object_type, 
00092                               int object_id, 
00093                               const char * report_as);
00094 
00095 void parserModuleVirtualObject(int module_id,
00096                                int device_id,
00097                                const char * pszObject);
00098 
00099 void parserModuleEnd();
00100 
00101 
00102 
00103 /* ----------------- Screen entity ----------------- */
00104 
00105 
00106 
00107 void parserScreenBegin(char * pszScreen);
00108 
00109 void parserScreenEnd(void);
00110 
00111 void parserScreenShowModule(char * pszModule,
00112                             int size_x,
00113                             int size_y,
00114                             int pos_x,
00115                             int pos_y);
00116 
00117 
00118 #endif
00119 

Generated on Mon Jul 17 01:36:12 2006 for IILC by  doxygen 1.4.6