[Scilab-Dev] Documentation for Xcos

Clément David clement.david at scilab-enterprises.com
Fri Feb 19 13:55:29 CET 2016


Hi,

> ---- 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.
> 
> 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?

In fact, the commandQueue is the way to communicate to the Scilab interpreter engine. When you
request an execution, the command is stored on the queue and latter the engine pick the command and
execute it.

When hitting the "Play" button on xcos, we push the diagram to the Scilab workspace and put an
'xcos_simulate' call to be executed.


> ---- 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?

On the xcos module, there is an 'Xcos.java' file that contains some annotated methods exported to C.
For instance you can take a look at the Xcos#xcos() method.

--
Clément

> On Mon, Feb 1, 2016 at 1:02 PM, Clément David-2 [via Scilab / Xcos - Mailing Lists Archives]
> <[hidden email]> 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://lists.scilab.org/mailman/listinfo/dev
> > _______________________________________________ 
> > dev mailing list 
> > [hidden email] 
> > 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
> > 
> 
> View this message in context: Re: Documentation for Xcos
> Sent from the Scilab developers - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev



More information about the dev mailing list