增加setBlendingGammaParam,setBlendingPowerParam,setBlendingAlphaParam,setBlendingCorrection协议
This commit is contained in:
parent
959235bc33
commit
c692cab4c9
|
@ -1253,10 +1253,16 @@ export default class ClientConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async testA() {
|
public async testA(
|
||||||
|
x: number,
|
||||||
|
y: number,
|
||||||
|
w: number,
|
||||||
|
h: number,
|
||||||
|
angle: number
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
return await this.doRpc<Protocol.RpcTestAResponseEntity>(
|
return await this.doRpc<Protocol.RpcTestAResponseEntity>(
|
||||||
new Protocol.RpcTestARequestEntity()
|
new Protocol.RpcTestARequestEntity(x, y, w, h, angle)
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -1313,6 +1319,74 @@ export default class ClientConnection {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async setBlendingCorrection(
|
||||||
|
row: number,
|
||||||
|
column: number,
|
||||||
|
correction_type: number,
|
||||||
|
control_point: number,
|
||||||
|
x: number,
|
||||||
|
y: number
|
||||||
|
) {
|
||||||
|
return await this.doRpc<Protocol.NoneResponse>(
|
||||||
|
new Protocol.SetBlendingCorrectionRequestEntity(
|
||||||
|
row,
|
||||||
|
column,
|
||||||
|
correction_type,
|
||||||
|
control_point,
|
||||||
|
x,
|
||||||
|
y
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setBlendingAlphaParam(
|
||||||
|
row: number,
|
||||||
|
column: number,
|
||||||
|
location: number,
|
||||||
|
value: number
|
||||||
|
) {
|
||||||
|
return await this.doRpc<Protocol.NoneResponse>(
|
||||||
|
new Protocol.SetBlendingAlphaParamRequestEntity(
|
||||||
|
row,
|
||||||
|
column,
|
||||||
|
location,
|
||||||
|
value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setBlendingPowerParam(
|
||||||
|
row: number,
|
||||||
|
column: number,
|
||||||
|
location: number,
|
||||||
|
value: number
|
||||||
|
) {
|
||||||
|
return await this.doRpc<Protocol.NoneResponse>(
|
||||||
|
new Protocol.SetBlendingPowerParamRequestEntity(
|
||||||
|
row,
|
||||||
|
column,
|
||||||
|
location,
|
||||||
|
value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setBlendingGammaParam(
|
||||||
|
row: number,
|
||||||
|
column: number,
|
||||||
|
location: number,
|
||||||
|
value: number
|
||||||
|
) {
|
||||||
|
return await this.doRpc<Protocol.NoneResponse>(
|
||||||
|
new Protocol.SetBlendingGammaParamRequestEntity(
|
||||||
|
row,
|
||||||
|
column,
|
||||||
|
location,
|
||||||
|
value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public destory() {
|
public destory() {
|
||||||
this.ws?.close();
|
this.ws?.close();
|
||||||
if (this.ws) {
|
if (this.ws) {
|
||||||
|
|
|
@ -487,6 +487,19 @@ export namespace Protocol {
|
||||||
return Commands.PROTOCOL_PREFIX + "RpcTestA";
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
static _all_commands = new Set([
|
static _all_commands = new Set([
|
||||||
Commands.kUnKnowCommand,
|
Commands.kUnKnowCommand,
|
||||||
Commands.kSearchDevice,
|
Commands.kSearchDevice,
|
||||||
|
@ -606,6 +619,10 @@ export namespace Protocol {
|
||||||
Commands.kRpcGetMagicWallConfig,
|
Commands.kRpcGetMagicWallConfig,
|
||||||
Commands.kRpcSetMagicWallConfig,
|
Commands.kRpcSetMagicWallConfig,
|
||||||
Commands.kRpcTestA,
|
Commands.kRpcTestA,
|
||||||
|
Commands.kSetBlendingCorrection,
|
||||||
|
Commands.kSetBlendingAlphaParam,
|
||||||
|
Commands.kSetBlendingPowerParam,
|
||||||
|
Commands.kSetBlendingGammaParam,
|
||||||
]);
|
]);
|
||||||
public static get AllCommands() {
|
public static get AllCommands() {
|
||||||
return this._all_commands;
|
return this._all_commands;
|
||||||
|
@ -3095,13 +3112,32 @@ export namespace Protocol {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RpcTestARequestEntity extends PacketEntity {
|
export class RpcTestARequestEntity extends PacketEntity {
|
||||||
constructor(rpc_id = 0) {
|
constructor(
|
||||||
|
x: number,
|
||||||
|
y: number,
|
||||||
|
w: number,
|
||||||
|
h: number,
|
||||||
|
angle: number,
|
||||||
|
rpc_id = 0
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
super.command = Commands.kRpcTestA;
|
super.command = Commands.kRpcTestA;
|
||||||
super.flag = PacketEntity.FLAG_REQUEST;
|
super.flag = PacketEntity.FLAG_REQUEST;
|
||||||
super.rpc_id = rpc_id;
|
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;
|
timestamp = 0;
|
||||||
|
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
w: number;
|
||||||
|
h: number;
|
||||||
|
angle: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RpcTestAResponseEntity extends PacketEntity {
|
export class RpcTestAResponseEntity extends PacketEntity {
|
||||||
|
@ -3118,4 +3154,107 @@ export namespace Protocol {
|
||||||
lb_b = 0;
|
lb_b = 0;
|
||||||
lb_l = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue