ncc协议x
This commit is contained in:
parent
8d00fa337b
commit
77f4d6f43d
@ -18,8 +18,8 @@ public class DeviceStatusConvertor {
|
||||
convert(DeviceStatus.TRACK.class,statusBitMap,to);
|
||||
final int SPEED_LIMIT_MASK = 0xff000000;
|
||||
final int SPEED_LIMIT_TYPE_MASK = 0x00f00000;
|
||||
final int speedLimit = (statusBitMap&SPEED_LIMIT_MASK)>>6;
|
||||
final int speedLimitType = (statusBitMap&SPEED_LIMIT_TYPE_MASK)>>5;
|
||||
final int speedLimit = (statusBitMap&SPEED_LIMIT_MASK)>>24;
|
||||
final int speedLimitType = (statusBitMap&SPEED_LIMIT_TYPE_MASK)>>20;
|
||||
to.setSpeedLimit(speedLimit);
|
||||
to.setLimitType(DeviceStatusProto.Track.LimitType.forNumber(speedLimitType));
|
||||
}
|
||||
@ -30,11 +30,11 @@ public class DeviceStatusConvertor {
|
||||
convert(DeviceStatus.PLATFORM.class,statusBitMap,to);
|
||||
final int NEXT_SECTION_RUNTIME_MASK = 0xffff0000;
|
||||
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 nextSectionRuntime = (spare&NEXT_SECTION_RUNTIME_MASK)>>16;
|
||||
final int nextSectionRunLevel = (spare&NEXT_SECTION_RUN_LEVEL_MASK)>>8;
|
||||
//
|
||||
final int STOP_TIME_MASK = 0xffff0000;
|
||||
final int stopTime = (statusBitMap&STOP_TIME_MASK)>>4;
|
||||
final int stopTime = (statusBitMap&STOP_TIME_MASK)>>16;
|
||||
//
|
||||
to.setNextSectionRunTime(nextSectionRuntime);
|
||||
to.setNextSectionRunLevel(nextSectionRunLevel);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 77a9491b44608ec84a49469f5cf0be4f1ca3f079
|
||||
Subproject commit e55bc50a0c82afb9a8b4556550e7618a170ec5e7
|
Loading…
Reference in New Issue
Block a user