[Scilab-Dev] Documentation for Xcos

Adhitya Kamakshidasan adhitya07 at gmail.com
Thu Feb 18 13:43:28 CET 2016


Hi all,

It's been a while, since I posted my previous query on the forum. However,
I have not yet received any response to it. I'm quite stuck with this for
the past week or so.

Could you please help me out?

Adhitya

On Fri, Feb 12, 2016 at 10:41 PM, adhitya <adhitya07 at gmail.com> wrote:

> Hi,
>
> Thank you for your response. I will definitely go through the links that
> you have provided for a better understanding.
>
> ---- 1 ----
>
> As a part of my reverse engineering process, I have started from the point
> where Xcos application is invoked, when the button is pressed in the
> MenuBar.
>
> The flow of files that I have gone through, after the button has been
> pressed, is the following:
>
> - main_menubar.xml
> - MenuBarBuilder.java
> - GraphicController.java
> - GraphicObject.java
> - CallBack.java
> - CommonCallBack.java
> - ScilabCallBack.java
> - InterpreterManagement.java
> - InterpreterManagementJNI.java
> - StoreCommand.cpp
> - ThreadManagement.cpp
>
>
> In the file named StoreCommand.cpp, the following function is invoked - (
> https://github.com/opencollab/scilab/blob/9cc3c2b45eec49626d82b496a80117b048745836/scilab/modules/core/src/cpp/storeCommand.cpp#L76
> )
>
> int StoreCommand(char *command)
> {
>     ThreadManagement::LockStoreCommand();
>     commandQueue.emplace_back(os_strdup(command),
>                               /*is prioritary*/ 0,
>                               /* is interruptible*/ 1,
>                               /* cmd origin */ NONE);
>
>     ThreadManagement::UnlockStoreCommand();
>     // Awake Scilab to execute a new command
>     ThreadManagement::SendCommandStoredSignal();
>
>     return 0;
> }
>
> In this function calls are further made to -
> https://github.com/opencollab/scilab/blob/9cc3c2b45eec49626d82b496a80117b048745836/scilab/modules/ast/src/cpp/system_env/threadmanagement.cpp#L110
>
> void ThreadManagement::LockStoreCommand(void)
> {
> #ifdef DEBUG_THREAD
>     PrintDebug("LockStoreCommand");
> #endif // DEBUG_THREAD
>     __Lock(&m_StoreCommandLock);
> }
>
> void ThreadManagement::UnlockStoreCommand(void)
> {
> #ifdef DEBUG_THREAD
>     PrintDebug("UnlockStoreCommand");
> #endif // DEBUG_THREAD
>     __UnLock(&m_StoreCommandLock);
> }
>
> I'm unable to understand the Lock and Unlock mechanisms that are used in
> this function. What happens before/during/after Lock and Unlock? Would you
> have any documentation for this part?
>
> If possible, could you explain the StoreCommand() function? I see that all
> incoming commands are en-queued in the commandQueue, to be processed one by
> one. But where in the code, is the command getting de-queued for parsing?
>
> ---- 2 ----
>
> The command that is given in /etc/main_menubar.xml for opening Xcos is
>
> if with_mode ('xcos') then xcos();
> else disp(gettext('Please install xcos module'))
>
> Would it be possible for you to point where xcos() is invoked after
> interpretation and parsing?
>
> Hypothetically for instance, if I were to create a new method in Java, so
> that I can see the Block Diagram Editor, like this -
>
> public static void main (String args[]){
>     Xcos xcos = new Xcos(); //Assuming I can write something like this
> }
>
> If this is possible, I would like to know, which is that particular 'XCos'
> Class that can allow me to do this?
>
> Do let me know, if any of my questions are vague or unclear.
>
> Thanks,
>
> Adhitya
>
> On Mon, Feb 1, 2016 at 1:02 PM, Clément David-2 [via Scilab / Xcos -
> Mailing Lists Archives] <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4033448&i=0>> wrote:
>
>> Hi Adhitya,
>>
>> The code is *the* reference but for more internal views I suggest you to
>> read these documents :
>>
>> * R. NIKOUKHAH AND S. STEER , Scicos a dynamic system builder and
>> simulator, IEEE INTERNATIONAL
>> CONFERENCE ON CACSD, DEARBORN , MICHIGAN , 1996.
>> * S. STEER , R. NIKOUKHAH , Scicos: a hybrid system formalism, ESS’99, E
>> RLANGEN , GERMANY , 1999.
>> * Masoud NAJAFI thesis , The Numerical Solver for the Simulation of the
>> Hybrid Dynamical Systems
>> , 2005 .
>>
>> And for understanding what's behind each block, take a look at the Scilab
>> documentation, and
>> ScilabTec presentations.
>>
>> Regards,
>>
>> --
>> Clément
>>
>>
>> Le vendredi 29 janvier 2016 à 23:31 -0700, adhitya a écrit :
>>
>> > Hi,
>> >
>> > My name is Adhitya Kamakshidasan and I'm an Intern at FOSSEE, IIT
>> Bombay.
>> >
>> > We are trying to develop a standalone version of Xcos, that is
>> completely
>> > web-based.
>> >
>> > I would like to know if there is any documentation with respect to how
>> Xcos
>> > has been written - Flowcharts, Main methods, PDF's, etc.
>> >
>> > Currently, I'm trying to reverse-engineer the code, by slowly moving
>> through
>> > the code, and removing the parts that are not related to Xcos. However,
>> this
>> > is taking a lot of time.
>> >
>> > We would like your support in this regard.
>> >
>> > Thanks,
>> >
>> > Adhitya Kamakshidasan
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://mailinglists.scilab.org/Documentation-for-Xcos-tp4033357.html
>> > Sent from the Scilab developers - Mailing Lists Archives mailing list
>> archive at Nabble.com.
>> > _______________________________________________
>> > dev mailing list
>> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4033359&i=0>
>> > http://lists.scilab.org/mailman/listinfo/dev
>> _______________________________________________
>> dev mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4033359&i=1>
>> http://lists.scilab.org/mailman/listinfo/dev
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://mailinglists.scilab.org/Documentation-for-Xcos-tp4033357p4033359.html
>> To unsubscribe from Documentation for Xcos, click here.
>> NAML
>> <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: Documentation for Xcos
> <http://mailinglists.scilab.org/Documentation-for-Xcos-tp4033357p4033448.html>
>
> Sent from the Scilab developers - Mailing Lists Archives mailing list
> archive
> <http://mailinglists.scilab.org/Scilab-developers-Mailing-Lists-Archives-f2574944.html>
> at Nabble.com.
>
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20160218/617f2c87/attachment.htm>


More information about the dev mailing list