Hi,
How about using "send_event_to_observers" instead?
https://github.com/iwaseyusuke/ryu/blob/master/ryu/base/app_manager.py#L305-L326
If you want to use "send_event", the first argument must be the name
of RyuApp which is observing the given event.
OTOH, "send_event_to_observers" will detects all RyuApp which are
observing the given event.
Thanks,
Iwase
On 2017年01月26日 13:28, Yiwen Shen wrote:
> Hi,
>
> I'm trying to start my Ryu system by sending an event from one app to
> another, but it keeps saying EVENT LOST when I use --verbose. I understand
> from another thread that we need to wait a bit for the event pipeline to
> open, so I put hub.sleep(5) but the problem persists.
>
> My original code was:
>
> /def start(self):/
> / super(Initialization,self).start()
> new_north_traffic_request_ev =
> Custom_event.North_CrossDomainTrafficRequestEvent()/
> / hub.sleep(5)/
> / self.send_event('Test', new_north_traffic_request_ev)/
>
> and inside North_CrossDomainTrafficRequestEvent(), I have a print statement
> to see if the event was triggered by the sent event but it's not since we
> have EVENT LOST.
> (Specifically it says EVENT LOST Initialization->Test
> North_CrossDomainTrafficRequestEvent).
>
> I have also tried separating start into a separate function for the event,
> and spawning a thread for that event, not sure if that helps, but I still get
> EVENT LOST:
> /
> /
> / def _north_request_event(self):/
> / hub.sleep(5)/
> / new_north_traffic_request_ev =
> Custom_event.North_CrossDomainTrafficRequestEvent()/
> / self.send_event('Test', new_north_traffic_request_ev)/
> /
> /
> / def start(self):/
> / super(Initialization,self).start()/
> / self.threads.append(hub.spawn(self._north_request_event))/
>
> Thank you,
> Yiwen
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel