From 6f511cecfae3592f271627ebcb41e6a8c4f831e9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 3 Nov 2009 12:39:48 +0100 Subject: more cleanup and working towards a parser module calling interface I cleaned up a lot of config variable access along the way. This version compiles and runs, but does not yet offer any enhanced functionality. pmrfc5424 is just a dummy that is not yet being used. --- runtime/parser.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'runtime/parser.h') diff --git a/runtime/parser.h b/runtime/parser.h index cec9c083..d5d9243d 100644 --- a/runtime/parser.h +++ b/runtime/parser.h @@ -24,7 +24,21 @@ #ifndef INCLUDED_PARSE_H #define INCLUDED_PARSE_H -extern rsRetVal parserClassInit(void); -extern rsRetVal parseMsg(msg_t*); +/* the parser object, a dummy because we have only static methods */ +typedef struct parser_s { + BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ +} parser_t; + +/* interfaces */ +BEGINinterface(parser) /* name must also be changed in ENDinterface macro! */ + INTERFACEObjDebugPrint(var); + rsRetVal (*ParseMsg)(msg_t *pMsg); +ENDinterface(parser) +#define parserCURR_IF_VERSION 1 /* increment whenever you change the interface above! */ + + +/* prototypes */ +PROTOTYPEObj(parser); + #endif /* #ifndef INCLUDED_PARSE_H */ -- cgit v1.2.3