Continue writing thesis

This commit is contained in:
Kristóf Tóth
2018-12-02 21:01:18 +01:00
parent 2f728dc353
commit 137fde57ca
6 changed files with 206 additions and 15 deletions

View File

@ -0,0 +1,18 @@
from tfw import EventHandlerBase
class MyFirstEventHandler(EventHandlerBase):
def __init__(self):
super().__init__(self, key='fsm_update')
def handle_event(self, message):
print('I have received a message! Yaaay!')
# the return value of this method is automatically
# sent back to the TFW server
return {
'key': 'message',
'data': {
'originator': 'My first event handler',
'message': f'I have received this message: {message}'
}
}