getEvents in rfsm

Hi,

Another question...
If I have multiple ports where events can arrive, how do I get the event from it?
If I do:
fsm.getevents = rfsm_rtt.gen_read_events(port1)
fsm.getevents = rfsm_rtt.gen_read_events(port2)

Will he still get events from port1? (a test revealed: no)
How to do this?

nick

getEvents in rfsm

On Mon, 11 Jul 2011, Dominick Vanthienen wrote:

> Hi,
>
> Another question...
> If I have multiple ports where events can arrive, how do I get the event from it?

can't you use one port for all events? Each event is just another instance
of the data flow on that port...

Herman

> If I do:
> fsm.getevents = rfsm_rtt.gen_read_events(port1)
> fsm.getevents = rfsm_rtt.gen_read_events(port2)
>
> Will he still get events from port1? (a test revealed: no)
> How to do this?
>
> nick
>

getEvents in rfsm

On 07/11/2011 06:15 PM, Herman Bruyninckx wrote:
> On Mon, 11 Jul 2011, Dominick Vanthienen wrote:
>
>> Hi,
>>
>> Another question...
>> If I have multiple ports where events can arrive, how do I get the event from it?
> can't you use one port for all events? Each event is just another instance
> of the data flow on that port...
The idea is that we can have data-driven and event-driven ports to get events.
The (buffered) date driven get all events and the FSM reads them every update
But in case of eg. an emergency stop (kill switch), you don't want to wait till the next update, but take immediate action
(that's why we have the event driven port)
> Herman
>
>> If I do:
>> fsm.getevents = rfsm_rtt.gen_read_events(port1)
>> fsm.getevents = rfsm_rtt.gen_read_events(port2)
>>
>> Will he still get events from port1? (a test revealed: no)
>> How to do this?
>>
>> nick
>>

getEvents in rfsm

On Mon, Jul 11, 2011 at 04:02:18PM +0200, Dominick Vanthienen wrote:
> Hi,
>
> Another question...
> If I have multiple ports where events can arrive, how do I get the event from it?
> If I do:
> fsm.getevents = rfsm_rtt.gen_read_events(port1)
> fsm.getevents = rfsm_rtt.gen_read_events(port2)

The first function gets overwritten by the second.

> Will he still get events from port1? (a test revealed: no)
> How to do this?

Indeed no. (I know I should urgently clean up the rFSM documentation,
sorry for this!)

You can given multiple ports to gen_read_events:

fsm.getevents = rfsm_rtt.gen_read_events(port1, port2)

The generated getevents will return _all_ event on all ports.

Markus

getEvents in rfsm

On 07/11/2011 06:05 PM, Markus Klotzbuecher wrote:
> On Mon, Jul 11, 2011 at 04:02:18PM +0200, Dominick Vanthienen wrote:
>> Hi,
>>
>> Another question...
>> If I have multiple ports where events can arrive, how do I get the event from it?
>> If I do:
>> fsm.getevents = rfsm_rtt.gen_read_events(port1)
>> fsm.getevents = rfsm_rtt.gen_read_events(port2)
> The first function gets overwritten by the second.
>
>> Will he still get events from port1? (a test revealed: no)
>> How to do this?
> Indeed no. (I know I should urgently clean up the rFSM documentation,
> sorry for this!)
>
> You can given multiple ports to gen_read_events:
>
> fsm.getevents = rfsm_rtt.gen_read_events(port1, port2)
>
> The generated getevents will return _all_ event on all ports.
that is no problem
I'll use this
thanx
> Markus