/****************************************************************************** * * Title : commandListDefinitions.h * Version 0.0 * * Description: Command list definitions header file. * Related files: * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ #ifndef COMMAND_LIST_DEFINITIONS_H /* multiple-inclusion protection */ #define COMMAND_LIST_DEFINITIONS_H /****************************************************************************** * Header files * ******************************************************************************/ #include "processor.h" #include "commandParamsStruct.h" /****************************************************************************** * Definitions * ******************************************************************************/ /* maximum commands in the command list - no dynamic memory allocation! */ #define MAXCOMMANDS_IN_LIST 100 #define CMD_COMMENT_LENGTH 600 /****************************************************************************** * Type definitions * ******************************************************************************/ /*--------------------------- COMMAND LIST DEFINITIONS --------------------------*/ struct COMMAND{ char comment[CMD_COMMENT_LENGTH]; /* cmd comment */ int id; /* command id */ UINT32 numRepetitions; /* number of command repetitions; 0 means execute once, don't repeat */ int continueIfError; /* if set, continue to the next command in the list even if this command returned error */ union COMMAND_PARAMS_UNION params; /* command parameters */ }; struct COMMAND_LIST{ char comment[CMD_COMMENT_LENGTH]; /* list comment */ int commandCount; /* real number of commands in the list */ struct COMMAND command[MAXCOMMANDS_IN_LIST]; /* array of commands */ }; /*------------------------- COMMAND_FUNCTION_TYPE -------------------------------*/ /* command function option */ typedef enum{ COMMAND_TO_LIST=0, /* copy command parameters from panel to list */ LIST_TO_COMMAND=1, /* copy command parameters from list to panel */ COMMAND_EXECUTION=2, /* execute command */ SAVE_CMD_TO_FILE=3, LOAD_CMD_FROM_FILE=4, } COMMAND_FUNC_OPTION; #include "hostDefinitions.h" /* command function type */ typedef ERROR_ID COMMAND_FUNCTION_TYPE(COMMAND_FUNC_OPTION funcOption, struct COMMAND *command, UINT8 slotNumber, FILE *file); #define COMMAND_FUNC_DEFINED /******************************************************************************/ #endif /* COMMAND_LIST_DEFINITIONS_H */