diva: add stage_result, end handlers

This commit is contained in:
Kevin Trocolli
2023-10-05 23:47:50 -04:00
parent b2a01d20d5
commit 2b02ed8684
4 changed files with 222 additions and 67 deletions

View File

@@ -144,8 +144,8 @@ class AttendRequest(BaseRequest):
self.is_bb = bool(int(self.power_on))
class AttendResponse(BaseResponse):
def __init__(self, cmd_id: str, req_id: int) -> None:
super().__init__(cmd_id, req_id)
def __init__(self, req_id: int) -> None:
super().__init__("attend", req_id)
self.atnd_prm1 = [1] * 100
self.atnd_prm2 = [1] * 100
self.atnd_prm3 = [1] * 100
@@ -177,8 +177,8 @@ class SpendCreditRequest(BaseRequest):
raise DivaRequestParseException(f"StartRequest: {e}")
class SpendCreditResponse(BaseResponse):
def __init__(self, cmd_id: str, req_id: int) -> None:
super().__init__(cmd_id, req_id)
def __init__(self, req_id: int) -> None:
super().__init__("spend_credit", req_id)
self.cmpgn_rslt = ",".join(["-1,-1,x,-1,-1,x,x,-1,x"] * 6)
self.cmpgn_rslt_num = 0
self.vcld_pts = 0