import { StringKeyValueEntity } from "./StringKeyValueEntity"; import { SignalSourceEntity } from "./SignalSourceEntity"; import ApplicationConfigEntity from "./ApplicationConfigEntity"; import { ModeEntity } from "./ModeEntity"; import { PlanEntity } from "./PlanEntity"; import SubtitleEntity from "./SubtitleEntity"; import { PollingEntity, PollingGroupEntity } from "./PollingEntity"; import { EdgeBlendingPoint } from "./EdgeBlendingEntities"; import { ExternalControlTableEntity } from "./ExternalControlTableEntity"; import { SerialPortConfigEntity } from "./SerialPortConfigEntity"; import { ConnectTableEntity } from "./ConnectTableEntity"; import TimingTaskEntity from "./TimingTaskEntity"; 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 kRpcGetPollings() { return Commands.PROTOCOL_PREFIX + "RpcGetPollings"; } 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 kSetWindowGeometry() { return Commands.PROTOCOL_PREFIX + "SetWindowGeometry"; } public static get kOpenWindow() { return Commands.PROTOCOL_PREFIX + "OpenWindow"; } public static get kOpenPolling() { return Commands.PROTOCOL_PREFIX + "OpenPolling"; } public static get kCloseWindow() { return Commands.PROTOCOL_PREFIX + "CloseWindow"; } public static get kWindowOtherStateChanged() { return Commands.PROTOCOL_PREFIX + "WindowOtherStateChanged"; } public static get kTopWindow() { return Commands.PROTOCOL_PREFIX + "TopWindow"; } public static get kLowerWindow() { return Commands.PROTOCOL_PREFIX + "LowerWindow"; } public static get kWindowFitGrid() { return Commands.PROTOCOL_PREFIX + "WindowFitGrid"; } 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 kRpcUpdateModeWindowList() { return Commands.PROTOCOL_PREFIX + "RpcUpdateModeWindowList"; } 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 kRpcAddPollingGroup() { return Commands.PROTOCOL_PREFIX + "RpcAddPollingGroup"; } public static get kRpcDeletePollingGroup() { return Commands.PROTOCOL_PREFIX + "RpcDeletePollingGroup"; } public static get kRpcEditPollingGroup() { return Commands.PROTOCOL_PREFIX + "RpcEditPollingGroup"; } public static get kRpcAddPolling() { return Commands.PROTOCOL_PREFIX + "RpcAddPolling"; } public static get kRpcEditPolling() { return Commands.PROTOCOL_PREFIX + "RpcEditPolling"; } public static get kRpcDeletePolling() { return Commands.PROTOCOL_PREFIX + "RpcDeletePolling"; } 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"; } public static get kRpcGetSubtitle() { return Commands.PROTOCOL_PREFIX + "RpcGetSubtitle"; } public static get kRpcGetRegisterInfo() { return Commands.PROTOCOL_PREFIX + "RpcGetRegisterInfo"; } public static get kRpcRegisterDevice() { return Commands.PROTOCOL_PREFIX + "RpcRegisterDevice"; } public static get kRpcSetSubtitle() { return Commands.PROTOCOL_PREFIX + "RpcSetSubtitle"; } public static get kRpcGetScreenSize() { return Commands.PROTOCOL_PREFIX + "RpcGetScreenSize"; } public static get kScreenSizeChanged() { return Commands.PROTOCOL_PREFIX + "ScreenSizeChanged"; } public static get kRpcSetSystemNetwork() { return Commands.PROTOCOL_PREFIX + "RpcSetSystemNetwork"; } public static get kRpcSetSystemGraphics() { return Commands.PROTOCOL_PREFIX + "RpcSetSystemGraphics"; } public static get kRpcSetSystemOther() { return Commands.PROTOCOL_PREFIX + "RpcSetSystemOther"; } public static get kRpcGetSupportResolutions() { return Commands.PROTOCOL_PREFIX + "RpcGetSupportResolutions"; } public static get kRpcGetOutputBoardSetting() { return Commands.PROTOCOL_PREFIX + "RpcGetOutputBoardSetting"; } public static get kRpcSetOutputBoardSetting() { return Commands.PROTOCOL_PREFIX + "RpcSetOutputBoardSetting"; } public static get kRpcRestoreOutputBoard() { return Commands.PROTOCOL_PREFIX + "RpcRestoreOutputBoard"; } public static get kSetWindowVolume() { return Commands.PROTOCOL_PREFIX + "SetWindowVolume"; } public static get kMuteWidow() { return Commands.PROTOCOL_PREFIX + "MuteWidow"; } public static get kUnMuteWidow() { return Commands.PROTOCOL_PREFIX + "UnMuteWidow"; } public static get kRpcGetBuildInfo() { return Commands.PROTOCOL_PREFIX + "RpcGetBuildInfo"; } public static get kFanTemperature() { return Commands.PROTOCOL_PREFIX + "FanTemperature"; } public static get kPlayWindow() { return Commands.PROTOCOL_PREFIX + "PlayWindow"; } public static get kPauseWindow() { return Commands.PROTOCOL_PREFIX + "PauseWindow"; } public static get kWindowPlayNext() { return Commands.PROTOCOL_PREFIX + "PlayNext"; } public static get kWindowPlayPrev() { return Commands.PROTOCOL_PREFIX + "PlayPrev"; } public static get kStartPolling() { return Commands.PROTOCOL_PREFIX + "StartPolling"; } public static get kStopPolling() { return Commands.PROTOCOL_PREFIX + "StopPolling"; } public static get kRpcSetWindowPollingData() { return Commands.PROTOCOL_PREFIX + "RpcSetWindowPollingData"; } public static get kPollingStateChanged() { return Commands.PROTOCOL_PREFIX + "PollingStateChanged"; } public static get kDesktopResolutionChangedNotify() { return Commands.PROTOCOL_PREFIX + "DesktopResolutionChangedNotify"; } public static get kDesktopDisconnectNotify() { return Commands.PROTOCOL_PREFIX + "DesktopDisconnectNotify"; } public static get kRpcGetSystemTimes() { return Commands.PROTOCOL_PREFIX + "RpcGetSystemTimes"; } public static get kRpcGetUsbDevices() { return Commands.PROTOCOL_PREFIX + "RpcGetUsbDevices"; } public static get kRpcGetEdgeBlendingInfo() { return Commands.PROTOCOL_PREFIX + "RpcGetEdgeBlendingInfo"; } public static get kRpcSetEdgeBlendingInfo() { return Commands.PROTOCOL_PREFIX + "RpcSetEdgeBlendingInfo"; } public static get kSetEdgeBlendingPoint() { return Commands.PROTOCOL_PREFIX + "SetEdgeBlendingPoint"; } public static get kRpcSetDevicePowerMode() { return Commands.PROTOCOL_PREFIX + "RpcSetDevicePowerMode"; } public static get kRpcFileOperator() { return Commands.PROTOCOL_PREFIX + "RpcFileOperator"; } public static get kRpcGetExternalControlDatas() { return Commands.PROTOCOL_PREFIX + "RpcGetExternalControlDatas"; } public static get kRpcDeleteExternalControlData() { return Commands.PROTOCOL_PREFIX + "RpcDeleteExternalControlData"; } public static get kRpcEditExternalControlData() { return Commands.PROTOCOL_PREFIX + "RpcEditExternalControlData"; } public static get kRpcAddExternalControlData() { return Commands.PROTOCOL_PREFIX + "RpcAddExternalControlData"; } public static get kCallExternalControlData() { return Commands.PROTOCOL_PREFIX + "CallExternalControlData"; } public static get kRpcGetExternalControlSerialPortConfig() { return Commands.PROTOCOL_PREFIX + "RpcGetExternalControlSerialPortConfig"; } public static get kRpcSetExternalControlSerialPortConfig() { return Commands.PROTOCOL_PREFIX + "RpcSetExternalControlSerialPortConfig"; } public static get kRpcGetConnectionList() { return Commands.PROTOCOL_PREFIX + "RpcGetConnectionList"; } public static get kRpcSetConnectionItem() { return Commands.PROTOCOL_PREFIX + "RpcSetConnectionItem"; } public static get kWindowFullScreen() { return Commands.PROTOCOL_PREFIX + "WindowFullScreen"; } public static get kSetDeviceAttribute() { return Commands.PROTOCOL_PREFIX + "SetDeviceAttribute"; } public static get kRpcGetDeviceAttribute() { return Commands.PROTOCOL_PREFIX + "RpcGetDeviceAttribute"; } public static get kRpcGetTimingTasks() { return Commands.PROTOCOL_PREFIX + "RpcGetTimingTasks"; } public static get kRpcDeleteTimingTask() { return Commands.PROTOCOL_PREFIX + "RpcDeleteTimingTask"; } public static get kRpcEditTimingTask() { return Commands.PROTOCOL_PREFIX + "RpcEditTimingTask"; } public static get kRpcAddTimingTask() { return Commands.PROTOCOL_PREFIX + "RpcAddTimingTask"; } public static get kRpcGetSystemNetworkInfo() { return Commands.PROTOCOL_PREFIX + "RpcGetSystemNetworkInfo"; } public static get kRpcSetHdmiInDecodeType() { return Commands.PROTOCOL_PREFIX + "RpcSetHdmiInDecodeType"; } public static get kRpcGetCityList() { return Commands.PROTOCOL_PREFIX + "RpcGetCityList"; } 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.kRpcGetPollings, Commands.kRpcGetApplicationConfig, Commands.kMoveWindow, Commands.kResizeWindow, Commands.kSetWindowGeometry, Commands.kOpenWindow, Commands.kOpenPolling, Commands.kCloseWindow, Commands.kTopWindow, Commands.kLowerWindow, 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.kRpcUpdateModeWindowList, Commands.kRpcGetCurrentRunningPlan, Commands.kCurrentRunningPlanStateChanged, Commands.kRpcAddPlanGroup, Commands.kRpcDeletePlanGroup, Commands.kRpcEditPlanGroup, Commands.kRpcAddPlan, Commands.kRpcDeletePlan, Commands.kRpcEditPlan, Commands.kRpcAddPollingGroup, Commands.kRpcDeletePollingGroup, Commands.kRpcEditPollingGroup, Commands.kRpcAddPolling, Commands.kRpcEditPolling, Commands.kRpcDeletePolling, Commands.kSetApplicationConfig, Commands.kRpcGetSubtitle, Commands.kRpcGetRegisterInfo, Commands.kRpcRegisterDevice, Commands.kRpcSetSubtitle, Commands.kRpcGetScreenSize, Commands.kScreenSizeChanged, Commands.kRpcSetSystemNetwork, Commands.kRpcSetSystemGraphics, Commands.kRpcSetSystemOther, Commands.kRpcGetSupportResolutions, Commands.kRpcRestoreOutputBoard, Commands.kRpcSetOutputBoardSetting, Commands.kRpcGetOutputBoardSetting, Commands.kSetWindowVolume, Commands.kMuteWidow, Commands.kUnMuteWidow, Commands.kRpcGetBuildInfo, Commands.kFanTemperature, Commands.kWindowPlayPrev, Commands.kWindowPlayNext, Commands.kPauseWindow, Commands.kPlayWindow, Commands.kPollingStateChanged, Commands.kRpcSetWindowPollingData, Commands.kStopPolling, Commands.kStartPolling, Commands.kPollingStateChanged, Commands.kDesktopResolutionChangedNotify, Commands.kDesktopDisconnectNotify, Commands.kRpcGetSystemTimes, Commands.kRpcGetUsbDevices, Commands.kRpcGetEdgeBlendingInfo, Commands.kRpcSetEdgeBlendingInfo, Commands.kSetEdgeBlendingPoint, Commands.kRpcSetDevicePowerMode, Commands.kRpcFileOperator, Commands.kRpcGetExternalControlDatas, Commands.kRpcDeleteExternalControlData, Commands.kRpcEditExternalControlData, Commands.kRpcAddExternalControlData, Commands.kCallExternalControlData, Commands.kRpcGetExternalControlSerialPortConfig, Commands.kRpcSetExternalControlSerialPortConfig, Commands.kRpcGetConnectionList, Commands.kRpcSetConnectionItem, Commands.kWindowFullScreen, Commands.kRpcGetDeviceAttribute, Commands.kSetDeviceAttribute, Commands.kRpcAddTimingTask, Commands.kRpcEditTimingTask, Commands.kRpcDeleteTimingTask, Commands.kRpcGetTimingTasks, Commands.kRpcGetSystemNetworkInfo, Commands.kRpcSetHdmiInDecodeType, Commands.kRpcGetCityList, ]); 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; /** 超时 毫秒 */ timeout = 15 * 1000; } export class NoneResponse extends PacketEntity { timestamp = Date.now(); } 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 = Date.now(); 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 = Date.now(); 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 = Date.now(); 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 = Date.now(); 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 = Date.now(); 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 SetWindowGeometryRequestEntity extends PacketEntity { window_id: number = 0; x: number = 0; y: number = 0; width: number = 0; height: number = 0; limit: boolean = true; constructor( window_id: number, x: number, y: number, width: number, height: number, limit: boolean = true ) { super(); this.command = Commands.kSetWindowGeometry; this.window_id = window_id ?? 0; this.x = x ?? 0; this.y = y ?? 0; this.width = width ?? 0; this.height = height ?? 0; this.limit = limit ?? 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; volume: number = 80; muted: boolean = true; paused: boolean = false; play_speed: number = 1; 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 OpenPollingRequestEntity extends PacketEntity { polling_uuid: string = ""; x: number = 0; y: number = 0; width: number = 0; height: number = 0; volume: number = 80; muted: boolean = true; paused: boolean = false; play_speed: number = 1; constructor( polling_uuid: string, x: number, y: number, width: number, height: number ) { super(); this.command = Commands.kOpenPolling; this.polling_uuid = polling_uuid ?? ""; 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; volume: number = 80; muted: boolean = false; paused: boolean = false; play_speed: number = 1; 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; uuid: string = ""; 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 UpdateModeWindowListRequestEntity extends Protocol.PacketEntity { uuid = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcUpdateModeWindowList; this.uuid = uuid ?? ""; } } export class UpdateModeWindowListResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcUpdateModeWindowList; } } 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; number: number; constructor( rcp_id?: number, name?: string, group_uuid?: string, number?: number ) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddMode; this.name = name ?? ""; this.group_uuid = group_uuid ?? ""; this.number = number ?? 0; } } 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; number: number; constructor( rcp_id?: number, name?: string, uuid?: string, number?: number ) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditMode; this.name = name ?? ""; this.uuid = uuid ?? ""; this.number = number ?? 0; } } 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 DeletePollingGroupRequestEntity extends Protocol.PacketEntity { uuid = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeletePollingGroup; this.uuid = uuid ?? ""; } } export class DeletePollingGroupResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeletePollingGroup; } } export class AddPollingRequestEntity extends Protocol.PacketEntity { name: string; group_uuid: string; polling_signal_sources: StringKeyValueEntity[]; note: string; constructor( rcp_id?: number, group_uuid?: string, name?: string, polling_signal_sources?: StringKeyValueEntity[], note?: string ) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcAddPolling; this.name = name ?? "new pollong"; this.group_uuid = group_uuid ?? ""; this.polling_signal_sources = Array.isArray(polling_signal_sources) ? polling_signal_sources : []; this.note = note ?? ""; } } export class AddPollingResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcAddPolling; } } export class EditPollingRequestEntity extends Protocol.PacketEntity { entity: PollingEntity = new PollingEntity(); constructor(rcp_id?: number, entity?: PollingEntity) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcEditPolling; if (entity) { this.entity = entity; } } } export class EditPollingResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcEditPolling; } } export class DeletePollingRequestEntity extends Protocol.PacketEntity { uuid: string = ""; constructor(rcp_id?: number, uuid?: string) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcDeletePolling; this.uuid = uuid ?? ""; } } export class DeletePollingResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcDeletePolling; } } 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 = Date.now(); 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 = Date.now(); 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; delay_ms: number = 0; constructor(delay_ms?: number) { super(); this.timestamp = new Date().getUTCMilliseconds(); this.command = Protocol.Commands.kRestartDeviceCommand; this.flag = Protocol.PacketEntity.FLAG_REQUEST; this.rpc_id = 0; if ( delay_ms != null && delay_ms != undefined && !isNaN(parseInt(delay_ms.toString())) ) { this.delay_ms = parseInt(delay_ms.toString()); } } } export class GetSubtitleRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetSubtitle; } } export class GetSubtitleResponseEntity extends Protocol.PacketEntity { subtitle: SubtitleEntity = new SubtitleEntity(); constructor() { super(); this.command = Protocol.Commands.kRpcGetSubtitle; } } export class GetRegisterInfoRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetRegisterInfo; } } export class GetRegisterInfoResponseEntity extends Protocol.PacketEntity { registered: boolean = false; register_code: string = ""; trial_days: number = 0; last_days: number = 0; register_date: string = ""; constructor() { super(); this.timeout = 60 * 1000; this.command = Protocol.Commands.kRpcGetRegisterInfo; } } export class RegisterDeviceRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); register_code: string = ""; secret_key: string = ""; active_code: string = ""; online: boolean = false; active_forever: boolean = false; hour: number = 0; constructor( register_code: string, active_code: string, online: boolean, active_forever: boolean, secret_key?: string, hour?: number, rcp_id?: number ) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcRegisterDevice; this.timestamp = Date.now(); this.register_code = register_code; this.active_code = active_code; this.online = online; this.active_forever = active_forever; this.secret_key = secret_key ?? ""; if (active_forever) { this.hour = 0; } else { this.hour = hour ?? 1; } } } export class RegisterDeviceResponseEntity extends Protocol.PacketEntity { success: boolean = false; constructor() { super(); this.command = Protocol.Commands.kRpcRegisterDevice; } } export class SetSubtitleRequestEntity extends Protocol.PacketEntity { subtitle: SubtitleEntity = new SubtitleEntity(); constructor(rcp_id?: number, subtitle?: SubtitleEntity) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcSetSubtitle; this.subtitle = subtitle ?? new SubtitleEntity(); this.subtitle.y_offset = parseInt(this.subtitle.y_offset); } } export class SetSubtitleResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcSetSubtitle; } } export class GetScreenSizeRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetScreenSize; } } export class GetScreenSizeResponseEntity extends Protocol.PacketEntity { width: number = 0; height: number = 0; constructor() { super(); this.command = Protocol.Commands.kRpcGetScreenSize; } } export class ScreenSizeChangedNotifyEntity extends PacketEntity { width: number = 0; height: number = 0; constructor() { super(); this.command = Commands.kScreenSizeChanged; } } export class SetSystemNetworkRequestEntity extends Protocol.PacketEntity { auto_ip: boolean = false; ip_address: string = "192.168.1.68"; gateway: string = "192.168.1.1"; net_mask: string = "255.255.255.0"; mac_address: string = "04:D9:F5:D3:F4:C5"; constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcSetSystemNetwork; } } export class SetSystemNetworkResponseEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor() { super(); this.command = Protocol.Commands.kRpcSetSystemNetwork; } } export class SetSystemGraphicsRequestEntity extends Protocol.PacketEntity { brightness: number = 100; contrast: number = 100; hue: number = 100; rotate: number = 0; target_resolution_type: string = "EDID"; device_resolution_name: string = "3840x2160@60"; target_resolution_timing: string = ""; constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcSetSystemGraphics; } } export class SetSystemGraphicsResponseEntity extends Protocol.PacketEntity { success: boolean = false; constructor() { super(); this.command = Protocol.Commands.kRpcSetSystemGraphics; } } export class SetSystemOtherRequestEntity extends Protocol.PacketEntity { system_muted: boolean = false; system_volume: number = 100; output_audio_card: string = ""; use_ntp: boolean = false; ntp_server: string = "ntp.ntsc.ac.cn"; ntp_sync_delay: number = 60; datetime: string = "1997-01-01 00:00:00"; time_zone: number = 21; constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcSetSystemOther; } } export class SetSystemOtherResponseEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor() { super(); this.command = Protocol.Commands.kRpcSetSystemOther; } } export class GetSupportResolutionsRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetSupportResolutions; } } export class TargetResolutionEntity { type: string = "EDID"; name: string = "3840X2160@30"; timing: string = ""; } export class GetSupportResolutionsResponseEntity extends Protocol.PacketEntity { device_edid_support_resolutions: string[] = []; current_device_resolution: string = ""; screen_width = 0; screen_height = 0; screen_refresh_rate = 0; target_resolution: TargetResolutionEntity = new TargetResolutionEntity(); constructor() { super(); this.command = Protocol.Commands.kRpcGetSupportResolutions; } } export class GetOutputBoardSettingRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetOutputBoardSetting; } } export class GetOutputBoardSettingResponseEntity extends Protocol.PacketEntity { wall_row: number = 2; wall_col: number = 2; splicing: boolean = false; vertical_blanking: number = 0; horizon_blanking: number = 0; rotate: number = 0; volume: number = 0; mute: boolean = false; output_board_support_resolutions: Object = {}; current_output_board_resolution: string = ""; constructor() { super(); this.command = Protocol.Commands.kRpcGetOutputBoardSetting; } } export class SetOutputBoardSettingRequestEntity extends Protocol.PacketEntity { wall_row: number = 2; wall_col: number = 2; splicing: boolean = false; vertical_blanking: number = 0; horizon_blanking: number = 0; rotate: number = 0; volume: number = 0; mute: boolean = false; output_board_resolution: string = "1920x1080"; constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcSetOutputBoardSetting; } } export class SetOutputBoardSettingResponseEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor() { super(); this.command = Protocol.Commands.kRpcSetOutputBoardSetting; } } export class RestoreOutputBoardRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcRestoreOutputBoard; } } export class RestoreOutputBoardResponseEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor() { super(); this.command = Protocol.Commands.kRpcRestoreOutputBoard; } } export class SetWindowVolumeRequestEntity extends Protocol.PacketEntity { window_id: number; volume: number; constructor(window_id: number, volume: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kSetWindowVolume; this.window_id = window_id; this.volume = volume; } } export class MuteWindowRequestEntity extends Protocol.PacketEntity { window_id: number; constructor(window_id: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kMuteWidow; this.window_id = window_id; } } export class PlayWindowRequestEntity extends Protocol.PacketEntity { window_id: number; constructor(window_id: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kPlayWindow; this.window_id = window_id; } } export class WindowPlayNextRequestEntity extends Protocol.PacketEntity { window_id: number; constructor(window_id: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kWindowPlayNext; this.window_id = window_id; } } export class WindowPlayPrevRequestEntity extends Protocol.PacketEntity { window_id: number; constructor(window_id: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kWindowPlayPrev; this.window_id = window_id; } } export class PauseWindowRequestEntity extends Protocol.PacketEntity { window_id: number; constructor(window_id: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kPauseWindow; this.window_id = window_id; } } export class UnMuteWindowRequestEntity extends Protocol.PacketEntity { window_id: number; constructor(window_id: number, rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kUnMuteWidow; this.window_id = window_id; } } export class GetBuildInfoRequestEntity extends Protocol.PacketEntity { timestamp = Date.now(); constructor(rcp_id?: number) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcGetBuildInfo; } } export class GetBuildInfoResponseEntity extends Protocol.PacketEntity { version = "unknow"; commit_hash = "unknow"; build_date = "unknow"; branch_name = "unknow"; major_version = 0; minor_version = 0; patch_version = 0; tweak_version = 0; kernel_version: string = ""; rootfs_version: string = ""; constructor() { super(); this.command = Protocol.Commands.kRpcGetBuildInfo; } } export class FanTemperatureNotifyEntity extends PacketEntity { fan_temp = 0; constructor() { super(); this.command = Commands.kFanTemperature; } } export class SetWindowPollingDataRequestEntity extends Protocol.PacketEntity { datas: StringKeyValueEntity[] = []; name: string; window_id: number = 0; constructor( window_id: number, name: string, datas?: StringKeyValueEntity[], rcp_id?: number ) { super(); this.rpc_id = rcp_id ?? 0; this.command = Protocol.Commands.kRpcSetWindowPollingData; if (Array.isArray(datas)) { if (datas.length % 2) { datas.splice(datas.length - 1, 1); } this.datas = datas; } this.window_id = window_id; this.name = name; } } export class SetWindowPollingDataResponseEntity extends Protocol.PacketEntity { success = false; constructor() { super(); this.command = Protocol.Commands.kRpcSetWindowPollingData; } } export class StartPollingRequestEntity extends PacketEntity { window_id: number; constructor(window_id: number) { super(); this.rpc_id = 0; this.command = Commands.kStartPolling; this.window_id = window_id; } } export class StopPollingRequestEntity extends PacketEntity { window_id: number; constructor(window_id: number) { super(); this.rpc_id = 0; this.command = Commands.kStopPolling; this.window_id = window_id; } } export class PollingStateChangeNotifyEntity extends PacketEntity { window_id: number = 0; polling: boolean = false; window_type: string = "EwindowType::Normal"; title: string = ""; constructor() { super(); this.command = Commands.kPollingStateChanged; } } export class TopWindowNotifyEntity extends PacketEntity { new_window_id: number = 0; old_window_id: number = 0; constructor() { super(); this.command = Commands.kTopWindow; } } export class LowerWindowNotifyEntity extends PacketEntity { window_id: number = 0; constructor() { super(); this.command = Commands.kLowerWindow; } } export class DesktopResolutionChangedNotifyEntity extends PacketEntity { width: number = 0; height: number = 0; refresh_rate: number = 0; constructor() { super(); this.command = Commands.kDesktopResolutionChangedNotify; } } export class DesktopDisconnectNotifyEntity extends PacketEntity { timestamp: number = 0; constructor() { super(); this.command = Commands.kDesktopDisconnectNotify; } } export class GetSystemTimesRequestEntity extends PacketEntity { timestamp = Date.now(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetSystemTimes; } } export class GetSystemTimesResponseEntity extends PacketEntity { system_run_time: number = 0; system_idle_time: number = 0; current_system_time: number = 0; server_run_time: number = 0; server_all_run_time: number = 0; constructor() { super(); this.command = Commands.kRpcGetSystemTimes; } } export class GetUsbDevicesRequestEntity extends PacketEntity { timestamp = Date.now(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetUsbDevices; } } export class GetUsbDevicesResponseEntity extends PacketEntity { usb_list: string[] = []; constructor() { super(); this.command = Commands.kRpcGetUsbDevices; } } export class GetPollingsRequestEntity extends PacketEntity { timestamp = Date.now(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetPollings; } } export class GetPollingsResponseEntity extends PacketEntity { pollings: PollingEntity[] = []; polling_groups: [] = []; constructor() { super(); this.command = Commands.kRpcGetPollings; } } export class PollingAddNotifyEntity extends Protocol.PacketEntity { polling: PollingEntity = new PollingEntity(); } export class PollingDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class PollingEditNotifyEntity extends Protocol.PacketEntity { polling: PollingEntity = new PollingEntity(); } export class PollingGroupAddNotifyEntity extends Protocol.PacketEntity { polling_group: PollingGroupEntity = new PollingGroupEntity(); } export class PollingGroupDeleteNotifyEntity extends Protocol.PacketEntity { uuid: string = ""; } export class PollingGroupEditNotifyEntity extends Protocol.PacketEntity { polling_group: PollingGroupEntity = new PollingGroupEntity(); } export class GetEdgeBlendingInfoRequestEntity extends PacketEntity { timestamp = Date.now(); constructor(rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcGetEdgeBlendingInfo; } } export class GetEdgeBlendingInfoResponseEntity extends PacketEntity { enable_blending = false; enable_correct = false; width = 0; height = 0; col = 0; row = 0; point_count = 0; points: EdgeBlendingPoint[] = []; constructor() { super(); this.command = Commands.kRpcGetEdgeBlendingInfo; } } export class SetEdgeBlendingInfoRequestEntity extends PacketEntity { enable_blending = false; enable_correct = false; width = 0; height = 0; col = 0; row = 0; point_count = 0; constructor( enable_blending: boolean, enable_correct: boolean, width: number, height: number, col: number, row: number, point_count: number, rpcid?: number ) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcSetEdgeBlendingInfo; this.enable_blending = enable_blending; this.enable_correct = enable_correct; this.width = width; this.height = height; this.col = col; this.row = row; this.point_count = point_count; } } export class SetEdgeBlendingInfoResponseEntity extends PacketEntity { success = false; constructor() { super(); this.command = Commands.kRpcSetEdgeBlendingInfo; } } export class SetEdgeBlendingPointRequestEntity extends PacketEntity { point: EdgeBlendingPoint; constructor(point: EdgeBlendingPoint, rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kSetEdgeBlendingPoint; this.point = point; } } export class FileOperatorRequestEntity extends PacketEntity { static kOperatorTypeNone = "NONE"; static kOperatorTypeCopy = "COPY"; static kOperatorTypeCut = "CUT"; from_path = ""; to_path = ""; operator_type = ""; force_operator = false; ext_data = ""; constructor( from_path: string, to_path: string, operator_type: string, force_operator: boolean = true, rpcid?: number ) { super(); this.timeout = 1000 * 60 * 5; this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcFileOperator; this.from_path = from_path ?? ""; this.to_path = to_path ?? ""; this.operator_type = operator_type ?? FileOperatorRequestEntity.kOperatorTypeNone; this.force_operator = force_operator; } } export class FileOperatorResponseEntity extends PacketEntity { success = true; message = ""; constructor() { super(); this.command = Commands.kRpcFileOperator; } } export class SetDevicePowerRequestEntity extends PacketEntity { power_state: string; static kPowerStatePowerOn = "POWER_ON"; static kPowerStatePowerOff = "POWER_OFF"; static kPowerStateStandBy = "STAND_BY"; constructor(power_state: string, rpcid?: number) { super(); this.rpc_id = rpcid ?? 0; this.command = Commands.kRpcSetDevicePowerMode; this.power_state = power_state; } } export class SetDevicePowerResponseEntity extends PacketEntity { success = true; constructor() { super(); this.command = Commands.kRpcSetDevicePowerMode; } } export class RpcGetExternalControlDatasRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetExternalControlDatas; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; } timestamp = 0; } export class RpcGetExternalControlDatasResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } datas: ExternalControlTableEntity[] = []; } export class RpcDeleteExternalControlDataRequestEntity extends PacketEntity { constructor(uuid: string, rpc_id = 0) { super(); super.command = Commands.kRpcDeleteExternalControlData; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.uuid = uuid; } uuid = ""; } export class RpcDeleteExternalControlDataResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class ExternalControlDataDeleteNotifyEntity extends PacketEntity { constructor() { super(); super.command = Commands.kRpcDeleteExternalControlData; super.flag = PacketEntity.FLAG_NOTIFY; super.rpc_id = 0; } uuid = ""; } export class RpcEditExternalControlDataRequestEntity extends PacketEntity { constructor(entity: ExternalControlTableEntity, rpc_id = 0) { super(); super.command = Commands.kRpcEditExternalControlData; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.entity = entity; } entity: ExternalControlTableEntity; } export class RpcEditExternalControlDataResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class ExternalControlDataEditNotifyEntity extends PacketEntity { constructor() { super(); super.command = Commands.kRpcDeleteExternalControlData; super.flag = PacketEntity.FLAG_NOTIFY; super.rpc_id = 0; } entity = new ExternalControlTableEntity(); } export class RpcAddExternalControlDataRequestEntity extends PacketEntity { constructor(entity: ExternalControlTableEntity, rpc_id = 0) { super(); super.command = Commands.kRpcAddExternalControlData; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.entity = entity; } entity: ExternalControlTableEntity; } export class RpcAddExternalControlDataResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class ExternalControlDataAddNotifyEntity extends PacketEntity { constructor() { super(); super.command = Commands.kRpcDeleteExternalControlData; super.flag = PacketEntity.FLAG_NOTIFY; super.rpc_id = 0; } entity = new ExternalControlTableEntity(); } export class CallExternalControlDataRequestEntity extends PacketEntity { constructor(uuid: string) { super(); super.command = Commands.kCallExternalControlData; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = 0; this.uuid = uuid; } uuid: string; } export class RpcGetExternalControlSerialPortConfigRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetExternalControlSerialPortConfig; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; } timestamp = 0; } export class RpcGetExternalControlSerialPortConfigResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } config = new SerialPortConfigEntity(); } export class RpcSetExternalControlSerialPortConfigRequestEntity extends PacketEntity { constructor(config: SerialPortConfigEntity, rpc_id = 0) { super(); super.command = Commands.kRpcSetExternalControlSerialPortConfig; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.config = config; } config: SerialPortConfigEntity; } export class RpcSetExternalControlSerialPortConfigResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class GetConnectionListRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetConnectionList; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; } timestamp = 0; } export class GetConnectionListResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } connects: ConnectTableEntity[] = []; } export class SetConnectionItemRequestEntity extends PacketEntity { constructor(entity: ConnectTableEntity, rpc_id = 0) { super(); super.command = Commands.kRpcSetConnectionItem; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.entity = entity; } entity: ConnectTableEntity; } export class SetConnectionItemResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class WindowFullScreen extends PacketEntity { constructor(window_id: number, full_screen: boolean, rpc_id = 0) { super(); super.command = Commands.kWindowFullScreen; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.window_id = window_id; this.full_screen = full_screen; } window_id: number; full_screen: boolean; } export enum EDeviceAttribute { None_All = 0x0000, None = 0x0001, OutputBoard = 0x0002, CenterControl = 0x0004, Reserve2 = 0x0008, Reserve3 = 0x0010, Reserve4 = 0x0020, Reserve5 = 0x0040, Reserve6 = 0x0080, Reserve7 = 0x0100, Reserve8 = 0x0200, Reserve9 = 0x0400, Reserve10 = 0x0800, Reserve11 = 0x1000, Reserve12 = 0x2000, Reserve13 = 0x4000, Reserve14 = 0x8000, All = 0xffff, } export class GetDeviceAttributeRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetDeviceAttribute; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; } timestamp = 0; } export class GetDeviceAttributeResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } attribute = 0; } export class SetDeviceAttributeRequestEntity extends PacketEntity { constructor(attribute: number, rpc_id = 0) { super(); super.command = Commands.kSetDeviceAttribute; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.attribute = attribute; } attribute: number = 0; } export class SetDeviceAttributeNotifyEntity extends PacketEntity { attribute: number = 0; constructor() { super(); this.command = Commands.kSetDeviceAttribute; } } export class GetTimingTasksRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetTimingTasks; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; } timestamp = 0; } export class GetTimingTasksResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } tasks: TimingTaskEntity[] = []; } export class AddTimingTaskRequestEntity extends PacketEntity { constructor(task: TimingTaskEntity, rpc_id = 0) { super(); super.command = Commands.kRpcAddTimingTask; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.task = task; } task: TimingTaskEntity; } export class AddTimingTaskResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; uuid = ""; } export class DeleteTimingTaskRequestEntity extends PacketEntity { constructor(uuid: string, rpc_id = 0) { super(); super.command = Commands.kRpcDeleteTimingTask; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.uuid = uuid; } uuid: string; } export class DeleteTimingTaskResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class EditTimingTaskRequestEntity extends PacketEntity { constructor(task: TimingTaskEntity, rpc_id = 0) { super(); super.command = Commands.kRpcEditTimingTask; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.task = task; } task: TimingTaskEntity; } export class EditTimingTaskResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; } export class GetSystemNetworkInfoRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetSystemNetworkInfo; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.timestamp = Date.now(); } timestamp: number; } export class GetSystemNetworkInfoResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } auto_ip = false; ip_address = "192.168.1.1"; gateway = "192.168.1.1"; net_mask = "192.168.1.1"; mac_address = "AA:BB:CC:DD:EE:FF"; } export class SetHdmiInDecodeTypeRequestEntity extends PacketEntity { constructor(index: number, type: string, rpc_id = 0) { super(); super.command = Commands.kRpcSetHdmiInDecodeType; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; this.index = index ?? 1; this.type = type ?? "NV12"; } index: number; type: string; note: string = ""; } export class SetHdmiInDecodeTypeResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } success = false; note = ""; } export class GetCityListRequestEntity extends PacketEntity { constructor(rpc_id = 0) { super(); super.command = Commands.kRpcGetCityList; super.flag = PacketEntity.FLAG_REQUEST; super.rpc_id = rpc_id; } timestamp = Date.now(); } export class GetCityListResponseEntity extends PacketEntity { constructor() { super(); super.flag = PacketEntity.FLAG_RESPONSE; } city_list = []; } }