增加删除融合场景接口

This commit is contained in:
ljqing 2023-02-02 09:38:36 +08:00
parent 361c2c06c5
commit deeb73cf26
2 changed files with 34 additions and 0 deletions

View File

@ -1499,6 +1499,12 @@ export default class ClientConnection {
);
}
public async DeleteBlendingScene(name: string) {
return await this.doRpc<Protocol.RpcBlendingResponseEntity>(
new Protocol.ApplyBlendingSceneRequestEntity(name)
);
}
public destory() {
this.ws?.close();
if (this.ws) {

View File

@ -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;
}
}