# Autogenerated constants for Jacscript Manager service
from enum import IntEnum
from jacdac.constants import *
from jacdac.system.constants import *
JD_SERVICE_CLASS_JACSCRIPT_MANAGER = const(0x1134ea2b)


class JacscriptManagerMessageFlags(IntEnum):
    TO_BE_CONTINUED = const(0x1)


JD_JACSCRIPT_MANAGER_CMD_DEPLOY_BYTECODE = const(0x80)
JD_JACSCRIPT_MANAGER_CMD_READ_BYTECODE = const(0x81)
JD_JACSCRIPT_MANAGER_CMD_LOG_MESSAGE = const(0x82)
JD_JACSCRIPT_MANAGER_REG_RUNNING = const(0x80)
JD_JACSCRIPT_MANAGER_REG_AUTOSTART = const(0x81)
JD_JACSCRIPT_MANAGER_REG_LOGGING = const(0x82)
JD_JACSCRIPT_MANAGER_REG_PROGRAM_SIZE = const(0x180)
JD_JACSCRIPT_MANAGER_REG_PROGRAM_HASH = const(0x181)
JD_JACSCRIPT_MANAGER_EV_PROGRAM_PANIC = const(0x80)
JD_JACSCRIPT_MANAGER_EV_PROGRAM_CHANGE = const(JD_EV_CHANGE)
JD_JACSCRIPT_MANAGER_PACK_FORMATS = {
    JD_JACSCRIPT_MANAGER_CMD_DEPLOY_BYTECODE: "u32",
    JD_JACSCRIPT_MANAGER_CMD_READ_BYTECODE: "b[12]",
    JD_JACSCRIPT_MANAGER_CMD_LOG_MESSAGE: "u8 u8 s",
    JD_JACSCRIPT_MANAGER_REG_RUNNING: "u8",
    JD_JACSCRIPT_MANAGER_REG_AUTOSTART: "u8",
    JD_JACSCRIPT_MANAGER_REG_LOGGING: "u8",
    JD_JACSCRIPT_MANAGER_REG_PROGRAM_SIZE: "u32",
    JD_JACSCRIPT_MANAGER_REG_PROGRAM_HASH: "u32",
    JD_JACSCRIPT_MANAGER_EV_PROGRAM_PANIC: "u32 u32"
}
