Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit Event Cancellation #92

Open
00javad00 opened this issue Jul 29, 2021 · 1 comment
Open

Implicit Event Cancellation #92

00javad00 opened this issue Jul 29, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@00javad00
Copy link

An implicit cancel occurs when an empty event is sent to the VEN via oadrDistributeEvent response (this could be because it was deleted in the VTN). Implicitly cancel events is normally not used, but it is mandatory to be implemented in VEN and it should handle event cancellation accordingly. To do this you may modify client.py to send a proper payload to on_event handler. i.e. send a None object indicating all event must be cancelled:

        elif response_type == 'oadrDistributeEvent':
            logger.info("The VTN called for oadrDistributeEvent.")
            if 'events' in response_payload and len(response_payload['events']) > 0:            
                await self._on_event(response_payload)
            else:
                await self.on_event(None)
@stan-janssen
Copy link
Member

stan-janssen commented Apr 9, 2022

I'll have to think about this. Event cancellation is a feature that I need to design on the client side, and that will then include implicit cancellations.

@stan-janssen stan-janssen self-assigned this Apr 9, 2022
@stan-janssen stan-janssen added the enhancement New feature or request label Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants