moved event handler to separate funtion
This commit is contained in:
parent
9a487c7407
commit
07601b734e
7
config/event_handler.py
Normal file
7
config/event_handler.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import config.object_ids as obj_ids
|
||||||
|
|
||||||
|
|
||||||
|
def handle_event_packet(
|
||||||
|
object_id: bytes, event_id: int, param_1: int, param_2: int
|
||||||
|
) -> str:
|
||||||
|
return ""
|
@ -103,10 +103,13 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
def handle_service_5_event(
|
def handle_service_5_event(
|
||||||
object_id: bytes, event_id: int, param_1: int, param_2: int
|
object_id: bytes, event_id: int, param_1: int, param_2: int
|
||||||
) -> str:
|
) -> str:
|
||||||
if object_id == RW1_ID:
|
from config.event_handler import handle_event_packet
|
||||||
if event_id == 1:
|
return handle_event_packet(
|
||||||
return ""
|
object_id=object_id,
|
||||||
return ""
|
event_id=event_id,
|
||||||
|
param_1=param_1,
|
||||||
|
param_2=param_2
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user