1. The low level: The text sent by rStep (MSG SBI... ) is processed in
com.studionex.rStep.input.InputParser and sent as events by
com.studionex.rStep.RStep. The events are data structures parsed from
the text (SBI messages are stored in
com.studionex.rStep.input.StepByInchMessageEvent instances).
2. The high level: These events are catched by
com.studionex.jrStepGUI.rStep.RStep in the eventHandler(InputEvent
inputEvent) method and wrapped into EventBus messages which "topic" is
formed by "RStep " + the string representation of the event.
3. How to use it: In any class you want some information about the
rStep output, you just have to register the appropriate event of the
EventBus. e.g. in the HardwareConfigJDialog class (the configuration
dialog) you have to write EventBus.subscribe(Pattern.compile("RStep
Step by inch:.*"), this) which register the current instance (this) to
receive all the messages following the "RStep Step by inch:.*"
pattern.
See
http://code.google.com/p/rstep/source/browse/trunk/clients/jrStepGUI/doc/Message%20Passing.txt
to have a summary of all the messages published on the EventBus and
where they are listened to.
On 8 fév, 10:06, Reza Naima <
r...@reza.net> wrote:
> :)
>
> So the configure button still doesn't work. I'm not sure how eventbus
> works, but it seems like your looking for these patterns
>
> EventBus.subscribe(Pattern.compile("RStep Step by inch:.*"), this);
> EventBus.subscribe(Pattern.compile("RStep Feed rate:.*"), this);
> EventBus.subscribe(Pattern.compile("RStep Current:.*"), this);
> EventBus.subscribe(Pattern.compile("RStep Stepping:.*"), this)
>
> however, this is the output
>
> .964] MSG SBI(4064,4064,4064)
> [16:10:15.980] MSG MFR(15,15,13)
> [16:10:16.012] MSG Cur(2.00,2.00,2.00)
> [16:10:16.028] MSG Step(16)
> [16:10:16.044] MSG Abs(1)
>
> and this is what i see..
>
> thoughts?
> -reza
>
> > ------------------------------------------------------------------------
>
> > iklln6 <mailto:
michaeldn...@gmail.com>
> > Tuesday, February 08, 2011 1:03 AM
>
> > class modelGCODE{
> > public:
> > //TODO write gcode parser and 3d modelling
> > };
>
> > extern modelGCODE;
>
> > half way there
>
> > ------------------------------------------------------------------------
>
> > Reza Naima <mailto:
r...@reza.net>