import { SignalSourceEntity } from "./SignalSourceEntity"; import ApplicationConfigEntity from "./ApplicationConfigEntity"; import { WindowOpenNotifyEntity } from "./MultimediaWindowEntity"; import { ModeEntity } from "./ModeEntity"; import { PlanEntity } from "./PlanEntity"; export namespace Protocol { export class Commands { public static get PROTOCOL_PREFIX() { return "_"; } public static get kUnKnowCommand() { return Commands.PROTOCOL_PREFIX + "UnKnowCommand"; } public static get kSearchDevice() { return Commands.PROTOCOL_PREFIX + "SearchDevice"; } public static get kEditNetworkInterfaceInfo() { return Commands.PROTOCOL_PREFIX + "EditNetworkInterfaceInfo"; } public static get kExecCommand() { return Commands.PROTOCOL_PREFIX + "ExecCommand"; } public static get kRestoreDevice() { return Commands.PROTOCOL_PREFIX + "RestoreDevice"; } public static get kLogin() { return Commands.PROTOCOL_PREFIX + "Login"; } public static get kLogout() { return Commands.PROTOCOL_PREFIX + "Logout"; } public static get kRpcGetWindows() { return Commands.PROTOCOL_PREFIX + "RpcGetWindows"; } public static get kRpcGetSignalSources() { return Commands.PROTOCOL_PREFIX + "RpcGetSignalSources"; } public static get kRpcGetModes() { return Commands.PROTOCOL_PREFIX + "RpcGetModes"; } public static get kRpcGetPlans() { return Commands.PROTOCOL_PREFIX + "RpcGetPlans"; } public static get kRpcGetApplicationConfig() { return Commands.PROTOCOL_PREFIX + "RpcGetApplicationConfig"; } public static get kMoveWindow() { return Commands.PROTOCOL_PREFIX + "MoveWindow"; } public static get kResizeWindow() { return Commands.PROTOCOL_PREFIX + "ResizeWindow"; } public static get kOpenWindow() { return Commands.PROTOCOL_PREFIX + "OpenWindow"; } public static get kCloseWindow() { return Commands.PROTOCOL_PREFIX + "CloseWindow"; } public static get kWindowOtherStateChanged() { return Commands.PROTOCOL_PREFIX + "WindowOtherStateChanged"; } public static get kFocuseWindow() { return Commands.PROTOCOL_PREFIX + "FocuseWindow"; } public static get kRpcAddSignalSourceGroup() { return Commands.PROTOCOL_PREFIX + "RpcAddSignalSourceGroup"; } public static get kRpcDeleteSignalSourceGroup() { return Commands.PROTOCOL_PREFIX + "RpcDeleteSignalSourceGroup"; } public static get kRpcEditSignalSourceGroup() { return Commands.PROTOCOL_PREFIX + "RpcEditSignalSourceGroup"; } public static get kRpcAddSignalSource() { return Commands.PROTOCOL_PREFIX + "RpcAddSignalSource"; } public static get kRpcDeleteSignalSource() { return Commands.PROTOCOL_PREFIX + "RpcDeleteSignalSource"; } public static get kRpcEditSignalSource() { return Commands.PROTOCOL_PREFIX + "RpcEditSignalSource"; } public static get kRpcAddModeGroup() { return Commands.PROTOCOL_PREFIX + "RpcAddModeGroup"; } public static get kRpcDeleteModeGroup() { return Commands.PROTOCOL_PREFIX + "RpcDeleteModeGroup"; } public static get kRpcEditModeGroup() { return Commands.PROTOCOL_PREFIX + "RpcEditModeGroup"; } public static get kRpcAddMode() { return Commands.PROTOCOL_PREFIX + "RpcAddMode"; } public static get kRpcDeleteMode() { return Commands.PROTOCOL_PREFIX + "RpcDeleteMode"; } public static get kRpcEditMode() { return Commands.PROTOCOL_PREFIX + "RpcEditMode"; } public static get kCallMode() { return Commands.PROTOCOL_PREFIX + "CallMode"; } public static get kRpcAddPlanGroup() { return Commands.PROTOCOL_PREFIX + "RpcAddPlanGroup"; } public static get kRpcDeletePlanGroup() { return Commands.PROTOCOL_PREFIX + "RpcDeletePlanGroup"; } public static get kRpcEditPlanGroup() { return Commands.PROTOCOL_PREFIX + "RpcEditPlanGroup"; } public static get kRpcAddPlan() { return Commands.PROTOCOL_PREFIX + "RpcAddPlan"; } public static get kRpcDeletePlan() { return Commands.PROTOCOL_PREFIX + "RpcDeletePlan"; } public static get kRpcEditPlan() { return Commands.PROTOCOL_PREFIX + "RpcEditPlan"; } public static get kRunPlan() { return Commands.PROTOCOL_PREFIX + "RunPlan"; } public static get kRpcGetCurrentRunningPlan() { return Commands.PROTOCOL_PREFIX + "RpcGetCurrentRunningPlan"; } public static get kCurrentRunningPlanStateChanged() { return Commands.PROTOCOL_PREFIX + "CurrentRunningPlanStateChanged"; } public static get kStopCurrentRunningPlan() { return Commands.PROTOCOL_PREFIX + "StopCurrentRunningPlan"; } public static get kSetApplicationConfig() { return Commands.PROTOCOL_PREFIX + "SetApplicationConfig"; } public static get kRestartDeviceCommand() { return Commands.PROTOCOL_PREFIX + "RestartDeviceCommand"; } static _all_commands = new Set([ Commands.kUnKnowCommand, Commands.kSearchDevice, Commands.kEditNetworkInterfaceInfo, Commands.kExecCommand, Commands.kRestoreDevice, Commands.kLogin, Commands.kLogout, Commands.kRpcGetWindows, Commands.kRpcGetSignalSources, Commands.kRpcGetModes, Commands.kRpcGetPlans, Commands.kRpcGetApplicationConfig, Commands.kMoveWindow, Commands.kResizeWindow, Commands.kOpenWindow, Commands.kCloseWindow, Commands.kWindowOtherStateChanged, Commands.kRpcAddSignalSourceGroup, Commands.kRpcDeleteSignalSourceGroup, Commands.kRpcEditSignalSourceGroup, Commands.kRpcAddSignalSource, Commands.kRpcDeleteSignalSource, Commands.kRpcEditSignalSource, Commands.kRpcAddModeGroup, Commands.kRpcDeleteModeGroup, Commands.kRpcEditModeGroup, Commands.kRpcAddMode, Commands.kRpcDeleteMode, Commands.kRpcEditMode, Commands.kRpcGetCurrentRunningPlan, Commands.kCurrentRunningPlanStateChanged, Commands.kRpcAddPlanGroup, Commands.kRpcDeletePlanGroup, Commands.kRpcEditPlanGroup, Commands.kRpcAddPlan, Commands.kRpcDeletePlan, Commands.kRpcEditPlan, Commands.kSetApplicationConfig, ]); public static get AllCommands() { return this._all_commands; } } export class PacketEntity { public static get FLAG_REQUEST() { return 0; } public static get FLAG_RESPONSE() { return 1; } public static get FLAG_NOTIFY() { return 2; } /** 是否出现异常,如果是异常,则为 ExceptionEntity */ has_exception = false; /** 0: 请求 1: 响应 */ flag = PacketEntity.FLAG_REQUEST; /** rpc 消息 ID,默认 0 */ rpc_id = 0; /** 命令 */ command = Protocol.Commands.kUnKnowCommand; } export class LoginRequest extends PacketEntity { user_name = ""; password = ""; constructor(user_name?: string, password?: string) { super(); this.user_name = user_name ?? ""; this.password = password ?? ""; this.command = Commands.kLogin; } } export class LoginResponse extends PacketEntity { success = false; error_code = 0; constructor() { super(); this.command = Commands.kLogin; } } export class GetSignalSourcesRequest extends PacketEntity { timestamp = new Date().getMilliseconds(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetSignalSources; } } export class GetSignalSourcesResponse extends PacketEntity { signal_sources: SignalSourceEntity[] = []; signal_source_groups: [] = []; constructor() { super(); this.command = Commands.kRpcGetSignalSources; } } export class GetModesRequestEntity extends PacketEntity { timestamp = new Date().getMilliseconds(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetModes; } } export class GetModesResponseEntity extends PacketEntity { modes: ModeEntity[] = []; mode_groups: [] = []; constructor() { super(); this.command = Commands.kRpcGetModes; } } export class GetPlansRequestEntity extends PacketEntity { timestamp = new Date().getMilliseconds(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetPlans; } } export class GetPlansResponseEntity extends PacketEntity { plans: PlanEntity[] = []; plan_groups: [] = []; constructor() { super(); this.command = Commands.kRpcGetPlans; } } export class GetApplicationConfigRequestEntity extends PacketEntity { timestamp: number = new Date().getMilliseconds(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetApplicationConfig; } } export class GetApplicationConfigResponseEntity extends PacketEntity { config: ApplicationConfigEntity | null = null; constructor() { super(); this.command = Commands.kRpcGetApplicationConfig; } } export class GetWindowsRequestEntity extends PacketEntity { timestamp: number = new Date().getMilliseconds(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetWindows; } } export class GetWindowsResponseEntity extends PacketEntity { windows: WindowOpenNotifyEntity[] = []; constructor() { super(); this.command = Commands.kRpcGetWindows; } } export class MoveWindowRequestEntity extends PacketEntity { window_id: number = 0; x: number = 0; y: number = 0; constructor(window_id: number, x: number, y: number) { super(); this.command = Commands.kMoveWindow; this.window_id = window_id ?? 0; this.x = x ?? 0; this.y = y ?? 0; } } export class ResizeWindowRequestEntity extends PacketEntity { window_id: number = 0; width: number = 0; height: number = 0; constructor(window_id: number, width: number, height: number) { super(); this.command = Commands.kResizeWindow; this.window_id = window_id ?? 0; this.width = width ?? 0; this.height = height ?? 0; } } export class CloseWindowRequestEntity extends PacketEntity { window_id: number = 0; constructor(window_id: number) { super(); this.command = Commands.kCloseWindow; this.window_id = window_id ?? 0; } } export class OpenWindowRequestEntity extends PacketEntity { signal_source: string = ""; x: number = 0; y: number = 0; width: number = 0; height: number = 0; constructor( signal_source: string, x: number, y: number, width: number, height: number ) { super(); this.command = Commands.kOpenWindow; this.signal_source = signal_source ?? ""; this.x = x ?? 0; this.y = y ?? 0; this.width = width ?? 0; this.height = height ?? 0; } } export class WindowCloseNotifyEntity extends PacketEntity { window_id: number = 0; constructor() { super(); this.command = Commands.kCloseWindow; } } export class WindowOpenNotifyEntity extends PacketEntity { window_id: number = 0; signal_source: string = ""; x: number = 0; y: number = 0; width: number = 0; height: number = 0; constructor() { super(); this.command = Commands.kOpenWindow; } } export class WindowMoveNotifyEntity extends PacketEntity { window_id: number = 0; x: number = 0; y: number = 0; constructor() { super(); this.command = Commands.kMoveWindow; } } export class WindowResizeNotifyEntity extends PacketEntity { window_id: number = 0; width: number = 0; height: number = 0; constructor() { super(); this.command = Commands.kResizeWindow; } } export class AddSignalSourceGroupRequestEntity extends Protocol.PacketEntity { parent_uuid = ""; name = ""; constructor(rcp_id?: number, parent_uuid?: string, name?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddSignalSourceGroup; this.parent_uuid = parent_uuid ?? ""; this.name = name ?? ""; } } export class AddSignalSourceGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddSignalSourceGroup; } } export class EditSignalSourceGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; name = ""; constructor(rcp_id?: number, uuid?: string, name?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditSignalSourceGroup; this.uuid = uuid ?? ""; this.name = name ?? ""; } } export class EditSignalSourceGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditSignalSourceGroup; } } export class DeleteSignalSourceGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeleteSignalSourceGroup; this.uuid = uuid ?? ""; } } export class DeleteSignalSourceGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeleteSignalSource; } } export class AddSignalSourceRequestEntity extends Protocol.PacketEntity { entity: SignalSourceEntity | null = null; constructor(rcp_id?: number, entity?: SignalSourceEntity) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddSignalSource; this.entity = entity ?? new SignalSourceEntity(); } } export class AddSignalSourceResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddSignalSourceGroup; } } export class EditSignalSourceRequestEntity extends Protocol.PacketEntity { entity: SignalSourceEntity | null = null; parent_uuid: string = ""; constructor( rcp_id?: number, entity?: SignalSourceEntity, parent_uuid?: string ) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditSignalSource; this.entity = entity ?? new SignalSourceEntity(); this.parent_uuid = parent_uuid ?? ""; } } export class EditSignalSourceResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditSignalSource; } } export class DeleteSignalSourceRequestEntity extends Protocol.PacketEntity { uuid: string = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeleteSignalSource; this.uuid = uuid ?? ""; } } export class DeleteSignalSourceResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeleteSignalSource; } } export class SignalSourceGroupEntity extends Protocol.PacketEntity { parent_uuid: string = ""; name: string = ""; system_default: boolean = false; } export class SignalSourceAddNotifyEntity extends Protocol.PacketEntity { signal_source: SignalSourceEntity = new SignalSourceEntity(); } export class SignalSourceDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class SignalSourceEditNotifyEntity extends Protocol.PacketEntity { signal_source: SignalSourceEntity = new SignalSourceEntity(); } export class SignalSourceGroupAddNotifyEntity extends Protocol.PacketEntity { signal_source_group: SignalSourceGroupEntity = new SignalSourceGroupEntity(); } export class SignalSourceGroupDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class SignalSourceGroupEditNotifyEntity extends Protocol.PacketEntity { signal_source_group: SignalSourceGroupEntity = new SignalSourceGroupEntity(); } export class AddModeGroupRequestEntity extends Protocol.PacketEntity { parent_uuid = ""; name = ""; constructor(rcp_id?: number, parent_uuid?: string, name?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddModeGroup; this.parent_uuid = parent_uuid ?? ""; this.name = name ?? ""; } } export class AddModeGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddModeGroup; } } export class EditModeGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; name = ""; constructor(rcp_id?: number, uuid?: string, name?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditModeGroup; this.uuid = uuid ?? ""; this.name = name ?? ""; } } export class EditModeGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditModeGroup; } } export class DeleteModeGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeleteModeGroup; this.uuid = uuid ?? ""; } } export class DeleteModeGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeleteMode; } } export class AddModeRequestEntity extends Protocol.PacketEntity { name: string; group_uuid: string; constructor(rcp_id?: number, name?: string, group_uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddMode; this.name = name ?? ""; this.group_uuid = group_uuid ?? ""; } } export class AddModeResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddMode; } } export class EditModeRequestEntity extends Protocol.PacketEntity { name: string; uuid: string; constructor(rcp_id?: number, name?: string, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditMode; this.name = name ?? ""; this.uuid = uuid ?? ""; } } export class EditModeResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditMode; } } export class DeleteModeRequestEntity extends Protocol.PacketEntity { uuid: string = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeleteMode; this.uuid = uuid ?? ""; } } export class DeleteModeResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeleteMode; } } export class CallModeRequestEntity extends Protocol.PacketEntity { uuid: string; constructor(uuid: string) { super(); this.command = Protocol.Commands.kCallMode; this.flag = Protocol.PacketEntity.FLAG_REQUEST; this.uuid = uuid; } } export class ModeGroupEntity extends Protocol.PacketEntity { parent_uuid: string = ""; name: string = ""; } export class ModeAddNotifyEntity extends Protocol.PacketEntity { mode: ModeEntity = new ModeEntity(); } export class ModeDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class ModeEditNotifyEntity extends Protocol.PacketEntity { mode: ModeEntity = new ModeEntity(); } export class ModeGroupAddNotifyEntity extends Protocol.PacketEntity { mode_group: ModeGroupEntity = new ModeGroupEntity(); } export class ModeGroupDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class ModeGroupEditNotifyEntity extends Protocol.PacketEntity { mode_group: ModeGroupEntity = new ModeGroupEntity(); } export class AddPlanGroupRequestEntity extends Protocol.PacketEntity { parent_uuid = ""; name = ""; constructor(rcp_id?: number, parent_uuid?: string, name?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddPlanGroup; this.parent_uuid = parent_uuid ?? ""; this.name = name ?? ""; } } export class AddPlanGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddPlanGroup; } } export class EditPlanGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; name = ""; constructor(rcp_id?: number, uuid?: string, name?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditPlanGroup; this.uuid = uuid ?? ""; this.name = name ?? ""; } } export class EditPlanGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditPlanGroup; } } export class DeletePlanGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeletePlanGroup; this.uuid = uuid ?? ""; } } export class DeletePlanGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeletePlan; } } export class AddPlanRequestEntity extends Protocol.PacketEntity { entity: PlanEntity = new PlanEntity(); constructor(rcp_id?: number, entity?: PlanEntity) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddPlan; if (entity) { this.entity = entity; } } } export class AddPlanResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddPlan; } } export class EditPlanRequestEntity extends Protocol.PacketEntity { entity: PlanEntity = new PlanEntity(); constructor(rcp_id?: number, entity?: PlanEntity) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditPlan; if (entity) { this.entity = entity; } } } export class EditPlanResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditPlan; } } export class DeletePlanRequestEntity extends Protocol.PacketEntity { uuid: string = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeletePlan; this.uuid = uuid ?? ""; } } export class DeletePlanResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeletePlan; } } export class GetCurrentRunningPlanRequestEntity extends Protocol.PacketEntity { timestamp: number = new Date().getMilliseconds(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetCurrentRunningPlan; } } export class GetCurrentRunningPlanResponseEntity extends Protocol.PacketEntity { plan = PlanEntity; running = false; constructor() { super(); this.command = Protocol.Commands.kRpcGetCurrentRunningPlan; } } export class PlanGroupEntity extends Protocol.PacketEntity { parent_uuid: string = ""; name: string = ""; } export class RunPlanRequestEntity extends Protocol.PacketEntity { uuid: string; constructor(uuid: string) { super(); this.command = Protocol.Commands.kRunPlan; this.flag = Protocol.PacketEntity.FLAG_REQUEST; this.uuid = uuid; } } export class StopCurrentRunningPlanRequestEntity extends Protocol.PacketEntity { timestamp = new Date().getMilliseconds(); constructor() { super(); this.command = Protocol.Commands.kStopCurrentRunningPlan; this.flag = Protocol.PacketEntity.FLAG_REQUEST; } } export class PlanAddNotifyEntity extends Protocol.PacketEntity { plan: PlanEntity = new PlanEntity(); } export class PlanDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class PlanEditNotifyEntity extends Protocol.PacketEntity { plan: PlanEntity = new PlanEntity(); } export class PlanGroupAddNotifyEntity extends Protocol.PacketEntity { plan_group: PlanGroupEntity = new PlanGroupEntity(); } export class PlanGroupDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class PlanGroupEditNotifyEntity extends Protocol.PacketEntity { plan_group: PlanGroupEntity = new PlanGroupEntity(); } export class PlanRunningStateChangeNotifyEntity extends Protocol.PacketEntity { plan: PlanEntity = new PlanEntity(); running = false; } export class SetApplicationConfigRequestEntity extends Protocol.PacketEntity { key: string = ""; value: string = ""; constructor(rcp_id?: number, key?: string, value?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kSetApplicationConfig; this.value = value ?? ""; this.key = key ?? ""; } } export class ApplicationConfigChangeNotifyEntity extends Protocol.PacketEntity { key: string = ""; value: string = ""; } export class RestartDeviceRequestEntity extends Protocol.PacketEntity { timestamp: number; constructor() { super(); this.timestamp = new Date().getUTCMilliseconds(); this.command = Protocol.Commands.kRestartDeviceCommand; this.flag = Protocol.PacketEntity.FLAG_REQUEST; this.rpc_id = 0; } } }