![]() ![]() It does not change the API’s behavior but reduces the amount of input and output parameters checked done when you call the APIs, thus may improve the performance. Configuration-The kernel can be configured by adding an scilabkernelconfig. Use the scilab-adv-cli executable if using a Posix-like OS, and WScilex-cli.exe if using Windows. If your code does an important amount of access of variables, in particular in loops, then you may want to compile with the _API_SCILAB_UNSAFE_ flag defined (through a “#define” positioned before the “#include “api_scilab.h”, or -D in the compiler options). You can specify the path to your Scilab executable by creating a SCILABEXECUTABLE environmental variable. More information are provided in API Scilab getting started. You only need to wrap the #include “api_scilab.h” in an extern “C” block. ![]() If you write C++ code, you can use the API the same way. To use the API, only “api_scilab.h” needs to be included in your C code all API functions are then available. Thus, new gateways should only use this new API. The API naming convention should also be clearer than the old version, and even simpler than comparable APIs in similar products. The API is also simpler, because it does not rely on the “stack” object that was at the core of earlier versions of Scilab, and which has been removed from Scilab 6. This new API has better performance than the old one, because it accesses the internal types directly. The old API will be deprecated in a soon-to-come release (most likely in Scilab 6.1), and will likely be removed entirely in the subsequent release (most likely in Scilab 6.2). But the new API is the only one that will be maintained in the long term. The previous API is still available for backward compatibility. A specific set of functions is provided for calling scilab (see call_scilab), but then the API is the same to access data - for example, to access the variables by name. The API for Scilab 6.0 can also be used to access data in Scilab from another application. Finally, you can call back Scilab functions (macros and built-in functions) from your gateway (see scilab_call). It also includes ways to overload existing Scilab functions to support additional parameter types (see scilab_overload). It allows defining native functions (commonly called “gateways”), getting input parameters for such functions, setting return parameters, accessing local variables, using common helper functions for accessing environment information (such as warning level), generate errors. The API for Scilab 6 is a new set of C APIs in Scilab 6 to write C or C++ extensions (toolboxes) to Scilab. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |