Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
CI / Docker-Build (push) Successful in 7m21s
All checks were successful
CI / Docker-Build (push) Successful in 7m21s
This commit is contained in:
commit
1181bfd270
@ -1 +1 @@
|
|||||||
Subproject commit ed8426685101b9c8e6ba72d15ca3b6d035110375
|
Subproject commit 2f5d8c3cfdf06ced1a0b0a50f47f9353c441e196
|
@ -442,6 +442,7 @@ export async function updateTrainConn(data: {
|
|||||||
id: string;
|
id: string;
|
||||||
simulationId: string;
|
simulationId: string;
|
||||||
connType: number;
|
connType: number;
|
||||||
|
typeName: string;
|
||||||
}) {
|
}) {
|
||||||
return await api.post(`${UriBase}/train/conn`, data);
|
return await api.post(`${UriBase}/train/conn`, data);
|
||||||
}
|
}
|
||||||
@ -473,9 +474,6 @@ export async function xcjUpdateParams(data: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 列车取消连接 */
|
/** 列车取消连接 */
|
||||||
export async function cancelTrainConn(data: {
|
export async function cancelTrainConn(data: { trainId: string; id: string }) {
|
||||||
trainId: string;
|
|
||||||
id: string;
|
|
||||||
}) {
|
|
||||||
return await api.delete(`${UriBase}/train/unconn/${data.trainId}/${data.id}`);
|
return await api.delete(`${UriBase}/train/unconn/${data.trainId}/${data.id}`);
|
||||||
}
|
}
|
||||||
|
@ -53,26 +53,23 @@ const props = defineProps({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const connType = ref<number | undefined>();
|
const connType = ref<string | undefined>();
|
||||||
const connectOptions = ref<{ label: string; value: number }[]>([]);
|
const connectOptions = ref<{ label: string; value: string }[]>([]);
|
||||||
|
|
||||||
const showLoadTransData = ref(true);
|
const showLoadTransData = ref(true);
|
||||||
|
const connectMap = new Map<string, number>();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
connectOptions.value = [];
|
connectOptions.value = [];
|
||||||
getCanLinkPlatForm(props.simulationId)
|
getCanLinkPlatForm(props.simulationId)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
const list: { label: string; value: number }[] = [];
|
const list: { label: string; value: string }[] = [];
|
||||||
resp.data.forEach((element: { connType: number }) => {
|
resp.data.forEach((element: { typeName: string; connType: number }) => {
|
||||||
if (element.connType === 1) {
|
list.push({
|
||||||
list.push({ label: '半实物', value: 1 });
|
label: element.typeName,
|
||||||
} else if (element.connType === 3) {
|
value: element.typeName,
|
||||||
list.push({ label: 'PC仿真A', value: 3 });
|
});
|
||||||
// } else if (element.connType === 0) {
|
connectMap.set(element.typeName, element.connType);
|
||||||
// list.push({ label: '取消连接', value: 0 });
|
|
||||||
} else if (element.connType === 4) {
|
|
||||||
list.push({ label: 'PC仿真B', value: 4 });
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
connectOptions.value = list;
|
connectOptions.value = list;
|
||||||
})
|
})
|
||||||
@ -87,7 +84,8 @@ function onCreate() {
|
|||||||
updateTrainConn({
|
updateTrainConn({
|
||||||
id: props.trainId + '',
|
id: props.trainId + '',
|
||||||
simulationId: props.simulationId,
|
simulationId: props.simulationId,
|
||||||
connType: connType.value as number,
|
connType: connectMap.get(connType.value as string) || 0,
|
||||||
|
typeName: connType.value as string,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
successNotify('列车连接成功!');
|
successNotify('列车连接成功!');
|
||||||
|
@ -57,6 +57,12 @@ const columns: QTable['columns'] = [
|
|||||||
field: (row) => (row.state == 0 ? '正常' : '异常'),
|
field: (row) => (row.state == 0 ? '正常' : '异常'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'serviceName',
|
||||||
|
label: '服务描述',
|
||||||
|
field: 'serviceName',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
const rows = ref<state.SimulationThirdPartyApiServiceState[]>([]);
|
const rows = ref<state.SimulationThirdPartyApiServiceState[]>([]);
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ const trainInfo = ref<ITrainState | null>();
|
|||||||
const list: KeyType[] = [
|
const list: KeyType[] = [
|
||||||
{ label: '列车索引', key: 'id' },
|
{ label: '列车索引', key: 'id' },
|
||||||
{ label: '连接状态', key: 'conn', formatFn: connStateFormat },
|
{ label: '连接状态', key: 'conn', formatFn: connStateFormat },
|
||||||
{ label: '连接平台', key: 'connType', formatFn: connTypeFormat },
|
{ label: '连接平台', key: 'typeName', formatFn: typeNameFormat },
|
||||||
{ label: '列车长度', key: 'trainLength', formatFn: trainLengthFormat },
|
{ label: '列车长度', key: 'trainLength', formatFn: trainLengthFormat },
|
||||||
{ label: '车头所在设备', key: 'headDeviceId', formatFn: getDeviveName },
|
{ label: '车头所在设备', key: 'headDeviceId', formatFn: getDeviveName },
|
||||||
{ label: '车头所在设备的偏移量', key: 'headOffset', formatFn: offsetFormat },
|
{ label: '车头所在设备的偏移量', key: 'headOffset', formatFn: offsetFormat },
|
||||||
@ -457,18 +457,19 @@ function connStateFormat(v: boolean) {
|
|||||||
}
|
}
|
||||||
// PC_SIM_A = 3; //PC仿真
|
// PC_SIM_A = 3; //PC仿真
|
||||||
// PC_SIM_B = 4; //PC仿真
|
// PC_SIM_B = 4; //PC仿真
|
||||||
function connTypeFormat(v: state.TrainConnState.TrainConnType) {
|
function typeNameFormat(v: string) {
|
||||||
if (v === state.TrainConnState.TrainConnType.NONE) {
|
return v;
|
||||||
return '无';
|
// if (v === state.TrainConnState.TrainConnType.NONE) {
|
||||||
} else if (v === state.TrainConnState.TrainConnType.PC_SIM_A) {
|
// return '无';
|
||||||
return 'PC仿真A';
|
// } else if (v === state.TrainConnState.TrainConnType.PC_SIM_A) {
|
||||||
} else if (v === state.TrainConnState.TrainConnType.VOBC) {
|
// return 'PC仿真A';
|
||||||
return '半实物';
|
// } else if (v === state.TrainConnState.TrainConnType.VOBC) {
|
||||||
} else if (v === state.TrainConnState.TrainConnType.PC_SIM_B) {
|
// return '半实物';
|
||||||
return 'PC仿真B';
|
// } else if (v === state.TrainConnState.TrainConnType.PC_SIM_B) {
|
||||||
} else {
|
// return 'PC仿真B';
|
||||||
return '无';
|
// } else {
|
||||||
}
|
// return '无';
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
function floatDecimal(v: number, x = 2) {
|
function floatDecimal(v: number, x = 2) {
|
||||||
// 小数精确位数
|
// 小数精确位数
|
||||||
|
@ -673,6 +673,12 @@ export class TrainState extends GraphicStateBase implements ITrainState {
|
|||||||
set connType(v: state.TrainConnState.TrainConnType) {
|
set connType(v: state.TrainConnState.TrainConnType) {
|
||||||
this.states.connState.connType = v;
|
this.states.connState.connType = v;
|
||||||
}
|
}
|
||||||
|
get typeName(): string {
|
||||||
|
return this.states.connState.typeName;
|
||||||
|
}
|
||||||
|
set typeName(v: string) {
|
||||||
|
this.states.connState.typeName = v;
|
||||||
|
}
|
||||||
get trainControlMapId(): number {
|
get trainControlMapId(): number {
|
||||||
return this.states.connState.TrainControlMapId;
|
return this.states.connState.TrainControlMapId;
|
||||||
}
|
}
|
||||||
|
@ -240,6 +240,8 @@ export interface ITrainState extends GraphicState {
|
|||||||
set conn(v: boolean);
|
set conn(v: boolean);
|
||||||
get connType(): state.TrainConnState.TrainConnType;
|
get connType(): state.TrainConnState.TrainConnType;
|
||||||
set connType(v: state.TrainConnState.TrainConnType);
|
set connType(v: state.TrainConnState.TrainConnType);
|
||||||
|
get typeName(): string;
|
||||||
|
set typeName(v: string);
|
||||||
get trainControlMapId(): number;
|
get trainControlMapId(): number;
|
||||||
}
|
}
|
||||||
interface bodyWH {
|
interface bodyWH {
|
||||||
|
@ -1021,6 +1021,7 @@ export namespace state {
|
|||||||
conn?: boolean;
|
conn?: boolean;
|
||||||
connType?: TrainConnState.TrainConnType;
|
connType?: TrainConnState.TrainConnType;
|
||||||
TrainControlMapId?: number;
|
TrainControlMapId?: number;
|
||||||
|
typeName?: string;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -1034,6 +1035,9 @@ export namespace state {
|
|||||||
if ("TrainControlMapId" in data && data.TrainControlMapId != undefined) {
|
if ("TrainControlMapId" in data && data.TrainControlMapId != undefined) {
|
||||||
this.TrainControlMapId = data.TrainControlMapId;
|
this.TrainControlMapId = data.TrainControlMapId;
|
||||||
}
|
}
|
||||||
|
if ("typeName" in data && data.typeName != undefined) {
|
||||||
|
this.typeName = data.typeName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get conn() {
|
get conn() {
|
||||||
@ -1054,10 +1058,17 @@ export namespace state {
|
|||||||
set TrainControlMapId(value: number) {
|
set TrainControlMapId(value: number) {
|
||||||
pb_1.Message.setField(this, 3, value);
|
pb_1.Message.setField(this, 3, value);
|
||||||
}
|
}
|
||||||
|
get typeName() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
||||||
|
}
|
||||||
|
set typeName(value: string) {
|
||||||
|
pb_1.Message.setField(this, 4, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
conn?: boolean;
|
conn?: boolean;
|
||||||
connType?: TrainConnState.TrainConnType;
|
connType?: TrainConnState.TrainConnType;
|
||||||
TrainControlMapId?: number;
|
TrainControlMapId?: number;
|
||||||
|
typeName?: string;
|
||||||
}): TrainConnState {
|
}): TrainConnState {
|
||||||
const message = new TrainConnState({});
|
const message = new TrainConnState({});
|
||||||
if (data.conn != null) {
|
if (data.conn != null) {
|
||||||
@ -1069,6 +1080,9 @@ export namespace state {
|
|||||||
if (data.TrainControlMapId != null) {
|
if (data.TrainControlMapId != null) {
|
||||||
message.TrainControlMapId = data.TrainControlMapId;
|
message.TrainControlMapId = data.TrainControlMapId;
|
||||||
}
|
}
|
||||||
|
if (data.typeName != null) {
|
||||||
|
message.typeName = data.typeName;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -1076,6 +1090,7 @@ export namespace state {
|
|||||||
conn?: boolean;
|
conn?: boolean;
|
||||||
connType?: TrainConnState.TrainConnType;
|
connType?: TrainConnState.TrainConnType;
|
||||||
TrainControlMapId?: number;
|
TrainControlMapId?: number;
|
||||||
|
typeName?: string;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.conn != null) {
|
if (this.conn != null) {
|
||||||
data.conn = this.conn;
|
data.conn = this.conn;
|
||||||
@ -1086,6 +1101,9 @@ export namespace state {
|
|||||||
if (this.TrainControlMapId != null) {
|
if (this.TrainControlMapId != null) {
|
||||||
data.TrainControlMapId = this.TrainControlMapId;
|
data.TrainControlMapId = this.TrainControlMapId;
|
||||||
}
|
}
|
||||||
|
if (this.typeName != null) {
|
||||||
|
data.typeName = this.typeName;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -1098,6 +1116,8 @@ export namespace state {
|
|||||||
writer.writeEnum(2, this.connType);
|
writer.writeEnum(2, this.connType);
|
||||||
if (this.TrainControlMapId != 0)
|
if (this.TrainControlMapId != 0)
|
||||||
writer.writeUint32(3, this.TrainControlMapId);
|
writer.writeUint32(3, this.TrainControlMapId);
|
||||||
|
if (this.typeName.length)
|
||||||
|
writer.writeString(4, this.typeName);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -1116,6 +1136,9 @@ export namespace state {
|
|||||||
case 3:
|
case 3:
|
||||||
message.TrainControlMapId = reader.readUint32();
|
message.TrainControlMapId = reader.readUint32();
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
message.typeName = reader.readString();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1132,9 +1155,7 @@ export namespace state {
|
|||||||
export enum TrainConnType {
|
export enum TrainConnType {
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
VOBC = 1,
|
VOBC = 1,
|
||||||
PC_SIM = 2,
|
PC_SIM = 2
|
||||||
PC_SIM_A = 3,
|
|
||||||
PC_SIM_B = 4
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class TrainState extends pb_1.Message {
|
export class TrainState extends pb_1.Message {
|
||||||
@ -2953,11 +2974,9 @@ export namespace state {
|
|||||||
confirmBtn?: boolean;
|
confirmBtn?: boolean;
|
||||||
modeLevelUpBtn?: boolean;
|
modeLevelUpBtn?: boolean;
|
||||||
atoSendTrainBtn?: boolean;
|
atoSendTrainBtn?: boolean;
|
||||||
trainIntegrity?: boolean;
|
|
||||||
atpOrAtoBypassState?: boolean;
|
atpOrAtoBypassState?: boolean;
|
||||||
trainTractionCuted?: boolean;
|
trainTractionCuted?: boolean;
|
||||||
obstacleCheckBtn?: boolean;
|
obstacleCheckBtn?: boolean;
|
||||||
driverActiveReportBtn?: boolean;
|
|
||||||
brakeHeavyFault?: boolean;
|
brakeHeavyFault?: boolean;
|
||||||
leftDoorState?: boolean;
|
leftDoorState?: boolean;
|
||||||
rightDoorState?: boolean;
|
rightDoorState?: boolean;
|
||||||
@ -2973,7 +2992,6 @@ export namespace state {
|
|||||||
doorModeAA?: boolean;
|
doorModeAA?: boolean;
|
||||||
doorModeAM?: boolean;
|
doorModeAM?: boolean;
|
||||||
doorModeMM?: boolean;
|
doorModeMM?: boolean;
|
||||||
outerEmergentBrakeReport?: boolean;
|
|
||||||
trainDoorOutLed?: boolean;
|
trainDoorOutLed?: boolean;
|
||||||
localAtpControl?: boolean;
|
localAtpControl?: boolean;
|
||||||
atoBrakeCommand?: boolean;
|
atoBrakeCommand?: boolean;
|
||||||
@ -2997,6 +3015,11 @@ export namespace state {
|
|||||||
atoTractionCommand3?: boolean;
|
atoTractionCommand3?: boolean;
|
||||||
mockInfo?: number;
|
mockInfo?: number;
|
||||||
atpCutSwitch?: boolean;
|
atpCutSwitch?: boolean;
|
||||||
|
lightEmergencyBrakingStatus?: boolean;
|
||||||
|
lightTractionSafetyCircuit?: boolean;
|
||||||
|
lightDir1?: boolean;
|
||||||
|
lightDir2?: boolean;
|
||||||
|
lightDriverActive?: boolean;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -3094,9 +3117,6 @@ export namespace state {
|
|||||||
if ("atoSendTrainBtn" in data && data.atoSendTrainBtn != undefined) {
|
if ("atoSendTrainBtn" in data && data.atoSendTrainBtn != undefined) {
|
||||||
this.atoSendTrainBtn = data.atoSendTrainBtn;
|
this.atoSendTrainBtn = data.atoSendTrainBtn;
|
||||||
}
|
}
|
||||||
if ("trainIntegrity" in data && data.trainIntegrity != undefined) {
|
|
||||||
this.trainIntegrity = data.trainIntegrity;
|
|
||||||
}
|
|
||||||
if ("atpOrAtoBypassState" in data && data.atpOrAtoBypassState != undefined) {
|
if ("atpOrAtoBypassState" in data && data.atpOrAtoBypassState != undefined) {
|
||||||
this.atpOrAtoBypassState = data.atpOrAtoBypassState;
|
this.atpOrAtoBypassState = data.atpOrAtoBypassState;
|
||||||
}
|
}
|
||||||
@ -3106,9 +3126,6 @@ export namespace state {
|
|||||||
if ("obstacleCheckBtn" in data && data.obstacleCheckBtn != undefined) {
|
if ("obstacleCheckBtn" in data && data.obstacleCheckBtn != undefined) {
|
||||||
this.obstacleCheckBtn = data.obstacleCheckBtn;
|
this.obstacleCheckBtn = data.obstacleCheckBtn;
|
||||||
}
|
}
|
||||||
if ("driverActiveReportBtn" in data && data.driverActiveReportBtn != undefined) {
|
|
||||||
this.driverActiveReportBtn = data.driverActiveReportBtn;
|
|
||||||
}
|
|
||||||
if ("brakeHeavyFault" in data && data.brakeHeavyFault != undefined) {
|
if ("brakeHeavyFault" in data && data.brakeHeavyFault != undefined) {
|
||||||
this.brakeHeavyFault = data.brakeHeavyFault;
|
this.brakeHeavyFault = data.brakeHeavyFault;
|
||||||
}
|
}
|
||||||
@ -3154,9 +3171,6 @@ export namespace state {
|
|||||||
if ("doorModeMM" in data && data.doorModeMM != undefined) {
|
if ("doorModeMM" in data && data.doorModeMM != undefined) {
|
||||||
this.doorModeMM = data.doorModeMM;
|
this.doorModeMM = data.doorModeMM;
|
||||||
}
|
}
|
||||||
if ("outerEmergentBrakeReport" in data && data.outerEmergentBrakeReport != undefined) {
|
|
||||||
this.outerEmergentBrakeReport = data.outerEmergentBrakeReport;
|
|
||||||
}
|
|
||||||
if ("trainDoorOutLed" in data && data.trainDoorOutLed != undefined) {
|
if ("trainDoorOutLed" in data && data.trainDoorOutLed != undefined) {
|
||||||
this.trainDoorOutLed = data.trainDoorOutLed;
|
this.trainDoorOutLed = data.trainDoorOutLed;
|
||||||
}
|
}
|
||||||
@ -3226,6 +3240,21 @@ export namespace state {
|
|||||||
if ("atpCutSwitch" in data && data.atpCutSwitch != undefined) {
|
if ("atpCutSwitch" in data && data.atpCutSwitch != undefined) {
|
||||||
this.atpCutSwitch = data.atpCutSwitch;
|
this.atpCutSwitch = data.atpCutSwitch;
|
||||||
}
|
}
|
||||||
|
if ("lightEmergencyBrakingStatus" in data && data.lightEmergencyBrakingStatus != undefined) {
|
||||||
|
this.lightEmergencyBrakingStatus = data.lightEmergencyBrakingStatus;
|
||||||
|
}
|
||||||
|
if ("lightTractionSafetyCircuit" in data && data.lightTractionSafetyCircuit != undefined) {
|
||||||
|
this.lightTractionSafetyCircuit = data.lightTractionSafetyCircuit;
|
||||||
|
}
|
||||||
|
if ("lightDir1" in data && data.lightDir1 != undefined) {
|
||||||
|
this.lightDir1 = data.lightDir1;
|
||||||
|
}
|
||||||
|
if ("lightDir2" in data && data.lightDir2 != undefined) {
|
||||||
|
this.lightDir2 = data.lightDir2;
|
||||||
|
}
|
||||||
|
if ("lightDriverActive" in data && data.lightDriverActive != undefined) {
|
||||||
|
this.lightDriverActive = data.lightDriverActive;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get lifeSignal() {
|
get lifeSignal() {
|
||||||
@ -3414,12 +3443,6 @@ export namespace state {
|
|||||||
set atoSendTrainBtn(value: boolean) {
|
set atoSendTrainBtn(value: boolean) {
|
||||||
pb_1.Message.setField(this, 31, value);
|
pb_1.Message.setField(this, 31, value);
|
||||||
}
|
}
|
||||||
get trainIntegrity() {
|
|
||||||
return pb_1.Message.getFieldWithDefault(this, 32, false) as boolean;
|
|
||||||
}
|
|
||||||
set trainIntegrity(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 32, value);
|
|
||||||
}
|
|
||||||
get atpOrAtoBypassState() {
|
get atpOrAtoBypassState() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean;
|
||||||
}
|
}
|
||||||
@ -3438,12 +3461,6 @@ export namespace state {
|
|||||||
set obstacleCheckBtn(value: boolean) {
|
set obstacleCheckBtn(value: boolean) {
|
||||||
pb_1.Message.setField(this, 35, value);
|
pb_1.Message.setField(this, 35, value);
|
||||||
}
|
}
|
||||||
get driverActiveReportBtn() {
|
|
||||||
return pb_1.Message.getFieldWithDefault(this, 36, false) as boolean;
|
|
||||||
}
|
|
||||||
set driverActiveReportBtn(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 36, value);
|
|
||||||
}
|
|
||||||
get brakeHeavyFault() {
|
get brakeHeavyFault() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 37, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 37, false) as boolean;
|
||||||
}
|
}
|
||||||
@ -3534,12 +3551,6 @@ export namespace state {
|
|||||||
set doorModeMM(value: boolean) {
|
set doorModeMM(value: boolean) {
|
||||||
pb_1.Message.setField(this, 51, value);
|
pb_1.Message.setField(this, 51, value);
|
||||||
}
|
}
|
||||||
get outerEmergentBrakeReport() {
|
|
||||||
return pb_1.Message.getFieldWithDefault(this, 52, false) as boolean;
|
|
||||||
}
|
|
||||||
set outerEmergentBrakeReport(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 52, value);
|
|
||||||
}
|
|
||||||
get trainDoorOutLed() {
|
get trainDoorOutLed() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 53, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 53, false) as boolean;
|
||||||
}
|
}
|
||||||
@ -3678,6 +3689,36 @@ export namespace state {
|
|||||||
set atpCutSwitch(value: boolean) {
|
set atpCutSwitch(value: boolean) {
|
||||||
pb_1.Message.setField(this, 76, value);
|
pb_1.Message.setField(this, 76, value);
|
||||||
}
|
}
|
||||||
|
get lightEmergencyBrakingStatus() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 77, false) as boolean;
|
||||||
|
}
|
||||||
|
set lightEmergencyBrakingStatus(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 77, value);
|
||||||
|
}
|
||||||
|
get lightTractionSafetyCircuit() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 78, false) as boolean;
|
||||||
|
}
|
||||||
|
set lightTractionSafetyCircuit(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 78, value);
|
||||||
|
}
|
||||||
|
get lightDir1() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 79, false) as boolean;
|
||||||
|
}
|
||||||
|
set lightDir1(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 79, value);
|
||||||
|
}
|
||||||
|
get lightDir2() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 80, false) as boolean;
|
||||||
|
}
|
||||||
|
set lightDir2(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 80, value);
|
||||||
|
}
|
||||||
|
get lightDriverActive() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 81, false) as boolean;
|
||||||
|
}
|
||||||
|
set lightDriverActive(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 81, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
lifeSignal?: number;
|
lifeSignal?: number;
|
||||||
tc1Active?: boolean;
|
tc1Active?: boolean;
|
||||||
@ -3710,11 +3751,9 @@ export namespace state {
|
|||||||
confirmBtn?: boolean;
|
confirmBtn?: boolean;
|
||||||
modeLevelUpBtn?: boolean;
|
modeLevelUpBtn?: boolean;
|
||||||
atoSendTrainBtn?: boolean;
|
atoSendTrainBtn?: boolean;
|
||||||
trainIntegrity?: boolean;
|
|
||||||
atpOrAtoBypassState?: boolean;
|
atpOrAtoBypassState?: boolean;
|
||||||
trainTractionCuted?: boolean;
|
trainTractionCuted?: boolean;
|
||||||
obstacleCheckBtn?: boolean;
|
obstacleCheckBtn?: boolean;
|
||||||
driverActiveReportBtn?: boolean;
|
|
||||||
brakeHeavyFault?: boolean;
|
brakeHeavyFault?: boolean;
|
||||||
leftDoorState?: boolean;
|
leftDoorState?: boolean;
|
||||||
rightDoorState?: boolean;
|
rightDoorState?: boolean;
|
||||||
@ -3730,7 +3769,6 @@ export namespace state {
|
|||||||
doorModeAA?: boolean;
|
doorModeAA?: boolean;
|
||||||
doorModeAM?: boolean;
|
doorModeAM?: boolean;
|
||||||
doorModeMM?: boolean;
|
doorModeMM?: boolean;
|
||||||
outerEmergentBrakeReport?: boolean;
|
|
||||||
trainDoorOutLed?: boolean;
|
trainDoorOutLed?: boolean;
|
||||||
localAtpControl?: boolean;
|
localAtpControl?: boolean;
|
||||||
atoBrakeCommand?: boolean;
|
atoBrakeCommand?: boolean;
|
||||||
@ -3754,6 +3792,11 @@ export namespace state {
|
|||||||
atoTractionCommand3?: boolean;
|
atoTractionCommand3?: boolean;
|
||||||
mockInfo?: number;
|
mockInfo?: number;
|
||||||
atpCutSwitch?: boolean;
|
atpCutSwitch?: boolean;
|
||||||
|
lightEmergencyBrakingStatus?: boolean;
|
||||||
|
lightTractionSafetyCircuit?: boolean;
|
||||||
|
lightDir1?: boolean;
|
||||||
|
lightDir2?: boolean;
|
||||||
|
lightDriverActive?: boolean;
|
||||||
}): TrainVobcState {
|
}): TrainVobcState {
|
||||||
const message = new TrainVobcState({});
|
const message = new TrainVobcState({});
|
||||||
if (data.lifeSignal != null) {
|
if (data.lifeSignal != null) {
|
||||||
@ -3849,9 +3892,6 @@ export namespace state {
|
|||||||
if (data.atoSendTrainBtn != null) {
|
if (data.atoSendTrainBtn != null) {
|
||||||
message.atoSendTrainBtn = data.atoSendTrainBtn;
|
message.atoSendTrainBtn = data.atoSendTrainBtn;
|
||||||
}
|
}
|
||||||
if (data.trainIntegrity != null) {
|
|
||||||
message.trainIntegrity = data.trainIntegrity;
|
|
||||||
}
|
|
||||||
if (data.atpOrAtoBypassState != null) {
|
if (data.atpOrAtoBypassState != null) {
|
||||||
message.atpOrAtoBypassState = data.atpOrAtoBypassState;
|
message.atpOrAtoBypassState = data.atpOrAtoBypassState;
|
||||||
}
|
}
|
||||||
@ -3861,9 +3901,6 @@ export namespace state {
|
|||||||
if (data.obstacleCheckBtn != null) {
|
if (data.obstacleCheckBtn != null) {
|
||||||
message.obstacleCheckBtn = data.obstacleCheckBtn;
|
message.obstacleCheckBtn = data.obstacleCheckBtn;
|
||||||
}
|
}
|
||||||
if (data.driverActiveReportBtn != null) {
|
|
||||||
message.driverActiveReportBtn = data.driverActiveReportBtn;
|
|
||||||
}
|
|
||||||
if (data.brakeHeavyFault != null) {
|
if (data.brakeHeavyFault != null) {
|
||||||
message.brakeHeavyFault = data.brakeHeavyFault;
|
message.brakeHeavyFault = data.brakeHeavyFault;
|
||||||
}
|
}
|
||||||
@ -3909,9 +3946,6 @@ export namespace state {
|
|||||||
if (data.doorModeMM != null) {
|
if (data.doorModeMM != null) {
|
||||||
message.doorModeMM = data.doorModeMM;
|
message.doorModeMM = data.doorModeMM;
|
||||||
}
|
}
|
||||||
if (data.outerEmergentBrakeReport != null) {
|
|
||||||
message.outerEmergentBrakeReport = data.outerEmergentBrakeReport;
|
|
||||||
}
|
|
||||||
if (data.trainDoorOutLed != null) {
|
if (data.trainDoorOutLed != null) {
|
||||||
message.trainDoorOutLed = data.trainDoorOutLed;
|
message.trainDoorOutLed = data.trainDoorOutLed;
|
||||||
}
|
}
|
||||||
@ -3981,6 +4015,21 @@ export namespace state {
|
|||||||
if (data.atpCutSwitch != null) {
|
if (data.atpCutSwitch != null) {
|
||||||
message.atpCutSwitch = data.atpCutSwitch;
|
message.atpCutSwitch = data.atpCutSwitch;
|
||||||
}
|
}
|
||||||
|
if (data.lightEmergencyBrakingStatus != null) {
|
||||||
|
message.lightEmergencyBrakingStatus = data.lightEmergencyBrakingStatus;
|
||||||
|
}
|
||||||
|
if (data.lightTractionSafetyCircuit != null) {
|
||||||
|
message.lightTractionSafetyCircuit = data.lightTractionSafetyCircuit;
|
||||||
|
}
|
||||||
|
if (data.lightDir1 != null) {
|
||||||
|
message.lightDir1 = data.lightDir1;
|
||||||
|
}
|
||||||
|
if (data.lightDir2 != null) {
|
||||||
|
message.lightDir2 = data.lightDir2;
|
||||||
|
}
|
||||||
|
if (data.lightDriverActive != null) {
|
||||||
|
message.lightDriverActive = data.lightDriverActive;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -4016,11 +4065,9 @@ export namespace state {
|
|||||||
confirmBtn?: boolean;
|
confirmBtn?: boolean;
|
||||||
modeLevelUpBtn?: boolean;
|
modeLevelUpBtn?: boolean;
|
||||||
atoSendTrainBtn?: boolean;
|
atoSendTrainBtn?: boolean;
|
||||||
trainIntegrity?: boolean;
|
|
||||||
atpOrAtoBypassState?: boolean;
|
atpOrAtoBypassState?: boolean;
|
||||||
trainTractionCuted?: boolean;
|
trainTractionCuted?: boolean;
|
||||||
obstacleCheckBtn?: boolean;
|
obstacleCheckBtn?: boolean;
|
||||||
driverActiveReportBtn?: boolean;
|
|
||||||
brakeHeavyFault?: boolean;
|
brakeHeavyFault?: boolean;
|
||||||
leftDoorState?: boolean;
|
leftDoorState?: boolean;
|
||||||
rightDoorState?: boolean;
|
rightDoorState?: boolean;
|
||||||
@ -4036,7 +4083,6 @@ export namespace state {
|
|||||||
doorModeAA?: boolean;
|
doorModeAA?: boolean;
|
||||||
doorModeAM?: boolean;
|
doorModeAM?: boolean;
|
||||||
doorModeMM?: boolean;
|
doorModeMM?: boolean;
|
||||||
outerEmergentBrakeReport?: boolean;
|
|
||||||
trainDoorOutLed?: boolean;
|
trainDoorOutLed?: boolean;
|
||||||
localAtpControl?: boolean;
|
localAtpControl?: boolean;
|
||||||
atoBrakeCommand?: boolean;
|
atoBrakeCommand?: boolean;
|
||||||
@ -4060,6 +4106,11 @@ export namespace state {
|
|||||||
atoTractionCommand3?: boolean;
|
atoTractionCommand3?: boolean;
|
||||||
mockInfo?: number;
|
mockInfo?: number;
|
||||||
atpCutSwitch?: boolean;
|
atpCutSwitch?: boolean;
|
||||||
|
lightEmergencyBrakingStatus?: boolean;
|
||||||
|
lightTractionSafetyCircuit?: boolean;
|
||||||
|
lightDir1?: boolean;
|
||||||
|
lightDir2?: boolean;
|
||||||
|
lightDriverActive?: boolean;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.lifeSignal != null) {
|
if (this.lifeSignal != null) {
|
||||||
data.lifeSignal = this.lifeSignal;
|
data.lifeSignal = this.lifeSignal;
|
||||||
@ -4154,9 +4205,6 @@ export namespace state {
|
|||||||
if (this.atoSendTrainBtn != null) {
|
if (this.atoSendTrainBtn != null) {
|
||||||
data.atoSendTrainBtn = this.atoSendTrainBtn;
|
data.atoSendTrainBtn = this.atoSendTrainBtn;
|
||||||
}
|
}
|
||||||
if (this.trainIntegrity != null) {
|
|
||||||
data.trainIntegrity = this.trainIntegrity;
|
|
||||||
}
|
|
||||||
if (this.atpOrAtoBypassState != null) {
|
if (this.atpOrAtoBypassState != null) {
|
||||||
data.atpOrAtoBypassState = this.atpOrAtoBypassState;
|
data.atpOrAtoBypassState = this.atpOrAtoBypassState;
|
||||||
}
|
}
|
||||||
@ -4166,9 +4214,6 @@ export namespace state {
|
|||||||
if (this.obstacleCheckBtn != null) {
|
if (this.obstacleCheckBtn != null) {
|
||||||
data.obstacleCheckBtn = this.obstacleCheckBtn;
|
data.obstacleCheckBtn = this.obstacleCheckBtn;
|
||||||
}
|
}
|
||||||
if (this.driverActiveReportBtn != null) {
|
|
||||||
data.driverActiveReportBtn = this.driverActiveReportBtn;
|
|
||||||
}
|
|
||||||
if (this.brakeHeavyFault != null) {
|
if (this.brakeHeavyFault != null) {
|
||||||
data.brakeHeavyFault = this.brakeHeavyFault;
|
data.brakeHeavyFault = this.brakeHeavyFault;
|
||||||
}
|
}
|
||||||
@ -4214,9 +4259,6 @@ export namespace state {
|
|||||||
if (this.doorModeMM != null) {
|
if (this.doorModeMM != null) {
|
||||||
data.doorModeMM = this.doorModeMM;
|
data.doorModeMM = this.doorModeMM;
|
||||||
}
|
}
|
||||||
if (this.outerEmergentBrakeReport != null) {
|
|
||||||
data.outerEmergentBrakeReport = this.outerEmergentBrakeReport;
|
|
||||||
}
|
|
||||||
if (this.trainDoorOutLed != null) {
|
if (this.trainDoorOutLed != null) {
|
||||||
data.trainDoorOutLed = this.trainDoorOutLed;
|
data.trainDoorOutLed = this.trainDoorOutLed;
|
||||||
}
|
}
|
||||||
@ -4286,6 +4328,21 @@ export namespace state {
|
|||||||
if (this.atpCutSwitch != null) {
|
if (this.atpCutSwitch != null) {
|
||||||
data.atpCutSwitch = this.atpCutSwitch;
|
data.atpCutSwitch = this.atpCutSwitch;
|
||||||
}
|
}
|
||||||
|
if (this.lightEmergencyBrakingStatus != null) {
|
||||||
|
data.lightEmergencyBrakingStatus = this.lightEmergencyBrakingStatus;
|
||||||
|
}
|
||||||
|
if (this.lightTractionSafetyCircuit != null) {
|
||||||
|
data.lightTractionSafetyCircuit = this.lightTractionSafetyCircuit;
|
||||||
|
}
|
||||||
|
if (this.lightDir1 != null) {
|
||||||
|
data.lightDir1 = this.lightDir1;
|
||||||
|
}
|
||||||
|
if (this.lightDir2 != null) {
|
||||||
|
data.lightDir2 = this.lightDir2;
|
||||||
|
}
|
||||||
|
if (this.lightDriverActive != null) {
|
||||||
|
data.lightDriverActive = this.lightDriverActive;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -4354,16 +4411,12 @@ export namespace state {
|
|||||||
writer.writeBool(30, this.modeLevelUpBtn);
|
writer.writeBool(30, this.modeLevelUpBtn);
|
||||||
if (this.atoSendTrainBtn != false)
|
if (this.atoSendTrainBtn != false)
|
||||||
writer.writeBool(31, this.atoSendTrainBtn);
|
writer.writeBool(31, this.atoSendTrainBtn);
|
||||||
if (this.trainIntegrity != false)
|
|
||||||
writer.writeBool(32, this.trainIntegrity);
|
|
||||||
if (this.atpOrAtoBypassState != false)
|
if (this.atpOrAtoBypassState != false)
|
||||||
writer.writeBool(33, this.atpOrAtoBypassState);
|
writer.writeBool(33, this.atpOrAtoBypassState);
|
||||||
if (this.trainTractionCuted != false)
|
if (this.trainTractionCuted != false)
|
||||||
writer.writeBool(34, this.trainTractionCuted);
|
writer.writeBool(34, this.trainTractionCuted);
|
||||||
if (this.obstacleCheckBtn != false)
|
if (this.obstacleCheckBtn != false)
|
||||||
writer.writeBool(35, this.obstacleCheckBtn);
|
writer.writeBool(35, this.obstacleCheckBtn);
|
||||||
if (this.driverActiveReportBtn != false)
|
|
||||||
writer.writeBool(36, this.driverActiveReportBtn);
|
|
||||||
if (this.brakeHeavyFault != false)
|
if (this.brakeHeavyFault != false)
|
||||||
writer.writeBool(37, this.brakeHeavyFault);
|
writer.writeBool(37, this.brakeHeavyFault);
|
||||||
if (this.leftDoorState != false)
|
if (this.leftDoorState != false)
|
||||||
@ -4394,8 +4447,6 @@ export namespace state {
|
|||||||
writer.writeBool(50, this.doorModeAM);
|
writer.writeBool(50, this.doorModeAM);
|
||||||
if (this.doorModeMM != false)
|
if (this.doorModeMM != false)
|
||||||
writer.writeBool(51, this.doorModeMM);
|
writer.writeBool(51, this.doorModeMM);
|
||||||
if (this.outerEmergentBrakeReport != false)
|
|
||||||
writer.writeBool(52, this.outerEmergentBrakeReport);
|
|
||||||
if (this.trainDoorOutLed != false)
|
if (this.trainDoorOutLed != false)
|
||||||
writer.writeBool(53, this.trainDoorOutLed);
|
writer.writeBool(53, this.trainDoorOutLed);
|
||||||
if (this.localAtpControl != false)
|
if (this.localAtpControl != false)
|
||||||
@ -4442,6 +4493,16 @@ export namespace state {
|
|||||||
writer.writeUint32(75, this.mockInfo);
|
writer.writeUint32(75, this.mockInfo);
|
||||||
if (this.atpCutSwitch != false)
|
if (this.atpCutSwitch != false)
|
||||||
writer.writeBool(76, this.atpCutSwitch);
|
writer.writeBool(76, this.atpCutSwitch);
|
||||||
|
if (this.lightEmergencyBrakingStatus != false)
|
||||||
|
writer.writeBool(77, this.lightEmergencyBrakingStatus);
|
||||||
|
if (this.lightTractionSafetyCircuit != false)
|
||||||
|
writer.writeBool(78, this.lightTractionSafetyCircuit);
|
||||||
|
if (this.lightDir1 != false)
|
||||||
|
writer.writeBool(79, this.lightDir1);
|
||||||
|
if (this.lightDir2 != false)
|
||||||
|
writer.writeBool(80, this.lightDir2);
|
||||||
|
if (this.lightDriverActive != false)
|
||||||
|
writer.writeBool(81, this.lightDriverActive);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -4544,9 +4605,6 @@ export namespace state {
|
|||||||
case 31:
|
case 31:
|
||||||
message.atoSendTrainBtn = reader.readBool();
|
message.atoSendTrainBtn = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 32:
|
|
||||||
message.trainIntegrity = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 33:
|
case 33:
|
||||||
message.atpOrAtoBypassState = reader.readBool();
|
message.atpOrAtoBypassState = reader.readBool();
|
||||||
break;
|
break;
|
||||||
@ -4556,9 +4614,6 @@ export namespace state {
|
|||||||
case 35:
|
case 35:
|
||||||
message.obstacleCheckBtn = reader.readBool();
|
message.obstacleCheckBtn = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 36:
|
|
||||||
message.driverActiveReportBtn = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 37:
|
case 37:
|
||||||
message.brakeHeavyFault = reader.readBool();
|
message.brakeHeavyFault = reader.readBool();
|
||||||
break;
|
break;
|
||||||
@ -4604,9 +4659,6 @@ export namespace state {
|
|||||||
case 51:
|
case 51:
|
||||||
message.doorModeMM = reader.readBool();
|
message.doorModeMM = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 52:
|
|
||||||
message.outerEmergentBrakeReport = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 53:
|
case 53:
|
||||||
message.trainDoorOutLed = reader.readBool();
|
message.trainDoorOutLed = reader.readBool();
|
||||||
break;
|
break;
|
||||||
@ -4676,6 +4728,21 @@ export namespace state {
|
|||||||
case 76:
|
case 76:
|
||||||
message.atpCutSwitch = reader.readBool();
|
message.atpCutSwitch = reader.readBool();
|
||||||
break;
|
break;
|
||||||
|
case 77:
|
||||||
|
message.lightEmergencyBrakingStatus = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 78:
|
||||||
|
message.lightTractionSafetyCircuit = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 79:
|
||||||
|
message.lightDir1 = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 80:
|
||||||
|
message.lightDir2 = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 81:
|
||||||
|
message.lightDriverActive = reader.readBool();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9952,6 +10019,7 @@ export namespace state {
|
|||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
type?: SimulationThirdPartyApiService.Type;
|
type?: SimulationThirdPartyApiService.Type;
|
||||||
state?: SimulationThirdPartyApiService.State;
|
state?: SimulationThirdPartyApiService.State;
|
||||||
|
serviceName?: string;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -9962,6 +10030,9 @@ export namespace state {
|
|||||||
if ("state" in data && data.state != undefined) {
|
if ("state" in data && data.state != undefined) {
|
||||||
this.state = data.state;
|
this.state = data.state;
|
||||||
}
|
}
|
||||||
|
if ("serviceName" in data && data.serviceName != undefined) {
|
||||||
|
this.serviceName = data.serviceName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get type() {
|
get type() {
|
||||||
@ -9976,9 +10047,16 @@ export namespace state {
|
|||||||
set state(value: SimulationThirdPartyApiService.State) {
|
set state(value: SimulationThirdPartyApiService.State) {
|
||||||
pb_1.Message.setField(this, 2, value);
|
pb_1.Message.setField(this, 2, value);
|
||||||
}
|
}
|
||||||
|
get serviceName() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
||||||
|
}
|
||||||
|
set serviceName(value: string) {
|
||||||
|
pb_1.Message.setField(this, 3, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
type?: SimulationThirdPartyApiService.Type;
|
type?: SimulationThirdPartyApiService.Type;
|
||||||
state?: SimulationThirdPartyApiService.State;
|
state?: SimulationThirdPartyApiService.State;
|
||||||
|
serviceName?: string;
|
||||||
}): SimulationThirdPartyApiServiceState {
|
}): SimulationThirdPartyApiServiceState {
|
||||||
const message = new SimulationThirdPartyApiServiceState({});
|
const message = new SimulationThirdPartyApiServiceState({});
|
||||||
if (data.type != null) {
|
if (data.type != null) {
|
||||||
@ -9987,12 +10065,16 @@ export namespace state {
|
|||||||
if (data.state != null) {
|
if (data.state != null) {
|
||||||
message.state = data.state;
|
message.state = data.state;
|
||||||
}
|
}
|
||||||
|
if (data.serviceName != null) {
|
||||||
|
message.serviceName = data.serviceName;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
const data: {
|
const data: {
|
||||||
type?: SimulationThirdPartyApiService.Type;
|
type?: SimulationThirdPartyApiService.Type;
|
||||||
state?: SimulationThirdPartyApiService.State;
|
state?: SimulationThirdPartyApiService.State;
|
||||||
|
serviceName?: string;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.type != null) {
|
if (this.type != null) {
|
||||||
data.type = this.type;
|
data.type = this.type;
|
||||||
@ -10000,6 +10082,9 @@ export namespace state {
|
|||||||
if (this.state != null) {
|
if (this.state != null) {
|
||||||
data.state = this.state;
|
data.state = this.state;
|
||||||
}
|
}
|
||||||
|
if (this.serviceName != null) {
|
||||||
|
data.serviceName = this.serviceName;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -10010,6 +10095,8 @@ export namespace state {
|
|||||||
writer.writeEnum(1, this.type);
|
writer.writeEnum(1, this.type);
|
||||||
if (this.state != SimulationThirdPartyApiService.State.Normal)
|
if (this.state != SimulationThirdPartyApiService.State.Normal)
|
||||||
writer.writeEnum(2, this.state);
|
writer.writeEnum(2, this.state);
|
||||||
|
if (this.serviceName.length)
|
||||||
|
writer.writeString(3, this.serviceName);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -10025,6 +10112,9 @@ export namespace state {
|
|||||||
case 2:
|
case 2:
|
||||||
message.state = reader.readEnum();
|
message.state = reader.readEnum();
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
message.serviceName = reader.readString();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10040,14 +10130,16 @@ export namespace state {
|
|||||||
export class TrainControlState extends pb_1.Message {
|
export class TrainControlState extends pb_1.Message {
|
||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
buttons?: TrainControlState.ControlButton[];
|
buttons?: Map<string, TrainControlState.ControlButton>;
|
||||||
driverKey?: TrainControlState.DriverKeySwitch[];
|
driverKey?: TrainControlState.DriverKeySwitch[];
|
||||||
dirKey?: TrainControlState.DirectionKeySwitch;
|
dirKey?: TrainControlState.DirectionKeySwitch;
|
||||||
pushHandler?: TrainControlState.PushHandler;
|
pushHandler?: TrainControlState.PushHandler;
|
||||||
lightMaps?: Map<string, TrainControlState.ControlLight>;
|
lightMaps?: Map<string, TrainControlState.ControlLight>;
|
||||||
|
lineInitTimeStamp12?: number;
|
||||||
|
line12ConnErr?: boolean;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
|
||||||
if (!Array.isArray(data) && typeof data == "object") {
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
if ("buttons" in data && data.buttons != undefined) {
|
if ("buttons" in data && data.buttons != undefined) {
|
||||||
this.buttons = data.buttons;
|
this.buttons = data.buttons;
|
||||||
@ -10064,15 +10156,23 @@ export namespace state {
|
|||||||
if ("lightMaps" in data && data.lightMaps != undefined) {
|
if ("lightMaps" in data && data.lightMaps != undefined) {
|
||||||
this.lightMaps = data.lightMaps;
|
this.lightMaps = data.lightMaps;
|
||||||
}
|
}
|
||||||
|
if ("lineInitTimeStamp12" in data && data.lineInitTimeStamp12 != undefined) {
|
||||||
|
this.lineInitTimeStamp12 = data.lineInitTimeStamp12;
|
||||||
|
}
|
||||||
|
if ("line12ConnErr" in data && data.line12ConnErr != undefined) {
|
||||||
|
this.line12ConnErr = data.line12ConnErr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (!this.buttons)
|
||||||
|
this.buttons = new Map();
|
||||||
if (!this.lightMaps)
|
if (!this.lightMaps)
|
||||||
this.lightMaps = new Map();
|
this.lightMaps = new Map();
|
||||||
}
|
}
|
||||||
get buttons() {
|
get buttons() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, TrainControlState.ControlButton, 1) as TrainControlState.ControlButton[];
|
return pb_1.Message.getField(this, 1) as any as Map<string, TrainControlState.ControlButton>;
|
||||||
}
|
}
|
||||||
set buttons(value: TrainControlState.ControlButton[]) {
|
set buttons(value: Map<string, TrainControlState.ControlButton>) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
pb_1.Message.setField(this, 1, value as any);
|
||||||
}
|
}
|
||||||
get driverKey() {
|
get driverKey() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, TrainControlState.DriverKeySwitch, 2) as TrainControlState.DriverKeySwitch[];
|
return pb_1.Message.getRepeatedWrapperField(this, TrainControlState.DriverKeySwitch, 2) as TrainControlState.DriverKeySwitch[];
|
||||||
@ -10104,18 +10204,34 @@ export namespace state {
|
|||||||
set lightMaps(value: Map<string, TrainControlState.ControlLight>) {
|
set lightMaps(value: Map<string, TrainControlState.ControlLight>) {
|
||||||
pb_1.Message.setField(this, 5, value as any);
|
pb_1.Message.setField(this, 5, value as any);
|
||||||
}
|
}
|
||||||
|
get lineInitTimeStamp12() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
|
||||||
|
}
|
||||||
|
set lineInitTimeStamp12(value: number) {
|
||||||
|
pb_1.Message.setField(this, 6, value);
|
||||||
|
}
|
||||||
|
get line12ConnErr() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
|
||||||
|
}
|
||||||
|
set line12ConnErr(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 7, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
buttons?: ReturnType<typeof TrainControlState.ControlButton.prototype.toObject>[];
|
buttons?: {
|
||||||
|
[key: string]: ReturnType<typeof TrainControlState.ControlButton.prototype.toObject>;
|
||||||
|
};
|
||||||
driverKey?: ReturnType<typeof TrainControlState.DriverKeySwitch.prototype.toObject>[];
|
driverKey?: ReturnType<typeof TrainControlState.DriverKeySwitch.prototype.toObject>[];
|
||||||
dirKey?: ReturnType<typeof TrainControlState.DirectionKeySwitch.prototype.toObject>;
|
dirKey?: ReturnType<typeof TrainControlState.DirectionKeySwitch.prototype.toObject>;
|
||||||
pushHandler?: ReturnType<typeof TrainControlState.PushHandler.prototype.toObject>;
|
pushHandler?: ReturnType<typeof TrainControlState.PushHandler.prototype.toObject>;
|
||||||
lightMaps?: {
|
lightMaps?: {
|
||||||
[key: string]: ReturnType<typeof TrainControlState.ControlLight.prototype.toObject>;
|
[key: string]: ReturnType<typeof TrainControlState.ControlLight.prototype.toObject>;
|
||||||
};
|
};
|
||||||
|
lineInitTimeStamp12?: number;
|
||||||
|
line12ConnErr?: boolean;
|
||||||
}): TrainControlState {
|
}): TrainControlState {
|
||||||
const message = new TrainControlState({});
|
const message = new TrainControlState({});
|
||||||
if (data.buttons != null) {
|
if (typeof data.buttons == "object") {
|
||||||
message.buttons = data.buttons.map(item => TrainControlState.ControlButton.fromObject(item));
|
message.buttons = new Map(Object.entries(data.buttons).map(([key, value]) => [key, TrainControlState.ControlButton.fromObject(value)]));
|
||||||
}
|
}
|
||||||
if (data.driverKey != null) {
|
if (data.driverKey != null) {
|
||||||
message.driverKey = data.driverKey.map(item => TrainControlState.DriverKeySwitch.fromObject(item));
|
message.driverKey = data.driverKey.map(item => TrainControlState.DriverKeySwitch.fromObject(item));
|
||||||
@ -10129,20 +10245,30 @@ export namespace state {
|
|||||||
if (typeof data.lightMaps == "object") {
|
if (typeof data.lightMaps == "object") {
|
||||||
message.lightMaps = new Map(Object.entries(data.lightMaps).map(([key, value]) => [key, TrainControlState.ControlLight.fromObject(value)]));
|
message.lightMaps = new Map(Object.entries(data.lightMaps).map(([key, value]) => [key, TrainControlState.ControlLight.fromObject(value)]));
|
||||||
}
|
}
|
||||||
|
if (data.lineInitTimeStamp12 != null) {
|
||||||
|
message.lineInitTimeStamp12 = data.lineInitTimeStamp12;
|
||||||
|
}
|
||||||
|
if (data.line12ConnErr != null) {
|
||||||
|
message.line12ConnErr = data.line12ConnErr;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
const data: {
|
const data: {
|
||||||
buttons?: ReturnType<typeof TrainControlState.ControlButton.prototype.toObject>[];
|
buttons?: {
|
||||||
|
[key: string]: ReturnType<typeof TrainControlState.ControlButton.prototype.toObject>;
|
||||||
|
};
|
||||||
driverKey?: ReturnType<typeof TrainControlState.DriverKeySwitch.prototype.toObject>[];
|
driverKey?: ReturnType<typeof TrainControlState.DriverKeySwitch.prototype.toObject>[];
|
||||||
dirKey?: ReturnType<typeof TrainControlState.DirectionKeySwitch.prototype.toObject>;
|
dirKey?: ReturnType<typeof TrainControlState.DirectionKeySwitch.prototype.toObject>;
|
||||||
pushHandler?: ReturnType<typeof TrainControlState.PushHandler.prototype.toObject>;
|
pushHandler?: ReturnType<typeof TrainControlState.PushHandler.prototype.toObject>;
|
||||||
lightMaps?: {
|
lightMaps?: {
|
||||||
[key: string]: ReturnType<typeof TrainControlState.ControlLight.prototype.toObject>;
|
[key: string]: ReturnType<typeof TrainControlState.ControlLight.prototype.toObject>;
|
||||||
};
|
};
|
||||||
|
lineInitTimeStamp12?: number;
|
||||||
|
line12ConnErr?: boolean;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.buttons != null) {
|
if (this.buttons != null) {
|
||||||
data.buttons = this.buttons.map((item: TrainControlState.ControlButton) => item.toObject());
|
data.buttons = (Object.fromEntries)((Array.from)(this.buttons).map(([key, value]) => [key, value.toObject()]));
|
||||||
}
|
}
|
||||||
if (this.driverKey != null) {
|
if (this.driverKey != null) {
|
||||||
data.driverKey = this.driverKey.map((item: TrainControlState.DriverKeySwitch) => item.toObject());
|
data.driverKey = this.driverKey.map((item: TrainControlState.DriverKeySwitch) => item.toObject());
|
||||||
@ -10156,14 +10282,24 @@ export namespace state {
|
|||||||
if (this.lightMaps != null) {
|
if (this.lightMaps != null) {
|
||||||
data.lightMaps = (Object.fromEntries)((Array.from)(this.lightMaps).map(([key, value]) => [key, value.toObject()]));
|
data.lightMaps = (Object.fromEntries)((Array.from)(this.lightMaps).map(([key, value]) => [key, value.toObject()]));
|
||||||
}
|
}
|
||||||
|
if (this.lineInitTimeStamp12 != null) {
|
||||||
|
data.lineInitTimeStamp12 = this.lineInitTimeStamp12;
|
||||||
|
}
|
||||||
|
if (this.line12ConnErr != null) {
|
||||||
|
data.line12ConnErr = this.line12ConnErr;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
serialize(w: pb_1.BinaryWriter): void;
|
serialize(w: pb_1.BinaryWriter): void;
|
||||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||||
const writer = w || new pb_1.BinaryWriter();
|
const writer = w || new pb_1.BinaryWriter();
|
||||||
if (this.buttons.length)
|
for (const [key, value] of this.buttons) {
|
||||||
writer.writeRepeatedMessage(1, this.buttons, (item: TrainControlState.ControlButton) => item.serialize(writer));
|
writer.writeMessage(1, this.buttons, () => {
|
||||||
|
writer.writeString(1, key);
|
||||||
|
writer.writeMessage(2, value, () => value.serialize(writer));
|
||||||
|
});
|
||||||
|
}
|
||||||
if (this.driverKey.length)
|
if (this.driverKey.length)
|
||||||
writer.writeRepeatedMessage(2, this.driverKey, (item: TrainControlState.DriverKeySwitch) => item.serialize(writer));
|
writer.writeRepeatedMessage(2, this.driverKey, (item: TrainControlState.DriverKeySwitch) => item.serialize(writer));
|
||||||
if (this.has_dirKey)
|
if (this.has_dirKey)
|
||||||
@ -10176,6 +10312,10 @@ export namespace state {
|
|||||||
writer.writeMessage(2, value, () => value.serialize(writer));
|
writer.writeMessage(2, value, () => value.serialize(writer));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (this.lineInitTimeStamp12 != 0)
|
||||||
|
writer.writeInt64(6, this.lineInitTimeStamp12);
|
||||||
|
if (this.line12ConnErr != false)
|
||||||
|
writer.writeBool(7, this.line12ConnErr);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -10186,7 +10326,11 @@ export namespace state {
|
|||||||
break;
|
break;
|
||||||
switch (reader.getFieldNumber()) {
|
switch (reader.getFieldNumber()) {
|
||||||
case 1:
|
case 1:
|
||||||
reader.readMessage(message.buttons, () => pb_1.Message.addToRepeatedWrapperField(message, 1, TrainControlState.ControlButton.deserialize(reader), TrainControlState.ControlButton));
|
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.buttons as any, reader, reader.readString, () => {
|
||||||
|
let value;
|
||||||
|
reader.readMessage(message, () => value = TrainControlState.ControlButton.deserialize(reader));
|
||||||
|
return value;
|
||||||
|
}));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
reader.readMessage(message.driverKey, () => pb_1.Message.addToRepeatedWrapperField(message, 2, TrainControlState.DriverKeySwitch.deserialize(reader), TrainControlState.DriverKeySwitch));
|
reader.readMessage(message.driverKey, () => pb_1.Message.addToRepeatedWrapperField(message, 2, TrainControlState.DriverKeySwitch.deserialize(reader), TrainControlState.DriverKeySwitch));
|
||||||
@ -10204,6 +10348,12 @@ export namespace state {
|
|||||||
return value;
|
return value;
|
||||||
}));
|
}));
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
message.lineInitTimeStamp12 = reader.readInt64();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
message.line12ConnErr = reader.readBool();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user