ncc协议x

This commit is contained in:
xzb 2023-06-12 10:30:21 +08:00
parent d216411cf8
commit 4488352fa1
2 changed files with 136 additions and 42 deletions

View File

@ -66,9 +66,13 @@ public class DeviceStatusConvertor {
final int NEXT_SECTION_RUN_LEVEL_MASK = 0x0000ff00;
final int nextSectionRuntime = (spare&NEXT_SECTION_RUNTIME_MASK)>>4;
final int nextSectionRunLevel = (spare&NEXT_SECTION_RUN_LEVEL_MASK)>>2;
//
final int STOP_TIME_MASK = 0xffff0000;
final int stopTime = (statusBitMap&STOP_TIME_MASK)>>4;
//
to.setNextSectionRunTime(nextSectionRuntime);
to.setNextSectionRunLevel(nextSectionRunLevel);
to.setStopTime(stopTime);
}
/**
* 以信号机为例测试

View File

@ -10768,6 +10768,16 @@ public final class DeviceStatusProto {
* @return The nextSectionRunLevel.
*/
int getNextSectionRunLevel();
/**
* <pre>
*停站时间
* </pre>
*
* <code>int32 stopTime = 17;</code>
* @return The stopTime.
*/
int getStopTime();
}
/**
* Protobuf type {@code state.Platform}
@ -10896,6 +10906,11 @@ public final class DeviceStatusProto {
nextSectionRunLevel_ = input.readInt32();
break;
}
case 136: {
stopTime_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
@ -11147,6 +11162,21 @@ public final class DeviceStatusProto {
return nextSectionRunLevel_;
}
public static final int STOPTIME_FIELD_NUMBER = 17;
private int stopTime_;
/**
* <pre>
*停站时间
* </pre>
*
* <code>int32 stopTime = 17;</code>
* @return The stopTime.
*/
@java.lang.Override
public int getStopTime() {
return stopTime_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@ -11209,6 +11239,9 @@ public final class DeviceStatusProto {
if (nextSectionRunLevel_ != 0) {
output.writeInt32(16, nextSectionRunLevel_);
}
if (stopTime_ != 0) {
output.writeInt32(17, stopTime_);
}
unknownFields.writeTo(output);
}
@ -11281,6 +11314,10 @@ public final class DeviceStatusProto {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(16, nextSectionRunLevel_);
}
if (stopTime_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(17, stopTime_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@ -11328,6 +11365,8 @@ public final class DeviceStatusProto {
!= other.getNextSectionRunTime()) return false;
if (getNextSectionRunLevel()
!= other.getNextSectionRunLevel()) return false;
if (getStopTime()
!= other.getStopTime()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@ -11384,6 +11423,8 @@ public final class DeviceStatusProto {
hash = (53 * hash) + getNextSectionRunTime();
hash = (37 * hash) + NEXTSECTIONRUNLEVEL_FIELD_NUMBER;
hash = (53 * hash) + getNextSectionRunLevel();
hash = (37 * hash) + STOPTIME_FIELD_NUMBER;
hash = (53 * hash) + getStopTime();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@ -11549,6 +11590,8 @@ public final class DeviceStatusProto {
nextSectionRunLevel_ = 0;
stopTime_ = 0;
return this;
}
@ -11591,6 +11634,7 @@ public final class DeviceStatusProto {
result.id_ = id_;
result.nextSectionRunTime_ = nextSectionRunTime_;
result.nextSectionRunLevel_ = nextSectionRunLevel_;
result.stopTime_ = stopTime_;
onBuilt();
return result;
}
@ -11688,6 +11732,9 @@ public final class DeviceStatusProto {
if (other.getNextSectionRunLevel() != 0) {
setNextSectionRunLevel(other.getNextSectionRunLevel());
}
if (other.getStopTime() != 0) {
setStopTime(other.getStopTime());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@ -12301,6 +12348,49 @@ public final class DeviceStatusProto {
onChanged();
return this;
}
private int stopTime_ ;
/**
* <pre>
*停站时间
* </pre>
*
* <code>int32 stopTime = 17;</code>
* @return The stopTime.
*/
@java.lang.Override
public int getStopTime() {
return stopTime_;
}
/**
* <pre>
*停站时间
* </pre>
*
* <code>int32 stopTime = 17;</code>
* @param value The stopTime to set.
* @return This builder for chaining.
*/
public Builder setStopTime(int value) {
stopTime_ = value;
onChanged();
return this;
}
/**
* <pre>
*停站时间
* </pre>
*
* <code>int32 stopTime = 17;</code>
* @return This builder for chaining.
*/
public Builder clearStopTime() {
stopTime_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@ -19354,7 +19444,7 @@ public final class DeviceStatusProto {
"\022\n\nspeedLimit\030\r \001(\005\022)\n\tlimitType\030\016 \001(\0162\026" +
".state.Track.LimitType\"D\n\tLimitType\022\013\n\007U" +
"nknown\020\000\022\010\n\004Cbtc\020\001\022\r\n\tInterlock\020\002\022\021\n\rCbt" +
"cInterlock\020\004\"\316\002\n\010Platform\022\021\n\temergstop\030\001" +
"cInterlock\020\004\"\340\002\n\010Platform\022\021\n\temergstop\030\001" +
" \001(\010\022\022\n\ntrainberth\030\002 \001(\010\022\r\n\005close\030\003 \001(\010\022" +
"\016\n\006upHold\030\004 \001(\010\022\020\n\010downHold\030\005 \001(\010\022\021\n\tupO" +
"ccHold\030\006 \001(\010\022\023\n\013downOccHold\030\007 \001(\010\022\017\n\007psd" +
@ -19362,45 +19452,45 @@ public final class DeviceStatusProto {
"\030\n \001(\010\022\024\n\014downSkipstop\030\013 \001(\010\022\027\n\017upTrainS" +
"kipstop\030\014 \001(\010\022\031\n\021downTrainSkipstop\030\r \001(\010" +
"\022\n\n\002id\030\016 \001(\t\022\032\n\022nextSectionRunTime\030\017 \001(\005" +
"\022\033\n\023nextSectionRunLevel\030\020 \001(\005\"S\n\005Scada\022\017" +
"\n\007scadaOn\030\001 \001(\010\022\030\n\020scadaSinglePower\030\002 \001(" +
"\010\022\023\n\013scadaUnkown\030\003 \001(\010\022\n\n\002id\030\004 \001(\t\"\215\001\n\016W" +
"aterProofDoor\022\022\n\ndoorClosed\030\001 \001(\010\022\027\n\017doo" +
"rExpectClose\030\002 \001(\010\022\027\n\017doorAgreeClosed\030\003 " +
"\001(\010\022\023\n\013doorClosing\030\004 \001(\010\022\024\n\014doorOpenLock" +
"\030\005 \001(\010\022\n\n\002id\030\006 \001(\t\"4\n\010WorkArea\022\034\n\024ipStus" +
"WorkAreaEnable\030\001 \001(\010\022\n\n\002id\030\002 \001(\t\"-\n\004Gama" +
"\022\031\n\021ipStusGamaDisable\030\001 \001(\010\022\n\n\002id\030\002 \001(\t\"" +
"\237\010\n\tTrainMode\022\035\n\025ipModeTrainTypeManual\030\001" +
" \001(\010\022\033\n\023ipModeTrainTypeHead\030\002 \001(\010\022\036\n\026ipM" +
"odeTrainTypeSpecial\030\003 \001(\010\022\037\n\027ipModeTrain" +
"TypeSchedule\030\004 \001(\010\022\034\n\024ipModeTrainTypeRou" +
"te\030\005 \001(\010\022\036\n\026ipModeTrainTypeShuttle\030\006 \001(\010" +
"\022\035\n\025ipModeTrainTypeLineup\030\007 \001(\010\022\034\n\024ipMod" +
"eTrainSchdEarly\030\010 \001(\010\022\033\n\023ipModeTrainSchd" +
"Late\030\t \001(\010\022\033\n\023ipModeTrainSkipstop\030\n \001(\010\022" +
"\033\n\023ipModeTrainCbtcMode\030\013 \001(\010\022\031\n\021ipModeTr" +
"ainAtpCut\030\014 \001(\010\022\032\n\022ipModeTrainBerthed\030\r " +
"\001(\010\022\031\n\021ipModeTrainStoped\030\016 \001(\010\022\031\n\021ipMode" +
"TrainHolded\030\017 \001(\010\022\030\n\020ipModeTrainItama\030\020 " +
"\001(\010\022\030\n\020ipModeTrainDirUp\030\021 \001(\010\022\032\n\022ipModeT" +
"rainDirDown\030\022 \001(\010\022\034\n\024ipModeTrainDirHeadU" +
"p\030\023 \001(\010\022\036\n\026ipModeTrainDirHeadDown\030\024 \001(\010\022" +
"\033\n\023ipModeTrainDoorOpen\030\025 \001(\010\022\032\n\022ipModeTr" +
"ainRsAlarm\030\026 \001(\010\022\034\n\024ipModeTrainDoorAlarm" +
"\030\027 \001(\010\022\032\n\022ipModeTrainEbAlarm\030\030 \001(\010\022!\n\031ip" +
"ModeTrainIntegrityAlarm\030\031 \001(\010\022\036\n\026ipModeT" +
"rainDriveModeAm\030\032 \001(\010\022\036\n\026ipModeTrainDriv" +
"eModeCm\030\033 \001(\010\022\037\n\027ipModeTrainDriveModeRmf" +
"\030\034 \001(\010\022\037\n\027ipModeTrainDriveModeDto\030\035 \001(\010\022" +
"\037\n\027ipModeTrainDriveModeAtb\030\036 \001(\010\022\037\n\027ipMo" +
"deTrainDriveBlockAm\030\037 \001(\010\022\037\n\027ipModeTrain" +
"DriveBlockCm\030 \001(\010\022\037\n\027ipModeTrainDriveMo" +
"deRmr\030! \001(\010\022 \n\030ipModeTrainDriveModeWash\030" +
"\" \001(\010\022\n\n\002id\030# \001(\t\".\n\020OccNccFepNetwork\022\n\n" +
"\002id\030\001 \001(\t\022\016\n\006active\030\002 \001(\010B6\n!club.joylin" +
"k.xiannccda.dto.protosB\021DeviceStatusProt" +
"ob\006proto3"
"\022\033\n\023nextSectionRunLevel\030\020 \001(\005\022\020\n\010stopTim" +
"e\030\021 \001(\005\"S\n\005Scada\022\017\n\007scadaOn\030\001 \001(\010\022\030\n\020sca" +
"daSinglePower\030\002 \001(\010\022\023\n\013scadaUnkown\030\003 \001(\010" +
"\022\n\n\002id\030\004 \001(\t\"\215\001\n\016WaterProofDoor\022\022\n\ndoorC" +
"losed\030\001 \001(\010\022\027\n\017doorExpectClose\030\002 \001(\010\022\027\n\017" +
"doorAgreeClosed\030\003 \001(\010\022\023\n\013doorClosing\030\004 \001" +
"(\010\022\024\n\014doorOpenLock\030\005 \001(\010\022\n\n\002id\030\006 \001(\t\"4\n\010" +
"WorkArea\022\034\n\024ipStusWorkAreaEnable\030\001 \001(\010\022\n" +
"\n\002id\030\002 \001(\t\"-\n\004Gama\022\031\n\021ipStusGamaDisable\030" +
"\001 \001(\010\022\n\n\002id\030\002 \001(\t\"\237\010\n\tTrainMode\022\035\n\025ipMod" +
"eTrainTypeManual\030\001 \001(\010\022\033\n\023ipModeTrainTyp" +
"eHead\030\002 \001(\010\022\036\n\026ipModeTrainTypeSpecial\030\003 " +
"\001(\010\022\037\n\027ipModeTrainTypeSchedule\030\004 \001(\010\022\034\n\024" +
"ipModeTrainTypeRoute\030\005 \001(\010\022\036\n\026ipModeTrai" +
"nTypeShuttle\030\006 \001(\010\022\035\n\025ipModeTrainTypeLin" +
"eup\030\007 \001(\010\022\034\n\024ipModeTrainSchdEarly\030\010 \001(\010\022" +
"\033\n\023ipModeTrainSchdLate\030\t \001(\010\022\033\n\023ipModeTr" +
"ainSkipstop\030\n \001(\010\022\033\n\023ipModeTrainCbtcMode" +
"\030\013 \001(\010\022\031\n\021ipModeTrainAtpCut\030\014 \001(\010\022\032\n\022ipM" +
"odeTrainBerthed\030\r \001(\010\022\031\n\021ipModeTrainStop" +
"ed\030\016 \001(\010\022\031\n\021ipModeTrainHolded\030\017 \001(\010\022\030\n\020i" +
"pModeTrainItama\030\020 \001(\010\022\030\n\020ipModeTrainDirU" +
"p\030\021 \001(\010\022\032\n\022ipModeTrainDirDown\030\022 \001(\010\022\034\n\024i" +
"pModeTrainDirHeadUp\030\023 \001(\010\022\036\n\026ipModeTrain" +
"DirHeadDown\030\024 \001(\010\022\033\n\023ipModeTrainDoorOpen" +
"\030\025 \001(\010\022\032\n\022ipModeTrainRsAlarm\030\026 \001(\010\022\034\n\024ip" +
"ModeTrainDoorAlarm\030\027 \001(\010\022\032\n\022ipModeTrainE" +
"bAlarm\030\030 \001(\010\022!\n\031ipModeTrainIntegrityAlar" +
"m\030\031 \001(\010\022\036\n\026ipModeTrainDriveModeAm\030\032 \001(\010\022" +
"\036\n\026ipModeTrainDriveModeCm\030\033 \001(\010\022\037\n\027ipMod" +
"eTrainDriveModeRmf\030\034 \001(\010\022\037\n\027ipModeTrainD" +
"riveModeDto\030\035 \001(\010\022\037\n\027ipModeTrainDriveMod" +
"eAtb\030\036 \001(\010\022\037\n\027ipModeTrainDriveBlockAm\030\037 " +
"\001(\010\022\037\n\027ipModeTrainDriveBlockCm\030 \001(\010\022\037\n\027" +
"ipModeTrainDriveModeRmr\030! \001(\010\022 \n\030ipModeT" +
"rainDriveModeWash\030\" \001(\010\022\n\n\002id\030# \001(\t\".\n\020O" +
"ccNccFepNetwork\022\n\n\002id\030\001 \001(\t\022\016\n\006active\030\002 " +
"\001(\010B6\n!club.joylink.xiannccda.dto.protos" +
"B\021DeviceStatusProtob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@ -19447,7 +19537,7 @@ public final class DeviceStatusProto {
internal_static_state_Platform_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_state_Platform_descriptor,
new java.lang.String[] { "Emergstop", "Trainberth", "Close", "UpHold", "DownHold", "UpOccHold", "DownOccHold", "PsdOpen", "PsdCut", "UpSkipstop", "DownSkipstop", "UpTrainSkipstop", "DownTrainSkipstop", "Id", "NextSectionRunTime", "NextSectionRunLevel", });
new java.lang.String[] { "Emergstop", "Trainberth", "Close", "UpHold", "DownHold", "UpOccHold", "DownOccHold", "PsdOpen", "PsdCut", "UpSkipstop", "DownSkipstop", "UpTrainSkipstop", "DownTrainSkipstop", "Id", "NextSectionRunTime", "NextSectionRunLevel", "StopTime", });
internal_static_state_Scada_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_state_Scada_fieldAccessorTable = new