[scilab-Users] C->Scilab: Now I'm lost and need some directions

Antoine Monmayrant antoine.monmayrant at laas.fr
Tue Jan 11 21:43:38 CET 2011


  Le 11/01/11 21:38, Calixte Denizet a écrit :
> Le mardi 11 janvier 2011 à 21:29 +0100, Calixte Denizet a écrit :
>> Hello Antoine,
>>
>> Maybe could you have a look at forge.scilab.org where you could find
>> several projects.
>>
> Maybe this one: http://forge.scilab.org/index.php/p/scimysql/
> and more precisely:
> http://forge.scilab.org/index.php/p/scimysql/source/tree/master/sci_gateway
Thanks, I'll check this tomorrow at work.
I was also thinking about:
http://forge.scilab.org/index.php/p/csv-readwrite/
as its purpose is close to the one of my C routine (read 16 bit tiff file).
I can't browse the sources now, so I don't know whether the comments are 
adapted to my level (newbeeee) in this field...
> I didn't try to compile it but in reading the code available in this
> directory, I found it interesting...
>
>> Calixte
>>
>> Le mardi 11 janvier 2011 à 21:24 +0100, Antoine Monmayrant a écrit :
>>> Le 11/01/11 17:31, Adrien Vogt-Schilb a écrit :
>>>> I am experiencing the same thing: being lost in the toolbox
>>>> skeleton.
>>> Good to know I am not the only one.
>>> I really started to feel dumb... I have been wandering with Scilab
>>> since 2.something and for the first time I am really lost.
>>>> I also find that typing "help api_scilab" does not help me at all
>>>> right now. And i just understood today (thanks to allan's mail) that
>>>> toolboxes is the modern way of doing what i do with call.
>>> Yep, I just understood that yesterday.
>>>> For now i am still using ilib_for_link and call, because of the very
>>>> effective help of ilib_for_link, which does provide a complete
>>>> example.
>>>>
>>>> If anyone happens to have some guidelines, it would be very helpfull
>>>> to make a wiki i think.
>>> That's exactly what I was thinking about.
>>> Is there anyone from the consortium who can provide us with some
>>> guidelines on the what-to-do and what-not-to-do when trying to build a
>>> primitive?
>>>> Le 11/01/2011 17:10, Antoine Monmayrant a écrit :
>>>>> Le 11/01/2011 16:55, Allan CORNET a écrit :
>>>>>> Hi,
>>>>>>
>>>>>> See help about api_scilab to write a primitive
>>>>>>
>>>>>> You can also see example in toolbox_skeleton
>>>>>> SCI/contrib/toolbox_skeleton
>>>>> Well, I didn't mention it, but I downloaded this module and I
>>>>> opened all the files I found and I was lost.
>>>>> Basically I don't know where to start and which file does what and
>>>>> what I should modify to adapt to my c code.
>>>>>> Allan
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Message d'origine-----
>>>>>> De : Antoine Monmayrant [mailto:antoine.monmayrant at laas.fr]
>>>>>> Envoyé : mardi 11 janvier 2011 16:47
>>>>>> À : users at lists.scilab.org
>>>>>> Objet : [scilab-Users] C->Scilab: Now I'm lost and need some
>>>>>> directions
>>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I am fighting to call some C code from within Scilab, or more
>>>>>> precisely to
>>>>>> add a primitive to Scilab using some C code I wrote.
>>>>>> I have a working C code and I managed to link it to Scilab by
>>>>>> using
>>>>>> "ilib_for_link".
>>>>>> It works, no problem.
>>>>>> Now I would like to bullet-proof it, that is to get it to work
>>>>>> like a real
>>>>>> scilab primitive.
>>>>>> For example, at the moment, if I try to open a file that do not
>>>>>> exist (from
>>>>>> within my C code), I just kill my Scilab session.
>>>>>> This is due to the way the error is treated in my C code.
>>>>>> I would prefer to get a normal Scilab error: "!--error 241, File
>>>>>> does not
>>>>>> exist".
>>>>>> In the end, I would like to handle all the usual scilab error
>>>>>> (wrong number
>>>>>> of arguments, wrong type, ...) gracefully.
>>>>>> What should I do?
>>>>>> I found bits and pieces here and there about how to link, what
>>>>>> the interface
>>>>>> should be like, how to use call, ... but I can't put the pieces
>>>>>> together to
>>>>>> get a big picture of what I should do.
>>>>>> I found "intersci" but it is obsolete. I found some articles but
>>>>>> they are
>>>>>> outdated
>>>>>> ( http://www.saphir-control.fr/articles/lm15/article.html ).
>>>>>> Does anyone know a proper tutorial or *complete* example
>>>>>> ( c_source,
>>>>>> interface_source, build and example of use) on the subject?
>>>>>>
>>>>>> Thank you in advance,
>>>>>>
>>>>>> Antoine
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> -- 
>>>>
>>>>
>>>> Adrien Vogt-Schilb
>>>>
>>>> Research Fellow
>>>>
>>>> vogt at centre-cired.fr
>>>>
>>>> Tel: (+33) 1 43 94 73 72
>>>>
>>>> Fax: (+33) 1 43 94 73 70
>>>>
>>>> CIRED
>>>>
>>>>
>>>> 45 bis, Av de la Belle Gabrielle
>>>>
>>>> F-94736 Nogent-sur-Marne
>>>>
>>>> http://www.centre-cired.fr/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>




More information about the users mailing list