2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2007-2008 - INRIA
4 * Copyright (C) 2008-2008 - Bruno JOFRET
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
17 #ifndef __STORECOMMAND_H__
18 #define __STORECOMMAND_H__
23 CONSOLE, // command from console
24 TCLSCI, // command from tclsci using ScilabEval interpreter
25 DEBUGGER // command from debugger
29 * Store a non-prioritary and interruptible command
31 * @param command : command wich will be stored
32 * @param piInterruptible : 1 if it is a interruptible command
33 * @param piPrioritary : 1 if it is a prioritary command
34 * @param iCmdorigin : origine of the command
35 * @return <ReturnValue>
37 int StoreCommandWithFlags(const char* command, int iPrioritary, int iInterruptible, enum command_origin_t iCmdorigin);
40 * Store a non-prioritary and interruptible command
42 * @param command : the command
43 * @return <ReturnValue>
45 int StoreCommand(const char *command);
48 * Store a prioritary and interruptible command
50 * @param command : the command
51 * @param iWaitFor : wait for the command execution end before return
52 * @return <ReturnValue>
54 int StoreConsoleCommand(const char *command, int iWaitFor);
57 * Store a prioritary and interruptible command and wait for it's execution
59 * @param command : the command
60 * @return <ReturnValue>
62 int StoreDebuggerCommand(const char *command);
65 * Store a prioritary and non-interruptible command
67 * @param command : the command
68 * @return <ReturnValue>
70 int StorePrioritaryCommand(const char *command);
73 * Get the next command to execute
75 * @param command : command wich will be executed
76 * @param piInterruptible : 1 if it is a interruptible command
77 * @param piPrioritary : 1 if it is a prioritary command
78 * @param iCmdorigin : origine of the command
79 * @return <ReturnValue> : 0 if command queue is empty
81 int GetCommand(char** command, int* piPrioritary, int* piInterruptible, enum command_origin_t* iCmdorigin);
84 * check if command queue is empty
85 * @return 1 if empty , 0 is not empty
87 int isEmptyCommandQueue(void);
90 * Checks if there's something on the
97 #endif /* __STORECOMMAND_H__ */