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