/****************************************************************************** * * Title : RWlists.c * Version 0.0 * * Description: Read/Write primitive and command lists to/from text files. * Related files: RWlists.c, * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ #ifndef RW_LISTS_H /* multiple-inclusion protection */ #define RW_LISTS_H /****************************************************************************** * Header files * ******************************************************************************/ #include #include "errorCodesRcc.h" #include "primListTableDefinitions.h" #include "commandListDefinitions.h" /****************************************************************************** * Definitions * ******************************************************************************/ /****************************************************************************** * Type definitions * ******************************************************************************/ /****************************************************************************** * Global Function Declarations * ******************************************************************************/ ERROR_ID readPrimListFile(char primListFile[], struct LIST_TABLE *listTable); ERROR_ID writePrimListFile(char primListFile[], struct LIST_TABLE *listTable); int readLineFromIndex(FILE* file, int index, int maxStringLength, char *returnString); ERROR_ID readCmdListFile(char cmdListFile[], struct COMMAND_LIST *cmdList); ERROR_ID writeCmdListFile(char cmdListFile[], struct COMMAND_LIST *cmdList); int readListHeader(FILE *file, struct MSG_LIST_HEAD *listHeader, char listComment[COMMENT_LENGTH], UINT32 *allPrimCount, UINT32 *replyLength, UINT32 *replyCount); int readPrimHeader(FILE *file, struct MSG_HEAD *primHeader, char primComment[COMMENT_LENGTH], UINT32 *replyLength); /******************************************************************************/ #endif /* RW_LISTS_H */