Files
azul/front/oscar/foodgroups/popup.py
T
Athena Funderburg 21f38ee3e1 production init
2026-05-26 16:41:23 +00:00

18 lines
587 B
Python

import struct
from typing import Optional
from util.misc import Logger
from ..proto.common import system_message
from ..proto.snac import OSCARClient, OSCARContext, SNACMessage, Foodgroup, Subgroup
from ..proto.tlv import TLV, unmarshal_tlvs
def popup_display(self, alert_url: Optional[str], alert_txt: str):
response_msg = SNACMessage(0x0008, 0x0002, 0x0000, 0x00000000)
response_msg.write_bytes(system_message(alert_url, alert_txt))
# TODO(HIDEN): pipe to ctrl.send_snac()
print('TLVs:', unmarshal_tlvs(response_msg.data))
#client.send_snac(response_msg)
return response_msg