media_player_client/src/entities/WSProtocol.ts

3440 lines
91 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { AdvancedIpAddressEntity } from "./AdvancedIpAddressEntity";
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";
import JointActionEquipmentTableEntity from "./JointActionEquipmentTableEntity";
import MagicWallConfig from "./MagicWallConfig";
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 kReplaceWindow() {
return Commands.PROTOCOL_PREFIX + "ReplaceWindow";
}
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 kWindowPropertyValueChanged() {
return Commands.PROTOCOL_PREFIX + "WindowPropertyValueChanged";
}
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 kOutputBoardSettingNotify() {
return Commands.PROTOCOL_PREFIX + "OutputBoardSettingNotify";
}
public static get kSwitchOutputBoardSplitState() {
return Commands.PROTOCOL_PREFIX + "SwitchOutputBoardSplitState";
}
public static get kRpcOutputBoardSpliceIndex() {
return Commands.PROTOCOL_PREFIX + "RpcOutputBoardSpliceIndex";
}
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 kRpcCallExternalControlData() {
return Commands.PROTOCOL_PREFIX + "RpcCallExternalControlData";
}
public static get kRpcGetExternalControlConfig() {
return Commands.PROTOCOL_PREFIX + "RpcGetExternalControlConfig";
}
public static get kRpcSetExternalControlConfig() {
return Commands.PROTOCOL_PREFIX + "RpcSetExternalControlConfig";
}
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";
}
public static get kRpcGetPowerState() {
return Commands.PROTOCOL_PREFIX + "RpcGetPowerState";
}
public static get kSetLanguage() {
return Commands.PROTOCOL_PREFIX + "SetLanguage";
}
public static get kRpcGetJointActionEquipment() {
return Commands.PROTOCOL_PREFIX + "RpcGetJointActionEquipment";
}
public static get kRpcSetJointActionEquipment() {
return Commands.PROTOCOL_PREFIX + "RpcSetJointActionEquipment";
}
public static get kRpcDeleteJointActionEquipment() {
return Commands.PROTOCOL_PREFIX + "RpcDeleteJointActionEquipment";
}
public static get kCleanBrowserCache() {
return Commands.PROTOCOL_PREFIX + "CleanBrowserCache";
}
public static get kSetHDMIRotation() {
return Commands.PROTOCOL_PREFIX + "SetHDMIRotation";
}
public static get kRpcSetHdmiInAudioDevice() {
return Commands.PROTOCOL_PREFIX + "RpcSetHdmiInAudioDevice";
}
public static get kRpcSetMagicWallConfig() {
return Commands.PROTOCOL_PREFIX + "RpcSetMagicWallConfig";
}
public static get kRpcGetMagicWallConfig() {
return Commands.PROTOCOL_PREFIX + "RpcGetMagicWallConfig";
}
public static get kRpcGetMagicWallGridState() {
return Commands.PROTOCOL_PREFIX + "RpcGetMagicWallGridState";
}
public static get kRpcSetMagicWallGridState() {
return Commands.PROTOCOL_PREFIX + "RpcSetMagicWallGridState";
}
public static get kRpcTestA() {
return Commands.PROTOCOL_PREFIX + "RpcTestA";
}
public static get kSetBlendingCorrection() {
return Commands.PROTOCOL_PREFIX + "SetBlendingCorrection";
}
public static get kSetBlendingAlphaParam() {
return Commands.PROTOCOL_PREFIX + "SetBlendingAlphaParam";
}
public static get kSetBlendingPowerParam() {
return Commands.PROTOCOL_PREFIX + "SetBlendingPowerParam";
}
public static get kSetBlendingGammaParam() {
return Commands.PROTOCOL_PREFIX + "SetBlendingGammaParam";
}
public static get kEnableBlending() {
return Commands.PROTOCOL_PREFIX + "EnableBlending";
}
public static get kSetBlendingOverlap() {
return Commands.PROTOCOL_PREFIX + "SetBlendingOverlap";
}
public static get kGetBlendingConfig() {
return Commands.PROTOCOL_PREFIX + "GetBlendingConfig";
}
public static get kSaveBlendingConfig() {
return Commands.PROTOCOL_PREFIX + "SaveBlendingConfig";
}
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.kReplaceWindow,
Commands.kOpenPolling,
Commands.kCloseWindow,
Commands.kTopWindow,
Commands.kLowerWindow,
Commands.kWindowOtherStateChanged,
Commands.kWindowPropertyValueChanged,
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.kOutputBoardSettingNotify,
Commands.kRpcSetOutputBoardSetting,
Commands.kRpcGetOutputBoardSetting,
Commands.kRpcOutputBoardSpliceIndex,
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.kRpcCallExternalControlData,
Commands.kRpcGetExternalControlConfig,
Commands.kRpcSetExternalControlConfig,
Commands.kRpcGetConnectionList,
Commands.kRpcSetConnectionItem,
Commands.kWindowFullScreen,
Commands.kRpcGetDeviceAttribute,
Commands.kSetDeviceAttribute,
Commands.kRpcAddTimingTask,
Commands.kRpcEditTimingTask,
Commands.kRpcDeleteTimingTask,
Commands.kRpcGetTimingTasks,
Commands.kRpcGetSystemNetworkInfo,
Commands.kRpcSetHdmiInDecodeType,
Commands.kRpcGetCityList,
Commands.kRpcGetPowerState,
Commands.kRpcGetJointActionEquipment,
Commands.kRpcSetJointActionEquipment,
Commands.kRpcDeleteJointActionEquipment,
Commands.kCleanBrowserCache,
Commands.kSetHDMIRotation,
Commands.kRpcSetHdmiInAudioDevice,
Commands.kRpcGetMagicWallConfig,
Commands.kRpcSetMagicWallConfig,
Commands.kRpcTestA,
Commands.kSetBlendingCorrection,
Commands.kSetBlendingAlphaParam,
Commands.kSetBlendingPowerParam,
Commands.kSetBlendingGammaParam,
Commands.kEnableBlending,
Commands.kSetBlendingOverlap,
Commands.kGetBlendingConfig,
Commands.kSaveBlendingConfig,
Commands.kRpcSetMagicWallGridState,
Commands.kRpcGetMagicWallGridState,
]);
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 ReplaceWindowRequestEntity extends PacketEntity {
window_id: number = 0;
signal_source: string = "";
ext_data: string = "";
polling: boolean = false;
constructor(
window_id: number,
signal_source: string,
polling?: boolean,
ext_data?: string
) {
super();
this.command = Commands.kReplaceWindow;
this.window_id = window_id;
this.signal_source = signal_source ?? "";
this.polling = typeof polling != "boolean" ? false : polling;
this.ext_data = ext_data ?? "";
}
}
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 = "";
parent_uuid = "";
constructor(
rcp_id?: number,
uuid?: string,
name?: string,
parent_uuid?: string
) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kRpcEditSignalSourceGroup;
this.uuid = uuid ?? "";
this.name = name ?? "";
this.parent_uuid = parent_uuid ?? "";
}
}
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 = "";
uuid: 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 = "";
parent_uuid = "";
constructor(
rcp_id?: number,
uuid?: string,
name?: string,
parent_uuid?: string
) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kRpcEditModeGroup;
this.uuid = uuid ?? "";
this.name = name ?? "";
this.parent_uuid = parent_uuid ?? "";
}
}
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;
joint_action_equipments: StringKeyValueEntity[] = [];
constructor(
rcp_id?: number,
name?: string,
group_uuid?: string,
number?: number,
joint_action_equipments?: StringKeyValueEntity[]
) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kRpcAddMode;
this.name = name ?? "";
this.group_uuid = group_uuid ?? "";
this.number = number ?? 0;
if (Array.isArray(joint_action_equipments)) {
this.joint_action_equipments = joint_action_equipments;
}
}
}
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;
group_uuid: string;
joint_action_equipments: StringKeyValueEntity[] = [];
constructor(
rcp_id?: number,
name?: string,
uuid?: string,
number?: number,
group_uuid?: string,
joint_action_equipments?: StringKeyValueEntity[]
) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kRpcEditMode;
this.name = name ?? "";
this.uuid = uuid ?? "";
this.number = number ?? 0;
this.group_uuid = group_uuid ?? "";
if (Array.isArray(joint_action_equipments)) {
this.joint_action_equipments = joint_action_equipments;
}
}
}
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 = "";
uuid: 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 = "";
parent_uuid = "";
constructor(
rcp_id?: number,
uuid?: string,
name?: string,
parent_uuid?: string
) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kRpcEditPlanGroup;
this.uuid = uuid ?? "";
this.name = name ?? "";
this.parent_uuid = parent_uuid ?? "";
}
}
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 = "";
uuid: 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(<any>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";
dns1: string = "";
dns2: string = "";
mac_address: string = "04:D9:F5:D3:F4:C5";
ip_address_list: AdvancedIpAddressEntity[] = [];
host_name: string = "";
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 = "";
hdmi_output_count = 1;
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 RpcOutputBoardSpliceIndexRequestEntity extends Protocol.PacketEntity {
device_index = 0;
splice_index = 0;
constructor(device_index: number, splice_index: number, rcp_id?: number) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kRpcOutputBoardSpliceIndex;
this.device_index = device_index;
this.splice_index = splice_index;
}
}
export class RpcOutputBoardSpliceIndexResponseEntity extends Protocol.PacketEntity {
success = false;
device_index = 0;
splice_index = 0;
constructor() {
super();
this.command = Protocol.Commands.kRpcOutputBoardSpliceIndex;
}
}
export class OutputBoardSettingNotify extends Protocol.PacketEntity {
splicing = false;
wall_rows = 2;
wall_cols = 2;
constructor() {
super();
this.command = Protocol.Commands.kOutputBoardSettingNotify;
super.flag = PacketEntity.FLAG_NOTIFY;
}
}
export class SwitchOutputBoardSplitStateRequestEntity extends Protocol.PacketEntity {
timestamp = Date.now();
constructor(rcp_id?: number) {
super();
this.rpc_id = rcp_id ?? 0;
this.command = Protocol.Commands.kSwitchOutputBoardSplitState;
}
}
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;
polling = 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 WindowPropertyValueChangeNotifyEntity extends PacketEntity {
window_id = 0;
name = "";
value = "";
constructor() {
super();
this.command = Commands.kWindowPropertyValueChanged;
}
}
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(number: number, rpc_id = 0) {
super();
super.command = Commands.kRpcDeleteExternalControlData;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.number = number ?? -1;
}
number = -1;
}
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.kRpcAddExternalControlData;
super.flag = PacketEntity.FLAG_NOTIFY;
super.rpc_id = 0;
}
entity = new ExternalControlTableEntity();
}
export class RpcCallExternalControlDataRequestEntity extends PacketEntity {
constructor(number: number) {
super();
super.command = Commands.kRpcCallExternalControlData;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = 0;
this.number = number;
}
number: number;
}
export class RpcCallExternalControlDataResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
success: boolean = false;
}
export class RpcGetExternalControlSerialPortConfigRequestEntity extends PacketEntity {
constructor(rpc_id = 0) {
super();
super.command = Commands.kRpcGetExternalControlConfig;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
}
timestamp = 0;
}
export class RpcGetExternalControlSerialPortConfigResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
serial_port = new SerialPortConfigEntity();
tcp_address = "192.168.2.2";
tcp_port = 1000;
udp_address = "192.168.2.2";
udp_port = 1000;
current_type = "SERIAL_PORT";
}
export class RpcSetExternalControlSerialPortConfigRequestEntity extends PacketEntity {
constructor(
serial_port: SerialPortConfigEntity,
tcp_address: string,
tcp_port: number,
udp_address: string,
udp_port: number,
current_type: string,
rpc_id = 0
) {
super();
super.command = Commands.kRpcSetExternalControlConfig;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.serial_port = serial_port ?? new SerialPortConfigEntity();
this.tcp_address = tcp_address ?? "192.168.2.2";
this.tcp_port = tcp_port ?? 1000;
this.udp_address = udp_address ?? "192.168.2.2";
this.udp_port = udp_port ?? 1000;
this.current_type = current_type ?? "SERIAL_PORT";
}
serial_port = new SerialPortConfigEntity();
tcp_address = "192.168.2.2";
tcp_port = 1000;
udp_address = "192.168.2.2";
udp_port = 1000;
current_type = "SERIAL_PORT";
}
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 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";
host_name = "player";
}
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 SetHdmiInAudioDeviceRequestEntity extends PacketEntity {
constructor(index: number, device: string, rpc_id = 0) {
super();
super.command = Commands.kRpcSetHdmiInAudioDevice;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.index = index ?? 1;
this.device = device ?? "";
}
index: number;
device: string;
note: string = "";
}
export class SetHdmiInAudioDeviceResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
success = false;
note = "";
}
export class GetCityListRequestEntity extends PacketEntity {
constructor(language?: string, rpc_id = 0) {
super();
super.command = Commands.kRpcGetCityList;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.language = language ?? "";
}
timestamp = Date.now();
language = "";
}
export class GetCityListResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
city_list = [];
}
export class GetPowerStateRequestEntity extends PacketEntity {
constructor(rpc_id = 0) {
super();
super.command = Commands.kRpcGetPowerState;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
}
timestamp = Date.now();
}
export class GetPowerStateResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
is_power_on = false;
}
export class SetLanguageRequestEntity extends PacketEntity {
constructor(language: string) {
super();
super.command = Commands.kSetLanguage;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = 0;
this.language = language ?? "zh-CN";
}
language = "zh-CN";
}
export class GetJointActionEquipmentRequestEntity extends PacketEntity {
constructor(rpc_id = 0) {
super();
super.command = Commands.kRpcGetJointActionEquipment;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
}
timestamp = Date.now();
}
export class GetJointActionEquipmentResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
entities: Array<JointActionEquipmentTableEntity> = [];
}
export class SetJointActionEquipmentRequestEntity extends PacketEntity {
constructor(entity: JointActionEquipmentTableEntity, rpc_id = 0) {
super();
super.command = Commands.kRpcSetJointActionEquipment;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
if (entity) {
this.entity = entity;
}
}
entity = new JointActionEquipmentTableEntity();
}
export class SetJointActionEquipmentResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
success = false;
}
export class DeleteJointActionEquipmentRequestEntity extends PacketEntity {
constructor(uuid: string, rpc_id = 0) {
super();
super.command = Commands.kRpcDeleteJointActionEquipment;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.uuid = uuid;
}
uuid = "";
}
export class DeleteJointActionEquipmentResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
success = false;
}
export class RestoreDeviceRequestEntity extends PacketEntity {
timestamp = Date.now();
delete_upload_dates = false;
constructor(delete_upload_dates = false, rpc_id = 0) {
super();
super.command = Commands.kRestoreDevice;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.delete_upload_dates = delete_upload_dates;
}
}
export class NormalRequestEntity extends PacketEntity {
constructor(command: string) {
super();
super.command = command;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = 0;
}
timestamp = Date.now();
}
export class SetHDMIRotationRequestEntity extends PacketEntity {
rotation = 0;
constructor(rotation = 0, rpc_id = 0) {
super();
super.command = Commands.kSetHDMIRotation;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.rotation = rotation;
}
}
export class RpcGetMagicWallConfigRequestEntity extends PacketEntity {
constructor(rpc_id = 0) {
super();
super.command = Commands.kRpcGetMagicWallConfig;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
}
timestamp = Date.now();
}
export class RpcGetMagicWallConfigResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
config: MagicWallConfig = new MagicWallConfig();
success = false;
}
export class RpcSetMagicWallConfigRequestEntity extends PacketEntity {
constructor(config: MagicWallConfig, rpc_id = 0) {
super();
super.command = Commands.kRpcSetMagicWallConfig;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.config = config ?? new MagicWallConfig();
}
config: MagicWallConfig = new MagicWallConfig();
}
export class RpcSetMagicWallConfigResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
config: MagicWallConfig = new MagicWallConfig();
success = false;
}
export class RpcSetMagicWallGridStateRequestEntity extends PacketEntity {
constructor(show_grid: boolean, rpc_id = 0) {
super();
super.command = Commands.kRpcSetMagicWallGridState;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.show_grid = show_grid;
}
show_grid = false;
}
export class RpcSetMagicWallGridStateResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
success = false;
}
export class RpcGetMagicWallGridStateRequestEntity extends PacketEntity {
constructor( rpc_id = 0) {
super();
super.command = Commands.kRpcGetMagicWallGridState;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
}
timestamp = 0;
}
export class RpcGetMagicWallGridStateResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
grid_showing = false;
}
export class MagicWallGridStateNotifyEntity extends PacketEntity {
grid_showing = false;
constructor() {
super();
this.command = Commands.kRpcSetMagicWallGridState;
}
}
export class RpcTestARequestEntity extends PacketEntity {
constructor(
x: number,
y: number,
w: number,
h: number,
angle: number,
rpc_id = 0
) {
super();
super.command = Commands.kRpcTestA;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.x = x ?? 0;
this.y = y ?? 0;
this.w = w ?? 0.5;
this.h = h ?? 0.5;
this.angle = angle ?? 0;
}
timestamp = 0;
x: number;
y: number;
w: number;
h: number;
angle: number;
}
export class RpcTestAResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
lt_t = 0;
lt_l = 0;
rt_t = 0;
rt_r = 0;
rb_b = 0;
rb_r = 0;
lb_b = 0;
lb_l = 0;
}
/** */
export class SetBlendingCorrectionRequestEntity extends PacketEntity {
constructor(
row: number,
column: number,
correction_type: number,
control_point: number,
x: number,
y: number,
rpc_id = 0
) {
super();
super.command = Commands.kSetBlendingCorrection;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.x = x ?? 0;
this.y = y ?? 0;
this.row = row ?? 0;
this.column = column ?? 0;
this.correction_type = correction_type ?? 0;
this.control_point = control_point ?? 0;
}
row = 0;
column = 0;
correction_type = 0; //4四点校正9曲面校正
control_point = 0; //控制点编号1开始从上到下从左到右
x = 0;
y = 0;
}
export class SetBlendingAlphaParamRequestEntity extends PacketEntity {
constructor(
row: number,
column: number,
location: number,
value: number,
rpc_id = 0
) {
super();
super.command = Commands.kSetBlendingAlphaParam;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.row = row ?? 0;
this.column = column ?? 0;
this.location = location ?? 0;
this.value = value ?? 0;
}
row = 0;
column = 0;
location = 0; //0左融合带1上融合带2右融合带3下融合带
value = 0.0;
}
export class SetBlendingPowerParamRequestEntity extends PacketEntity {
constructor(
row: number,
column: number,
location: number,
value: number,
rpc_id = 0
) {
super();
super.command = Commands.kSetBlendingPowerParam;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.row = row ?? 0;
this.column = column ?? 0;
this.location = location ?? 0;
this.value = value ?? 0;
}
row = 0;
column = 0;
location = 0; //0左融合带1上融合带2右融合带3下融合带
value = 0.0;
}
export class SetBlendingGammaParamRequestEntity extends PacketEntity {
constructor(
row: number,
column: number,
location: number,
value: number,
rpc_id = 0
) {
super();
super.command = Commands.kSetBlendingGammaParam;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.row = row ?? 0;
this.column = column ?? 0;
this.location = location ?? 0;
this.value = value ?? 0;
}
row = 0;
column = 0;
location = 0; //0左融合带1上融合带2右融合带3下融合带
value = 0.0;
}
export class EnableBlendingRequestEntity extends PacketEntity {
constructor(enable: boolean, rpc_id = 0) {
super();
super.command = Commands.kEnableBlending;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.enable = enable ?? false;
}
enable = false;
}
export class SetBlendingOverlapRequestEntity extends PacketEntity {
constructor(
row: number,
column: number,
location: number,
enable: boolean,
width: number,
rpc_id = 0
) {
super();
super.command = Commands.kSetBlendingOverlap;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.row = row ?? 0;
this.column = column ?? 0;
this.location = location ?? 0;
this.enable = enable ?? false;
this.width = width ?? 0;
}
row = 0;
column = 0;
location = 0; //0左融合带1上融合带2右融合带3下融合带
enable = false;
width = 0;
}
export class GetBlendingConfigResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
config = "";
}
export class GetBlendingConfigRequestEntity extends PacketEntity {
constructor(name: string, rpc_id = 0) {
super();
super.command = Commands.kGetBlendingConfig;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.name = name ?? "";
}
name = "";
}
export class SaveBlendingConfigResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
success = false;
}
export class SaveBlendingConfigRequestEntity extends PacketEntity {
constructor(name: string, rpc_id = 0) {
super();
super.command = Commands.kSaveBlendingConfig;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.name = name ?? "";
}
name = "";
}
}