旋钮请求更改
This commit is contained in:
parent
5313a00dc6
commit
fe56bdc27d
@ -191,7 +191,7 @@ export interface TccOperationParams {
|
||||
controlType: request.TrainControl.TrainControlType;
|
||||
controlButton?: object;
|
||||
driverKey?: object;
|
||||
dirKey?: object;
|
||||
switchKey?: object;
|
||||
handler?: object;
|
||||
}
|
||||
export async function tccOperation(params: TccOperationParams) {
|
||||
|
@ -1423,7 +1423,7 @@ export namespace request {
|
||||
controlType?: TrainControl.TrainControlType;
|
||||
controlButton?: TrainControl.ControlButton;
|
||||
driverKey?: TrainControl.DriverKeySwitch;
|
||||
dirKey?: TrainControl.DirectionKeySwitch;
|
||||
switchKey?: TrainControl.SwitchKeyChange;
|
||||
handler?: TrainControl.PushHandler;
|
||||
}) {
|
||||
super();
|
||||
@ -1447,8 +1447,8 @@ export namespace request {
|
||||
if ("driverKey" in data && data.driverKey != undefined) {
|
||||
this.driverKey = data.driverKey;
|
||||
}
|
||||
if ("dirKey" in data && data.dirKey != undefined) {
|
||||
this.dirKey = data.dirKey;
|
||||
if ("switchKey" in data && data.switchKey != undefined) {
|
||||
this.switchKey = data.switchKey;
|
||||
}
|
||||
if ("handler" in data && data.handler != undefined) {
|
||||
this.handler = data.handler;
|
||||
@ -1497,13 +1497,13 @@ export namespace request {
|
||||
get has_driverKey() {
|
||||
return pb_1.Message.getField(this, 6) != null;
|
||||
}
|
||||
get dirKey() {
|
||||
return pb_1.Message.getWrapperField(this, TrainControl.DirectionKeySwitch, 7) as TrainControl.DirectionKeySwitch;
|
||||
get switchKey() {
|
||||
return pb_1.Message.getWrapperField(this, TrainControl.SwitchKeyChange, 7) as TrainControl.SwitchKeyChange;
|
||||
}
|
||||
set dirKey(value: TrainControl.DirectionKeySwitch) {
|
||||
set switchKey(value: TrainControl.SwitchKeyChange) {
|
||||
pb_1.Message.setWrapperField(this, 7, value);
|
||||
}
|
||||
get has_dirKey() {
|
||||
get has_switchKey() {
|
||||
return pb_1.Message.getField(this, 7) != null;
|
||||
}
|
||||
get handler() {
|
||||
@ -1522,7 +1522,7 @@ export namespace request {
|
||||
controlType?: TrainControl.TrainControlType;
|
||||
controlButton?: ReturnType<typeof TrainControl.ControlButton.prototype.toObject>;
|
||||
driverKey?: ReturnType<typeof TrainControl.DriverKeySwitch.prototype.toObject>;
|
||||
dirKey?: ReturnType<typeof TrainControl.DirectionKeySwitch.prototype.toObject>;
|
||||
switchKey?: ReturnType<typeof TrainControl.SwitchKeyChange.prototype.toObject>;
|
||||
handler?: ReturnType<typeof TrainControl.PushHandler.prototype.toObject>;
|
||||
}): TrainControl {
|
||||
const message = new TrainControl({});
|
||||
@ -1544,8 +1544,8 @@ export namespace request {
|
||||
if (data.driverKey != null) {
|
||||
message.driverKey = TrainControl.DriverKeySwitch.fromObject(data.driverKey);
|
||||
}
|
||||
if (data.dirKey != null) {
|
||||
message.dirKey = TrainControl.DirectionKeySwitch.fromObject(data.dirKey);
|
||||
if (data.switchKey != null) {
|
||||
message.switchKey = TrainControl.SwitchKeyChange.fromObject(data.switchKey);
|
||||
}
|
||||
if (data.handler != null) {
|
||||
message.handler = TrainControl.PushHandler.fromObject(data.handler);
|
||||
@ -1560,7 +1560,7 @@ export namespace request {
|
||||
controlType?: TrainControl.TrainControlType;
|
||||
controlButton?: ReturnType<typeof TrainControl.ControlButton.prototype.toObject>;
|
||||
driverKey?: ReturnType<typeof TrainControl.DriverKeySwitch.prototype.toObject>;
|
||||
dirKey?: ReturnType<typeof TrainControl.DirectionKeySwitch.prototype.toObject>;
|
||||
switchKey?: ReturnType<typeof TrainControl.SwitchKeyChange.prototype.toObject>;
|
||||
handler?: ReturnType<typeof TrainControl.PushHandler.prototype.toObject>;
|
||||
} = {};
|
||||
if (this.simulationId != null) {
|
||||
@ -1581,8 +1581,8 @@ export namespace request {
|
||||
if (this.driverKey != null) {
|
||||
data.driverKey = this.driverKey.toObject();
|
||||
}
|
||||
if (this.dirKey != null) {
|
||||
data.dirKey = this.dirKey.toObject();
|
||||
if (this.switchKey != null) {
|
||||
data.switchKey = this.switchKey.toObject();
|
||||
}
|
||||
if (this.handler != null) {
|
||||
data.handler = this.handler.toObject();
|
||||
@ -1605,8 +1605,8 @@ export namespace request {
|
||||
writer.writeMessage(5, this.controlButton, () => this.controlButton.serialize(writer));
|
||||
if (this.has_driverKey)
|
||||
writer.writeMessage(6, this.driverKey, () => this.driverKey.serialize(writer));
|
||||
if (this.has_dirKey)
|
||||
writer.writeMessage(7, this.dirKey, () => this.dirKey.serialize(writer));
|
||||
if (this.has_switchKey)
|
||||
writer.writeMessage(7, this.switchKey, () => this.switchKey.serialize(writer));
|
||||
if (this.has_handler)
|
||||
writer.writeMessage(8, this.handler, () => this.handler.serialize(writer));
|
||||
if (!w)
|
||||
@ -1637,7 +1637,7 @@ export namespace request {
|
||||
reader.readMessage(message.driverKey, () => message.driverKey = TrainControl.DriverKeySwitch.deserialize(reader));
|
||||
break;
|
||||
case 7:
|
||||
reader.readMessage(message.dirKey, () => message.dirKey = TrainControl.DirectionKeySwitch.deserialize(reader));
|
||||
reader.readMessage(message.switchKey, () => message.switchKey = TrainControl.SwitchKeyChange.deserialize(reader));
|
||||
break;
|
||||
case 8:
|
||||
reader.readMessage(message.handler, () => message.handler = TrainControl.PushHandler.deserialize(reader));
|
||||
@ -1659,12 +1659,13 @@ export namespace request {
|
||||
EMERGENT_BUTTON = 0,
|
||||
DRIVER_KEY_SWITCH = 1,
|
||||
DIRECTION_KEY_SWITCH = 2,
|
||||
HANDLER = 3
|
||||
HANDLER = 3,
|
||||
TRAIN_DOOR_MODE_CHANGE = 4
|
||||
}
|
||||
export enum Direction {
|
||||
BACKWARD = 0,
|
||||
FORWARD = 1,
|
||||
NEUTRALWARD = 2
|
||||
export enum KeyLocation {
|
||||
KL_END = 0,
|
||||
KL_FONT = 1,
|
||||
KL_CENTER = 2
|
||||
}
|
||||
export class ControlButton extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
@ -1867,7 +1868,7 @@ export namespace request {
|
||||
return DriverKeySwitch.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class DirectionKeySwitch extends pb_1.Message {
|
||||
export class SwitchKeyChange extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
val?: number;
|
||||
@ -1888,8 +1889,8 @@ export namespace request {
|
||||
}
|
||||
static fromObject(data: {
|
||||
val?: number;
|
||||
}): DirectionKeySwitch {
|
||||
const message = new DirectionKeySwitch({});
|
||||
}): SwitchKeyChange {
|
||||
const message = new SwitchKeyChange({});
|
||||
if (data.val != null) {
|
||||
message.val = data.val;
|
||||
}
|
||||
@ -1913,8 +1914,8 @@ export namespace request {
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DirectionKeySwitch {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DirectionKeySwitch();
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SwitchKeyChange {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SwitchKeyChange();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
@ -1930,8 +1931,8 @@ export namespace request {
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): DirectionKeySwitch {
|
||||
return DirectionKeySwitch.deserialize(bytes);
|
||||
static deserializeBinary(bytes: Uint8Array): SwitchKeyChange {
|
||||
return SwitchKeyChange.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class PushHandler extends pb_1.Message {
|
||||
|
@ -85,7 +85,7 @@ export const useTccStore = defineStore('tcc', {
|
||||
trainId: this.tccId + '',
|
||||
deviceId: this.tccKeyDirId,
|
||||
controlType: request.TrainControl.TrainControlType.DIRECTION_KEY_SWITCH,
|
||||
dirKey: {
|
||||
switchKey: {
|
||||
val: position,
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user