diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 1ab590a..78a7e26 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1499,6 +1499,12 @@ export default class ClientConnection { ); } + public async DeleteBlendingScene(name: string) { + return await this.doRpc( + new Protocol.ApplyBlendingSceneRequestEntity(name) + ); + } + public destory() { this.ws?.close(); if (this.ws) { diff --git a/src/entities/WSProtocol.ts b/src/entities/WSProtocol.ts index fc74613..f327322 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -532,6 +532,9 @@ export namespace Protocol { public static get kApplyBlendingScene() { return Commands.PROTOCOL_PREFIX + "ApplyBlendingScene"; } + public static get kDeleteBlendingScene() { + return Commands.PROTOCOL_PREFIX + "DeleteBlendingScene"; + } static _all_commands = new Set([ Commands.kUnKnowCommand, @@ -667,6 +670,7 @@ export namespace Protocol { Commands.kSetBlendingOption, Commands.kEnumBlendingScene, Commands.kApplyBlendingScene, + Commands.kDeleteBlendingScene, ]); public static get AllCommands() { return this._all_commands; @@ -3223,6 +3227,15 @@ export namespace Protocol { lb_l = 0; } + export class RpcBlendingResponseEntity extends PacketEntity { + constructor() { + super(); + super.flag = PacketEntity.FLAG_RESPONSE; + } + + success = false; + } + /** */ export class SetBlendingCorrectionRequestEntity extends PacketEntity { constructor( @@ -3527,4 +3540,19 @@ export namespace Protocol { } name; } + + export class DeleteBlendingSceneRequestEntity extends PacketEntity { + constructor( + name: string, + rpc_id = 0 + ) { + super(); + super.command = Commands.kDeleteBlendingScene; + super.flag = PacketEntity.FLAG_REQUEST; + super.rpc_id = rpc_id; + + this.name = name ?? ""; + } + name; + } }