From ea210d9220ede150bbb795eedbbb4b80fa699574 Mon Sep 17 00:00:00 2001 From: GG Date: Tue, 12 Dec 2023 15:37:27 +0800 Subject: [PATCH] first commit --- .gitignore | 38 + .idea/.gitignore | 8 + .idea/encodings.xml | 7 + .idea/misc.xml | 13 + .idea/uiDesigner.xml | 124 + .idea/vcs.xml | 6 + pom.xml | 463 + .../zhichenhaixin/base/constant/Constant.java | 100 + .../base/constant/GlobalVariable.java | 124 + .../base/controller/BaseController.java | 30 + .../com/zhichenhaixin/base/dao/BaseDao.java | 35 + .../zhichenhaixin/base/dao/MongoDBDao.java | 25 + .../base/dao/impl/BaseDaoImpl.java | 157 + .../base/dao/impl/MongoDBDaoImpl.java | 81 + .../base/model/MatrixCameraVo.java | 90 + .../zhichenhaixin/base/model/MatrixPCVo.java | 40 + .../zhichenhaixin/base/model/MatrixVo.java | 67 + .../com/zhichenhaixin/base/model/ReqPage.java | 74 + .../zhichenhaixin/base/model/ResInfoVo.java | 198 + .../com/zhichenhaixin/base/model/ResPage.java | 49 + .../base/service/BaseService.java | 46 + .../base/service/impl/BaseServiceImpl.java | 389 + .../base/util/ArithmeticUtil.java | 83 + .../zhichenhaixin/base/util/CacheUtil.java | 20 + .../base/util/CharacterUtil.java | 66 + .../zhichenhaixin/base/util/ConvertUtils.java | 74 + .../com/zhichenhaixin/base/util/DateUtil.java | 183 + .../zhichenhaixin/base/util/DistanceUtil.java | 185 + .../base/util/ExecutorsUtils.java | 36 + .../zhichenhaixin/base/util/GZipUtils.java | 109 + .../zhichenhaixin/base/util/GaussUtil.java | 165 + .../zhichenhaixin/base/util/GeometryUtil.java | 117 + .../zhichenhaixin/base/util/HttpUtils.java | 158 + .../com/zhichenhaixin/base/util/JsonUtil.java | 67 + .../base/util/JsonValidator.java | 222 + .../base/util/Kml2polygonUtil.java | 86 + .../com/zhichenhaixin/base/util/ListUtil.java | 159 + .../zhichenhaixin/base/util/LonLatUtil.java | 65 + .../com/zhichenhaixin/base/util/MD5Utils.java | 55 + .../com/zhichenhaixin/base/util/MapUtil.java | 199 + .../com/zhichenhaixin/base/util/MathUtil.java | 42 + .../com/zhichenhaixin/base/util/Matrix.java | 124 + .../zhichenhaixin/base/util/ObjectUtil.java | 23 + .../com/zhichenhaixin/base/util/PingUtil.java | 141 + .../base/util/PortManageUtils.java | 57 + .../zhichenhaixin/base/util/ProxyUtil.java | 42 + .../com/zhichenhaixin/base/util/ReadUtil.java | 36 + .../base/util/ReflectionUtils.java | 144 + .../zhichenhaixin/base/util/ResourceUtil.java | 48 + .../base/util/SpringBeanUtil.java | 65 + .../base/util/SpringPropertyUtil.java | 75 + .../zhichenhaixin/base/util/StringUtil.java | 104 + .../com/zhichenhaixin/base/util/TcpUtil.java | 115 + .../zhichenhaixin/base/util/ZLibUtils.java | 65 + .../cache/util/AgilTrackEhcache.java | 71 + .../cache/util/CtrlVoEhcache.java | 76 + .../cache/util/CustomFeatureEhcache.java | 101 + .../cache/util/DefenceCacheUtil.java | 141 + .../cache/util/GpsVoEhcache.java | 89 + .../cache/util/NightModeEhcache.java | 78 + .../cache/util/RadarFalseAlarmEhcache.java | 71 + .../cache/util/SmuggleEhcache.java | 78 + .../cache/util/SurLineDataEhcache.java | 78 + .../cache/util/TrackAlarmEhcache.java | 71 + .../cache/util/TrackCameraEhcache.java | 71 + .../cache/util/TrackPointEhcache.java | 71 + .../cache/util/WarnAlarmCountEhcache.java | 42 + .../control/model/ReqPacket.java | 99 + .../control/model/ResPacket.java | 100 + .../control/model/VideoWarnInfoHandle.java | 192 + .../factory/DefaultCacheDecoratorFactory.java | 24 + .../fusedata/CopyOfFuseRadarThread.java | 202 + .../com/zhichenhaixin/fusedata/EntityVo.java | 107 + .../fusedata/FuseDataThread.java | 66 + .../zhichenhaixin/fusedata/FuseDataUtil.java | 415 + .../zhichenhaixin/fusedata/FuseDataVo.java | 93 + .../fusedata/FuseRadarThread.java | 230 + .../com/zhichenhaixin/fusedata/FuseVo.java | 27 + .../com/zhichenhaixin/fusedata/LocusVo.java | 44 + .../com/zhichenhaixin/fusedata/MongoUtil.java | 340 + .../zhichenhaixin/gui/RadarHelperFrame.java | 213 + .../com/zhichenhaixin/hbase/CommonConfig.java | 75 + .../com/zhichenhaixin/hbase/HBaseClient.java | 567 + .../http/sys/model/RongkeInfo.java | 96 + .../http/sys/model/RongkeVo.java | 147 + .../interceptor/CacheInterceptor.java | 67 + .../interceptor/MethodCacheAfterAdvice.java | 52 + .../interceptor/PaginationInterceptor.java | 96 + .../zhichenhaixin/interceptor/QuartzTask.java | 17 + .../interceptor/RequiredInterceptor.java | 14 + .../list/dao/DbAlarmInfoDao.java | 34 + .../zhichenhaixin/list/dao/DbDeviceDao.java | 23 + .../zhichenhaixin/list/dao/DbSiteInfoDao.java | 19 + .../list/dao/impl/DbAlarmInfoDaoImpl.java | 258 + .../list/dao/impl/DbDeviceDaoImpl.java | 39 + .../list/dao/impl/DbSiteInfoDaoImpl.java | 65 + .../list/model/AlarmInfoSearch.java | 102 + .../list/model/AlarmListDto.java | 15 + .../com/zhichenhaixin/list/model/ClsDev.java | 201 + .../com/zhichenhaixin/list/model/ResMsg.java | 87 + .../zhichenhaixin/list/model/SiteInfo.java | 122 + .../com/zhichenhaixin/list/model/SmsDev.java | 329 + .../list/model/StatisticsInfo.java | 74 + .../list/model/StatisticsVo.java | 65 + .../com/zhichenhaixin/list/model/VasDev.java | 201 + .../com/zhichenhaixin/list/model/WmsDev.java | 201 + .../list/model/dto/RectListDto.java | 132 + .../zhichenhaixin/list/model/dto/TheDto.java | 20 + .../list/service/impl/LSWRServiceImpl.java | 174 + .../listener/StartupListener.java | 49 + .../zhichenhaixin/main/RadarHelperMain.java | 34 + .../zhichenhaixin/proto/ZCHXAISVessel.java | 11983 ++++++++++++++++ .../com/zhichenhaixin/proto/ZCHXCamera.java | 6845 +++++++++ .../proto/ZCHXCameraVideoWarn.java | 2084 +++ .../com/zhichenhaixin/proto/ZCHXFllow.java | 9366 ++++++++++++ .../java/com/zhichenhaixin/proto/ZCHXGPS.java | 5805 ++++++++ .../com/zhichenhaixin/proto/ZCHXRadar.java | 8546 +++++++++++ .../java/com/zhichenhaixin/proto/ZCHXUAV.java | 1648 +++ .../zhichenhaixin/proto/ZCHXVideoWarn.java | 6796 +++++++++ .../serializer/RadarTrackVo.java | 373 + .../stopcamera/RadarTrackEhcache.java | 52 + .../stopcamera/StopCameraService.java | 34 + .../zhichenhaixin/stopcamera/TrackSpotVo.java | 84 + .../sys/dao/impl/BigScreenDaoImpl.java | 168 + .../sys/dao/impl/CamInfoDaoImpl.java | 234 + .../sys/dao/impl/DefenceDaoImpl.java | 167 + .../sys/dao/impl/IslandCruiseDaoImpl.java | 209 + .../sys/dao/impl/LogManagerInfoDaoImpl.java | 40 + .../sys/dao/impl/NewlyDaoImpl.java | 314 + .../sys/dao/impl/UserRoleManagerDaoImpl.java | 329 + .../sys/model/BigScreenInfo.java | 127 + .../com/zhichenhaixin/sys/model/CamInfo.java | 749 + .../sys/model/CamPresetInfo.java | 148 + .../sys/model/CameraAuthorityVo.java | 179 + .../zhichenhaixin/sys/model/CameraInfo.java | 1149 ++ .../zhichenhaixin/sys/model/CameraInfoVo.java | 572 + .../sys/model/CameraInitPreset.java | 115 + .../zhichenhaixin/sys/model/CameraModel.java | 984 ++ .../sys/model/CameraStatusInfoVo.java | 198 + .../com/zhichenhaixin/sys/model/CameraVo.java | 279 + .../sys/model/CustomDefence.java | 409 + .../zhichenhaixin/sys/model/EarlyWarnVo.java | 235 + .../sys/model/FocusPointInfo.java | 188 + .../zhichenhaixin/sys/model/FunFCnfVo.java | 140 + .../sys/model/GunBallLinkage.java | 398 + .../sys/model/InspectionPolicyInfo.java | 127 + .../sys/model/LogManagerInfo.java | 251 + .../sys/model/MatrixCameraInfo.java | 276 + .../sys/model/MediaServerVo.java | 113 + .../sys/model/MediaXideweiListVo.java | 99 + .../zhichenhaixin/sys/model/NightModeVo.java | 126 + .../zhichenhaixin/sys/model/PosMarkData.java | 142 + .../sys/model/RadarPatrolList.java | 99 + .../sys/model/RadarPatrolVo.java | 136 + .../com/zhichenhaixin/sys/model/ResVo.java | 59 + .../com/zhichenhaixin/sys/model/RoleVo.java | 163 + .../zhichenhaixin/sys/model/SmuggleVo.java | 114 + .../zhichenhaixin/sys/model/SurLineInfo.java | 254 + .../zhichenhaixin/sys/model/THqCamera2.java | 137 + .../com/zhichenhaixin/sys/model/Targit.java | 143 + .../zhichenhaixin/sys/model/TimeSpanVo.java | 159 + .../sys/model/TrackCameraVo.java | 326 + .../sys/model/UserLoginLogInfo.java | 176 + .../com/zhichenhaixin/sys/model/UserVo.java | 404 + .../sys/model/WarnComposeVideoVo.java | 256 + .../zhichenhaixin/sys/model/WarnInfoBean.java | 715 + .../sys/model/XideweiServerVo.java | 202 + .../sys/model/param/CamParam.java | 36 + .../sys/model/param/Line_parameter.java | 36 + .../sys/model/param/LinkParam.java | 18 + .../sys/model/param/MapRect.java | 54 + .../zhichenhaixin/sys/model/param/Ptend.java | 27 + .../sys/model/param/Ptstart.java | 27 + .../sys/model/param/TurnParam.java | 72 + .../sys/service/RadarService.java | 26 + .../sys/service/impl/CLURDICServiceImpl.java | 291 + .../sys/service/impl/DefenceServiceImpl.java | 159 + .../sys/service/impl/NewlyServiceImpl.java | 114 + .../sys/service/impl/RadarServiceImpl.java | 517 + .../sys/vo/ManipulateConfiguraVo.java | 59 + .../tcp/model/NyGuideCamPosModel.java | 52 + .../tcp/model/RadarRESPackageModel.java | 85 + .../tcp/model/RadarStateModel.java | 101 + .../tcp/model/RadarTargetModel.java | 91 + .../tcp/model/RadarTrackModel.java | 225 + .../thread/BrokerServerThread.java | 78 + .../thread/CamBrokerServerThread.java | 78 + .../thread/CamWorkerServerThread.java | 244 + .../zhichenhaixin/thread/CameraThread.java | 265 + .../thread/ControllerFllowThread.java | 431 + .../thread/FllowBrokerServerThread.java | 78 + .../com/zhichenhaixin/thread/FllowSocket.java | 501 + .../com/zhichenhaixin/thread/FllowThread.java | 81 + .../thread/FllowTimeOutThread.java | 75 + .../thread/FllowWorkerServerThread.java | 122 + .../thread/GpsOnlineUpdateTime.java | 106 + .../zhichenhaixin/thread/GpsPushThread.java | 57 + .../thread/GpsTcpServerThread.java | 282 + .../thread/HttpServerThread.java | 272 + .../thread/ManualFllowServerThread.java | 86 + .../thread/RadarAcceptSocket.java | 512 + .../com/zhichenhaixin/thread/RadarServer.java | 76 + .../thread/ReceiveCamStatusThread.java | 104 + .../thread/ReceiveComposeVideoThread.java | 142 + .../ReceiveXideweiVideoWarnInfoThread.java | 180 + .../thread/SendCarPersonShipThread.java | 109 + .../thread/SendComposeVideoThread.java | 114 + .../thread/SendComposeVideoTimeOutThread.java | 83 + .../thread/SendManualFllowDataThread.java | 113 + .../zhichenhaixin/thread/UserLoginThread.java | 186 + .../thread/WarnGPSDyDataThread.java | 87 + .../zhichenhaixin/thread/WarnGPSThread.java | 48 + .../thread/WorkerServerThread.java | 1 + .../zhichenhaixin/thread/ZMQPubServer.java | 97 + .../zhichenhaixin/thread/ZMQServerDyData.java | 53 + .../zhichenhaixin/thread/ZMQServerPubCam.java | 53 + .../zhichenhaixin/uav/AirPlaneEhcache.java | 48 + .../zhichenhaixin/uav/UAVByteReaderUtils.java | 72 + .../uav/UAVDataTypeParseUtils.java | 121 + .../java/com/zhichenhaixin/uav/UAVFeed.java | 119 + .../com/zhichenhaixin/uav/UAVIndexVO.java | 124 + .../java/com/zhichenhaixin/uav/WrjVo.java | 111 + .../zhichenhaixin/util/AgilTrackEhcache.java | 71 + .../com/zhichenhaixin/util/BitConverter.java | 132 + .../com/zhichenhaixin/util/ByteIntUtil.java | 58 + .../com/zhichenhaixin/util/CtrlVoEhcache.java | 76 + .../util/CustomFeatureEhcache.java | 101 + .../zhichenhaixin/util/DefenceCacheUtil.java | 141 + .../com/zhichenhaixin/util/EndianUtil.java | 133 + .../com/zhichenhaixin/util/GpsVoEhcache.java | 89 + .../java/com/zhichenhaixin/util/IPUtil.java | 50 + .../zhichenhaixin/util/NightModeEhcache.java | 78 + .../util/RadarFalseAlarmEhcache.java | 71 + .../util/RadarTransformUtil.java | 37 + .../zhichenhaixin/util/SmuggleEhcache.java | 78 + .../util/SurLineDataEhcache.java | 78 + .../zhichenhaixin/util/TrackAlarmEhcache.java | 71 + .../util/TrackCameraEhcache.java | 71 + .../zhichenhaixin/util/TrackPointEhcache.java | 71 + .../util/WarnAlarmCountEhcache.java | 42 + .../com/zhichenhaixin/zmq/RadarAisThread.java | 45 + .../zhichenhaixin/zmq/clean/CleanData.java | 96 + .../com/zhichenhaixin/zmq/model/AISData.java | 491 + .../zmq/model/RadarHeadInfo.java | 61 + .../zhichenhaixin/zmq/model/RadarInfo.java | 469 + .../zmq/model/RadarInfoUtil.java | 212 + .../zhichenhaixin/zmq/model/ResultData.java | 27 + .../com/zhichenhaixin/zmq/receive/Ad.java | 60 + .../zmq/receive/ReceiveAISHandle.java | 240 + .../zmq/receive/ReceiveEcho.java | 99 + .../zmq/receive/ReceiveNyGuideCamPos.java | 229 + .../zmq/receive/ReceiveRadarHandle.java | 527 + .../zhichenhaixin/zmq/searh/ZMQServerYd.java | 240 + .../zmq/send/SendAISHistoricalData.java | 143 + .../zmq/send/SendGPSHistoricalData.java | 133 + .../zmq/send/SendRadarHistoricalData.java | 144 + .../zmq/send/SendRadarRealTimeData.java | 65 + .../zmq/send/SendRadarWarnHistoricalData.java | 138 + .../zmq/send/SendUAVHistoricalData.java | 133 + .../zmq/uav/FloatJsonValueProcessor.java | 46 + .../zhichenhaixin/zmq/uav/UAVDataThread.java | 78 + .../resources/META-INF/maven/archetype.xml | 9 + src/main/resources/application-cached.xml | 34 + .../resources/archetype-resources/pom.xml | 15 + .../src/main/java/App.java | 13 + .../src/test/java/AppTest.java | 38 + src/main/resources/jdbc.properties | 23 + src/main/resources/log4j.properties | 95 + src/main/resources/mongodb.properties | 36 + src/main/resources/mybatis-config.xml | 36 + src/main/resources/resources.properties | 356 + src/main/resources/spring-mvc.xml | 66 + src/main/resources/spring-mybatis.xml | 82 + src/main/resources/start-thread.xml | 92 + 274 files changed, 90601 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/vcs.xml create mode 100644 pom.xml create mode 100644 src/main/java/com/zhichenhaixin/base/constant/Constant.java create mode 100644 src/main/java/com/zhichenhaixin/base/constant/GlobalVariable.java create mode 100644 src/main/java/com/zhichenhaixin/base/controller/BaseController.java create mode 100644 src/main/java/com/zhichenhaixin/base/dao/BaseDao.java create mode 100644 src/main/java/com/zhichenhaixin/base/dao/MongoDBDao.java create mode 100644 src/main/java/com/zhichenhaixin/base/dao/impl/BaseDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/base/dao/impl/MongoDBDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/base/model/MatrixCameraVo.java create mode 100644 src/main/java/com/zhichenhaixin/base/model/MatrixPCVo.java create mode 100644 src/main/java/com/zhichenhaixin/base/model/MatrixVo.java create mode 100644 src/main/java/com/zhichenhaixin/base/model/ReqPage.java create mode 100644 src/main/java/com/zhichenhaixin/base/model/ResInfoVo.java create mode 100644 src/main/java/com/zhichenhaixin/base/model/ResPage.java create mode 100644 src/main/java/com/zhichenhaixin/base/service/BaseService.java create mode 100644 src/main/java/com/zhichenhaixin/base/service/impl/BaseServiceImpl.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ArithmeticUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/CacheUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/CharacterUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ConvertUtils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/DateUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/DistanceUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ExecutorsUtils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/GZipUtils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/GaussUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/GeometryUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/HttpUtils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/JsonUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/JsonValidator.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/Kml2polygonUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ListUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/LonLatUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/MD5Utils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/MapUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/MathUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/Matrix.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ObjectUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/PingUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/PortManageUtils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ProxyUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ReadUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ReflectionUtils.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ResourceUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/SpringBeanUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/SpringPropertyUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/StringUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/TcpUtil.java create mode 100644 src/main/java/com/zhichenhaixin/base/util/ZLibUtils.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/AgilTrackEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/CtrlVoEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/CustomFeatureEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/DefenceCacheUtil.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/GpsVoEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/NightModeEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/RadarFalseAlarmEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/SmuggleEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/SurLineDataEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/TrackAlarmEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/TrackCameraEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/TrackPointEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/cache/util/WarnAlarmCountEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/control/model/ReqPacket.java create mode 100644 src/main/java/com/zhichenhaixin/control/model/ResPacket.java create mode 100644 src/main/java/com/zhichenhaixin/control/model/VideoWarnInfoHandle.java create mode 100644 src/main/java/com/zhichenhaixin/factory/DefaultCacheDecoratorFactory.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/CopyOfFuseRadarThread.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/EntityVo.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/FuseDataThread.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/FuseDataUtil.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/FuseDataVo.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/FuseRadarThread.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/FuseVo.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/LocusVo.java create mode 100644 src/main/java/com/zhichenhaixin/fusedata/MongoUtil.java create mode 100644 src/main/java/com/zhichenhaixin/gui/RadarHelperFrame.java create mode 100644 src/main/java/com/zhichenhaixin/hbase/CommonConfig.java create mode 100644 src/main/java/com/zhichenhaixin/hbase/HBaseClient.java create mode 100644 src/main/java/com/zhichenhaixin/http/sys/model/RongkeInfo.java create mode 100644 src/main/java/com/zhichenhaixin/http/sys/model/RongkeVo.java create mode 100644 src/main/java/com/zhichenhaixin/interceptor/CacheInterceptor.java create mode 100644 src/main/java/com/zhichenhaixin/interceptor/MethodCacheAfterAdvice.java create mode 100644 src/main/java/com/zhichenhaixin/interceptor/PaginationInterceptor.java create mode 100644 src/main/java/com/zhichenhaixin/interceptor/QuartzTask.java create mode 100644 src/main/java/com/zhichenhaixin/interceptor/RequiredInterceptor.java create mode 100644 src/main/java/com/zhichenhaixin/list/dao/DbAlarmInfoDao.java create mode 100644 src/main/java/com/zhichenhaixin/list/dao/DbDeviceDao.java create mode 100644 src/main/java/com/zhichenhaixin/list/dao/DbSiteInfoDao.java create mode 100644 src/main/java/com/zhichenhaixin/list/dao/impl/DbAlarmInfoDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/list/dao/impl/DbDeviceDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/list/dao/impl/DbSiteInfoDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/AlarmInfoSearch.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/AlarmListDto.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/ClsDev.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/ResMsg.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/SiteInfo.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/SmsDev.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/StatisticsInfo.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/StatisticsVo.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/VasDev.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/WmsDev.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/dto/RectListDto.java create mode 100644 src/main/java/com/zhichenhaixin/list/model/dto/TheDto.java create mode 100644 src/main/java/com/zhichenhaixin/list/service/impl/LSWRServiceImpl.java create mode 100644 src/main/java/com/zhichenhaixin/listener/StartupListener.java create mode 100644 src/main/java/com/zhichenhaixin/main/RadarHelperMain.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXAISVessel.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXCamera.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXCameraVideoWarn.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXFllow.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXGPS.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXRadar.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXUAV.java create mode 100644 src/main/java/com/zhichenhaixin/proto/ZCHXVideoWarn.java create mode 100644 src/main/java/com/zhichenhaixin/serializer/RadarTrackVo.java create mode 100644 src/main/java/com/zhichenhaixin/stopcamera/RadarTrackEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/stopcamera/StopCameraService.java create mode 100644 src/main/java/com/zhichenhaixin/stopcamera/TrackSpotVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/BigScreenDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/CamInfoDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/DefenceDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/IslandCruiseDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/LogManagerInfoDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/NewlyDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/dao/impl/UserRoleManagerDaoImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/BigScreenInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CamInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CamPresetInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraAuthorityVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraInfoVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraInitPreset.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraModel.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraStatusInfoVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CameraVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/CustomDefence.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/EarlyWarnVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/FocusPointInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/FunFCnfVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/GunBallLinkage.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/InspectionPolicyInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/LogManagerInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/MatrixCameraInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/MediaServerVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/MediaXideweiListVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/NightModeVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/PosMarkData.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/RadarPatrolList.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/RadarPatrolVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/ResVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/RoleVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/SmuggleVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/SurLineInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/THqCamera2.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/Targit.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/TimeSpanVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/TrackCameraVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/UserLoginLogInfo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/UserVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/WarnComposeVideoVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/WarnInfoBean.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/XideweiServerVo.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/CamParam.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/Line_parameter.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/LinkParam.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/MapRect.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/Ptend.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/Ptstart.java create mode 100644 src/main/java/com/zhichenhaixin/sys/model/param/TurnParam.java create mode 100644 src/main/java/com/zhichenhaixin/sys/service/RadarService.java create mode 100644 src/main/java/com/zhichenhaixin/sys/service/impl/CLURDICServiceImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/service/impl/DefenceServiceImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/service/impl/NewlyServiceImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/service/impl/RadarServiceImpl.java create mode 100644 src/main/java/com/zhichenhaixin/sys/vo/ManipulateConfiguraVo.java create mode 100644 src/main/java/com/zhichenhaixin/tcp/model/NyGuideCamPosModel.java create mode 100644 src/main/java/com/zhichenhaixin/tcp/model/RadarRESPackageModel.java create mode 100644 src/main/java/com/zhichenhaixin/tcp/model/RadarStateModel.java create mode 100644 src/main/java/com/zhichenhaixin/tcp/model/RadarTargetModel.java create mode 100644 src/main/java/com/zhichenhaixin/tcp/model/RadarTrackModel.java create mode 100644 src/main/java/com/zhichenhaixin/thread/BrokerServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/CamBrokerServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/CamWorkerServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/CameraThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ControllerFllowThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/FllowBrokerServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/FllowSocket.java create mode 100644 src/main/java/com/zhichenhaixin/thread/FllowThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/FllowTimeOutThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/FllowWorkerServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/GpsOnlineUpdateTime.java create mode 100644 src/main/java/com/zhichenhaixin/thread/GpsPushThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/GpsTcpServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/HttpServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ManualFllowServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/RadarAcceptSocket.java create mode 100644 src/main/java/com/zhichenhaixin/thread/RadarServer.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ReceiveCamStatusThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ReceiveComposeVideoThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ReceiveXideweiVideoWarnInfoThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/SendCarPersonShipThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/SendComposeVideoThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/SendComposeVideoTimeOutThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/SendManualFllowDataThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/UserLoginThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/WarnGPSDyDataThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/WarnGPSThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/WorkerServerThread.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ZMQPubServer.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ZMQServerDyData.java create mode 100644 src/main/java/com/zhichenhaixin/thread/ZMQServerPubCam.java create mode 100644 src/main/java/com/zhichenhaixin/uav/AirPlaneEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/uav/UAVByteReaderUtils.java create mode 100644 src/main/java/com/zhichenhaixin/uav/UAVDataTypeParseUtils.java create mode 100644 src/main/java/com/zhichenhaixin/uav/UAVFeed.java create mode 100644 src/main/java/com/zhichenhaixin/uav/UAVIndexVO.java create mode 100644 src/main/java/com/zhichenhaixin/uav/WrjVo.java create mode 100644 src/main/java/com/zhichenhaixin/util/AgilTrackEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/BitConverter.java create mode 100644 src/main/java/com/zhichenhaixin/util/ByteIntUtil.java create mode 100644 src/main/java/com/zhichenhaixin/util/CtrlVoEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/CustomFeatureEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/DefenceCacheUtil.java create mode 100644 src/main/java/com/zhichenhaixin/util/EndianUtil.java create mode 100644 src/main/java/com/zhichenhaixin/util/GpsVoEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/IPUtil.java create mode 100644 src/main/java/com/zhichenhaixin/util/NightModeEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/RadarFalseAlarmEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/RadarTransformUtil.java create mode 100644 src/main/java/com/zhichenhaixin/util/SmuggleEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/SurLineDataEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/TrackAlarmEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/TrackCameraEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/TrackPointEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/util/WarnAlarmCountEhcache.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/RadarAisThread.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/clean/CleanData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/model/AISData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/model/RadarHeadInfo.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/model/RadarInfo.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/model/RadarInfoUtil.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/model/ResultData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/receive/Ad.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/receive/ReceiveAISHandle.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/receive/ReceiveEcho.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/receive/ReceiveNyGuideCamPos.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/receive/ReceiveRadarHandle.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/searh/ZMQServerYd.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/send/SendAISHistoricalData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/send/SendGPSHistoricalData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/send/SendRadarHistoricalData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/send/SendRadarRealTimeData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/send/SendRadarWarnHistoricalData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/send/SendUAVHistoricalData.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/uav/FloatJsonValueProcessor.java create mode 100644 src/main/java/com/zhichenhaixin/zmq/uav/UAVDataThread.java create mode 100644 src/main/resources/META-INF/maven/archetype.xml create mode 100644 src/main/resources/application-cached.xml create mode 100644 src/main/resources/archetype-resources/pom.xml create mode 100644 src/main/resources/archetype-resources/src/main/java/App.java create mode 100644 src/main/resources/archetype-resources/src/test/java/AppTest.java create mode 100644 src/main/resources/jdbc.properties create mode 100644 src/main/resources/log4j.properties create mode 100644 src/main/resources/mongodb.properties create mode 100644 src/main/resources/mybatis-config.xml create mode 100644 src/main/resources/resources.properties create mode 100644 src/main/resources/spring-mvc.xml create mode 100644 src/main/resources/spring-mybatis.xml create mode 100644 src/main/resources/start-thread.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..106fade --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..6f5230a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..9304d7f --- /dev/null +++ b/pom.xml @@ -0,0 +1,463 @@ + + 4.0.0 + org.example + radar-gui-v1.0 + 1.0-SNAPSHOT + Archetype - radar-gui-v1.0 + http://maven.apache.org + + + + 1.0.4 + com.alibaba + druid + + + + 1.1.37 + com.alibaba + fastjson + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + + 1.3.9-1 + com.github.stephenc.findbugs + findbugs-annotations + + + + r09 + com.google.guava + guava + + + + 2.6.1 + com.google.protobuf + protobuf-java + + + + 1.2.0 + com.googlecode.ehcache-spring-annotations + ehcache-spring-annotations + + + + 1.1.3 + com.jcraft + jzlib + + + + 1.9 + com.sun.jersey + jersey-client + + + + 1.9 + com.sun.jersey + jersey-core + + + + 2.3 + com.thoughtworks.paranamer + paranamer + + + + 1.11 + com.vividsolutions + jts + + + + 1.8.0 + commons-beanutils + commons-beanutils + + + + 1.2 + commons-cli + commons-cli + + + + 1.7 + commons-codec + commons-codec + + + + 3.2.1 + commons-collections + commons-collections + + + + 1.6 + commons-configuration + commons-configuration + + + + 2.4 + commons-io + commons-io + + + + 2.5 + commons-lang + commons-lang + + + + 1.1.1 + commons-logging + commons-logging + + + + 3.1 + commons-net + commons-net + + + + 3.6.6.Final + io.netty + netty + + + + 1.2.17 + log4j + log4j + + + + 2.4.5 + net.sf.ehcache + ehcache-core + + + + 1.0.6 + net.sf.ezmorph + ezmorph + + + + 1.7.4 + org.apache.avro + avro + + + + 1.4.1 + org.apache.commons + commons-compress + + + + 3.1.1 + org.apache.commons + commons-math3 + + + + 2.6.0 + org.apache.curator + curator-client + + + + 2.6.0 + org.apache.curator + curator-framework + + + + 2.6.0 + org.apache.curator + curator-recipes + + + + 2.6.0 + org.apache.hadoop + hadoop-annotations + + + + 2.2.0 + org.apache.hadoop + hadoop-auth + + + + 2.6.0 + org.apache.hadoop + hadoop-client + + + + 2.6.0 + org.apache.hadoop + hadoop-common + + + + 2.6.0 + org.apache.hadoop + hadoop-hdfs + + + + 2.6.0 + org.apache.hadoop + hadoop-mapreduce-client-app + + + + 2.6.0 + org.apache.hadoop + hadoop-mapreduce-client-common + + + + 2.6.0 + org.apache.hadoop + hadoop-mapreduce-client-core + + + + 2.6.0 + org.apache.hadoop + hadoop-mapreduce-client-jobclient + + + + 2.6.0 + org.apache.hadoop + hadoop-mapreduce-client-shuffle + + + + 2.6.0 + org.apache.hadoop + hadoop-yarn-api + + + + 2.6.0 + org.apache.hadoop + hadoop-yarn-client + + + + 2.6.0 + org.apache.hadoop + hadoop-yarn-common + + + + 2.6.0 + org.apache.hadoop + hadoop-yarn-server-common + + + + 0.98.0-hadoop2 + org.apache.hbase + hbase-client + + + + 0.98.0-hadoop2 + org.apache.hbase + hbase-common + + + + 0.98.0-hadoop2 + org.apache.hbase + hbase-protocol + + + + 2.04 + org.cloudera.htrace + htrace-core + + + + 1.8 + org.fusesource.leveldbjni + leveldbjni-all + + + + 1.1 + org.hamcrest + hamcrest-core + + + + 3.0.4 + org.htrace + htrace-core + + + + 6.1.26 + org.mortbay.jetty + jetty-util + + + + 3.2.7 + org.mybatis + mybatis + + + + 1.2.2 + org.mybatis + mybatis-spring + + + + 1.8.5 + org.quartz-scheduler + quartz + + + + 1.6.6 + org.slf4j + jcl-over-slf4j + + + + 1.6.6 + org.slf4j + slf4j-api + + + + + + org.springframework + spring-webmvc + 5.0.1.RELEASE + + + + 1.5.0.RELEASE + org.springframework.data + spring-data-commons + + + + 1.2.0.RELEASE + org.springframework.data + spring-data-mongodb + + + + org.springframework + org.springframework.web + 3.1.0.RELEASE + + + + 1.0.4.1 + org.xerial.snappy + snappy-java + + + + 0.3.5 + org.zeromq + jeromq + + + + + + radargui + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.0.0 + + + + com.zhichenhaixin.main.RadarHelperMain + + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + + + + diff --git a/src/main/java/com/zhichenhaixin/base/constant/Constant.java b/src/main/java/com/zhichenhaixin/base/constant/Constant.java new file mode 100644 index 0000000..7d1b1f0 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/constant/Constant.java @@ -0,0 +1,100 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.constant; + +import com.zhichenhaixin.base.util.HttpUtils; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.base.util.TcpUtil; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import com.zhichenhaixin.sys.model.UserVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import com.zhichenhaixin.thread.WarnGPSDyDataThread; +import com.zhichenhaixin.thread.ZMQServerDyData; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Hashtable; +import java.util.Map; + +public class Constant extends GlobalVariable +{ + public static Log log; + public static Map loginMap; + + static { + Constant.log = LogFactory.getLog(Constant.class); + Constant.loginMap = new Hashtable(); + } + + public static void addWarnMap(final String trackNum, final String tts) { + if (!Constant.warnMap.containsKey(trackNum)) { + try { + Constant.warnMap.put(trackNum, tts); + if (Constant.ttsStatus == 2 || tts.contains(Constant.defence_name)) { + return; + } + TcpUtil.playTts(tts); + final String time = String.valueOf(System.currentTimeMillis()); + ZMQServerDyData.getZMQPUB().sendData(Constant.sign, time, tts.getBytes("UTF-8")); + } + catch (Exception e) { + Constant.log.error("\u53d1\u9001TTS\u65f6\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public static void removeWarnMap(final String trackNum) { + if (Constant.warnMap.containsKey(trackNum)) { + Constant.warnMap.remove(trackNum); + } + } + + public static void sendClient(final WarnInfoBean warnInfoVo) { + final ZCHXVideoWarn.VideoWarnInfo.Builder videoWarnInfo = ZCHXVideoWarn.VideoWarnInfo.newBuilder(); + videoWarnInfo.setTransactionId(warnInfoVo.getObject_id()); + videoWarnInfo.setAlarmId(warnInfoVo.getId()); + final String carmeraid = StringUtil.isBlank(warnInfoVo.getCamera_id()) ? "0" : warnInfoVo.getCamera_id(); + videoWarnInfo.setCameraId(Integer.parseInt(carmeraid)); + videoWarnInfo.setAlarmPlace(StringUtil.isBlank(warnInfoVo.getAlarm_site()) ? "\u672a\u77e5" : warnInfoVo.getAlarm_site()); + videoWarnInfo.setAlarmFtp(""); + videoWarnInfo.setAlarmRtsp(StringUtil.isBlank(warnInfoVo.getRtsp()) ? "" : warnInfoVo.getRtsp()); + videoWarnInfo.setAlarmLat(warnInfoVo.getY()); + videoWarnInfo.setAlarmLon(warnInfoVo.getX()); + videoWarnInfo.setAlarmLevel(Integer.parseInt(StringUtil.isBlank(warnInfoVo.getAlarm_level()) ? "2" : warnInfoVo.getAlarm_level())); + videoWarnInfo.setTargetId(warnInfoVo.getObject_id()); + videoWarnInfo.setTargetType(GlobalVariable.getCilentType(Integer.parseInt(StringUtil.isBlank(warnInfoVo.getObject_type()) ? "0" : warnInfoVo.getObject_type()))); + videoWarnInfo.setAlarmSource(Integer.parseInt(warnInfoVo.getAlarm_source())); + final String time = String.valueOf(warnInfoVo.getBegintime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 10) ? (date * 1000L) : date; + videoWarnInfo.setAlarmTime(begintime); + videoWarnInfo.setAlarmType(Integer.parseInt(warnInfoVo.getAlarm_type())); + videoWarnInfo.setAlarmStatus(Integer.parseInt(warnInfoVo.getAlarm_status())); + videoWarnInfo.setUntreatedAlarmCount(warnInfoVo.getUntreated_alarm_count()); + WarnGPSDyDataThread.getZMQPUB().sendData(Constant.TOPIC, videoWarnInfo.build().toByteArray()); + } + + public static void parseParmSendWarnToRongKe(final ZCHXVideoWarn.VideoWarnInfo videoWarnInfo) { + final WarnInfoBean bean = WarnInfoBean.getClone(); + bean.setSign("1"); + bean.setId(videoWarnInfo.getAlarmId()); + bean.setAlarm_level(String.valueOf(videoWarnInfo.getAlarmLevel())); + final String time = String.valueOf(videoWarnInfo.getAlarmTime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 13) ? (date / 1000L) : date; + bean.setBegintime(begintime); + bean.setAlarm_site(videoWarnInfo.getAlarmPlace()); + bean.setX(videoWarnInfo.getAlarmLon()); + bean.setY(videoWarnInfo.getAlarmLat()); + bean.setAlarm_source("1"); + bean.setAlarm_type(String.valueOf(videoWarnInfo.getAlarmType())); + bean.setMark(""); + bean.setCamera_id(String.valueOf(videoWarnInfo.getCameraId())); + bean.setObject_type(String.valueOf(GlobalVariable.getRongkeType(videoWarnInfo.getTargetType()))); + bean.setRtsp(StringUtil.isBlank(videoWarnInfo.getAlarmRtsp()) ? "0" : videoWarnInfo.getAlarmRtsp()); + bean.setHandle_status(2); + HttpUtils.sendWarnToRongKe(bean); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/constant/GlobalVariable.java b/src/main/java/com/zhichenhaixin/base/constant/GlobalVariable.java new file mode 100644 index 0000000..548a9af --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/constant/GlobalVariable.java @@ -0,0 +1,124 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.constant; + +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zeromq.ZMQ; + +import java.util.Map; +import java.util.Timer; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +public class GlobalVariable +{ + public static Log log; + public static String sign; + public static final int ttsStatus; + public static final String TOPIC; + public static final int surline_number; + public static ExecutorService cachedThreadPool; + public static ZMQ.Context context; + public static int defence_id; + public static String defence_name; + public static Timer timer; + public static final String REQ_DATA = "data"; + public static final String REQ_SID = "sid"; + public static final String REQ_ID = "id"; + public static final String CODE_NAME = "code"; + public static final int SUCCESS = 1000; + public static final int ERROR = 1001; + public static final String RES_MSG = "msg"; + public static final String RES_DATA = "data"; + public static final String VALIDATOR_FIELD = "field"; + public static final String VALIDATOR_RUEL = "rule"; + public static final String VALIDATOR_COMMENT = "comment"; + public static final String VALIDATOR_MIN_LENGTH = "minLength"; + public static final String VALIDATOR_MAX_LENGTH = "maxLength"; + public static final String VALIDATOR_REGX_EXPRESS = "regx_express"; + public static final String IP; + public static final String release_type = "release"; + public static final String GUAGN_DIAN_YI = "\u5149\u7535\u4eea"; + public static int MODEL_TYPE; + public static int big_controll_big_screen; + public static Map warnMap; + public static final String TTS_ALARM = "\u6709\u76ee\u6807\u8fdb\u5165"; + public static final String SURRAND_LINE_ONE = "line_one"; + public static final String SURRAND_LINE_TWO = "line_two"; + public static final String SURRAND_LINE_THREE = "line_three"; + public static final String DEFENCE = "defence"; + public static final String warn_alarm_count = "warn_alarm_count"; + public static Map mapVideoWarnInfo; + public static Map mapComposeVideoBefore; + public static Map mapComposeVideoAfter; + + static { + GlobalVariable.log = LogFactory.getLog(GlobalVariable.class); + GlobalVariable.sign = SpringPropertyUtil.getProperty("tts_report_topic"); + ttsStatus = Integer.valueOf(SpringPropertyUtil.getProperty("tts.status")); + TOPIC = SpringPropertyUtil.getProperty("video.alarm.info.topic"); + surline_number = Integer.valueOf(SpringPropertyUtil.getProperty("surline.number")); + GlobalVariable.cachedThreadPool = Executors.newCachedThreadPool(); + GlobalVariable.context = ZMQ.context(1); + GlobalVariable.defence_id = Integer.valueOf(SpringPropertyUtil.getProperty("defence_id")); + GlobalVariable.defence_name = SpringPropertyUtil.getProperty("defence_name"); + GlobalVariable.timer = new Timer(); + IP = SpringPropertyUtil.getProperty("address.ip"); + GlobalVariable.MODEL_TYPE = 3; + GlobalVariable.big_controll_big_screen = 5; + GlobalVariable.warnMap = new ConcurrentHashMap(); + GlobalVariable.mapVideoWarnInfo = new ConcurrentHashMap(); + GlobalVariable.mapComposeVideoBefore = new ConcurrentHashMap(); + GlobalVariable.mapComposeVideoAfter = new ConcurrentHashMap(); + } + + public static int getRongkeType(int type) { + switch (type) { + case 0: { + type = 1; + break; + } + case 1: { + type = 2; + break; + } + case 2: { + type = 3; + break; + } + default: { + type = 4; + break; + } + } + return type; + } + + public static int getCilentType(int type) { + switch (type) { + case 1: { + type = 0; + break; + } + case 2: { + type = 1; + break; + } + case 3: { + type = 2; + break; + } + default: { + type = 4; + break; + } + } + return type; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/controller/BaseController.java b/src/main/java/com/zhichenhaixin/base/controller/BaseController.java new file mode 100644 index 0000000..be9051e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/controller/BaseController.java @@ -0,0 +1,30 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.controller; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletRequest; + +@Controller +@RequestMapping({ "baseController" }) +public class BaseController +{ + public Log log; + + public BaseController() { + this.log = LogFactory.getLog(BaseController.class); + } + + @RequestMapping({ "{pkg}/{jsp}" }) + public String view(@PathVariable("pkg") final String pkg, @PathVariable("jsp") final String jsp, final HttpServletRequest request) { + this.log.info("toPage : " + pkg + "/" + jsp); + return String.valueOf(pkg) + "/" + jsp; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/dao/BaseDao.java b/src/main/java/com/zhichenhaixin/base/dao/BaseDao.java new file mode 100644 index 0000000..f3b0b86 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/dao/BaseDao.java @@ -0,0 +1,35 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.dao; + +import com.zhichenhaixin.sys.model.UserLoginLogInfo; +import org.apache.ibatis.annotations.Param; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +public interface BaseDao +{ + Map queryById(final String p0, final int p1); + + List> queryByParams(final String p0, final Map p1); + + void insertRow(final String p0, final Map p1); + + void insertList(final String p0, final Collection p1); + + void insertListBYId(final String p0, @Param("list") final Collection p1, @Param("link_id") final int p2); + + void updateById(final String p0, final Map p1); + + void deleteById(final String p0, final int p1); + + List> queryForPageList(final String p0, final Map p1); + + int queryForPageCount(final String p0, final Map p1); + + void saveLoginLog(final UserLoginLogInfo p0); +} diff --git a/src/main/java/com/zhichenhaixin/base/dao/MongoDBDao.java b/src/main/java/com/zhichenhaixin/base/dao/MongoDBDao.java new file mode 100644 index 0000000..1e9cf2b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/dao/MongoDBDao.java @@ -0,0 +1,25 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.dao; + +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; + +import java.util.List; + +public interface MongoDBDao +{ + void deleteByPrimaryKey(final String p0, final String p1); + + void insert(final String p0, final BasicDBObject p1); + + DBObject selectByPrimaryKey(final String p0, final String p1); + + List selectAll(final String p0); + + List selectAllByField(final String p0, final String p1, final String p2); + + void updateByPrimaryKey(final String p0, final BasicDBObject p1); +} diff --git a/src/main/java/com/zhichenhaixin/base/dao/impl/BaseDaoImpl.java b/src/main/java/com/zhichenhaixin/base/dao/impl/BaseDaoImpl.java new file mode 100644 index 0000000..3ac487a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/dao/impl/BaseDaoImpl.java @@ -0,0 +1,157 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.dao.impl; + +import com.zhichenhaixin.base.dao.BaseDao; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.sys.model.UserLoginLogInfo; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.ibatis.session.RowBounds; +import org.mybatis.spring.SqlSessionTemplate; +import org.springframework.stereotype.Repository; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Repository("baseDaoImpl") +public class BaseDaoImpl implements BaseDao +{ + public Log log; + @Resource(name = "pg_template") + public SqlSessionTemplate pg_template; + + public BaseDaoImpl() { + this.log = LogFactory.getLog(BaseDaoImpl.class); + } + + public SqlSessionTemplate getPg_template() { + return this.pg_template; + } + + public void setPg_template(final SqlSessionTemplate pg_template) { + this.pg_template = pg_template; + } + + @Override + public Map queryById(final String sid, final int id) { + return this.pg_template.selectOne(sid, id); + } + + @Override + public List> queryByParams(final String sid, final Map param) { + final List> list = this.pg_template.selectList(sid, param); + return list; + } + + @Override + public void insertRow(final String sid, final Map param) { + this.pg_template.insert(sid, param); + } + + @Override + public void updateById(final String sid, final Map param) { + this.pg_template.update(sid, param); + } + + @Override + public void deleteById(final String sid, final int id) { + this.pg_template.delete(sid, id); + } + + @Override + public void insertList(final String sid, final Collection list) { + this.pg_template.insert(sid, list); + } + + @Override + public void insertListBYId(final String sid, final Collection list, final int link_id) { + final Map param = new HashMap(); + param.put("list", list); + param.put("link_id", link_id); + this.pg_template.insert(sid, param); + } + + @Override + public List> queryForPageList(final String key, final Map param) { + int page = 1; + int rows = Integer.MAX_VALUE; + Label_0172: { + Label_0088: { + try { + final String pagestr = new StringBuilder().append(param.get("curPage")).toString(); + if (StringUtil.notBlank(pagestr)) { + page = Integer.parseInt(pagestr); + } + } + catch (NumberFormatException e) { + this.log.debug("parameter page is empty"); + break Label_0088; + } + finally { + if (page < 1) { + page = 1; + } + } + if (page < 1) { + page = 1; + } + try { + final String rowsstr = new StringBuilder().append(param.get("size")).toString(); + rows = Integer.parseInt(rowsstr); + } + catch (NumberFormatException e) { + this.log.debug("parameter rows is empty"); + break Label_0172; + } + finally { + if (rows < 1) { + rows = Integer.MAX_VALUE; + } + } + } + if (rows < 1) { + rows = Integer.MAX_VALUE; + } + } + param.put("_QUERY_PAGED_FLAG_", true); + final List> list = this.pg_template.selectList(key, param, new RowBounds((page - 1) * rows, rows)); + param.remove("_QUERY_PAGED_FLAG_"); + return list; + } + + @Override + public int queryForPageCount(final String key, final Map param) { + final Collection mappedStatementNames = this.pg_template.getConfiguration().getMappedStatementNames(); + int cnt = 0; + if (mappedStatementNames.contains(String.valueOf(key) + "Count")) { + this.log.debug("\u5b58\u5728\u5206\u9875\u67e5\u8be2\u603b\u6570SQL:" + key + "Count,\u76f4\u63a5\u4f7f\u7528"); + final Map ret = this.pg_template.selectOne(String.valueOf(key) + "Count", param); + if (ret instanceof Map) { + final Map retmap = ret; + cnt = Integer.parseInt(String.valueOf(retmap.get("cnt_total"))); + } + else { + cnt = Integer.parseInt(ret.toString()); + } + } + else { + param.put("_QUERY_COUNT_FLAG_", true); + final Map ret = this.pg_template.selectOne(key, param); + cnt = Integer.parseInt(String.valueOf(ret.get("cnt_total"))); + param.remove("_QUERY_COUNT_FLAG_"); + } + return cnt; + } + + @Override + public void saveLoginLog(final UserLoginLogInfo info) { + this.pg_template.insert("base.insertLoginLog", info); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/dao/impl/MongoDBDaoImpl.java b/src/main/java/com/zhichenhaixin/base/dao/impl/MongoDBDaoImpl.java new file mode 100644 index 0000000..76a0d50 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/dao/impl/MongoDBDaoImpl.java @@ -0,0 +1,81 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.dao.impl; + +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBCursor; +import com.mongodb.DBObject; +import com.zhichenhaixin.base.dao.MongoDBDao; +import org.springframework.data.mongodb.core.MongoTemplate; + +import java.util.ArrayList; +import java.util.List; + +public class MongoDBDaoImpl implements MongoDBDao +{ + private MongoTemplate mongoTemplate; + + @Override + public void deleteByPrimaryKey(final String collectionName, final String id) { + DBCollection collection = null; + collection = this.mongoTemplate.getCollection(collectionName); + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put("_id", id); + collection.remove(queryObject); + } + + @Override + public void insert(final String collectionName, final BasicDBObject record) { + DBCollection collection = null; + collection = this.mongoTemplate.getCollection(collectionName); + collection.save(record); + } + + @Override + public DBObject selectByPrimaryKey(final String collectionName, final String id) { + DBCollection collection = null; + collection = this.mongoTemplate.getCollection(collectionName); + DBObject dbObject = null; + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put("_id", id); + final DBCursor cursor = collection.find(queryObject); + while (cursor.hasNext()) { + dbObject = cursor.next(); + } + return dbObject; + } + + @Override + public List selectAll(final String collectionName) { + DBCollection collection = null; + collection = this.mongoTemplate.getCollection(collectionName); + final List dbList = new ArrayList(); + final DBCursor cursor = collection.find(); + while (cursor.hasNext()) { + dbList.add(cursor.next()); + } + return dbList; + } + + @Override + public void updateByPrimaryKey(final String collectionName, final BasicDBObject record) { + } + + @Override + public List selectAllByField(final String collectionName, final String field1, final String field2) { + DBCollection collection = null; + collection = this.mongoTemplate.getCollection(collectionName); + final List dbList = new ArrayList(); + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put(field1, true); + queryObject.put(field2, true); + final DBCursor cursor = collection.find(new BasicDBObject(), queryObject); + while (cursor.hasNext()) { + dbList.add(cursor.next()); + } + return dbList; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/model/MatrixCameraVo.java b/src/main/java/com/zhichenhaixin/base/model/MatrixCameraVo.java new file mode 100644 index 0000000..74c71d9 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/model/MatrixCameraVo.java @@ -0,0 +1,90 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class MatrixCameraVo implements Serializable +{ + private static final long serialVersionUID = -3077865585768466263L; + private int splitScreenId; + private int cameraId; + private String videoIp; + private int videoPort; + private String userName; + private String passWord; + private String channelid; + + public void setSplitScreenId(final int splitScreenId) { + this.splitScreenId = splitScreenId; + } + + public void setCameraId(final int cameraId) { + this.cameraId = cameraId; + } + + public void setVideoIp(final String videoIp) { + this.videoIp = videoIp; + } + + public void setVideoPort(final int videoPort) { + this.videoPort = videoPort; + } + + public void setUserName(final String userName) { + this.userName = userName; + } + + public void setPassWord(final String passWord) { + this.passWord = passWord; + } + + public void setChannelid(final String channelid) { + this.channelid = channelid; + } + + public int getSplitScreenId() { + return this.splitScreenId; + } + + public int getCameraId() { + return this.cameraId; + } + + public String getVideoIp() { + return this.videoIp; + } + + public int getVideoPort() { + return this.videoPort; + } + + public String getUserName() { + return this.userName; + } + + public String getPassWord() { + return this.passWord; + } + + public String getChannelid() { + return this.channelid; + } + + public MatrixCameraVo() { + } + + @ConstructorProperties({ "splitScreenId", "cameraId", "videoIp", "videoPort", "userName", "passWord", "channelid" }) + public MatrixCameraVo(final int splitScreenId, final int cameraId, final String videoIp, final int videoPort, final String userName, final String passWord, final String channelid) { + this.splitScreenId = splitScreenId; + this.cameraId = cameraId; + this.videoIp = videoIp; + this.videoPort = videoPort; + this.userName = userName; + this.passWord = passWord; + this.channelid = channelid; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/model/MatrixPCVo.java b/src/main/java/com/zhichenhaixin/base/model/MatrixPCVo.java new file mode 100644 index 0000000..f7bf530 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/model/MatrixPCVo.java @@ -0,0 +1,40 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class MatrixPCVo implements Serializable +{ + private static final long serialVersionUID = 3292350969094959749L; + private int pcId; + private int splitScreenId; + + public void setPcId(final int pcId) { + this.pcId = pcId; + } + + public void setSplitScreenId(final int splitScreenId) { + this.splitScreenId = splitScreenId; + } + + public int getPcId() { + return this.pcId; + } + + public int getSplitScreenId() { + return this.splitScreenId; + } + + public MatrixPCVo() { + } + + @ConstructorProperties({ "pcId", "splitScreenId" }) + public MatrixPCVo(final int pcId, final int splitScreenId) { + this.pcId = pcId; + this.splitScreenId = splitScreenId; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/model/MatrixVo.java b/src/main/java/com/zhichenhaixin/base/model/MatrixVo.java new file mode 100644 index 0000000..67588cd --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/model/MatrixVo.java @@ -0,0 +1,67 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.model; + +import java.beans.ConstructorProperties; +import java.util.ArrayList; +import java.util.List; + +public class MatrixVo +{ + private int handle; + private int sceneId; + private List HCList; + private List computerList; + + public void addMatrixCameraVo(final MatrixCameraVo vo) { + if (this.HCList == null) { + this.HCList = new ArrayList(); + } + this.HCList.add(vo); + } + + public void setHandle(final int handle) { + this.handle = handle; + } + + public void setSceneId(final int sceneId) { + this.sceneId = sceneId; + } + + public void setHCList(final List HCList) { + this.HCList = HCList; + } + + public void setComputerList(final List computerList) { + this.computerList = computerList; + } + + public int getHandle() { + return this.handle; + } + + public int getSceneId() { + return this.sceneId; + } + + public List getHCList() { + return this.HCList; + } + + public List getComputerList() { + return this.computerList; + } + + public MatrixVo() { + } + + @ConstructorProperties({ "handle", "sceneId", "HCList", "computerList" }) + public MatrixVo(final int handle, final int sceneId, final List HCList, final List computerList) { + this.handle = handle; + this.sceneId = sceneId; + this.HCList = HCList; + this.computerList = computerList; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/model/ReqPage.java b/src/main/java/com/zhichenhaixin/base/model/ReqPage.java new file mode 100644 index 0000000..cf7750c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/model/ReqPage.java @@ -0,0 +1,74 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class ReqPage implements Serializable +{ + private static final long serialVersionUID = -4284245164252282726L; + private int curPage; + private int size; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ReqPage)) { + return false; + } + final ReqPage other = (ReqPage)o; + return other.canEqual(this) && this.getCurPage() == other.getCurPage() && this.getSize() == other.getSize(); + } + + protected boolean canEqual(final Object other) { + return other instanceof ReqPage; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getCurPage(); + result = result * 59 + this.getSize(); + return result; + } + + @Override + public String toString() { + return "ReqPage(curPage=" + this.getCurPage() + ", size=" + this.getSize() + ")"; + } + + public void setCurPage(final int curPage) { + this.curPage = curPage; + } + + public void setSize(final int size) { + this.size = size; + } + + public int getCurPage() { + return this.curPage; + } + + public int getSize() { + return this.size; + } + + public ReqPage() { + this.curPage = 1; + this.size = 10; + } + + @ConstructorProperties({ "curPage", "size" }) + public ReqPage(final int curPage, final int size) { + this.curPage = 1; + this.size = 10; + this.curPage = curPage; + this.size = size; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/model/ResInfoVo.java b/src/main/java/com/zhichenhaixin/base/model/ResInfoVo.java new file mode 100644 index 0000000..3e3041e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/model/ResInfoVo.java @@ -0,0 +1,198 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class ResInfoVo implements Serializable +{ + private static final long serialVersionUID = -4644991203691658628L; + private String operateId; + private String uiSaveDataFlag; + private String msgCode; + private String msgContent; + private String msgType; + private String data; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResInfoVo)) { + return false; + } + final ResInfoVo other = (ResInfoVo)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$operateId = this.getOperateId(); + final Object other$operateId = other.getOperateId(); + Label_0065: { + if (this$operateId == null) { + if (other$operateId == null) { + break Label_0065; + } + } + else if (this$operateId.equals(other$operateId)) { + break Label_0065; + } + return false; + } + final Object this$uiSaveDataFlag = this.getUiSaveDataFlag(); + final Object other$uiSaveDataFlag = other.getUiSaveDataFlag(); + Label_0102: { + if (this$uiSaveDataFlag == null) { + if (other$uiSaveDataFlag == null) { + break Label_0102; + } + } + else if (this$uiSaveDataFlag.equals(other$uiSaveDataFlag)) { + break Label_0102; + } + return false; + } + final Object this$msgCode = this.getMsgCode(); + final Object other$msgCode = other.getMsgCode(); + Label_0139: { + if (this$msgCode == null) { + if (other$msgCode == null) { + break Label_0139; + } + } + else if (this$msgCode.equals(other$msgCode)) { + break Label_0139; + } + return false; + } + final Object this$msgContent = this.getMsgContent(); + final Object other$msgContent = other.getMsgContent(); + Label_0176: { + if (this$msgContent == null) { + if (other$msgContent == null) { + break Label_0176; + } + } + else if (this$msgContent.equals(other$msgContent)) { + break Label_0176; + } + return false; + } + final Object this$msgType = this.getMsgType(); + final Object other$msgType = other.getMsgType(); + Label_0213: { + if (this$msgType == null) { + if (other$msgType == null) { + break Label_0213; + } + } + else if (this$msgType.equals(other$msgType)) { + break Label_0213; + } + return false; + } + final Object this$data = this.getData(); + final Object other$data = other.getData(); + if (this$data == null) { + if (other$data == null) { + return true; + } + } + else if (this$data.equals(other$data)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof ResInfoVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $operateId = this.getOperateId(); + result = result * 59 + (($operateId == null) ? 43 : $operateId.hashCode()); + final Object $uiSaveDataFlag = this.getUiSaveDataFlag(); + result = result * 59 + (($uiSaveDataFlag == null) ? 43 : $uiSaveDataFlag.hashCode()); + final Object $msgCode = this.getMsgCode(); + result = result * 59 + (($msgCode == null) ? 43 : $msgCode.hashCode()); + final Object $msgContent = this.getMsgContent(); + result = result * 59 + (($msgContent == null) ? 43 : $msgContent.hashCode()); + final Object $msgType = this.getMsgType(); + result = result * 59 + (($msgType == null) ? 43 : $msgType.hashCode()); + final Object $data = this.getData(); + result = result * 59 + (($data == null) ? 43 : $data.hashCode()); + return result; + } + + @Override + public String toString() { + return "ResInfoVo(operateId=" + this.getOperateId() + ", uiSaveDataFlag=" + this.getUiSaveDataFlag() + ", msgCode=" + this.getMsgCode() + ", msgContent=" + this.getMsgContent() + ", msgType=" + this.getMsgType() + ", data=" + this.getData() + ")"; + } + + public void setOperateId(final String operateId) { + this.operateId = operateId; + } + + public void setUiSaveDataFlag(final String uiSaveDataFlag) { + this.uiSaveDataFlag = uiSaveDataFlag; + } + + public void setMsgCode(final String msgCode) { + this.msgCode = msgCode; + } + + public void setMsgContent(final String msgContent) { + this.msgContent = msgContent; + } + + public void setMsgType(final String msgType) { + this.msgType = msgType; + } + + public void setData(final String data) { + this.data = data; + } + + public String getOperateId() { + return this.operateId; + } + + public String getUiSaveDataFlag() { + return this.uiSaveDataFlag; + } + + public String getMsgCode() { + return this.msgCode; + } + + public String getMsgContent() { + return this.msgContent; + } + + public String getMsgType() { + return this.msgType; + } + + public String getData() { + return this.data; + } + + @ConstructorProperties({ "operateId", "uiSaveDataFlag", "msgCode", "msgContent", "msgType", "data" }) + public ResInfoVo(final String operateId, final String uiSaveDataFlag, final String msgCode, final String msgContent, final String msgType, final String data) { + this.operateId = operateId; + this.uiSaveDataFlag = uiSaveDataFlag; + this.msgCode = msgCode; + this.msgContent = msgContent; + this.msgType = msgType; + this.data = data; + } + + public ResInfoVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/base/model/ResPage.java b/src/main/java/com/zhichenhaixin/base/model/ResPage.java new file mode 100644 index 0000000..cafef33 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/model/ResPage.java @@ -0,0 +1,49 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class ResPage implements Serializable +{ + private static final long serialVersionUID = 8244860634690350718L; + private int rowTotal; + private List infoContent; + + public void setRowTotal(final int rowTotal) { + this.rowTotal = rowTotal; + } + + public void setInfoContent(final List infoContent) { + this.infoContent = infoContent; + } + + public int getRowTotal() { + return this.rowTotal; + } + + public List getInfoContent() { + return this.infoContent; + } + + @Override + public String toString() { + return "ResPage(rowTotal=" + this.getRowTotal() + ", infoContent=" + this.getInfoContent() + ")"; + } + + public ResPage() { + this.infoContent = new ArrayList(); + } + + @ConstructorProperties({ "rowTotal", "infoContent" }) + public ResPage(final int rowTotal, final List infoContent) { + this.infoContent = new ArrayList(); + this.rowTotal = rowTotal; + this.infoContent = infoContent; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/service/BaseService.java b/src/main/java/com/zhichenhaixin/base/service/BaseService.java new file mode 100644 index 0000000..bc73376 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/service/BaseService.java @@ -0,0 +1,46 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.service; + +import com.zhichenhaixin.sys.model.UserLoginLogInfo; + +import java.util.Map; + +public interface BaseService +{ + String queryById(final String p0); + + String queryById(final Map p0); + + Map queryById3(final Map p0); + + String queryByParams(final String p0); + + String queryByParams(final Map p0); + + Map queryByParams3(final Map p0); + + String insertRow(final String p0); + + String insertRow(final Map p0); + + Map insertRow3(final Map p0); + + String updateById(final String p0); + + String updateById(final Map p0); + + Map updateById3(final Map p0); + + String deleteById(final String p0); + + String deleteById(final Map p0); + + Map deleteById3(final Map p0); + + Map queryForPage(final String p0, final Map p1); + + void saveLoginLog(final UserLoginLogInfo p0); +} diff --git a/src/main/java/com/zhichenhaixin/base/service/impl/BaseServiceImpl.java b/src/main/java/com/zhichenhaixin/base/service/impl/BaseServiceImpl.java new file mode 100644 index 0000000..fbdc9f4 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/service/impl/BaseServiceImpl.java @@ -0,0 +1,389 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.service.impl; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import com.zhichenhaixin.base.dao.BaseDao; +import com.zhichenhaixin.base.service.BaseService; +import com.zhichenhaixin.base.util.ObjectUtil; +import com.zhichenhaixin.sys.model.UserLoginLogInfo; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Type; +import java.util.*; + +@Service("baseServiceImpl") +public class BaseServiceImpl implements BaseService +{ + public static Log log; + @Resource(name = "baseDaoImpl") + private BaseDao baseDao; + + static { + BaseServiceImpl.log = LogFactory.getLog(BaseServiceImpl.class); + } + + public String backSucessMapStr(final Object obj) { + final Map map = new HashMap(); + map.put("code", 1000); + map.put("msg", "\u64cd\u4f5c\u6210\u529f"); + map.put("data", obj); + return mapTojsonStr(map); + } + + public Map backSucessMap(final Object obj) { + final Map map = new HashMap(); + map.put("code", 1000); + map.put("msg", "\u64cd\u4f5c\u6210\u529f"); + map.put("data", obj); + return map; + } + + public String backErrorMapStr(final Object obj) { + final Map map = new HashMap(); + map.put("code", 1001); + map.put("msg", "\u64cd\u4f5c\u5931\u8d25"); + map.put("data", obj); + return mapTojsonStr(map); + } + + public Map backErrorMap(final Object obj) { + final Map map = new HashMap(); + map.put("code", 1001); + map.put("msg", "\u64cd\u4f5c\u5931\u8d25"); + map.put("data", obj); + return map; + } + + @Override + public String queryById(final String param) { + try { + final Map map = strToMap(param); + final Map obj = this.baseDao.queryById(map.get("sid").toString(), ObjectUtil.parseInt(map.get("id"))); + return this.backSucessMapStr(obj); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public String queryById(final Map map) { + try { + final Map obj = this.baseDao.queryById(map.get("sid").toString(), ObjectUtil.parseInt(map.get("id"))); + return this.backSucessMapStr(obj); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public Map queryById3(final Map map) { + try { + final Map obj = this.baseDao.queryById(map.get("sid").toString(), ObjectUtil.parseInt(map.get("id"))); + return this.backSucessMap(obj); + } + catch (Exception e) { + return this.backErrorMap(null); + } + } + + @Override + public String queryByParams(final String param) { + try { + final Map map = strToMap(param); + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + final List> list = this.baseDao.queryByParams(map.get("sid").toString(), params); + return this.backSucessMapStr(list); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public String queryByParams(final Map map) { + try { + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + final List> list = this.baseDao.queryByParams(map.get("sid").toString(), params); + return this.backSucessMapStr(list); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public Map queryByParams3(final Map map) { + try { + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + final List> list = this.baseDao.queryByParams(map.get("sid").toString(), params); + return this.backSucessMap(list); + } + catch (Exception e) { + return this.backErrorMap(null); + } + } + + @Override + public String insertRow(final String param) { + try { + final Map map = strToMap(param); + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + this.baseDao.insertRow(map.get("sid").toString(), params); + return this.backSucessMapStr(null); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public String insertRow(final Map map) { + try { + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + this.baseDao.insertRow(map.get("sid").toString(), params); + return this.backSucessMapStr(null); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public Map insertRow3(final Map map) { + try { + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + this.baseDao.insertRow(map.get("sid").toString(), params); + return this.backSucessMap(null); + } + catch (Exception e) { + return this.backErrorMap(null); + } + } + + @Override + public String updateById(final String param) { + try { + final Map map = strToMap(param); + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + this.baseDao.updateById(map.get("sid").toString(), params); + return this.backSucessMapStr(null); + } + catch (Exception e) { + e.printStackTrace(); + return this.backErrorMapStr(null); + } + } + + @Override + public String updateById(final Map map) { + try { + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + this.baseDao.updateById(map.get("sid").toString(), params); + return this.backSucessMapStr(null); + } + catch (Exception e) { + e.printStackTrace(); + return this.backErrorMapStr(null); + } + } + + @Override + public Map updateById3(final Map map) { + try { + final Object obj = map.get("data"); + final Map params = strToMap(obj.toString()); + this.baseDao.updateById(map.get("sid").toString(), params); + return this.backSucessMap(null); + } + catch (Exception e) { + e.printStackTrace(); + return this.backErrorMap(null); + } + } + + @Override + public String deleteById(final String param) { + try { + final Map map = strToMap(param); + this.baseDao.deleteById(map.get("sid").toString(), ObjectUtil.parseInt(map.get("id"))); + return this.backSucessMapStr(null); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public String deleteById(final Map map) { + try { + this.baseDao.deleteById(map.get("sid").toString(), ObjectUtil.parseInt(map.get("id"))); + return this.backSucessMapStr(null); + } + catch (Exception e) { + return this.backErrorMapStr(null); + } + } + + @Override + public Map deleteById3(final Map map) { + try { + this.baseDao.deleteById(map.get("sid").toString(), ObjectUtil.parseInt(map.get("id"))); + return this.backSucessMap(null); + } + catch (Exception e) { + return this.backErrorMap(null); + } + } + + public static Map strToMap(final String str) { + Map map = null; + try { + final JSONObject jsonObj = (JSONObject)(map = (Map)JSONObject.fromObject(str)); + } + catch (Exception e) { + BaseServiceImpl.log.error("json\u5b57\u7b26\u4e32\u8f6c\u5316\u4e3amap\u7684\u683c\u5f0f\u9519\u8bef!"); + return null; + } + return map; + } + + public List> strToListMap(final String str) { + List> ObjectList = null; + try { + final Gson gson = new Gson(); + final Type type = new TypeToken>() {}.getType(); + ObjectList = gson.fromJson(str, type); + } + catch (Exception e) { + BaseServiceImpl.log.error("json\u8f6c\u5316\u4e3alist\u7684\u683c\u5f0f\u9519\u8bef"); + return null; + } + return ObjectList; + } + + public static String mapTojsonStr(final Map map) { + String str = ""; + try { + final JSONObject jsonObj = JSONObject.fromObject(map); + str = jsonObj.toString(); + } + catch (Exception e) { + BaseServiceImpl.log.error("map\u8f6cjson\u5b57\u7b26\u4e32\u7684\u6570\u636e\u683c\u5f0f\u9519\u8bef"); + } + return str; + } + + public static String listMapToJsonStr(final List> list) { + String json = null; + try { + json = JSONArray.fromObject(list).toString(); + } + catch (Exception e) { + BaseServiceImpl.log.error("list\u8f6cjson\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\u9519\u8bef"); + } + return json; + } + + public static String StrToBinstr(final String str) { + final char[] strChar = str.toCharArray(); + String result = ""; + for (int i = 0; i < strChar.length; ++i) { + result = String.valueOf(result) + Integer.toBinaryString(strChar[i]) + " "; + } + return result; + } + + public static String BinstrToStr(final String binStr) { + final String[] tempStr = StrToStrArray(binStr); + final char[] tempChar = new char[tempStr.length]; + for (int i = 0; i < tempStr.length; ++i) { + tempChar[i] = BinstrToChar(tempStr[i]); + } + return String.valueOf(tempChar); + } + + public static String[] StrToStrArray(final String str) { + return str.split(" "); + } + + public static char BinstrToChar(final String binStr) { + final int[] temp = BinstrToIntArray(binStr); + int sum = 0; + for (int i = 0; i < temp.length; ++i) { + sum += temp[temp.length - 1 - i] << i; + } + return (char)sum; + } + + public static int[] BinstrToIntArray(final String binStr) { + final char[] temp = binStr.toCharArray(); + final int[] result = new int[temp.length]; + for (int i = 0; i < temp.length; ++i) { + result[i] = temp[i] - '0'; + } + return result; + } + + @Override + public Map queryForPage(final String key, final Map param) { + final Map map = new HashMap(); + try { + map.put("infoContent", this.baseDao.queryForPageList(key, param)); + map.put("rowTotal", this.baseDao.queryForPageCount(key, param)); + } + catch (Exception e) { + e.printStackTrace(); + } + return map; + } + + public Map getParameterMap(final HttpServletRequest request) { + final Map retMap = new HashMap(); + final Map paramMap = (Map)request.getParameterMap(); + final Set paramKeys = paramMap.keySet(); + for (final String key : paramKeys) { + final Object originalValue = paramMap.get(key); + if (originalValue.getClass().isArray()) { + final Object[] values = (Object[])originalValue; + if (values.length == 1) { + if (ObjectUtil.isEmpty(values[0])) { + continue; + } + retMap.put(key, values[0]); + } + else { + if (values.length <= 1) { + continue; + } + retMap.put(key, Arrays.asList(values)); + } + } + } + return retMap; + } + + @Override + public void saveLoginLog(final UserLoginLogInfo info) { + this.baseDao.saveLoginLog(info); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ArithmeticUtil.java b/src/main/java/com/zhichenhaixin/base/util/ArithmeticUtil.java new file mode 100644 index 0000000..9a6c04a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ArithmeticUtil.java @@ -0,0 +1,83 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +public class ArithmeticUtil +{ + public static ArithmeticUtil util; + public static final double haili = 1.852; + + static { + ArithmeticUtil.util = null; + } + + private ArithmeticUtil() { + } + + public static ArithmeticUtil getInstance() { + if (ArithmeticUtil.util == null) { + ArithmeticUtil.util = new ArithmeticUtil(); + } + return ArithmeticUtil.util; + } + + public double getSpeed(final int vx, final int vy) { + final double x = Math.pow(vx, 2.0); + final double y = Math.pow(vy, 2.0); + final double xy = x + y; + final double val = Math.sqrt(xy); + return val; + } + + public double getSpeedKm(double xy) { + xy *= 3.6; + return xy; + } + + public double getSpeedHl(double xy) { + xy /= 1.852; + return xy; + } + + public double getSpeedHlByVXY(final int vx, final int vy) { + double xy = this.getSpeed(vx, vy); + xy = this.getSpeedKm(xy); + xy = this.getSpeedHl(xy); + return xy; + } + + public double getSpeedHlByVXY(double speed) { + speed = this.getSpeedKm(speed); + speed = this.getSpeedHl(speed); + return speed; + } + + public double getCourse(final int vx, final int vy) { + double course; + if (vx > 0) { + course = 0.0 + Math.atan2(vx, vy); + } + else { + course = 6.283185307179586 + Math.atan2(vx, vy); + } + return course; + } + + public double getCourseDegre(double course) { + course = course / 3.141592653589793 * 180.0; + return course; + } + + public double getCourseDegBYVXY(final int vx, final int vy) { + double xy = this.getCourse(vx, vy); + xy = this.getCourseDegre(xy); + return xy; + } + + public static void main(final String[] args) { + final double val = getInstance().getCourseDegBYVXY(2, 1); + System.out.println(val); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/CacheUtil.java b/src/main/java/com/zhichenhaixin/base/util/CacheUtil.java new file mode 100644 index 0000000..d965b2b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/CacheUtil.java @@ -0,0 +1,20 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import net.sf.ehcache.Cache; +import net.sf.ehcache.CacheManager; + +public class CacheUtil +{ + public static Cache getECache(final String cache_name) { + final boolean b = CacheManager.getInstance().cacheExists(cache_name); + Cache cache = null; + if (b) { + cache = CacheManager.getInstance().getCache(cache_name); + } + return cache; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/CharacterUtil.java b/src/main/java/com/zhichenhaixin/base/util/CharacterUtil.java new file mode 100644 index 0000000..93a72cd --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/CharacterUtil.java @@ -0,0 +1,66 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.io.ByteArrayOutputStream; + +public class CharacterUtil +{ + private static String hexStr; + private static String[] binaryArray; + + static { + CharacterUtil.hexStr = "0123456789ABCDEF"; + CharacterUtil.binaryArray = new String[] { "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" }; + } + + public static String bytes2BinaryStr(final byte[] bArray) { + String outStr = ""; + int pos = 0; + for (final byte b : bArray) { + pos = (b & 0xF0) >> 4; + outStr = String.valueOf(outStr) + CharacterUtil.binaryArray[pos]; + pos = (b & 0xF); + outStr = String.valueOf(outStr) + CharacterUtil.binaryArray[pos]; + } + return outStr; + } + + public static String BinaryToHexString(final byte[] bytes) { + String result = ""; + String hex = ""; + for (int i = 0; i < bytes.length; ++i) { + hex = String.valueOf(CharacterUtil.hexStr.charAt((bytes[i] & 0xF0) >> 4)); + hex = String.valueOf(hex) + String.valueOf(CharacterUtil.hexStr.charAt(bytes[i] & 0xF)); + result = String.valueOf(result) + hex + " "; + } + return result; + } + + public static byte[] HexStringToBinary(final String hexString) { + final int len = hexString.length() / 2; + final byte[] bytes = new byte[len]; + byte high = 0; + byte low = 0; + for (int i = 0; i < len; ++i) { + high = (byte)(CharacterUtil.hexStr.indexOf(hexString.charAt(2 * i)) << 4); + low = (byte)CharacterUtil.hexStr.indexOf(hexString.charAt(2 * i + 1)); + bytes[i] = (byte)(high | low); + } + return bytes; + } + + public static String getStrByBytes(final byte[] bytes) { + return new String(bytes); + } + + public static String decode(final String bytes) { + final ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length() / 2); + for (int i = 0; i < bytes.length(); i += 2) { + baos.write(CharacterUtil.hexStr.indexOf(bytes.charAt(i)) << 4 | CharacterUtil.hexStr.indexOf(bytes.charAt(i + 1))); + } + return new String(baos.toByteArray()); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ConvertUtils.java b/src/main/java/com/zhichenhaixin/base/util/ConvertUtils.java new file mode 100644 index 0000000..f96fb98 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ConvertUtils.java @@ -0,0 +1,74 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.zhichenhaixin.proto.ZCHXAISVessel; +import com.zhichenhaixin.zmq.model.AISData; + +public class ConvertUtils +{ + public static void convertVesselTrack(final ZCHXAISVessel.VesselTrack vesselTrack, final AISData aisData) { + aisData.setMmsi(vesselTrack.getMmsi()); + aisData.setShiptype(vesselTrack.getShiptype()); + aisData.setNavStatus(new StringBuilder().append(vesselTrack.getNavStatus()).toString()); + aisData.setRot(vesselTrack.getRot()); + aisData.setSog(vesselTrack.getSog()); + aisData.setLon(vesselTrack.getLon()); + aisData.setLat(vesselTrack.getLat()); + aisData.setCog(vesselTrack.getCog()); + aisData.setHeading(vesselTrack.getHeading()); + aisData.setUtc(vesselTrack.getUTC()); + } + + public static void convertVesselInfo(final ZCHXAISVessel.VesselInfo vesselInfo, final AISData aisData) { + aisData.setImo(vesselInfo.getImo()); + aisData.setCallSign(vesselInfo.getCallSign()); + aisData.setShipName(vesselInfo.getShipName()); + aisData.setCargoType(new StringBuilder(String.valueOf(vesselInfo.getCargoType())).toString()); + aisData.setCountry(vesselInfo.getCountry()); + aisData.setShipLength(vesselInfo.getShipLength()); + aisData.setShipWidth(vesselInfo.getShipWidth()); + aisData.setToBow(vesselInfo.getToBow()); + aisData.setToStern(vesselInfo.getToStern()); + aisData.setToPort(vesselInfo.getToPort()); + aisData.setToStarboard(vesselInfo.getToStarboard()); + aisData.setEta(vesselInfo.getEta()); + aisData.setDraught(vesselInfo.getDraught()); + aisData.setDest(vesselInfo.getDest()); + aisData.setUtc(vesselInfo.getUTC()); + } + + public static void convertVesselTrackProto(final ZCHXAISVessel.VesselTrack vesselTrack, final ZCHXAISVessel.AISVesselData.Builder aisData) { + aisData.setId(vesselTrack.getId()); + aisData.setMmsi(vesselTrack.getMmsi()); + aisData.setShiptype(vesselTrack.getShiptype()); + aisData.setNavStatus(vesselTrack.getNavStatus()); + aisData.setRot(vesselTrack.getRot()); + aisData.setSog(vesselTrack.getSog()); + aisData.setLon(vesselTrack.getLon()); + aisData.setLat(vesselTrack.getLat()); + aisData.setCog(vesselTrack.getCog()); + aisData.setHeading(vesselTrack.getHeading()); + } + + public static void convertVesselInfoProto(final ZCHXAISVessel.VesselInfo vesselInfo, final ZCHXAISVessel.AISVesselData.Builder aisData) { + aisData.setImo(vesselInfo.getImo()); + aisData.setCallSign(vesselInfo.getCallSign()); + aisData.setShipName(vesselInfo.getShipName()); + aisData.setCargoType(vesselInfo.getCargoType()); + aisData.setCountry(vesselInfo.getCountry()); + aisData.setVendorID(vesselInfo.getVendorID()); + aisData.setShipLength(vesselInfo.getShipLength()); + aisData.setShipWidth(vesselInfo.getShipWidth()); + aisData.setToBow(vesselInfo.getToBow()); + aisData.setToStern(vesselInfo.getToStern()); + aisData.setToPort(vesselInfo.getToPort()); + aisData.setToStarboard(vesselInfo.getToStarboard()); + aisData.setEta(vesselInfo.getEta()); + aisData.setDraught(vesselInfo.getDraught()); + aisData.setDest(vesselInfo.getDest()); + aisData.setUTC(vesselInfo.getUTC()); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/DateUtil.java b/src/main/java/com/zhichenhaixin/base/util/DateUtil.java new file mode 100644 index 0000000..e829973 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/DateUtil.java @@ -0,0 +1,183 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.log4j.Logger; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +public class DateUtil +{ + private static Logger log; + public static SimpleDateFormat format; + public static SimpleDateFormat format1; + public static SimpleDateFormat format2; + public static SimpleDateFormat format3; + public static SimpleDateFormat format4; + public static SimpleDateFormat format5; + public static SimpleDateFormat format6; + public static SimpleDateFormat format7; + public static SimpleDateFormat format8; + + static { + DateUtil.log = Logger.getLogger(DateUtil.class); + DateUtil.format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + DateUtil.format1 = new SimpleDateFormat("yyyy"); + DateUtil.format2 = new SimpleDateFormat("MM"); + DateUtil.format3 = new SimpleDateFormat("d"); + DateUtil.format4 = new SimpleDateFormat("HH"); + DateUtil.format5 = new SimpleDateFormat("mm"); + DateUtil.format6 = new SimpleDateFormat("ss"); + DateUtil.format7 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + DateUtil.format8 = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + } + + public static Date now() { + return new Date(); + } + + public static long getMilliseconds(final Date t2, final Date t1) { + final long l2 = t2.getTime(); + final long l3 = t1.getTime(); + return l2 - l3; + } + + public static String getNowTimestamp() { + final Date d = new Date(); + return DateUtil.format7.format(d); + } + + public static String getCurMillion() { + final Date d = new Date(); + return DateUtil.format8.format(d); + } + + public static String format(final Date d) { + return DateUtil.format.format(d); + } + + public static String format(final Date d, final String fstr) { + final SimpleDateFormat f = new SimpleDateFormat(fstr); + return f.format(d); + } + + public static String getDateMills(final String dateStr) { + final Date d = getDate(dateStr, "yy-MM-dd HH:mm:ss"); + final long time = d.getTime(); + return String.valueOf(time); + } + + public static Map getDateMap(final Date date) { + final HashMap m = new HashMap(); + m.put("Years", DateUtil.format1.format(date)); + m.put("Month", DateUtil.format2.format(date)); + m.put("Day", DateUtil.format3.format(date)); + m.put("Hours", DateUtil.format4.format(date)); + m.put("Minute", DateUtil.format5.format(date)); + m.put("Seconds", DateUtil.format6.format(date)); + return m; + } + + public static Date getDate(final String dateStr, final String format) { + final SimpleDateFormat sdf = new SimpleDateFormat(format); + Date d = null; + try { + d = sdf.parse(dateStr); + } + catch (ParseException e) { + DateUtil.log.error("\u65e5\u671f\u8f6c\u6362\u5f02\u5e38\uff01" + e.getLocalizedMessage()); + } + return d; + } + + public static String getDateRound() { + return String.valueOf(format(new Date(), "yyyyMMddhhmmss")) + getRound(4); + } + + public static String getRound(final int length) { + final Random r = new Random(); + String number = ""; + for (int i = 0; i < length; ++i) { + final int num = r.nextInt(10); + number = String.valueOf(number) + num; + } + return number; + } + + public static String getbackTime(final int count) { + try { + long timeStemp = System.currentTimeMillis(); + timeStemp += 3600000 * -count; + return String.valueOf(timeStemp); + } + catch (Exception e) { + DateUtil.log.error("\u65e5\u671f\u683c\u5f0f\u5316\u9519\u8bef\uff01" + e.getLocalizedMessage()); + return ""; + } + } + + public static String getDateStrByTimestamp(final long time) { + final Date date = new Date(time); + final String str = format(date, "yyyy-MM-dd hh:mm:ss"); + return str; + } + + public static String andHour(final String sysDate, final String sysTime) { + String str = ""; + Date d = null; + try { + SimpleDateFormat simpleDateFormat = null; + if ("24".equals(SpringPropertyUtil.getProperty("gps.hour"))) { + simpleDateFormat = new SimpleDateFormat("ddMMyyHHmmss"); + } + else { + simpleDateFormat = new SimpleDateFormat("ddMMyyhhmmss"); + } + d = simpleDateFormat.parse(String.valueOf(sysDate) + sysTime); + long timeStemp = d.getTime(); + timeStemp += (long)(3600000.0 * Double.parseDouble(SpringPropertyUtil.getProperty("gps.time"))); + final Date date = new Date(timeStemp); + str = simpleDateFormat.format(date); + } + catch (ParseException e) { + DateUtil.log.error("\u65e5\u671f\u683c\u5f0f\u5316\u9519\u8bef\uff01", e.fillInStackTrace()); + d = null; + } + return str; + } + + public static long parseTime(final String str) { + long time = 0L; + try { + SimpleDateFormat simpleDateFormat = null; + if ("24".equals(SpringPropertyUtil.getProperty("gps.hour"))) { + simpleDateFormat = new SimpleDateFormat("ddMMyyHHmmss"); + } + else { + simpleDateFormat = new SimpleDateFormat("ddMMyyhhmmss"); + } + final Date date = simpleDateFormat.parse(str); + time = date.getTime(); + } + catch (ParseException e) { + DateUtil.log.error("\u65e5\u671f\u8f6c\u6362\u5931\u8d25\uff01", e.fillInStackTrace()); + } + return time; + } + + public static void main(final String[] args) throws ParseException { + final String str = getCurMillion(); + System.out.println(str); + final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + final Date parse = format.parse("2017-03-11 13:50:51"); + final long millis = System.currentTimeMillis(); + System.out.println(millis - parse.getTime() >= 300000L); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/DistanceUtil.java b/src/main/java/com/zhichenhaixin/base/util/DistanceUtil.java new file mode 100644 index 0000000..92f81d3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/DistanceUtil.java @@ -0,0 +1,185 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.sys.model.TrackCameraVo; + +import java.util.ArrayList; +import java.util.List; + +public class DistanceUtil +{ + private static final double EARTH_RADIUS = 6378137.0; + private static final double EARTH_ARC = 111199.0; + + public static double degToRad(final double degree) { + return degree * 3.141592653589793 / 180.0; + } + + public static double radToDeg(final double radian) { + return 0.017453292519943295 * radian; + } + + public static double lantitudeLongitudeDist(final double lon1, final double lat1, final double lon2, final double lat2) { + double radLat1 = degToRad(lat1); + double radLat2 = degToRad(lat2); + double radLon1 = degToRad(lon1); + double radLon2 = degToRad(lon2); + if (radLat1 < 0.0) { + radLat1 = 1.5707963267948966 + Math.abs(radLat1); + } + else if (radLat1 > 0.0) { + radLat1 = 1.5707963267948966 - Math.abs(radLat1); + } + if (radLat2 < 0.0) { + radLat2 = 1.5707963267948966 + Math.abs(radLat2); + } + else if (radLat2 > 0.0) { + radLat2 = 1.5707963267948966 - Math.abs(radLat2); + } + if (radLon1 > 0.0) { + radLon1 = 6.283185307179586 + Math.abs(radLon1); + } + else if (radLon1 < 0.0) { + radLon1 = 6.283185307179586 - Math.abs(radLon1); + } + if (radLon2 > 0.0) { + radLon2 = 6.283185307179586 + Math.abs(radLon2); + } + else if (radLon2 < 0.0) { + radLon2 = 6.283185307179586 - Math.abs(radLon2); + } + final double x1 = 6378137.0 * Math.cos(radLon1) * Math.sin(radLat1); + final double y1 = 6378137.0 * Math.sin(radLon1) * Math.sin(radLat1); + final double z1 = 6378137.0 * Math.cos(radLat1); + final double x2 = 6378137.0 * Math.cos(radLon2) * Math.sin(radLat2); + final double y2 = 6378137.0 * Math.sin(radLon2) * Math.sin(radLat2); + final double z2 = 6378137.0 * Math.cos(radLat2); + final double d = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2)); + final double theta = Math.acos((8.1361263181538E13 - d * d) / 8.1361263181538E13); + final double dist = theta * 6378137.0; + return dist; + } + + public static double getDistance(final double lat1, final double lng1, final double lat2, final double lng2) { + final double a = degToRad(lat1) - degToRad(lat2); + final double b = degToRad(lng1) - degToRad(lng2); + final double sa2 = Math.sin(a / 2.0); + final double sb2 = Math.sin(b / 2.0); + final double d = 1.2756274E7 * Math.asin(Math.sqrt(sa2 * sa2 + Math.cos(lat1) * Math.cos(lat2) * sb2 * sb2)); + return d; + } + + public static double getDistanceFromXtoY(final double lat_a, final double lng_a, final double lat_b, final double lng_b) { + final double pk = 57.29577951308232; + final double a1 = lat_a / pk; + final double a2 = lng_a / pk; + final double b1 = lat_b / pk; + final double b2 = lng_b / pk; + final double t1 = Math.cos(a1) * Math.cos(a2) * Math.cos(b1) * Math.cos(b2); + final double t2 = Math.cos(a1) * Math.sin(a2) * Math.cos(b1) * Math.sin(b2); + final double t3 = Math.sin(a1) * Math.sin(b1); + final double tt = Math.acos(t1 + t2 + t3); + return 6366000.0 * tt; + } + + public static double getpab(double lng_a, double lat_a, double lng_b, double lat_b) { + double d = 0.0; + lat_a = degToRad(lat_a); + lng_a = degToRad(lng_a); + lat_b = degToRad(lat_b); + lng_b = degToRad(lng_b); + d = Math.sin(lat_a) * Math.sin(lat_b) + Math.cos(lat_a) * Math.cos(lat_b) * Math.cos(lng_b - lng_a); + d = Math.sqrt(1.0 - d * d); + d = Math.cos(lat_b) * Math.sin(lng_b - lng_a) / d; + d = Math.asin(d) * 180.0 / 3.141592653589793; + return d; + } + + public static double getAzimuth(double lon1, double lat1, double lon2, double lat2) { + lat1 = degToRad(lat1); + lat2 = degToRad(lat2); + lon1 = degToRad(lon1); + lon2 = degToRad(lon2); + double azimuth = Math.sin(lat1) * Math.sin(lat2) + Math.cos(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1); + azimuth = Math.sqrt(1.0 - azimuth * azimuth); + azimuth = Math.cos(lat2) * Math.sin(lon2 - lon1) / azimuth; + azimuth = Math.asin(azimuth) * 180.0 / 3.141592653589793; + if (Double.isNaN(azimuth)) { + if (lon1 < lon2) { + azimuth = 90.0; + } + else { + azimuth = 270.0; + } + } + return azimuth; + } + + public static double[] convertDistanceToLogLat(final double lng1, final double lat1, final double distance, double azimuth) { + final double[] lon_lat = new double[2]; + azimuth = degToRad(azimuth); + final double lon = lng1 + distance * Math.sin(azimuth) / (111199.0 * Math.cos(degToRad(lat1))); + final double lat2 = lat1 + distance * Math.cos(azimuth) / 111199.0; + lon_lat[0] = lon; + lon_lat[1] = lat2; + return lon_lat; + } + + public static boolean verifyIsSmuggle(final TrackCameraVo cvo, final List cvolist, final RadarTrackVo rvo, final List rvolist, final int people, final int car, final int ship, final int smuggle_bound) { + if (cvo != null && cvolist != null) { + for (final TrackCameraVo tcvo : cvolist) { + try { + final double instance = getDistanceFromXtoY(cvo.getObjectMapPosY(), cvo.getObjectMapPosX(), tcvo.getObjectMapPosY(), tcvo.getObjectMapPosX()); + tcvo.setDistance(instance); + } + catch (Exception ex) {} + } + } + if (rvo != null && cvolist != null) { + for (final TrackCameraVo tcvo : cvolist) { + try { + final double instance = getDistanceFromXtoY(rvo.getWgs84PosLat(), rvo.getWgs84PosLon(), tcvo.getObjectMapPosY(), tcvo.getObjectMapPosX()); + tcvo.setDistance(instance); + } + catch (Exception ex2) {} + } + } + if (cvolist != null && rvolist != null && cvolist.size() + rvolist.size() < people + car + ship) { + return false; + } + final List list1 = new ArrayList(); + final List list2 = new ArrayList(); + final List list3 = new ArrayList(); + if (cvolist != null) { + for (int i = 0; i < cvolist.size(); ++i) { + final TrackCameraVo cv = cvolist.get(i); + if (cv.getDistance() <= smuggle_bound) { + final int ctype = cv.getObjectType(); + if (ctype == 0) { + list1.add(i); + } + if (ctype == 1) { + list2.add(i); + } + if (ctype == 2) { + list3.add(i); + } + } + } + } + if (list1.size() == 0 && list2.size() == 0 && list3.size() == 0) { + return false; + } + if (list1.size() >= people && list2.size() >= car && list3.size() >= ship) { + list1.clear(); + list2.clear(); + list3.clear(); + return true; + } + return false; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ExecutorsUtils.java b/src/main/java/com/zhichenhaixin/base/util/ExecutorsUtils.java new file mode 100644 index 0000000..aa93baa --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ExecutorsUtils.java @@ -0,0 +1,36 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.TimeUnit; + +public class ExecutorsUtils +{ + private static Log log; + + static { + ExecutorsUtils.log = LogFactory.getLog(ExecutorsUtils.class); + } + + public static void shutdownAndAwaitTermination(final ExecutorService pool, final int timeout, final TimeUnit unit) { + pool.shutdown(); + try { + if (!pool.awaitTermination(timeout, unit)) { + pool.shutdownNow(); + if (!pool.awaitTermination(timeout, unit)) { + ExecutorsUtils.log.info("Pool did not terminate"); + } + } + } + catch (InterruptedException ie) { + pool.shutdownNow(); + Thread.currentThread().interrupt(); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/GZipUtils.java b/src/main/java/com/zhichenhaixin/base/util/GZipUtils.java new file mode 100644 index 0000000..e784185 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/GZipUtils.java @@ -0,0 +1,109 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.io.*; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +public class GZipUtils +{ + public static final int BUFFER = 1024; + public static final String EXT = ".gz"; + + public static byte[] compress(final byte[] data) throws Exception { + final ByteArrayInputStream bais = new ByteArrayInputStream(data); + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + compress(bais, baos); + final byte[] output = baos.toByteArray(); + baos.flush(); + baos.close(); + bais.close(); + return output; + } + + public static void compress(final File file) throws Exception { + compress(file, true); + } + + public static void compress(final File file, final boolean delete) throws Exception { + final FileInputStream fis = new FileInputStream(file); + final FileOutputStream fos = new FileOutputStream(String.valueOf(file.getPath()) + ".gz"); + compress(fis, fos); + fis.close(); + fos.flush(); + fos.close(); + if (delete) { + file.delete(); + } + } + + public static void compress(final InputStream is, final OutputStream os) throws Exception { + final GZIPOutputStream gos = new GZIPOutputStream(os); + final byte[] data = new byte[1024]; + int count; + while ((count = is.read(data, 0, 1024)) != -1) { + gos.write(data, 0, count); + } + gos.finish(); + gos.flush(); + gos.close(); + } + + public static void compress(final String path) throws Exception { + compress(path, true); + } + + public static void compress(final String path, final boolean delete) throws Exception { + final File file = new File(path); + compress(file, delete); + } + + public static byte[] decompress(byte[] data) throws Exception { + final ByteArrayInputStream bais = new ByteArrayInputStream(data); + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + decompress(bais, baos); + data = baos.toByteArray(); + baos.flush(); + baos.close(); + bais.close(); + return data; + } + + public static void decompress(final File file) throws Exception { + decompress(file, true); + } + + public static void decompress(final File file, final boolean delete) throws Exception { + final FileInputStream fis = new FileInputStream(file); + final FileOutputStream fos = new FileOutputStream(file.getPath().replace(".gz", "")); + decompress(fis, fos); + fis.close(); + fos.flush(); + fos.close(); + if (delete) { + file.delete(); + } + } + + public static void decompress(final InputStream is, final OutputStream os) throws Exception { + final GZIPInputStream gis = new GZIPInputStream(is); + final byte[] data = new byte[1024]; + int count; + while ((count = gis.read(data, 0, 1024)) != -1) { + os.write(data, 0, count); + } + gis.close(); + } + + public static void decompress(final String path) throws Exception { + decompress(path, true); + } + + public static void decompress(final String path, final boolean delete) throws Exception { + final File file = new File(path); + decompress(file, delete); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/GaussUtil.java b/src/main/java/com/zhichenhaixin/base/util/GaussUtil.java new file mode 100644 index 0000000..1910afd --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/GaussUtil.java @@ -0,0 +1,165 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.util.ArrayList; +import java.util.List; + +public class GaussUtil +{ + private static double KmPerDegree; + private static double DegreesPerKm; + private static double PI; + private static double TwoPI; + private static double HalfPI; + private static double RadiansPerDegree; + private static double DegreesPerRadian; + + static { + GaussUtil.KmPerDegree = 111.12000071117; + GaussUtil.DegreesPerKm = 1.0 / GaussUtil.KmPerDegree; + GaussUtil.PI = 3.141592653589793; + GaussUtil.TwoPI = 2.0 * GaussUtil.PI; + GaussUtil.HalfPI = GaussUtil.PI / 2.0; + GaussUtil.RadiansPerDegree = GaussUtil.PI / 180.0; + GaussUtil.DegreesPerRadian = 180.0 / GaussUtil.PI; + } + + public static double copysign(final double x, final double y) { + return (y < 0.0) ? (-Math.abs(x)) : Math.abs(x); + } + + public static double NGT1(final double x) { + return (Math.abs(x) > 1.0) ? copysign(1.0, x) : x; + } + + public static double ArcCos(final double x) { + return Math.acos(x); + } + + public static double hav(final double x) { + return (1.0 - Math.cos(x)) * 0.5; + } + + public static double ahav(final double x) { + return ArcCos(NGT1(1.0 - x * 2.0)); + } + + public static double sec(final double x) { + return 1.0 / Math.cos(x); + } + + public static double csc(final double x) { + return 1.0 / Math.sin(x); + } + + public static List GaussProjCal(final double longitude, final double latitude) { + int ProjNo = 0; + final double iPI = 0.0174532925199433; + final int ZoneWide = 6; + final double a = 6378137.0; + final double f = 0.0033528131778969143; + ProjNo = (int)(longitude / ZoneWide); + double longitude2 = ProjNo * ZoneWide + ZoneWide / 2; + longitude2 *= iPI; + final double latitude2 = 0.0; + final double longitude3 = longitude * iPI; + final double latitude3 = latitude * iPI; + final double e2 = 2.0 * f - f * f; + final double ee = e2 * (1.0 - e2); + final double NN = a / Math.sqrt(1.0 - e2 * Math.sin(latitude3) * Math.sin(latitude3)); + final double T = Math.tan(latitude3) * Math.tan(latitude3); + final double C = ee * Math.cos(latitude3) * Math.cos(latitude3); + final double A = (longitude3 - longitude2) * Math.cos(latitude3); + final double M = a * ((1.0 - e2 / 4.0 - 3.0 * e2 * e2 / 64.0 - 5.0 * e2 * e2 * e2 / 256.0) * latitude3 - (3.0 * e2 / 8.0 + 3.0 * e2 * e2 / 32.0 + 45.0 * e2 * e2 * e2 / 1024.0) * Math.sin(2.0 * latitude3) + (15.0 * e2 * e2 / 256.0 + 45.0 * e2 * e2 * e2 / 1024.0) * Math.sin(4.0 * latitude3) - 35.0 * e2 * e2 * e2 / 3072.0 * Math.sin(6.0 * latitude3)); + double xval = NN * (A + (1.0 - T + C) * A * A * A / 6.0 + (5.0 - 18.0 * T + T * T + 72.0 * C - 58.0 * ee) * A * A * A * A * A / 120.0); + double yval = M + NN * Math.tan(latitude3) * (A * A / 2.0 + (5.0 - T + 9.0 * C + 4.0 * C * C) * A * A * A * A / 24.0 + (61.0 - 58.0 * T + T * T + 600.0 * C - 330.0 * ee) * A * A * A * A * A * A / 720.0); + final double X0 = (double)(1000000L * (ProjNo + 1) + 500000L); + final double Y0 = 0.0; + xval += X0; + yval += Y0; + final double X2 = xval; + final double Y2 = yval; + final List list = new ArrayList(); + list.add(X2); + list.add(Y2); + return list; + } + + public static double[] GaussToBLToGauss(final double longitude, final double latitude) { + int ProjNo = 0; + final double[] output = new double[2]; + final double iPI = 0.0174532925199433; + final int ZoneWide = 6; + final double a = 6378137.0; + final double f = 0.003352329869259135; + ProjNo = (int)(longitude / ZoneWide); + double longitude2 = ProjNo * ZoneWide + ZoneWide / 2; + longitude2 *= iPI; + final double longitude3 = longitude * iPI; + final double latitude2 = latitude * iPI; + final double e2 = 2.0 * f - f * f; + final double ee = e2 / (1.0 - e2); + final double NN = a / Math.sqrt(1.0 - e2 * Math.sin(latitude2) * Math.sin(latitude2)); + final double T = Math.tan(latitude2) * Math.tan(latitude2); + final double C = ee * Math.cos(latitude2) * Math.cos(latitude2); + final double A = (longitude3 - longitude2) * Math.cos(latitude2); + final double M = a * ((1.0 - e2 / 4.0 - 3.0 * e2 * e2 / 64.0 - 5.0 * e2 * e2 * e2 / 256.0) * latitude2 - (3.0 * e2 / 8.0 + 3.0 * e2 * e2 / 32.0 + 45.0 * e2 * e2 * e2 / 1024.0) * Math.sin(2.0 * latitude2) + (15.0 * e2 * e2 / 256.0 + 45.0 * e2 * e2 * e2 / 1024.0) * Math.sin(4.0 * latitude2) - 35.0 * e2 * e2 * e2 / 3072.0 * Math.sin(6.0 * latitude2)); + double xval = NN * (A + (1.0 - T + C) * A * A * A / 6.0 + (5.0 - 18.0 * T + T * T + 14.0 * C - 58.0 * ee) * A * A * A * A * A / 120.0); + double yval = M + NN * Math.tan(latitude2) * (A * A / 2.0 + (5.0 - T + 9.0 * C + 4.0 * C * C) * A * A * A * A / 24.0 + (61.0 - 58.0 * T + T * T + 270.0 * C - 330.0 * ee) * A * A * A * A * A * A / 720.0); + final double X0 = (double)(1000000L * (ProjNo + 1) + 500000L); + final double Y0 = 0.0; + xval += X0; + yval += Y0; + output[0] = xval; + output[1] = yval; + return output; + } + + public static double[] moveLocation(final double lon, final double lat, final double distance, final double angle) { + double dist = distance / 1000.0; + double course = angle; + final double slt = lat; + double slg = lon; + double xlt = 0.0; + double xlg = 0.0; + if (dist > GaussUtil.KmPerDegree * 180.0) { + course -= 180.0; + if (course < 0.0) { + course += 360.0; + } + dist = GaussUtil.KmPerDegree * 360.0 - dist; + } + if (course > 180.0) { + course -= 360.0; + } + final double c = course * GaussUtil.RadiansPerDegree; + final double d = dist * GaussUtil.DegreesPerKm * GaussUtil.RadiansPerDegree; + final double L1 = slt * GaussUtil.RadiansPerDegree; + slg *= GaussUtil.RadiansPerDegree; + final double coL1 = (90.0 - slt) * GaussUtil.RadiansPerDegree; + final double coL2 = ahav(hav(c) / (sec(L1) * csc(d)) + hav(d - coL1)); + final double L2 = GaussUtil.HalfPI - coL2; + final double l = L2 - L1; + double dLo; + if ((dLo = Math.cos(L1) * Math.cos(L2)) != 0.0) { + dLo = ahav((hav(d) - hav(l)) / dLo); + } + if (c < 0.0) { + dLo = -dLo; + } + slg += dLo; + if (slg < -GaussUtil.PI) { + slg += GaussUtil.TwoPI; + } + else if (slg > GaussUtil.PI) { + slg -= GaussUtil.TwoPI; + } + xlt = L2 * GaussUtil.DegreesPerRadian; + xlg = slg * GaussUtil.DegreesPerRadian; + final double[] caculate = { xlt, xlg }; + return caculate; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/GeometryUtil.java b/src/main/java/com/zhichenhaixin/base/util/GeometryUtil.java new file mode 100644 index 0000000..7794e99 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/GeometryUtil.java @@ -0,0 +1,117 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.vividsolutions.jts.geom.*; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKTReader; +import com.vividsolutions.jts.io.gml2.GMLReader; +import com.vividsolutions.jts.io.gml2.GMLWriter; +import org.xml.sax.SAXException; + +import javax.xml.parsers.ParserConfigurationException; +import java.io.IOException; + +public class GeometryUtil +{ + private static GeometryFactory factory; + private static double EARTH_RADIS; + private static final int SIDES = 64; + + static { + GeometryUtil.factory = new GeometryFactory(new PrecisionModel(), 4326); + GeometryUtil.EARTH_RADIS = 6356752.314245; + } + + public static Geometry convertGeometryByKML(final String kml) { + final GMLReader gmlReader = new GMLReader(); + Geometry filter = null; + try { + filter = gmlReader.read(kml, GeometryUtil.factory); + return filter; + } + catch (SAXException e) { + return null; + } + catch (IOException e2) { + return null; + } + catch (ParserConfigurationException e3) { + return null; + } + } + + public static String asKml(final Geometry geometry) { + final GMLWriter kmlWriter = new GMLWriter(); + kmlWriter.setPrefix(""); + return kmlWriter.write(geometry); + } + + public static Geometry convertLonAndLatToGeometry(final double lon, final double lat) { + final String wktPoint = "POINT(" + lon + " " + lat + ")"; + final WKTReader fromText = new WKTReader(); + Geometry location = null; + try { + location = fromText.read(wktPoint); + location.setSRID(4326); + } + catch (ParseException e) { + throw new RuntimeException("Not a WKT string:" + wktPoint); + } + return location; + } + + public static Polygon kmlstring2polygon(final String kml) { + final int s = kml.indexOf(""); + final int e = kml.indexOf(""); + if (s != -1 && e != -1) { + String cdstr = kml.substring(s + "".length(), e); + cdstr = cdstr.trim(); + final String[] cdstrsplit = cdstr.split("\\s+"); + final Coordinate[] cds = new Coordinate[cdstrsplit.length + 1]; + for (int i = 0; i < cdstrsplit.length; ++i) { + final String[] ss = cdstrsplit[i].split(","); + cds[i] = new Coordinate(Double.valueOf(ss[0]), Double.valueOf(ss[1])); + } + cds[cds.length - 1] = new Coordinate(cds[0].x, cds[0].y); + final LinearRing linear = new GeometryFactory().createLinearRing(cds); + final Polygon poly = new Polygon(linear, null, GeometryUtil.factory); + return poly; + } + return null; + } + + public static double getDistance(double lon1, double lat1, double lon2, double lat2) { + lat1 = Math.toRadians(lat1); + lon1 = Math.toRadians(lon1); + lat2 = Math.toRadians(lat2); + lon2 = Math.toRadians(lon2); + final double dLat = lat2 - lat1; + final double dLon = lon2 - lon1; + final double a = Math.sin(dLat / 2.0) * Math.sin(dLat / 2.0) + Math.cos(lat1) * Math.cos(lat2) * Math.sin(dLon / 2.0) * Math.sin(dLon / 2.0); + final double c = 2.0 * Math.atan2(Math.sqrt(a), Math.sqrt(1.0 - a)); + final double d = GeometryUtil.EARTH_RADIS * c; + return d; + } + + public static Polygon createCircle(final double x, final double y, final double RADIUS) { + final Coordinate[] coords = new Coordinate[65]; + for (int i = 0; i < 64; ++i) { + final double angle = i / 64.0 * 3.141592653589793 * 2.0; + final double dx = Math.cos(angle) * RADIUS; + final double dy = Math.sin(angle) * RADIUS; + coords[i] = new Coordinate(x + dx, y + dy); + } + coords[64] = coords[0]; + final LinearRing ring = GeometryUtil.factory.createLinearRing(coords); + final Polygon polygon = GeometryUtil.factory.createPolygon(ring, null); + return polygon; + } + + public static void main(final String[] args) { + final Polygon pol = createCircle(1.0, 2.0, 30.0); + System.out.println(pol.toString()); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/HttpUtils.java b/src/main/java/com/zhichenhaixin/base/util/HttpUtils.java new file mode 100644 index 0000000..70fd91c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/HttpUtils.java @@ -0,0 +1,158 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.zhichenhaixin.sys.model.UserVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.log4j.Logger; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.sql.Timestamp; + +public class HttpUtils +{ + private static Logger log; + private static final String USER_INFO_URL; + private static final String RONGKE_WARN_URL; + private static int TIMEOUT; + private static HttpURLConnection urlConn; + + static { + HttpUtils.log = Logger.getLogger(HttpUtils.class); + USER_INFO_URL = SpringPropertyUtil.getProperty("http.rongke.userinfo.url"); + RONGKE_WARN_URL = SpringPropertyUtil.getProperty("http.rongke.warn.url"); + HttpUtils.TIMEOUT = Integer.parseInt(SpringPropertyUtil.getProperty("http.rongke.timeout")); + HttpUtils.urlConn = null; + if (HttpUtils.TIMEOUT > 1000) { + HttpUtils.TIMEOUT = 500; + } + } + + public static void sendUserInfoToRongKe(final UserVo userVo, final int status) { + final StringBuilder param = new StringBuilder(); + param.append("/" + userVo.getUser_account().replaceAll(" ", "")); + param.append("/" + userVo.getUser_passwd().replaceAll(" ", "")); + param.append("/" + userVo.getUser_name().replaceAll(" ", "")); + param.append("/" + status); + param.append(".rest"); + sendUserInfo(param.toString()); + HttpUtils.log.info("-> \u7ed9\u8363\u79d1\u53d1\u9001\u7528\u6237\u6570\u636e \uff1a " + param.toString()); + } + + public static synchronized void sendUserInfo(final String str) { + try { + final URL url = new URL(String.valueOf(HttpUtils.USER_INFO_URL) + new String(str.getBytes("UTF-8"))); + (HttpUtils.urlConn = (HttpURLConnection)url.openConnection()).setConnectTimeout(HttpUtils.TIMEOUT); + HttpUtils.urlConn.setDoOutput(true); + HttpUtils.urlConn.setDoInput(true); + HttpUtils.urlConn.setRequestMethod("POST"); + HttpUtils.urlConn.setUseCaches(false); + HttpUtils.urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + HttpUtils.urlConn.setRequestProperty("contentType", "UTF-8"); + HttpUtils.urlConn.setRequestProperty("Accept-Charset", "UTF-8"); + HttpUtils.urlConn.getResponseCode(); + } + catch (Exception ex) { + return; + } + finally { + if (HttpUtils.urlConn != null) { + HttpUtils.urlConn.disconnect(); + } + } + if (HttpUtils.urlConn != null) { + HttpUtils.urlConn.disconnect(); + } + } + + public static String sendWarnToRongKe(final WarnInfoBean bean) { + final StringBuilder param = new StringBuilder(); + param.append("/" + bean.getId()); + final String time = String.valueOf(bean.getBegintime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 10) ? (date * 1000L) : date; + param.append("/" + Timestamp.valueOf(DateUtil.format.format(begintime)).toString().replaceAll(" ", "")); + param.append("/" + bean.getX()); + param.append("/" + bean.getY()); + param.append("/" + (StringUtil.isBlank(bean.getAlarm_type()) ? "0" : bean.getAlarm_type().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getAlarm_level()) ? "0" : bean.getAlarm_level().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getMark()) ? "0" : bean.getMark().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getObject_type()) ? "0" : bean.getObject_type().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getCamera_id()) ? "0" : bean.getCamera_id().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getSign()) ? "1" : bean.getSign().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getAlarm_source()) ? "0" : bean.getAlarm_source().replaceAll(" ", ""))); + param.append("/" + (StringUtil.isBlank(bean.getRtsp()) ? "0" : bean.getRtsp().replaceAll("/", "*"))); + param.append("/" + (StringUtil.isBlank(bean.getAlarm_site()) ? "0" : bean.getAlarm_site().replaceAll(" ", ""))); + param.append("/" + bean.getHandle_status()); + param.append(".rest"); + final String msg = sendWarnInfo(param.toString()); + HttpUtils.log.info("-> \u7ed9\u8363\u79d1\u53d1\u9001\u8b66\u60c5\u6570\u636e\uff1a" + param.toString()); + return msg; + } + + public static synchronized String sendWarnInfo(final String param) { + OutputStream out = null; + HttpURLConnection urlConn = null; + InputStream in = null; + try { + final URL url = new URL(String.valueOf(HttpUtils.RONGKE_WARN_URL) + new String(param.getBytes("UTF-8"))); + urlConn = (HttpURLConnection)url.openConnection(); + urlConn.setConnectTimeout(HttpUtils.TIMEOUT); + urlConn.setDoOutput(true); + urlConn.setDoInput(true); + urlConn.setRequestMethod("POST"); + urlConn.setUseCaches(false); + urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + urlConn.setRequestProperty("contentType", "UTF-8"); + urlConn.setRequestProperty("Accept-Charset", "UTF-8"); + out = urlConn.getOutputStream(); + out.write(param.getBytes()); + out.flush(); + urlConn.getResponseCode(); + in = urlConn.getInputStream(); + final StringBuffer sbf = new StringBuffer(); + final BufferedReader inl = new BufferedReader(new InputStreamReader(in, "UTF-8")); + String line = ""; + while ((line = inl.readLine()) != null) { + sbf.append(line); + } + return sbf.toString(); + } + catch (Exception ex) { + try { + if (out != null) { + out.close(); + } + if (urlConn != null) { + urlConn.disconnect(); + return ""; + } + return ""; + } + catch (Exception e2) { + HttpUtils.log.error("http \u5173\u95ed\u6d41\u51fa\u73b0\u5f02\u5e38\uff1a" + e2.getMessage()); + } + } + finally { + try { + if (out != null) { + out.close(); + } + if (urlConn != null) { + urlConn.disconnect(); + } + } + catch (Exception e2) { + HttpUtils.log.error("http \u5173\u95ed\u6d41\u51fa\u73b0\u5f02\u5e38\uff1a" + e2.getMessage()); + } + } + return ""; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/JsonUtil.java b/src/main/java/com/zhichenhaixin/base/util/JsonUtil.java new file mode 100644 index 0000000..a8a2051 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/JsonUtil.java @@ -0,0 +1,67 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.beanutils.PropertyUtilsBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.lang.reflect.InvocationTargetException; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +public class JsonUtil +{ + private static Log log; + + static { + JsonUtil.log = LogFactory.getLog(JsonUtil.class); + } + + public static String ListToJsonString(final List list) { + final String jsonText = JSON.toJSONString(list, true); + return jsonText; + } + + public static String beanToJSonString(final Object o) { + return JSON.toJSONString(o); + } + + public static JSONObject getJsonObject(final String str) { + final JSONObject jsonObj = JSON.parseObject(str); + return jsonObj; + } + + public static String mapTojsonStr(final Map map) { + String str = ""; + try { + final net.sf.json.JSONObject jsonObj = net.sf.json.JSONObject.fromObject(map); + str = jsonObj.toString(); + } + catch (Exception e) { + JsonUtil.log.error("map\u8f6cjson\u5b57\u7b26\u4e32\u7684\u6570\u636e\u683c\u5f0f\u9519\u8bef"); + } + return str; + } + + public static List getPropertyList(final List objList, final String propertyName) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { + if (objList == null || objList.size() == 0) { + throw new IllegalArgumentException("No objList specified"); + } + if (propertyName == null || "".equals(propertyName)) { + throw new IllegalArgumentException("No propertyName specified for bean class '" + objList.get(0).getClass() + "'"); + } + final PropertyUtilsBean p = new PropertyUtilsBean(); + final List propList = new LinkedList(); + for (int i = 0; i < objList.size(); ++i) { + final T obj = objList.get(i); + propList.add(p.getProperty(obj, propertyName)); + } + return propList; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/JsonValidator.java b/src/main/java/com/zhichenhaixin/base/util/JsonValidator.java new file mode 100644 index 0000000..4c2579c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/JsonValidator.java @@ -0,0 +1,222 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.text.CharacterIterator; +import java.text.StringCharacterIterator; + +public class JsonValidator +{ + private static CharacterIterator it; + private static char c; + private static int col; + + public static boolean validate(String input) { + if (StringUtil.isBlank(input)) { + return false; + } + input = input.trim(); + final boolean ret = valid(input); + return ret; + } + + private static boolean valid(final String input) { + boolean ret = true; + JsonValidator.it = new StringCharacterIterator(input); + JsonValidator.c = JsonValidator.it.first(); + JsonValidator.col = 1; + if (!value()) { + ret = false; + } + else { + skipWhiteSpace(); + if (JsonValidator.c != '\uffff') { + ret = false; + } + } + return ret; + } + + private static boolean value() { + return literal("true") || literal("false") || literal("null") || string() || number() || object() || array(); + } + + private static boolean literal(final String text) { + final CharacterIterator ci = new StringCharacterIterator(text); + char t = ci.first(); + if (JsonValidator.c != t) { + return false; + } + final int start = JsonValidator.col; + boolean ret = true; + for (t = ci.next(); t != '\uffff'; t = ci.next()) { + if (t != nextCharacter()) { + ret = false; + break; + } + } + nextCharacter(); + if (!ret) { + error("literal " + text, start); + } + return ret; + } + + private static boolean array() { + return aggregate('[', ']', false); + } + + private static boolean object() { + return aggregate('{', '}', true); + } + + private static boolean aggregate(final char entryCharacter, final char exitCharacter, final boolean prefix) { + if (JsonValidator.c != entryCharacter) { + return false; + } + nextCharacter(); + skipWhiteSpace(); + if (JsonValidator.c == exitCharacter) { + nextCharacter(); + return true; + } + while (true) { + if (prefix) { + final int start = JsonValidator.col; + if (!string()) { + return error("string", start); + } + skipWhiteSpace(); + if (JsonValidator.c != ':') { + return error("colon", JsonValidator.col); + } + nextCharacter(); + skipWhiteSpace(); + } + if (!value()) { + return error("value", JsonValidator.col); + } + skipWhiteSpace(); + if (JsonValidator.c == ',') { + nextCharacter(); + skipWhiteSpace(); + } + else { + if (JsonValidator.c == exitCharacter) { + nextCharacter(); + return true; + } + return error("comma or " + exitCharacter, JsonValidator.col); + } + } + } + + private static boolean number() { + if (!Character.isDigit(JsonValidator.c) && JsonValidator.c != '-') { + return false; + } + final int start = JsonValidator.col; + if (JsonValidator.c == '-') { + nextCharacter(); + } + if (JsonValidator.c == '0') { + nextCharacter(); + } + else { + if (!Character.isDigit(JsonValidator.c)) { + return error("number", start); + } + while (Character.isDigit(JsonValidator.c)) { + nextCharacter(); + } + } + if (JsonValidator.c == '.') { + nextCharacter(); + if (!Character.isDigit(JsonValidator.c)) { + return error("number", start); + } + while (Character.isDigit(JsonValidator.c)) { + nextCharacter(); + } + } + if (JsonValidator.c == 'e' || JsonValidator.c == 'E') { + nextCharacter(); + if (JsonValidator.c == '+' || JsonValidator.c == '-') { + nextCharacter(); + } + if (!Character.isDigit(JsonValidator.c)) { + return error("number", start); + } + while (Character.isDigit(JsonValidator.c)) { + nextCharacter(); + } + } + return true; + } + + private static boolean string() { + if (JsonValidator.c != '\"') { + return false; + } + final int start = JsonValidator.col; + boolean escaped = false; + nextCharacter(); + while (JsonValidator.c != '\uffff') { + if (!escaped && JsonValidator.c == '\\') { + escaped = true; + } + else if (escaped) { + if (!escape()) { + return false; + } + escaped = false; + } + else if (JsonValidator.c == '\"') { + nextCharacter(); + return true; + } + nextCharacter(); + } + return error("quoted string", start); + } + + private static boolean escape() { + final int start = JsonValidator.col - 1; + if (" \\\"/bfnrtu".indexOf(JsonValidator.c) < 0) { + return error("escape sequence \\\",\\\\,\\/,\\b,\\f,\\n,\\r,\\t or \\uxxxx ", start); + } + return JsonValidator.c != 'u' || (ishex(nextCharacter()) && ishex(nextCharacter()) && ishex(nextCharacter()) && ishex(nextCharacter())) || error("unicode escape sequence \\uxxxx ", start); + } + + private static boolean ishex(final char d) { + return "0123456789abcdefABCDEF".indexOf(JsonValidator.c) >= 0; + } + + private static char nextCharacter() { + JsonValidator.c = JsonValidator.it.next(); + ++JsonValidator.col; + return JsonValidator.c; + } + + private static void skipWhiteSpace() { + while (Character.isWhitespace(JsonValidator.c)) { + nextCharacter(); + } + } + + private static boolean error(final String type, final int col) { + System.out.printf("type: %s, col: %s%s", type, col, System.getProperty("line.separator")); + return false; + } + + public static void main(final String[] args) { + final String jsonStr = "{\"RectList\":[{\"H\":0.07039862,\"Lat\":22.13916976693058,\"Lon\":113.44665718671446,\"Time\":1470401215,\"W\":0.045932423,\"X\":0.8542848,\"Y\":0.2322127},{\"H\":0.056612633,\"Lat\":22.139169720102164,\"Lon\":113.44665716356158,\"Time\":1470401215,\"W\":0.038410924,\"X\":0.8526764,\"Y\":0.22404432},{\"H\":0.060527433,\"Lat\":22.139169704790678,\"Lon\":113.44665715606715,\"Time\":1470401216,\"W\":0.04654039,\"X\":0.84860504,\"Y\":0.22917898},{\"H\":0.061682187,\"Lat\":22.139169695136054,\"Lon\":113.44665715136067,\"Time\":1470401216,\"W\":0.04551673,\"X\":0.84703445,\"Y\":0.23023741},{\"H\":0.069775075,\"Lat\":22.139169712474647,\"Lon\":113.44665715982352,\"Time\":1470401217,\"W\":0.04892395,\"X\":0.8493781,\"Y\":0.22939597},{\"H\":0.052624863,\"Lat\":22.13916964852791,\"Lon\":113.44665712884733,\"Time\":1470401217,\"W\":0.0345741,\"X\":0.8391821,\"Y\":0.23610547},{\"H\":0.057601005,\"Lat\":22.139169702233275,\"Lon\":113.446657154819,\"Time\":1470401218,\"W\":0.041692387,\"X\":0.84451646,\"Y\":0.23758568},{\"H\":0.056303144,\"Lat\":22.139169665211963,\"Lon\":113.4466571368669,\"Time\":1470401218,\"W\":0.034816958,\"X\":0.83997285,\"Y\":0.23849888},{\"H\":0.059537314,\"Lat\":22.13916965102712,\"Lon\":113.44665713004586,\"Time\":1470401219,\"W\":0.033885177,\"X\":0.83935165,\"Y\":0.2363499},{\"H\":0.045450352,\"Lat\":22.139169670587997,\"Lon\":113.44665713946036,\"Time\":1470401219,\"W\":0.0292827,\"X\":0.8362834,\"Y\":0.24808614},{\"H\":0.032614212,\"Lat\":22.139169714628114,\"Lon\":113.44665716087795,\"Time\":1470401220,\"W\":0.030854248,\"X\":0.8389284,\"Y\":0.25296682},{\"H\":0.033007763,\"Lat\":22.139169685894803,\"Lon\":113.44665714686953,\"Time\":1470401220,\"W\":0.027751403,\"X\":0.83809656,\"Y\":0.24780089},{\"H\":0.02174272,\"Lat\":22.139169706730417,\"Lon\":113.44665715701451,\"Time\":1470401221,\"W\":0.020869147,\"X\":0.83515084,\"Y\":0.25939545},{\"H\":0.013569793,\"Lat\":22.139169682376373,\"Lon\":113.44665714516317,\"Time\":1470401222,\"W\":0.012507873,\"X\":0.83389163,\"Y\":0.25630292},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401222,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401223,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401223,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401224,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401224,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401225,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401225,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496},{\"H\":0.02688714,\"Lat\":22.139169653144112,\"Lon\":113.44665713106183,\"Time\":1470401226,\"W\":0.013007185,\"X\":0.83198327,\"Y\":0.2534496}]}"; + final String jsonStr2 = "{ \"ccobjtypeid\": \"1001\", \"fromuser\": \"\u674e\u56db\", \"touser\": \"\u5f20\u4e09\", \"desc\": \"\u63cf\u8ff0\", \"subject\": \"\u4e3b\u9898\", \"attach\": \"3245,3456,4345,4553\", \"data\": { \"desc\": \"\u6d4b\u8bd5\u5bf9\u8c61\", \"dataid\": \"22\", \"billno\": \"TEST0001\", \"datarelation\":[ { \"dataname\": \"\u5173\u8054\u5bf9\u8c611\", \"data\": [ { \"dataid\": \"22\", \"datalineid\": \"1\", \"content1\": \"test1\", \"content2\": \"test2\" } ] } ] } }"; + final String jsonStr3 = ""; + System.out.println(validate(jsonStr)); + System.out.println(validate(jsonStr2)); + System.out.println(validate(jsonStr3)); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/Kml2polygonUtil.java b/src/main/java/com/zhichenhaixin/base/util/Kml2polygonUtil.java new file mode 100644 index 0000000..241137a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/Kml2polygonUtil.java @@ -0,0 +1,86 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.vividsolutions.jts.geom.*; +import com.vividsolutions.jts.io.WKTReader; +import com.vividsolutions.jts.io.gml2.GMLReader; +import org.xml.sax.SAXException; + +import javax.xml.parsers.ParserConfigurationException; +import java.io.IOException; + +public class Kml2polygonUtil +{ + private static GeometryFactory factory; + private static GMLReader gmlReader; + + static { + Kml2polygonUtil.factory = new GeometryFactory(); + Kml2polygonUtil.gmlReader = new GMLReader(); + } + + public static LineString poly2linestring(final Polygon poly) { + LineString ret = null; + if (poly != null) { + ret = new GeometryFactory(new PrecisionModel(), 4326).createLineString(poly.getCoordinates()); + } + return ret; + } + + public static Polygon linestring2poly(final LineString ls) { + Polygon ret = null; + if (ls != null) { + final GeometryFactory fact = new GeometryFactory(new PrecisionModel(), 4326); + final LinearRing linear = fact.createLinearRing(ls.getCoordinates()); + ret = new Polygon(linear, null, fact); + } + return ret; + } + + public static void testclosed() { + System.out.println("==\u95ed\u5408kml"); + final Coordinate[] coordinates = { new Coordinate(113.43692913986084, 22.12011372526001), new Coordinate(113.44465390182373, 22.12328946073364), new Coordinate(113.45250740981933, 22.108440751627196), new Coordinate(113.44302311874267, 22.105436677530516), new Coordinate(113.43692913986084, 22.12011372526001) }; + final GeometryFactory fact = new GeometryFactory(new PrecisionModel(), 4326); + final LinearRing linear = new GeometryFactory(new PrecisionModel(), 4326).createLinearRing(coordinates); + final Polygon poly = new Polygon(linear, null, fact); + System.out.println(poly); + final Boolean contains = poly.contains(new GeometryFactory(new PrecisionModel(), 4326).createPoint(new Coordinate(113.44755068755981, 22.11009299238037))); + System.out.println("\u5305\u542b:" + contains); + } + + public static Geometry convertGeometryByKML(final String kml) { + Geometry filter = null; + try { + filter = Kml2polygonUtil.gmlReader.read(kml, Kml2polygonUtil.factory); + return filter; + } + catch (SAXException e) { + return null; + } + catch (IOException e2) { + return null; + } + catch (ParserConfigurationException e3) { + return null; + } + } + + public static Geometry convertGeometryByKML2(final String kml) { + Geometry g = null; + try { + g = new WKTReader().read(kml); + return g; + } + catch (Exception e) { + System.out.println(e.getLocalizedMessage()); + return null; + } + } + + public static Point xy2point(final double x, final double y) { + return Kml2polygonUtil.factory.createPoint(new Coordinate(x, y)); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ListUtil.java b/src/main/java/com/zhichenhaixin/base/util/ListUtil.java new file mode 100644 index 0000000..dc4f550 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ListUtil.java @@ -0,0 +1,159 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.util.*; + +public class ListUtil +{ + public static Map listToEchats(final List> dataList, final Map opts) { + final Map resultMap = new HashMap(); + final List legendData = new ArrayList(); + final List categoryData = new ArrayList(); + final List series = new ArrayList(); + for (int i = 0; i < dataList.size(); ++i) { + final Map tMap = dataList.get(i); + final Map tsMap = new LinkedHashMap(); + tsMap.put("name", tMap.get("category")); + for (final Map.Entry e : opts.entrySet()) { + tsMap.put(e.getKey(), e.getValue()); + } + if (!tsMap.containsKey("type")) { + tsMap.put("type", "bar"); + } + final List seriesData = new ArrayList(); + for (final Map.Entry entry : tMap.entrySet()) { + if (entry.getKey().equals("category")) { + legendData.add(entry.getValue()); + } + else { + seriesData.add(entry.getValue()); + if (categoryData.contains(entry.getKey())) { + continue; + } + categoryData.add(entry.getKey()); + } + } + tsMap.put("data", seriesData); + series.add(tsMap); + } + resultMap.put("legendData", legendData); + resultMap.put("categoryData", categoryData); + resultMap.put("series", series); + return resultMap; + } + + public static Map listToEchats2(final List> dataList, final Map opts) { + final Map resultMap = new HashMap(); + final Map variableMap = new HashMap(); + final List legendData = new ArrayList(); + final List categoryData = new ArrayList(); + final List category2Data = new ArrayList(); + final List series = new ArrayList(); + final List markPointList = new ArrayList(); + if (dataList.size() > 0) { + final Map categoryMap = dataList.get(0); + int m = 0; + final List categoryList = new ArrayList(); + if (opts.containsKey("sortData")) { + final String[] sortData = (String[])opts.get("sortData"); + String[] array; + for (int length = (array = sortData).length, k = 0; k < length; ++k) { + final String s = array[k]; + if (categoryMap.containsKey(s)) { + categoryList.add(s); + } + } + for (final String category : categoryMap.keySet()) { + Boolean exist = false; + String[] array2; + for (int length2 = (array2 = sortData).length, l = 0; l < length2; ++l) { + final String s2 = array2[l]; + if (category.equals(s2)) { + exist = true; + } + } + if (!exist) { + categoryList.add(category); + } + } + } + else { + for (final String category2 : categoryMap.keySet()) { + categoryList.add(category2); + } + } + for (final String category2 : categoryList) { + if (category2.indexOf("category") == -1 && category2.indexOf("variable_") == -1 && category2.indexOf("markPoint") == -1) { + final List seriesData = new ArrayList(); + legendData.add(category2); + final Map tsMap = new LinkedHashMap(); + tsMap.put("name", category2); + for (final Map.Entry e : opts.entrySet()) { + if (!e.getKey().equals("sortData")) { + tsMap.put(e.getKey(), e.getValue()); + } + } + if (!tsMap.containsKey("type")) { + tsMap.put("type", "bar"); + } + for (int i = 0; i < dataList.size(); ++i) { + final Map tMap = dataList.get(i); + if (m == 0) { + categoryData.add(tMap.get("category")); + } + if (m == 0 && tMap.containsKey("category2")) { + if ("%".equals(opts.get("suffix")) && !"".equals(tMap.get("category2"))) { + category2Data.add(tMap.get("category2") + "%"); + } + else { + category2Data.add(tMap.get("category2")); + } + } + if (m == 0 && tMap.containsKey("markPoint")) { + markPointList.add(tMap.get("markPoint")); + } + seriesData.add(tMap.get(category2)); + } + tsMap.put("data", seriesData); + tsMap.put("markPointList", markPointList); + series.add(tsMap); + ++m; + } + else { + if (category2.indexOf("variable_") < 0) { + continue; + } + variableMap.put(category2, StringUtil.toString(categoryMap.get(category2))); + } + } + if (m == 0) { + for (int j = 0; j < dataList.size(); ++j) { + final Map tMap = dataList.get(j); + categoryData.add(tMap.get("category")); + if (tMap.containsKey("category2")) { + if ("%".equals(opts.get("suffix")) && !"".equals(tMap.get("category2"))) { + category2Data.add(tMap.get("category2") + "%"); + } + else { + category2Data.add(tMap.get("category2")); + } + } + } + } + } + resultMap.put("legendData", legendData); + resultMap.put("categoryData", categoryData); + if (category2Data.size() > 0) { + resultMap.put("category2Data", category2Data); + } + if (markPointList != null && markPointList.size() > 0) { + resultMap.put("markPointList", markPointList); + } + resultMap.put("series", series); + resultMap.put("variableMap", variableMap); + return resultMap; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/LonLatUtil.java b/src/main/java/com/zhichenhaixin/base/util/LonLatUtil.java new file mode 100644 index 0000000..948a4bc --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/LonLatUtil.java @@ -0,0 +1,65 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.text.DecimalFormat; + +public class LonLatUtil +{ + private static DecimalFormat digits; + + static { + LonLatUtil.digits = new DecimalFormat("0.00000000"); + } + + public static double xypase(String dms, final String type) { + if (StringUtil.isBlank(dms)) { + return 0.0; + } + double result = 0.0; + String temp = ""; + dms = dms.replace(",", "."); + if (type.equals("E")) { + final String e1 = dms.substring(0, 3); + final String e2 = dms.substring(3, dms.length()); + result = Double.parseDouble(e1); + result += Double.parseDouble(e2) / 60.0; + temp = String.valueOf(result); + if (temp.length() > 17) { + temp = String.valueOf(e1) + temp.substring(temp.indexOf("."), 17); + } + } + else if (type.equals("N")) { + final String n1 = dms.substring(0, 2); + final String n2 = dms.substring(2, dms.length()); + result = Double.parseDouble(n1); + result += Double.parseDouble(n2) / 60.0; + temp = String.valueOf(result); + if (temp.length() > 16) { + temp = String.valueOf(n1) + temp.substring(temp.indexOf("."), 16); + } + } + return Double.parseDouble(temp); + } + + public static String getLonOrLat(String du, final int length) { + if (StringUtil.isBlank(du)) { + return du; + } + du = du.replace(",", "."); + final String edu = du.substring(0, length); + final int edu2 = Integer.parseInt(edu); + final String fen = du.substring(length, du.length()); + final double fen2 = Double.parseDouble(fen); + final double fen3 = fen2 / 60.0; + final double fen4 = edu2 + fen3; + final String es = LonLatUtil.digits.format(fen4); + return es; + } + + public static void main(final String[] args) { + System.out.println(getLonOrLat("2232.12213", 2)); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/MD5Utils.java b/src/main/java/com/zhichenhaixin/base/util/MD5Utils.java new file mode 100644 index 0000000..2007e9a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/MD5Utils.java @@ -0,0 +1,55 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import sun.misc.BASE64Encoder; + +import java.security.MessageDigest; + +public class MD5Utils +{ + private static Log log; + + static { + MD5Utils.log = LogFactory.getLog(MD5Utils.class); + } + + public static final String MD5(final String s) { + final char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g' }; + try { + final byte[] strTemp = s.getBytes(); + final MessageDigest mdTemp = MessageDigest.getInstance("MD5"); + mdTemp.update(strTemp); + final byte[] md = mdTemp.digest(); + final int j = md.length; + final char[] str = new char[j * 2]; + int k = 0; + for (final byte byte0 : md) { + str[k++] = hexDigits[byte0 >>> 4 & 0xF]; + str[k++] = hexDigits[byte0 & 0xF]; + } + return new String(str); + } + catch (Exception e) { + MD5Utils.log.error("MD5\u52a0\u5bc6\u5f02\u5e38\uff01"); + return null; + } + } + + public static String EncoderByMd5(final String str) { + String newstr = ""; + try { + final MessageDigest md5 = MessageDigest.getInstance("MD5"); + final BASE64Encoder base64en = new BASE64Encoder(); + newstr = base64en.encode(md5.digest(str.getBytes("utf-8"))); + } + catch (Exception e) { + MD5Utils.log.error("BASE64Encoder\u8f6c\u6362\u5f02\u5e38\uff01"); + } + return newstr; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/MapUtil.java b/src/main/java/com/zhichenhaixin/base/util/MapUtil.java new file mode 100644 index 0000000..d4a01e4 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/MapUtil.java @@ -0,0 +1,199 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.beans.BeanInfo; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class MapUtil +{ + private static Log log; + + static { + MapUtil.log = LogFactory.getLog(MapUtil.class); + } + + public Map toMap() { + final Map retmap = new HashMap(); + final Field[] fields = this.getClass().getDeclaredFields(); + if (fields.length > 0) { + for (int i = 0; i < fields.length; ++i) { + final Field field = fields[i]; + final String name = field.getName(); + if (!name.equals("serialVersionUID")) { + final boolean accessible = field.isAccessible(); + if (!accessible) { + field.setAccessible(true); + } + Object value = null; + try { + value = field.get(this); + } + catch (Exception e) { + System.out.println(e.getLocalizedMessage()); + } + if (!accessible) { + field.setAccessible(false); + } + retmap.put(name, value); + } + } + } + return retmap; + } + + public static Map strToMap(final String str) { + Map map = null; + try { + final JSONObject jsonObj = (JSONObject)(map = (Map)JSONObject.fromObject(str)); + } + catch (Exception e) { + MapUtil.log.error("json\u5b57\u7b26\u4e32\u8f6c\u5316\u4e3amap\u7684\u683c\u5f0f\u9519\u8bef!"); + return null; + } + return map; + } + + public static List> strToListMap(final String str) { + List> ObjectList = null; + try { + final Gson gson = new Gson(); + final Type type = new TypeToken>() {}.getType(); + ObjectList = gson.fromJson(str, type); + } + catch (Exception e) { + MapUtil.log.error("json\u8f6c\u5316\u4e3alist\u7684\u683c\u5f0f\u9519\u8bef"); + return null; + } + return ObjectList; + } + + public static String mapTojsonStr(final Map map) { + String str = ""; + try { + final JSONObject jsonObj = JSONObject.fromObject(map); + str = jsonObj.toString(); + } + catch (Exception e) { + MapUtil.log.error("map\u8f6cjson\u5b57\u7b26\u4e32\u7684\u6570\u636e\u683c\u5f0f\u9519\u8bef"); + } + return str; + } + + public static String listMapToJsonStr(final List> list) { + String json = null; + try { + json = JSONArray.fromObject(list).toString(); + } + catch (Exception e) { + MapUtil.log.error("list\u8f6cjson\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\u9519\u8bef"); + } + return json; + } + + public static String StrToBinstr(final String str) { + final char[] strChar = str.toCharArray(); + String result = ""; + for (int i = 0; i < strChar.length; ++i) { + result = String.valueOf(result) + Integer.toBinaryString(strChar[i]) + " "; + } + return result; + } + + public static String BinstrToStr(final String binStr) { + final String[] tempStr = StrToStrArray(binStr); + final char[] tempChar = new char[tempStr.length]; + for (int i = 0; i < tempStr.length; ++i) { + tempChar[i] = BinstrToChar(tempStr[i]); + } + return String.valueOf(tempChar); + } + + public static String[] StrToStrArray(final String str) { + return str.split(" "); + } + + public static char BinstrToChar(final String binStr) { + final int[] temp = BinstrToIntArray(binStr); + int sum = 0; + for (int i = 0; i < temp.length; ++i) { + sum += temp[temp.length - 1 - i] << i; + } + return (char)sum; + } + + public static int[] BinstrToIntArray(final String binStr) { + final char[] temp = binStr.toCharArray(); + final int[] result = new int[temp.length]; + for (int i = 0; i < temp.length; ++i) { + result[i] = temp[i] - '0'; + } + return result; + } + + public static Map convertBean(final Object bean) { + final Class type = bean.getClass(); + final Map returnMap = new HashMap(); + try { + final BeanInfo beanInfo = Introspector.getBeanInfo(type); + final PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); + for (int i = 0; i < propertyDescriptors.length; ++i) { + final PropertyDescriptor descriptor = propertyDescriptors[i]; + final String propertyName = descriptor.getName(); + if (!propertyName.equals("class")) { + final Method readMethod = descriptor.getReadMethod(); + final Object result = readMethod.invoke(bean, new Object[0]); + if (result != null) { + returnMap.put(propertyName, result); + } + else { + returnMap.put(propertyName, ""); + } + } + } + } + catch (Exception e) { + MapUtil.log.error("bean\u5bf9\u8c61\u8f6c\u5316\u4e3amap\u7684\u683c\u5f0f\u9519\u8bef"); + return null; + } + return returnMap; + } + + public static Object convertMap(final Class type, final Map map) { + Object obj = null; + try { + final BeanInfo beanInfo = Introspector.getBeanInfo(type); + obj = type.newInstance(); + final PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); + for (int i = 0; i < propertyDescriptors.length; ++i) { + final PropertyDescriptor descriptor = propertyDescriptors[i]; + final String propertyName = descriptor.getName(); + if (map.containsKey(propertyName)) { + final Object value = map.get(propertyName); + final Object[] args = { value }; + descriptor.getWriteMethod().invoke(obj, args); + } + } + } + catch (Exception e) { + System.out.println(e.getLocalizedMessage()); + } + return obj; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/MathUtil.java b/src/main/java/com/zhichenhaixin/base/util/MathUtil.java new file mode 100644 index 0000000..ec1ba57 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/MathUtil.java @@ -0,0 +1,42 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.text.DecimalFormat; + +public class MathUtil +{ + public static String round(final float num, final float chushu, final int xiaoshudianweishu) { + return round(String.valueOf(num), chushu, xiaoshudianweishu); + } + + public static String round(final String numStr, final float chushu, final int xiaoshudianweishu) { + String result = ""; + if (!StringUtil.isBlank(numStr)) { + double num = Double.valueOf(numStr); + if (num == 0.0) { + return "0"; + } + num /= chushu; + String f = "0"; + String l = ""; + if (xiaoshudianweishu > 0) { + for (int i = 0; i < xiaoshudianweishu; ++i) { + l = String.valueOf(l) + "0"; + } + } + if (!StringUtil.isBlank(l)) { + f = String.valueOf(f) + "." + l; + } + final DecimalFormat df = new DecimalFormat(f); + result = df.format(num); + } + return result; + } + + public static void main(final String[] args) { + System.out.println(round("6400", 1.0E8f, 9)); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/Matrix.java b/src/main/java/com/zhichenhaixin/base/util/Matrix.java new file mode 100644 index 0000000..ca770fa --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/Matrix.java @@ -0,0 +1,124 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +public class Matrix +{ + static double[][] data3; + static double[][] data2; + static double[][] data2f; + static double[] data2d; + + static { + Matrix.data3 = new double[][] { { 1.0, 1.0, 1.0 }, { 0.0, 2.0, 2.0 }, { 1.0, -1.0, 0.0 } }; + Matrix.data2 = new double[][] { { 3.0, -2.0 }, { -1.0, 4.0 } }; + Matrix.data2f = new double[][] { { 0.0, 0.0 }, { 0.0, 0.0 } }; + Matrix.data2d = new double[] { 1.0, 1.0, 2.0 }; + } + + public static double[][] getDY(final double[][] data, final int h, final int v) { + final int H = data.length; + final int V = data[0].length; + final double[][] newData = new double[H - 1][V - 1]; + for (int i = 0; i < newData.length; ++i) { + if (i < h - 1) { + for (int j = 0; j < newData[i].length; ++j) { + if (j < v - 1) { + newData[i][j] = data[i][j]; + } + else { + newData[i][j] = data[i][j + 1]; + } + } + } + else { + for (int j = 0; j < newData[i].length; ++j) { + if (j < v - 1) { + newData[i][j] = data[i + 1][j]; + } + else { + newData[i][j] = data[i + 1][j + 1]; + } + } + } + } + return newData; + } + + public static double getHL(final double[][] data) { + if (data.length == 2) { + return data[0][0] * data[1][1] - data[0][1] * data[1][0]; + } + double total = 0.0; + final int num = data.length; + final double[] nums = new double[num]; + for (int i = 0; i < num; ++i) { + if (i % 2 == 0) { + nums[i] = data[0][i] * getHL(getDY(data, 1, i + 1)); + } + else { + nums[i] = -data[0][i] * getHL(getDY(data, 1, i + 1)); + } + } + for (int i = 0; i < num; ++i) { + total += nums[i]; + } + return total; + } + + public static double[][] getN(final double[][] data) { + final double A = getHL(data); + double[][] newData = new double[data.length][data.length]; + for (int i = 0; i < data.length; ++i) { + for (int j = 0; j < data.length; ++j) { + double num; + if ((i + j) % 2 == 0) { + num = getHL(getDY(data, i + 1, j + 1)); + } + else { + num = -getHL(getDY(data, i + 1, j + 1)); + } + newData[i][j] = num / A; + } + } + newData = getA_T(newData); + for (int i = 0; i < data.length; ++i) { + for (int j = 0; j < data.length; ++j) {} + } + return newData; + } + + public static double[][] getA_T(final double[][] A) { + final int h = A.length; + final int v = A[0].length; + final double[][] A_T = new double[v][h]; + for (int i = 0; i < v; ++i) { + for (int j = 0; j < h; ++j) { + A_T[j][i] = A[i][j]; + } + } + return A_T; + } + + public static double[] matrixMultiply(final double[][] list1, final double[] list2) { + final double[] list3 = new double[list2.length]; + if (list1[0].length == list2.length) { + for (int i = 0; i < list1.length; ++i) { + for (int j = 0; j < list1[i].length; ++j) { + final double[] array = list3; + final int n = i; + array[n] += list1[i][j] * list2[j]; + } + } + } + return list3; + } + + public static void main(final String[] args) { + final double[][] inverseMatrix = getN(Matrix.data3); + final double[] result = matrixMultiply(inverseMatrix, Matrix.data2d); + System.out.println("\u6c42\u89e3\u7684\u503c\u4e3a\uff1ax1 = " + result[0] + ", x2 = " + result[1] + ", x3 = " + result[2]); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ObjectUtil.java b/src/main/java/com/zhichenhaixin/base/util/ObjectUtil.java new file mode 100644 index 0000000..3004ae4 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ObjectUtil.java @@ -0,0 +1,23 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +public class ObjectUtil +{ + public static boolean notBlack(final Object str) { + return str != null && !str.equals(""); + } + + public static int parseInt(final Object str) { + if (str == null || str == "") { + return 0; + } + return Integer.parseInt(new StringBuilder().append(str).toString()); + } + + public static boolean isEmpty(final Object str) { + return str == null || "".equals(str); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/PingUtil.java b/src/main/java/com/zhichenhaixin/base/util/PingUtil.java new file mode 100644 index 0000000..559410c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/PingUtil.java @@ -0,0 +1,141 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.log4j.Logger; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.LineNumberReader; +import java.net.InetAddress; +import java.net.Socket; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class PingUtil +{ + private static final Logger log; + + static { + log = Logger.getLogger(PingUtil.class); + } + + public static boolean ping(final String ipAddress) { + boolean status = false; + try { + final int timeOut = 2000; + status = InetAddress.getByName(ipAddress).isReachable(timeOut); + } + catch (Exception e) { + PingUtil.log.error("\u68c0\u6d4bip\u5f02\u5e38\uff01"); + return false; + } + return status; + } + + public static void ping02(final String ipAddress) throws Exception { + String line = null; + try { + final Process pro = Runtime.getRuntime().exec("ping " + ipAddress); + final BufferedReader buf = new BufferedReader(new InputStreamReader(pro.getInputStream())); + while ((line = buf.readLine()) != null) { + System.out.println(line); + } + } + catch (Exception e) { + PingUtil.log.error("\u68c0\u6d4bip\u5f02\u5e38\uff01"); + } + } + + public static boolean ping(final String ipAddress, final int pingTimes, final int timeOut) { + BufferedReader in = null; + final Runtime r = Runtime.getRuntime(); + final String pingCommand = "ping " + ipAddress + " -n " + pingTimes + " -w " + timeOut; + try { + System.out.println(pingCommand); + final Process p = r.exec(pingCommand); + if (p == null) { + return false; + } + in = new BufferedReader(new InputStreamReader(p.getInputStream())); + int connectedCount = 0; + String line = null; + while ((line = in.readLine()) != null) { + connectedCount += getCheckResult(line); + } + return connectedCount == pingTimes; + } + catch (Exception e) { + PingUtil.log.error("\u68c0\u6d4bip\u5f02\u5e38\uff01"); + return false; + } + finally { + try { + in.close(); + } + catch (IOException e2) { + PingUtil.log.error("\u5173\u95ed\u6d41\u5f02\u5e38\uff01"); + } + } + } + + private static int getCheckResult(final String line) { + final Pattern pattern = Pattern.compile("(\\d+ms)(\\s+)(TTL=\\d+)", 2); + final Matcher matcher = pattern.matcher(line); + if (matcher.find()) { + return 1; + } + return 0; + } + + public static boolean pingIp(final String ip) { + try { + final String address = ip; + final Process process = Runtime.getRuntime().exec("ping " + address); + final InputStreamReader r = new InputStreamReader(process.getInputStream()); + final LineNumberReader returnData = new LineNumberReader(r); + String returnMsg = ""; + String line = ""; + while ((line = returnData.readLine()) != null) { + returnMsg = String.valueOf(returnMsg) + line; + } + System.out.println(returnMsg); + if (returnMsg.indexOf("100% loss") != -1) { + System.out.println("\u4e0e " + address + " \u8fde\u63a5\u4e0d\u7545\u901a."); + return false; + } + System.out.println("\u4e0e " + address + " \u8fde\u63a5\u7545\u901a."); + return true; + } + catch (Exception e) { + PingUtil.log.error("\u68c0\u6d4bip\u5f02\u5e38\uff01"); + return false; + } + } + + public static boolean pingIpAndPort(final String ip, final int port) { + try { + Socket s = new Socket(ip, port); + PingUtil.log.info(s.getLocalAddress() + "\u53ef\u4ee5\u8bbf\u95ee" + ip + "\u4e0a\u7684\u7aef\u53e3" + 8080 + "\u7684\u670d\u52a1."); + s = null; + return true; + } + catch (Exception e) { + PingUtil.log.error("\u65e0\u6cd5\u53d6\u5f97" + ip + "\u4e0a\u7684\u7aef\u53e3" + 8080 + "\u7684\u670d\u52a1."); + return false; + } + } + + public static void main(final String[] args) { + try { + final String ipAddress = "192.168.50.66"; + System.out.println(ping(ipAddress)); + } + catch (Exception e) { + System.out.println(e.getLocalizedMessage()); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/PortManageUtils.java b/src/main/java/com/zhichenhaixin/base/util/PortManageUtils.java new file mode 100644 index 0000000..82af03b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/PortManageUtils.java @@ -0,0 +1,57 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.log4j.Logger; + +import java.util.HashMap; +import java.util.Map; + +public class PortManageUtils +{ + static Logger log; + public static Map portMap; + + static { + PortManageUtils.log = Logger.getLogger(PortManageUtils.class); + PortManageUtils.portMap = new HashMap(); + } + + public static String getRandom(final String str) { + boolean bool = false; + String port; + do { + String theNum = null; + port = null; + final int num = (int)(Math.random() * 100.0); + if (num < 10) { + theNum = "0" + num; + } + else { + theNum = String.valueOf(num); + } + port = String.valueOf(str) + theNum; + bool = searchSavePort(port); + } while (!bool); + return port; + } + + public static synchronized boolean searchSavePort(final String port) { + boolean bool = true; + if (PortManageUtils.portMap != null && PortManageUtils.portMap.containsKey(port)) { + bool = false; + } + if (bool) { + PortManageUtils.portMap.put(port, port); + } + return bool; + } + + public static synchronized void searchDelete(final String port) { + if (PortManageUtils.portMap != null && PortManageUtils.portMap.containsKey(port)) { + PortManageUtils.portMap.remove(port); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ProxyUtil.java b/src/main/java/com/zhichenhaixin/base/util/ProxyUtil.java new file mode 100644 index 0000000..0977b10 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ProxyUtil.java @@ -0,0 +1,42 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.springframework.aop.framework.AdvisedSupport; +import org.springframework.aop.support.AopUtils; + +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Proxy; + +public class ProxyUtil +{ + public static Object getTarget(final Object proxy) { + try { + if (!AopUtils.isAopProxy(proxy)) { + return proxy; + } + if (AopUtils.isJdkDynamicProxy(proxy)) { + return getJdkDynamicProxyTargetObject(proxy); + } + return getCglibProxyTargetObject(proxy); + } + catch (Exception e) { + System.out.println(e.getLocalizedMessage()); + return null; + } + } + + private static Object getCglibProxyTargetObject(final Object proxy) throws Exception { + final Object dynamicAdvisedInterceptor = ReflectionUtils.getFieldValue(proxy, "CGLIB$CALLBACK_0"); + final Object target = ((AdvisedSupport)ReflectionUtils.getFieldValue(dynamicAdvisedInterceptor, "advised")).getTargetSource().getTarget(); + return target; + } + + private static Object getJdkDynamicProxyTargetObject(final Object proxy) throws Exception { + final InvocationHandler invocationHandler = Proxy.getInvocationHandler(proxy); + final Object target = ((AdvisedSupport)ReflectionUtils.getFieldValue(invocationHandler, "advised")).getTargetSource().getTarget(); + return target; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ReadUtil.java b/src/main/java/com/zhichenhaixin/base/util/ReadUtil.java new file mode 100644 index 0000000..9cd16e6 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ReadUtil.java @@ -0,0 +1,36 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.io.InputStream; + +public class ReadUtil +{ + private static ReadUtil util; + + private ReadUtil() { + } + + public static ReadUtil getInstance() { + if (ReadUtil.util == null) { + ReadUtil.util = new ReadUtil(); + } + return ReadUtil.util; + } + + public byte[] readMessage(final InputStream in) { + try { + final byte[] bytes = new byte[4096]; + final int length = in.read(bytes); + final byte[] blenth = new byte[length]; + System.arraycopy(bytes, 0, blenth, 0, length); + return blenth; + } + catch (Exception e) { + System.out.println(e.getLocalizedMessage()); + return null; + } + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ReflectionUtils.java b/src/main/java/com/zhichenhaixin/base/util/ReflectionUtils.java new file mode 100644 index 0000000..6bf3d3f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ReflectionUtils.java @@ -0,0 +1,144 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; + +public class ReflectionUtils +{ + private static Log log; + + static { + ReflectionUtils.log = LogFactory.getLog(ReflectionUtils.class); + } + + public static Object invoke(final Object obj, final String methodName, final Object... args) { + final Class[] parametersType = new Class[args.length]; + for (int i = 0; i < args.length; ++i) { + parametersType[i] = args[i].getClass(); + } + final Method method = getMethod(obj.getClass(), methodName, (Class[])parametersType); + try { + return method.invoke(obj, args); + } + catch (Exception e) { + ReflectionUtils.log.error("\u7236\u7c7b\u4e2d\u7684\u79c1\u6709\u65b9\u6cd5\uff0c\u4f60\u4e0d\u53ef\u8bbf\u95ee!!!"); + return null; + } + } + + public static Method getMethod(Class cla, final String methodName, final Class... parametersType) { + boolean isFirstClass = true; + while (cla != Object.class) { + Method method = null; + try { + method = cla.getDeclaredMethod(methodName, parametersType); + if (isFirstClass) { + method.setAccessible(true); + isFirstClass = false; + } + return method; + } + catch (Exception ex) {} + finally { + isFirstClass = false; + } + cla = cla.getSuperclass(); + } + return null; + } + + public static Object invoke(final String className, final String methodName, final Object... args) { + Object obj = null; + try { + obj = Class.forName(className).newInstance(); + } + catch (Exception e) { + ReflectionUtils.log.error(e.getLocalizedMessage()); + } + if (obj == null) { + return null; + } + return invoke(obj, methodName, args); + } + + public static Object getFieldValue(final Object obj, final String fieldName) { + final Class cla = obj.getClass(); + final Field field = getField(cla, fieldName); + try { + return field.get(obj); + } + catch (Exception e) { + ReflectionUtils.log.error("\u7236\u7c7b\u4e2d\u7684\u79c1\u6709\u5c5e\u6027\uff0c\u4f60\u4e0d\u53ef\u8bbf\u95ee!!!"); + return null; + } + } + + public static Field getField(Class cla, final String fieldName) { + boolean isFirstClass = true; + while (cla != Object.class) { + Field field = null; + try { + field = cla.getDeclaredField(fieldName); + if (isFirstClass) { + field.setAccessible(true); + isFirstClass = false; + } + return field; + } + catch (Exception ex) {} + finally { + isFirstClass = false; + } + cla = cla.getSuperclass(); + } + return null; + } + + public static void setFieldValue(final Object obj, final String fieldName, final Object val) { + final Field field = getField(obj.getClass(), fieldName); + try { + field.set(obj, val); + } + catch (Exception e) { + ReflectionUtils.log.error("\u65e0\u6cd5\u8bbe\u7f6e\u7236\u7c7b\u4e2d\u7684\u79c1\u6709\u5c5e\u6027!!!"); + } + } + + public static T setFieldValue(final String className, final String fieldName, final Object val) { + T obj = null; + try { + obj = (T)Class.forName(className).newInstance(); + } + catch (Exception e) { + ReflectionUtils.log.error("\u7c7b\u540d\u9519\u8bef\uff01\uff01\uff01"); + } + setFieldValue(obj, fieldName, val); + return obj; + } + + public static Class getGenericSuperClass(final Class className, final int index) { + final Type type = className.getGenericSuperclass(); + if (!(type instanceof ParameterizedType)) { + return null; + } + final ParameterizedType parameterizedType = (ParameterizedType)type; + final Type[] args = parameterizedType.getActualTypeArguments(); + if (index < 0 || index > args.length) { + return null; + } + if (args != null) { + final Class cla = (Class)args[index]; + return cla; + } + return null; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ResourceUtil.java b/src/main/java/com/zhichenhaixin/base/util/ResourceUtil.java new file mode 100644 index 0000000..e00d483 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ResourceUtil.java @@ -0,0 +1,48 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.core.io.support.PropertiesLoaderUtils; + +import java.io.IOException; +import java.util.Properties; + +public class ResourceUtil +{ + private static Log log; + private static final Resource resource; + private static Properties props; + + static { + ResourceUtil.log = LogFactory.getLog(ResourceUtil.class); + resource = new ClassPathResource("/resources.properties"); + try { + ResourceUtil.props = PropertiesLoaderUtils.loadProperties(ResourceUtil.resource); + } + catch (IOException e) { + ResourceUtil.log.error("\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u5f02\u5e38\uff01"); + } + } + + public static final String getCtrlFllowHost() { + return ResourceUtil.props.getProperty("ctrl_fllow_host"); + } + + public static final int getCtrlFllowPort() { + return Integer.parseInt(ResourceUtil.props.getProperty("ctrl_fllow_port")); + } + + public static final int getPushFllowTime() { + return Integer.parseInt(ResourceUtil.props.getProperty("push.fllow.target.time")); + } + + public static final String getClientTopic() { + return ResourceUtil.props.getProperty("client.track.topic"); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/SpringBeanUtil.java b/src/main/java/com/zhichenhaixin/base/util/SpringBeanUtil.java new file mode 100644 index 0000000..84de580 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/SpringBeanUtil.java @@ -0,0 +1,65 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +public class SpringBeanUtil implements ApplicationContextAware +{ + private static ApplicationContext applicationContext; + + private SpringBeanUtil() { + } + + @Override + public void setApplicationContext(final ApplicationContext applicationContext) throws BeansException { + if (SpringBeanUtil.applicationContext == null) { + synchronized (SpringBeanUtil.class) { + if (SpringBeanUtil.applicationContext == null) { + SpringBeanUtil.applicationContext = applicationContext; + } + } + // monitorexit(SpringBeanUtil.class) + } + } + + public static Object getBean(final String beanName) { + return SpringBeanUtil.applicationContext.getBean(beanName); + } + + public static T getBean(final Class beanType) { + return SpringBeanUtil.applicationContext.getBean(beanType); + } + + public static T getBean(final String beanName, final Class beanType) { + final Object obj = getBean(beanName); + if (obj == null) { + return getBean(beanType); + } + return (T)obj; + } + + public static boolean existsBean(final String beanName) { + return SpringBeanUtil.applicationContext.containsBean(beanName); + } + + public static boolean existsBeanDefinition(final String beanName) { + return SpringBeanUtil.applicationContext.containsBeanDefinition(beanName); + } + + public static boolean existsLocalBean(final String beanName) { + return SpringBeanUtil.applicationContext.containsLocalBean(beanName); + } + + public static boolean existsBean(final Class beanType) { + return SpringBeanUtil.applicationContext.getBeanNamesForType(beanType).length > 0; + } + + public static ApplicationContext getApplicationContext() { + return SpringBeanUtil.applicationContext; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/SpringPropertyUtil.java b/src/main/java/com/zhichenhaixin/base/util/SpringPropertyUtil.java new file mode 100644 index 0000000..8f33aa7 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/SpringPropertyUtil.java @@ -0,0 +1,75 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.PropertyResourceConfigurer; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.support.AbstractApplicationContext; +import org.springframework.core.io.support.PropertiesLoaderSupport; + +import java.lang.reflect.Method; +import java.util.Properties; + +public class SpringPropertyUtil implements ApplicationContextAware +{ + private static Log log; + private static ApplicationContext applicationContext; + private static Properties properties; + private static AbstractApplicationContext abstractContext; + + static { + SpringPropertyUtil.log = LogFactory.getLog(SpringPropertyUtil.class); + SpringPropertyUtil.applicationContext = null; + SpringPropertyUtil.properties = new Properties(); + SpringPropertyUtil.abstractContext = null; + } + + @Override + public void setApplicationContext(final ApplicationContext applicationContext) throws BeansException { + if (SpringPropertyUtil.applicationContext == null) { + synchronized (SpringBeanUtil.class) { + if (SpringPropertyUtil.applicationContext == null) { + SpringPropertyUtil.applicationContext = applicationContext; + } + } + // monitorexit(SpringBeanUtil.class) + } + SpringPropertyUtil.abstractContext = (AbstractApplicationContext)applicationContext; + init(); + } + + private static void init() { + try { + final String[] postProcessorNames = SpringPropertyUtil.abstractContext.getBeanNamesForType(BeanFactoryPostProcessor.class, true, true); + String[] array; + for (int length = (array = postProcessorNames).length, i = 0; i < length; ++i) { + final String ppName = array[i]; + final BeanFactoryPostProcessor beanProcessor = SpringPropertyUtil.abstractContext.getBean(ppName, BeanFactoryPostProcessor.class); + if (beanProcessor instanceof PropertyResourceConfigurer) { + final PropertyResourceConfigurer propertyResourceConfigurer = (PropertyResourceConfigurer)beanProcessor; + final Method mergeProperties = PropertiesLoaderSupport.class.getDeclaredMethod("mergeProperties", (Class[])new Class[0]); + mergeProperties.setAccessible(true); + final Properties props = (Properties)mergeProperties.invoke(propertyResourceConfigurer, new Object[0]); + final Method convertProperties = PropertyResourceConfigurer.class.getDeclaredMethod("convertProperties", Properties.class); + convertProperties.setAccessible(true); + convertProperties.invoke(propertyResourceConfigurer, props); + SpringPropertyUtil.properties.putAll(props); + } + } + } + catch (Exception e) { + SpringPropertyUtil.log.error(e.getLocalizedMessage()); + } + } + + public static String getProperty(final String propertyName) { + return SpringPropertyUtil.properties.getProperty(propertyName); + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/StringUtil.java b/src/main/java/com/zhichenhaixin/base/util/StringUtil.java new file mode 100644 index 0000000..fb543de --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/StringUtil.java @@ -0,0 +1,104 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import java.util.List; +import java.util.Map; + +public class StringUtil +{ + public static String toSelectStr(final List resultList, final String key, final String value) { + final StringBuilder selectStr = new StringBuilder(); + for (final Object object : resultList) { + final Map _obj = (Map)object; + selectStr.append(""); + } + return selectStr.toString(); + } + + public static String toString(final Object object) { + if (object != null) { + return object.toString().trim(); + } + return null; + } + + public static String firstCharToLowerCase(String str) { + final Character firstChar = str.charAt(0); + final String tail = str.substring(1); + str = String.valueOf(Character.toLowerCase(firstChar)) + tail; + return str; + } + + public static String firstCharToUpperCase(String str) { + final Character firstChar = str.charAt(0); + final String tail = str.substring(1); + str = String.valueOf(Character.toUpperCase(firstChar)) + tail; + return str; + } + + public static boolean isBlank(final String str) { + return str == null || "".equals(str.trim()); + } + + public static boolean notBlank(final String str) { + return str != null && !"".equals(str.trim()); + } + + public static boolean notBlank(final String... strings) { + if (strings == null) { + return false; + } + for (final String str : strings) { + if (str == null || "".equals(str.trim())) { + return false; + } + } + return true; + } + + public static boolean notNull(final Object... paras) { + if (paras == null) { + return false; + } + for (final Object obj : paras) { + if (obj == null) { + return false; + } + } + return true; + } + + public static String nvl(final String string) { + return nvl(string, ""); + } + + public static String nvl(final Object o) { + return nvl(toString(o), ""); + } + + public static String nvl(final String string, final String string2) { + if (isBlank(string)) { + return string2; + } + return string; + } + + public static String getIpToStr(final Object addressIp) { + final String ip = new StringBuilder().append(addressIp).toString(); + return ip.substring(1, ip.length()); + } + + public static String defaultString(final String str) { + return (str == null) ? "" : str; + } + + public static Object minusOne(String str) { + if (str != null && !"".equals(str)) { + str = str.substring(0, str.length() - 1); + } + return str; + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/TcpUtil.java b/src/main/java/com/zhichenhaixin/base/util/TcpUtil.java new file mode 100644 index 0000000..56f94e4 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/TcpUtil.java @@ -0,0 +1,115 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.alibaba.fastjson.JSON; +import com.zhichenhaixin.base.model.MatrixVo; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.net.InetSocketAddress; +import java.net.Socket; + +public class TcpUtil +{ + private static final Log log; + private static final String ttsHost; + private static final int ttsPort; + private static final String bigScrHost; + private static final int bigScrPort; + + static { + log = LogFactory.getLog(TcpUtil.class); + ttsHost = SpringPropertyUtil.getProperty("tts.host"); + ttsPort = Integer.valueOf(SpringPropertyUtil.getProperty("tts.port")); + bigScrHost = SpringPropertyUtil.getProperty("big.scr.host"); + bigScrPort = Integer.valueOf(SpringPropertyUtil.getProperty("big.scr.port")); + } + + public static boolean send(final MatrixVo matrixVo) { + matrixVo.setHandle(1); + final String str = JSON.toJSONString(matrixVo); + Socket socket = null; + try { + socket = new Socket(); + socket.connect(new InetSocketAddress(TcpUtil.bigScrHost, TcpUtil.bigScrPort), 200); + final BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); + out.write(str); + out.flush(); + out.close(); + return true; + } + catch (Exception e) { + TcpUtil.log.error("===> \u5207\u6362\u5927\u5c4f\u5931\u8d25"); + if (socket != null) { + try { + socket.close(); + } + catch (IOException e2) { + TcpUtil.log.error("\u5173\u95ed\u6d41\u5f02\u5e38"); + } + } + } + finally { + if (socket != null) { + try { + socket.close(); + } + catch (IOException e2) { + TcpUtil.log.error("\u5173\u95ed\u6d41\u5f02\u5e38"); + } + } + } + return false; + } + + public static void playTts(String content) { + content = ((content == null) ? "" : content); + Socket socket = null; + try { + socket = new Socket(); + socket.connect(new InetSocketAddress(TcpUtil.ttsHost, TcpUtil.ttsPort), 100); + final OutputStream os = socket.getOutputStream(); + final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os, "UTF-8")); + bw.write(content); + bw.flush(); + bw.close(); + } + catch (Exception e) { + TcpUtil.log.error("-> TTS\u670d\u52a1\u5668\u672a\u5f00\u542f\u6216\u8005\u662f[ip: " + TcpUtil.ttsHost + " port: " + TcpUtil.ttsPort + "]\u9519\u8bef"); + if (socket != null) { + try { + socket.close(); + } + catch (IOException e2) { + TcpUtil.log.error("\u5173\u95ed\u6d41\u5f02\u5e38"); + } + } + return; + } + finally { + if (socket != null) { + try { + socket.close(); + } + catch (IOException e2) { + TcpUtil.log.error("\u5173\u95ed\u6d41\u5f02\u5e38"); + } + } + } + if (socket != null) { + try { + socket.close(); + } + catch (IOException e2) { + TcpUtil.log.error("\u5173\u95ed\u6d41\u5f02\u5e38"); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/base/util/ZLibUtils.java b/src/main/java/com/zhichenhaixin/base/util/ZLibUtils.java new file mode 100644 index 0000000..55a5307 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/base/util/ZLibUtils.java @@ -0,0 +1,65 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.base.util; + +import com.jcraft.jzlib.ZInputStream; +import com.jcraft.jzlib.ZOutputStream; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +public class ZLibUtils +{ + private static final Log log; + + static { + log = LogFactory.getLog(ZLibUtils.class); + } + + public static byte[] jzlib(final byte[] object) { + byte[] data = null; + try { + final ByteArrayOutputStream out = new ByteArrayOutputStream(); + final ZOutputStream zOut = new ZOutputStream(out, -1); + final DataOutputStream objOut = new DataOutputStream(zOut); + objOut.write(object); + objOut.flush(); + zOut.close(); + data = out.toByteArray(); + out.close(); + } + catch (IOException e) { + ZLibUtils.log.error("\u538b\u7f29\u6570\u636e\u5f02\u5e38\uff01" + e.getLocalizedMessage()); + } + return data; + } + + public static byte[] unjzlib(final byte[] object) { + byte[] data = null; + try { + final ByteArrayInputStream in = new ByteArrayInputStream(object); + final ZInputStream zIn = new ZInputStream(in); + final byte[] buf = new byte[1024]; + int num = -1; + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + while ((num = zIn.read(buf, 0, buf.length)) != -1) { + baos.write(buf, 0, num); + } + data = baos.toByteArray(); + baos.flush(); + baos.close(); + zIn.close(); + in.close(); + } + catch (IOException e) { + ZLibUtils.log.error("\u89e3\u538b\u6570\u636e\u5f02\u5e38\uff01" + e.getLocalizedMessage()); + } + return data; + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/AgilTrackEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/AgilTrackEhcache.java new file mode 100644 index 0000000..657fc40 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/AgilTrackEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.serializer.RadarTrackVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class AgilTrackEhcache +{ + public static final String CACHE_NAME = "agilTrackVoCache"; + + public static void put(final RadarTrackVo radarTrackVo) { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return; + } + cache.put(new Element(radarTrackVo.getTrackNumber(), radarTrackVo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((RadarTrackVo)element.getValue()); + } + } + return result; + } + + public static RadarTrackVo get(final int trackNum) { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNum); + if (element == null) { + return null; + } + return (RadarTrackVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int trackNum) { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return; + } + cache.remove(trackNum); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/CtrlVoEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/CtrlVoEhcache.java new file mode 100644 index 0000000..8519a80 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/CtrlVoEhcache.java @@ -0,0 +1,76 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXFllow; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class CtrlVoEhcache +{ + public static final String CACHE_NAME = "ctrlVoCache"; + List list; + + public CtrlVoEhcache() { + this.list = new ArrayList(); + } + + public static void put(final ZCHXFllow.CtrlVo vo) { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getTrackNumber(), vo)); + } + + public static void remove(final int trackNumber) { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return; + } + cache.remove(trackNumber); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXFllow.CtrlVo)element.getValue()); + } + } + return result; + } + + public static ZCHXFllow.CtrlVo get(final int trackNumber) { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNumber); + if (element == null) { + return null; + } + return (ZCHXFllow.CtrlVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/CustomFeatureEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/CustomFeatureEhcache.java new file mode 100644 index 0000000..d3e5326 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/CustomFeatureEhcache.java @@ -0,0 +1,101 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.Point; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKTReader; +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.CustomDefence; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFeatureEhcache +{ + public static final String CACHE_NAME = "customFeatureEhcache"; + + public static void put(final CustomDefence customLayer) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(customLayer.getDefence_id(), customLayer)); + } + + public static CustomDefence isContainArea(final Point point) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + for (int size = keys.size(), i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + final CustomDefence customLayer = (CustomDefence)element.getValue(); + if (customLayer.getDefence_type() != 1) { + try { + final Geometry defence = new WKTReader().read(customLayer.getLon_lat()); + if (defence.contains(point)) { + return customLayer; + } + } + catch (ParseException e) { + System.out.println(e.getMessage()); + } + } + } + } + return null; + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((CustomDefence)element.getValue()); + } + } + return result; + } + + public static CustomDefence get(final int defence_id) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(defence_id); + if (element == null) { + return null; + } + return (CustomDefence)element.getValue(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/DefenceCacheUtil.java b/src/main/java/com/zhichenhaixin/cache/util/DefenceCacheUtil.java new file mode 100644 index 0000000..20c849d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/DefenceCacheUtil.java @@ -0,0 +1,141 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.DateUtil; +import com.zhichenhaixin.sys.model.CustomDefence; +import com.zhichenhaixin.sys.model.TimeSpanVo; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +public class DefenceCacheUtil +{ + public static void saveDefenceCache(final List list) { + CustomFeatureEhcache.clear(); + for (final CustomDefence cus2 : list) { + CustomFeatureEhcache.put(cus2); + } + } + + public static boolean isSetDefence(final List list) { + if (list == null) { + return false; + } + for (final TimeSpanVo time : list) { + final String start = time.getStarttime(); + final String cur = DateUtil.format(DateUtil.now(), "HH:mm"); + final String end = time.getEndtime(); + final int start2 = Integer.parseInt(start.replaceAll(":", "")); + final int cur2 = Integer.parseInt(cur.replaceAll(":", "")); + final int end2 = Integer.parseInt(end.replaceAll(":", "")); + if (start2 <= cur2 && cur2 <= end2) { + return true; + } + } + return false; + } + + public static boolean judgeSetDefence(final List list) { + if (list != null) { + final Calendar calendar = Calendar.getInstance(); + final Date date = new Date(); + calendar.setTime(date); + final int dayOfWeek = calendar.get(7); + for (final TimeSpanVo time : list) { + if (switchTimeCycle(time, dayOfWeek, date)) { + return true; + } + } + } + return false; + } + + public static boolean switchTimeCycle(final TimeSpanVo time, final int dayOfWeek, final Date date) { + final int timeCicle = time.getTime_cycle(); + boolean result = false; + switch (timeCicle) { + case 1: { + if (dayOfWeek == 2) { + result = judgeTime(time, date); + break; + } + break; + } + case 2: { + if (dayOfWeek == 3) { + result = judgeTime(time, date); + break; + } + break; + } + case 3: { + if (dayOfWeek == 4) { + result = judgeTime(time, date); + break; + } + break; + } + case 4: { + if (dayOfWeek == 5) { + result = judgeTime(time, date); + break; + } + break; + } + case 5: { + if (dayOfWeek == 6) { + result = judgeTime(time, date); + break; + } + break; + } + case 6: { + if (dayOfWeek == 7) { + result = judgeTime(time, date); + break; + } + break; + } + case 7: { + if (dayOfWeek == 1) { + result = judgeTime(time, date); + break; + } + break; + } + case 8: { + if (dayOfWeek > 1 && dayOfWeek < 7) { + result = judgeTime(time, date); + break; + } + break; + } + case 9: { + if (dayOfWeek == 1 || dayOfWeek == 7) { + result = judgeTime(time, date); + break; + } + break; + } + case 10: { + result = judgeTime(time, date); + break; + } + } + return result; + } + + public static boolean judgeTime(final TimeSpanVo timeSpanVo, final Date date) { + final String start = timeSpanVo.getStarttime(); + final String cur = DateUtil.format(date, "HH:mm"); + final String end = timeSpanVo.getEndtime(); + final int start2 = Integer.parseInt(start.replaceAll(":", "")); + final int cur2 = Integer.parseInt(cur.replaceAll(":", "")); + final int end2 = Integer.parseInt(end.replaceAll(":", "")); + return start2 <= cur2 && cur2 <= end2; + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/GpsVoEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/GpsVoEhcache.java new file mode 100644 index 0000000..82324a1 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/GpsVoEhcache.java @@ -0,0 +1,89 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXGPS; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class GpsVoEhcache +{ + public static final String CACHE_NAME = "gpsVoCache"; + + public static void put(final ZCHXGPS.GPSData vo) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getImei(), vo)); + } + + public static void remove(final String imei) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return; + } + cache.remove(imei); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXGPS.GPSData)element.getValue()); + } + } + return result; + } + + public static ZCHXGPS.GPSData get(final String imei) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(imei); + if (element == null) { + return null; + } + return (ZCHXGPS.GPSData)element.getValue(); + } + + public static boolean get(final ZCHXGPS.GPSData vo) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return false; + } + final List keys = (List)cache.getKeys(); + for (int size = keys.size(), i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + final ZCHXGPS.GPSData gvo = (ZCHXGPS.GPSData)element.getValue(); + if (gvo.getImei().equals(vo.getImei()) && gvo.getLon() == vo.getLon() && gvo.getLat() == vo.getLat()) { + return true; + } + } + } + return false; + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/NightModeEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/NightModeEhcache.java new file mode 100644 index 0000000..c089145 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/NightModeEhcache.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.NightModeVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class NightModeEhcache +{ + public static final String CACHE_NAME = "nightModeCache"; + + public static void put(final NightModeVo vo) { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getId(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((NightModeVo)element.getValue()); + } + } + return result; + } + + public static NightModeVo get(final int id) { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(id); + if (element == null) { + return null; + } + return (NightModeVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void saveNightModeVoCache(final List list) { + clear(); + for (final NightModeVo vo : list) { + put(vo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/RadarFalseAlarmEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/RadarFalseAlarmEhcache.java new file mode 100644 index 0000000..a0b3cda --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/RadarFalseAlarmEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXRadar; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class RadarFalseAlarmEhcache +{ + public static final String CACHE_NAME = "radarFalseAlarmEhcache"; + + public static void put(final ZCHXRadar.RadarHistoryTrack vo) { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getTrackNumber(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXRadar.RadarHistoryTrack)element.getValue()); + } + } + return result; + } + + public static ZCHXRadar.RadarHistoryTrack get(final int trackNum) { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNum); + if (element == null) { + return null; + } + return (ZCHXRadar.RadarHistoryTrack)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int trackNum) { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return; + } + cache.remove(trackNum); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/SmuggleEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/SmuggleEhcache.java new file mode 100644 index 0000000..d6d545a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/SmuggleEhcache.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.SmuggleVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class SmuggleEhcache +{ + public static final String CACHE_NAME = "smuggleCache"; + + public static void put(final SmuggleVo vo) { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getId(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((SmuggleVo)element.getValue()); + } + } + return result; + } + + public static SmuggleVo get(final int id) { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(id); + if (element == null) { + return null; + } + return (SmuggleVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void saveSmuggleVoCache(final List list) { + clear(); + for (final SmuggleVo vo : list) { + put(vo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/SurLineDataEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/SurLineDataEhcache.java new file mode 100644 index 0000000..bacf58e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/SurLineDataEhcache.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.SurLineInfo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class SurLineDataEhcache +{ + public static final String CACHE_NAME = "surLineDataCache"; + + public static void put(final SurLineInfo vo) { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getId(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((SurLineInfo)element.getValue()); + } + } + return result; + } + + public static SurLineInfo get(final int id) { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(id); + if (element == null) { + return null; + } + return (SurLineInfo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void saveSurLineDataCache(final List list) { + clear(); + for (final SurLineInfo vo : list) { + put(vo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/TrackAlarmEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/TrackAlarmEhcache.java new file mode 100644 index 0000000..f57b74f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/TrackAlarmEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class TrackAlarmEhcache +{ + public static final String CACHE_NAME = "trackAlarmEhcache"; + + public static void put(final WarnInfoBean warnInfoBean) { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(String.valueOf(warnInfoBean.getWarnSiteType()) + warnInfoBean.getObject_id(), warnInfoBean)); + } + + public static void remove(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return; + } + cache.remove(ObjectID); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((WarnInfoBean)element.getValue()); + } + } + return result; + } + + public static WarnInfoBean get(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(ObjectID); + if (element == null) { + return null; + } + return (WarnInfoBean)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/TrackCameraEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/TrackCameraEhcache.java new file mode 100644 index 0000000..0a543b4 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/TrackCameraEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.TrackCameraVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class TrackCameraEhcache +{ + public static final String CACHE_NAME = "trackCameraEhcache"; + + public static void put(final TrackCameraVo trackCameraVo) { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(trackCameraVo.getTargetId(), trackCameraVo)); + } + + public static void remove(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return; + } + cache.remove(ObjectID); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((TrackCameraVo)element.getValue()); + } + } + return result; + } + + public static TrackCameraVo get(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(ObjectID); + if (element == null) { + return null; + } + return (TrackCameraVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/TrackPointEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/TrackPointEhcache.java new file mode 100644 index 0000000..1d82d7b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/TrackPointEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXRadar; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class TrackPointEhcache +{ + public static final String CACHE_NAME = "trackPointEhcache"; + + public static void put(final ZCHXRadar.TrackPoint point) { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(point.getTrackNumber(), point)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXRadar.TrackPoint)element.getValue()); + } + } + return result; + } + + public static ZCHXRadar.TrackPoint get(final int trackNum) { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNum); + if (element == null) { + return null; + } + return (ZCHXRadar.TrackPoint)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int trackNum) { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return; + } + cache.remove(trackNum); + } +} diff --git a/src/main/java/com/zhichenhaixin/cache/util/WarnAlarmCountEhcache.java b/src/main/java/com/zhichenhaixin/cache/util/WarnAlarmCountEhcache.java new file mode 100644 index 0000000..f19f9b3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/cache/util/WarnAlarmCountEhcache.java @@ -0,0 +1,42 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.cache.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +public class WarnAlarmCountEhcache +{ + public static final String CACHE_NAME = "warnAlarmCountCache"; + + public static void put(final int count) { + final Cache cache = CacheUtil.getECache("warnAlarmCountCache"); + if (cache == null) { + return; + } + cache.put(new Element("warn_alarm_count", count)); + } + + public static int get() { + final Cache cache = CacheUtil.getECache("warnAlarmCountCache"); + if (cache == null) { + return 0; + } + final Element element = cache.get("warn_alarm_count"); + if (element == null) { + return 0; + } + return (int)element.getValue(); + } + + public static void remove() { + final Cache cache = CacheUtil.getECache("warnAlarmCountCache"); + if (cache == null) { + return; + } + cache.remove("warn_alarm_count"); + } +} diff --git a/src/main/java/com/zhichenhaixin/control/model/ReqPacket.java b/src/main/java/com/zhichenhaixin/control/model/ReqPacket.java new file mode 100644 index 0000000..9bad273 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/control/model/ReqPacket.java @@ -0,0 +1,99 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.control.model; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class ReqPacket +{ + private static Log log; + private byte[] byte_content; + private String mark_hex; + + static { + ReqPacket.log = LogFactory.getLog(ReqPacket.class); + } + + public ReqPacket() { + this.mark_hex = "aaaaaaaa"; + } + + public void setMark_hex(final String mark_hex) { + this.mark_hex = mark_hex; + } + + public void setByte_content(final byte[] byte_content) { + this.byte_content = byte_content; + } + + public String switchStr(String hex) { + switch (hex.length()) { + case 1: { + hex = "0000000" + hex; + break; + } + case 2: { + hex = "000000" + hex; + break; + } + case 3: { + hex = "00000" + hex; + break; + } + case 4: { + hex = "0000" + hex; + break; + } + case 5: { + hex = "000" + hex; + break; + } + case 6: { + hex = "00" + hex; + break; + } + case 7: { + hex = "0" + hex; + break; + } + } + return hex; + } + + public byte[] getByteStream() { + final int len = this.byte_content.length; + byte[] soc = new byte[8 + len]; + try { + int index = 0; + int num = 0; + for (int i = 0; i < 4; ++i) { + final String mark_hex = this.mark_hex; + final int beginIndex = num; + num += 2; + final String str = mark_hex.substring(beginIndex, num); + soc[index++] = (byte)Integer.parseInt(str, 16); + } + String hex = Integer.toHexString(len); + hex = this.switchStr(hex); + num = 0; + for (int j = 0; j < 4; ++j) { + final String s = hex; + final int beginIndex2 = num; + num += 2; + final String str2 = s.substring(beginIndex2, num); + soc[index++] = (byte)Integer.parseInt(str2, 16); + } + for (int j = 0; j < len; ++j) { + soc[index++] = this.byte_content[j]; + } + } + catch (Exception e) { + soc = new byte[] { 0 }; + ReqPacket.log.error("\u7ed9\u63a7\u5236\u5668\u53d1\u9001\u6570\u636e\u7684\u6570\u636e\u5305\u5f02\u5e38\uff01" + e.getMessage()); + } + return soc; + } +} diff --git a/src/main/java/com/zhichenhaixin/control/model/ResPacket.java b/src/main/java/com/zhichenhaixin/control/model/ResPacket.java new file mode 100644 index 0000000..e33671a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/control/model/ResPacket.java @@ -0,0 +1,100 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.control.model; + +import org.apache.commons.lang.StringUtils; + +public class ResPacket implements Cloneable +{ + private static ResPacket BaseCredit; + private byte[] all_pack_bytes; + + static { + ResPacket.BaseCredit = new ResPacket(); + } + + public static ResPacket getClone() { + try { + return (ResPacket)ResPacket.BaseCredit.clone(); + } + catch (CloneNotSupportedException e) { + return new ResPacket(); + } + } + + public void setAll_pack_bytes(final byte[] all_pack_bytes) { + this.all_pack_bytes = all_pack_bytes; + } + + public static int byte2Int(final byte[] bytes, final int index) { + return bytes[index]; + } + + public static String byteToHex(final byte[] bytes, final int i) { + String hexString = Integer.toHexString(byte2Int(bytes, i)); + if (hexString.length() == 1) { + hexString = "0" + hexString; + } + if (hexString.length() > 2) { + hexString = StringUtils.right(hexString, 2); + } + return hexString; + } + + public static String readBy2Byte(final byte[] bytes, final int start, final int length) { + if (bytes.length - start < length) { + return null; + } + byte[] bytes2 = null; + try { + bytes2 = new byte[length]; + final int end = start + length; + int num = 0; + for (int i = start; i < end; ++i) { + bytes2[num] = bytes[i]; + ++num; + } + } + catch (Exception e) { + e.printStackTrace(); + } + return (bytes2 == null) ? "" : new String(bytes2); + } + + public static byte[] readContentByte(final byte[] bytes, final int start, final int length) { + final byte[] bytes2 = new byte[length]; + try { + System.arraycopy(bytes, start, bytes2, 0, length); + } + catch (Exception e) { + System.out.println("\u6570\u636e\u5305\u5185\u5bb9\u4e0d\u591f"); + } + return bytes2; + } + + public String getMark() { + String mark = ""; + for (int i = 0; i < 4; ++i) { + mark = String.valueOf(mark) + byteToHex(this.all_pack_bytes, i); + } + return mark; + } + + public int getContentLen() { + String len = ""; + for (int i = 4; i < 8; ++i) { + len = String.valueOf(len) + byteToHex(this.all_pack_bytes, i); + } + return Integer.parseInt(len, 16); + } + + public String getContent() { + return readBy2Byte(this.all_pack_bytes, 8, this.getContentLen()); + } + + public byte[] getContentBytes() { + return readContentByte(this.all_pack_bytes, 8, this.getContentLen()); + } +} diff --git a/src/main/java/com/zhichenhaixin/control/model/VideoWarnInfoHandle.java b/src/main/java/com/zhichenhaixin/control/model/VideoWarnInfoHandle.java new file mode 100644 index 0000000..bd60820 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/control/model/VideoWarnInfoHandle.java @@ -0,0 +1,192 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.control.model; + +import com.alibaba.fastjson.JSONObject; +import com.google.protobuf.InvalidProtocolBufferException; +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.fusedata.MongoUtil; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.log4j.Logger; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class VideoWarnInfoHandle +{ + private static Logger log; + + static { + VideoWarnInfoHandle.log = Logger.getLogger(VideoWarnInfoHandle.class); + } + + public static void saveVideoWarnTargetInfo(final ZCHXVideoWarn.VideoWarnTargetInfo.Builder info) { + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("VideoWarnTarget_Track", info.getTargetId()); + ZCHXVideoWarn.RectInfos.Builder infos = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("datas"); + try { + infos = ZCHXVideoWarn.RectInfos.parseFrom(trackData).toBuilder(); + info.setRects(infos); + } + catch (InvalidProtocolBufferException e) { + VideoWarnInfoHandle.log.info(e.getMessage()); + } + } + saveTargetToMongoDB("VideoWarnTarget_Track", info, infos); + } + + public static ZCHXVideoWarn.VideoWarnTargetInfo.Builder getVideoWarnTargetInfo(final String object_id) { + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("VideoWarnTarget_Track", object_id); + ZCHXVideoWarn.VideoWarnTargetInfo.Builder infoss = null; + ZCHXVideoWarn.RectInfos.Builder infos = null; + if (dbTrack != null) { + final byte[] trackDatas = (byte[])dbTrack.get("datas"); + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + infos = ZCHXVideoWarn.RectInfos.parseFrom(trackDatas).toBuilder(); + infoss = ZCHXVideoWarn.VideoWarnTargetInfo.parseFrom(trackData).toBuilder(); + infoss.setRects(infos); + } + catch (InvalidProtocolBufferException e) { + VideoWarnInfoHandle.log.info(e.getMessage()); + } + } + return infoss; + } + + public static void deleteVideoWarnTargetInfo(final String object_id) { + MongoUtil.getInstance().deleteByPrimaryKey("VideoWarnTarget_Track", object_id); + } + + public static void saveVideoWarnInfo(final ZCHXVideoWarn.VideoWarnInfo.Builder info) { + final BasicDBObject document = new BasicDBObject(); + document.put("_id", info.getTargetId()); + document.put("data", info.build().toByteArray()); + document.put("time", System.currentTimeMillis()); + MongoUtil.getInstance().saveVideoWarnInfo(document); + } + + public static void saveVideoWarnInfos(final ZCHXVideoWarn.VideoWarnInfo.Builder info) { + final BasicDBObject document = new BasicDBObject(); + document.put("_id", info.getTransactionId()); + document.put("data", info.build().toByteArray()); + document.put("time", System.currentTimeMillis()); + MongoUtil.getInstance().saveVideoWarnInfos(document); + } + + public static ZCHXVideoWarn.VideoWarnInfo.Builder getVideoWarnInfo(final String object_id) { + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("VideoWarn_Track", object_id); + ZCHXVideoWarn.VideoWarnInfo.Builder infos = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + infos = ZCHXVideoWarn.VideoWarnInfo.parseFrom(trackData).toBuilder(); + } + catch (InvalidProtocolBufferException e) { + VideoWarnInfoHandle.log.info(e.getMessage()); + } + } + return infos; + } + + public static ZCHXVideoWarn.VideoWarnInfo.Builder getVideoWarnInfos(final String session_id) { + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("VideoWarns_Track", session_id); + ZCHXVideoWarn.VideoWarnInfo.Builder infos = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + infos = ZCHXVideoWarn.VideoWarnInfo.parseFrom(trackData).toBuilder(); + } + catch (InvalidProtocolBufferException e) { + VideoWarnInfoHandle.log.info(e.getMessage()); + } + } + return infos; + } + + public static void deleteVideoWarnInfo(final String object_id) { + MongoUtil.getInstance().deleteByPrimaryKey("VideoWarn_Track", object_id); + } + + public static void deleteVideoWarnInfos(final String session_id) { + MongoUtil.getInstance().deleteByPrimaryKey("VideoWarns_Track", session_id); + } + + public static void saveTargetToMongoDB(final String name, final ZCHXVideoWarn.VideoWarnTargetInfo.Builder info, ZCHXVideoWarn.RectInfos.Builder infos) { + final ZCHXVideoWarn.RectInfo.Builder builder = ZCHXVideoWarn.RectInfo.newBuilder(); + builder.setTime(info.getAlarmTime()); + builder.setLat(info.getAlarmLat()); + builder.setLon(info.getAlarmLon()); + builder.setX((float)info.getTargetX()); + builder.setY((float)info.getTargetY()); + builder.setW((float)info.getTargetWidth()); + builder.setH((float)info.getTargetHeight()); + if (infos == null) { + infos = ZCHXVideoWarn.RectInfos.newBuilder(); + } + infos.addRect(builder); + info.setAlarmLevel(1); + final BasicDBObject document = new BasicDBObject(); + document.put("_id", info.getTargetId()); + document.put("data", info.build().toByteArray()); + document.put("datas", infos.build().toByteArray()); + document.put("time", System.currentTimeMillis()); + MongoUtil.getInstance().saveVideoWarnTargetInfo(document); + } + + public static WarnInfoBean covertWarnInfoBean(final ZCHXVideoWarn.VideoWarnInfo info) { + final WarnInfoBean aInfo = new WarnInfoBean(); + aInfo.setId(info.getAlarmId()); + aInfo.setAlarm_type(String.valueOf(info.getAlarmType())); + aInfo.setAlarm_level(String.valueOf(info.getAlarmLevel())); + aInfo.setAlarm_source("1"); + aInfo.setBegintime(Integer.valueOf(String.valueOf(info.getAlarmTime()).substring(0, 10))); + aInfo.setEndtime(Integer.valueOf(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + aInfo.setY(info.getAlarmLat()); + aInfo.setX(info.getAlarmLon()); + aInfo.setAlarm_site(info.getAlarmPlace()); + aInfo.setAlarm_status("3"); + aInfo.setCamera_id(String.valueOf(info.getCameraId())); + aInfo.setObject_id(info.getTargetId()); + aInfo.setObject_type(String.valueOf(GlobalVariable.getRongkeType(info.getTargetType()))); + aInfo.setCreate_time(new Timestamp(System.currentTimeMillis())); + aInfo.setAlarm_site_no(String.valueOf(info.getCameraId())); + aInfo.setParam(null); + return aInfo; + } + + public static WarnInfoBean covertWarnInfoBean(final ZCHXVideoWarn.VideoWarnTargetInfo info) { + final WarnInfoBean aInfo = new WarnInfoBean(); + aInfo.setEndtime(Integer.valueOf(String.valueOf(info.getAlarmTime()).substring(0, 10))); + final ZCHXVideoWarn.RectInfos rect = info.getRects(); + aInfo.setParam(listToParam(rect.getRectList())); + return aInfo; + } + + private static String listToParam(final List list) { + final List> themap = new ArrayList>(); + for (final ZCHXVideoWarn.RectInfo info : list) { + final Map map = new HashMap(); + map.put("Time", info.getTime()); + map.put("Lat", info.getLat()); + map.put("Lon", info.getLon()); + map.put("X", info.getX()); + map.put("Y", info.getY()); + map.put("W", info.getW()); + map.put("H", info.getH()); + themap.add(map); + } + final JSONObject jsonObject = new JSONObject(); + jsonObject.put("RectList", themap); + return jsonObject.toJSONString(); + } +} diff --git a/src/main/java/com/zhichenhaixin/factory/DefaultCacheDecoratorFactory.java b/src/main/java/com/zhichenhaixin/factory/DefaultCacheDecoratorFactory.java new file mode 100644 index 0000000..23f5263 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/factory/DefaultCacheDecoratorFactory.java @@ -0,0 +1,24 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.factory; + +import net.sf.ehcache.Ehcache; +import net.sf.ehcache.constructs.CacheDecoratorFactory; +import net.sf.ehcache.constructs.blocking.BlockingCache; + +import java.util.Properties; + +public class DefaultCacheDecoratorFactory +extends CacheDecoratorFactory { + @Override + public Ehcache createDecoratedEhcache(Ehcache cache, Properties properties) { + return new BlockingCache(cache); + } + + @Override + public Ehcache createDefaultDecoratedEhcache(Ehcache cache, Properties properties) { + return new BlockingCache(cache); + } +} + diff --git a/src/main/java/com/zhichenhaixin/fusedata/CopyOfFuseRadarThread.java b/src/main/java/com/zhichenhaixin/fusedata/CopyOfFuseRadarThread.java new file mode 100644 index 0000000..c5e3204 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/CopyOfFuseRadarThread.java @@ -0,0 +1,202 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.util.DistanceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.AgilTrackEhcache; +import com.zhichenhaixin.cache.util.TrackPointEhcache; +import com.zhichenhaixin.proto.ZCHXRadar; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.text.SimpleDateFormat; +import java.util.*; + +public class CopyOfFuseRadarThread extends Thread +{ + private static Log log; + private static float belongLimit; + private static double distance; + private static double sog; + private static double cog; + private static float varaince_dis; + private static float varaince_cog; + private static float varaince_sog; + private static final long FUSE_TIME_SPAN; + private static int timeSpan; + private static float t1; + private static float t2; + private static float t3; + private static Map varianceMap; + private static float[] elemWight; + private static SimpleDateFormat fmt; + private static String RADAR_TABLE; + private static final String DISTANCE = "distance"; + private static final String COG = "cog"; + private static final String SOG = "sog"; + + static { + CopyOfFuseRadarThread.log = LogFactory.getLog(CopyOfFuseRadarThread.class); + CopyOfFuseRadarThread.belongLimit = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.belongLimit")); + CopyOfFuseRadarThread.distance = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.radar.distance")); + CopyOfFuseRadarThread.sog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.radar.sog")); + CopyOfFuseRadarThread.cog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.radar.cog")); + CopyOfFuseRadarThread.varaince_dis = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.varaince_dis")); + CopyOfFuseRadarThread.varaince_cog = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.varaince_cog")); + CopyOfFuseRadarThread.varaince_sog = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.varaince_sog")); + FUSE_TIME_SPAN = Long.parseLong(SpringPropertyUtil.getProperty("fuse.radar.time.span")); + CopyOfFuseRadarThread.timeSpan = Integer.parseInt(SpringPropertyUtil.getProperty("fuse.radar.time")); + CopyOfFuseRadarThread.t1 = 0.001f; + CopyOfFuseRadarThread.t2 = 0.1f; + CopyOfFuseRadarThread.t3 = 0.1f; + CopyOfFuseRadarThread.varianceMap = setVarianceMap(); + CopyOfFuseRadarThread.elemWight = setElemWight(); + CopyOfFuseRadarThread.fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); + CopyOfFuseRadarThread.RADAR_TABLE = "radar"; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.handleFuseRadar(); + Thread.sleep(1000L); + } + catch (Exception e) { + CopyOfFuseRadarThread.log.error("\u5904\u7406\u591a\u96f7\u8fbe\u878d\u5408\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void handleFuseRadar() throws InvalidProtocolBufferException { + final long newTime = MongoUtil.getInstance().getMaxUtc(CopyOfFuseRadarThread.RADAR_TABLE); + final String endTime = CopyOfFuseRadarThread.fmt.format(new Date(newTime)); + final String startTime = CopyOfFuseRadarThread.fmt.format(new Date(newTime - CopyOfFuseRadarThread.timeSpan)); + final List radarList = MongoUtil.getInstance().getDataByTime(CopyOfFuseRadarThread.RADAR_TABLE, startTime, endTime); + for (final EntityVo vo : radarList) { + for (final EntityVo vo2 : radarList) { + final String radarType1 = vo.getNumber().substring(0, 1); + final String radarType2 = vo2.getNumber().substring(0, 1); + final ZCHXRadar.TrackPoint tpoint = TrackPointEhcache.get(Integer.valueOf(vo.getNumber())); + final ZCHXRadar.TrackPoint tpoint2 = TrackPointEhcache.get(Integer.valueOf(vo2.getNumber())); + if (!radarType1.equals(radarType2) && tpoint != null && tpoint2 != null) { + final double shipDistance = DistanceUtil.getDistance(vo.getLat(), vo.getLon(), vo2.getLat(), vo2.getLon()); + final double gapCog = Math.abs(vo.getCog() - vo2.getCog()); + final double gapSog = Math.abs(vo.getSog() - vo2.getSog()); + if (shipDistance >= CopyOfFuseRadarThread.distance || gapSog >= CopyOfFuseRadarThread.sog || gapCog >= CopyOfFuseRadarThread.cog) { + continue; + } + final float belong = calculateFuseDgr(vo.getNumber(), vo2.getNumber()); + if (CopyOfFuseRadarThread.belongLimit >= belong) { + continue; + } + TrackPointEhcache.remove(Integer.valueOf(vo2.getNumber())); + AgilTrackEhcache.remove(Integer.valueOf(vo2.getNumber())); + CopyOfFuseRadarThread.log.info(String.valueOf(vo.getNumber()) + "\u548c" + vo2.getNumber() + "\u662f\u540c\u4e00\u4e2a\u76ee\u6807\uff0c\u4fdd\u7559" + vo.getNumber()); + } + } + } + } + + public static Map setVarianceMap() { + final Map varianceMap = new HashMap(); + varianceMap.put("distance", CopyOfFuseRadarThread.varaince_dis); + varianceMap.put("cog", CopyOfFuseRadarThread.varaince_cog); + varianceMap.put("sog", CopyOfFuseRadarThread.varaince_sog); + return varianceMap; + } + + public static float[] setElemWight() { + final float[] elemWight = { 0.45f, 0.25f, 0.3f }; + return elemWight; + } + + public static float cutSingleBln(final EntityVo radarCalcul1, final EntityVo radarCalcul2, final Map varianceMap) { + final float dataDistance = (float)DistanceUtil.getDistance(radarCalcul1.getLat(), radarCalcul1.getLon(), radarCalcul2.getLat(), radarCalcul2.getLon()); + final float dataCog = (float)Math.abs(radarCalcul1.getCog() - radarCalcul2.getCog()); + final float dataSog = (float)Math.abs(radarCalcul1.getSog() - radarCalcul2.getSog()); + final float distanceBln = (float)Math.exp(-CopyOfFuseRadarThread.t1 * (Math.pow(dataDistance, 2.0) / varianceMap.get("distance"))); + final float cogBln = (float)Math.exp(-CopyOfFuseRadarThread.t2 * (Math.pow(dataCog, 2.0) / varianceMap.get("cog"))); + final float sogBln = (float)Math.exp(-CopyOfFuseRadarThread.t3 * (Math.pow(dataSog, 2.0) / varianceMap.get("sog"))); + final float belong = CopyOfFuseRadarThread.elemWight[0] * distanceBln + CopyOfFuseRadarThread.elemWight[1] * cogBln + CopyOfFuseRadarThread.elemWight[2] * sogBln; + return belong; + } + + public static float calculateFuseDgr(final String radarCalculId1, final String radarCalculId2) throws InvalidProtocolBufferException { + float avgBelong = 0.0f; + final LocusVo radarLocus1 = MongoUtil.getInstance().query_radarLocus_ById(radarCalculId1); + final LocusVo radarLocus2 = MongoUtil.getInstance().query_radarLocus_ById(radarCalculId2); + final byte[] radarLocusData1 = radarLocus1.getData(); + final byte[] radarLocusData2 = radarLocus2.getData(); + if (radarLocusData1 != null && radarLocusData2 != null) { + final ZCHXRadar.RadarHistoryTracks radarLocusList1 = ZCHXRadar.RadarHistoryTracks.parseFrom(radarLocusData1); + final ZCHXRadar.RadarHistoryTracks radarLocusList2 = ZCHXRadar.RadarHistoryTracks.parseFrom(radarLocusData2); + final Map> syncMap = syncRadarData(radarLocusList1, radarLocusList2); + final List radarList1 = syncMap.get("1"); + final List radarList2 = syncMap.get("2"); + if (radarList1.size() > 3) { + float belongSum = 0.0f; + final int radarSize1 = radarList1.size(); + final int radarSize2 = radarList1.size(); + final int listSize = (radarSize1 < radarSize2) ? radarSize1 : radarSize2; + for (int i = 0; i < listSize; ++i) { + final float belong = cutSingleBln(radarList1.get(i), radarList2.get(i), CopyOfFuseRadarThread.varianceMap); + belongSum += belong; + } + avgBelong = belongSum / listSize; + } + } + return avgBelong; + } + + public static Map> syncRadarData(final ZCHXRadar.RadarHistoryTracks radarLocusList1, final ZCHXRadar.RadarHistoryTracks radarLocusList2) { + final Map> resultMap = new HashMap>(); + final List radarTrackList1 = radarLocusList1.getTracksList(); + final List radarTrackList2 = radarLocusList2.getTracksList(); + final List radarList1 = new ArrayList(); + final List radarList2 = new ArrayList(); + final long endTime = System.currentTimeMillis() - CopyOfFuseRadarThread.FUSE_TIME_SPAN; + int size = radarTrackList1.size(); + for (int i = size - 1; i >= 0; --i) { + final ZCHXRadar.RadarHistoryTrack radarTrack = radarTrackList1.get(i); + if (radarTrack.getUTC() < endTime) { + break; + } + final EntityVo radarVo = new EntityVo(); + radarVo.setNumber(String.valueOf(radarTrack.getTrackNumber())); + radarVo.setLon(radarTrack.getWgs84PosLong()); + radarVo.setLat(radarTrack.getWgs84PosLat()); + radarVo.setUtc(radarTrack.getUTC()); + radarVo.setSog(radarTrack.getSog()); + radarVo.setCog(radarTrack.getCog()); + radarList1.add(radarVo); + } + resultMap.put("1", radarList1); + size = radarTrackList2.size(); + for (int i = size - 1; i >= 0; --i) { + final ZCHXRadar.RadarHistoryTrack radarTrack = radarTrackList2.get(i); + if (radarTrack.getUTC() < endTime) { + break; + } + final EntityVo radarVo = new EntityVo(); + radarVo.setNumber(String.valueOf(radarTrack.getTrackNumber())); + radarVo.setLon(radarTrack.getWgs84PosLong()); + radarVo.setLat(radarTrack.getWgs84PosLat()); + radarVo.setUtc(radarTrack.getUTC()); + radarVo.setSog(radarTrack.getSog()); + radarVo.setCog(radarTrack.getCog()); + radarList2.add(radarVo); + } + resultMap.put("2", radarList2); + return resultMap; + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/EntityVo.java b/src/main/java/com/zhichenhaixin/fusedata/EntityVo.java new file mode 100644 index 0000000..1891c21 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/EntityVo.java @@ -0,0 +1,107 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import com.mongodb.ReflectionDBObject; + +public class EntityVo extends ReflectionDBObject implements Cloneable +{ + private String _id; + private String number; + private Double lon; + private Double lat; + private String time; + private long utc; + private long space_time; + private Double sog; + private Double cog; + private static EntityVo BaseCredit; + + static { + EntityVo.BaseCredit = new EntityVo(); + } + + public static EntityVo getClone() { + try { + return (EntityVo)EntityVo.BaseCredit.clone(); + } + catch (CloneNotSupportedException e) { + return new EntityVo(); + } + } + + public Double getLon() { + return this.lon; + } + + public void setLon(final Double lon) { + this.lon = lon; + } + + public Double getLat() { + return this.lat; + } + + public void setLat(final Double lat) { + this.lat = lat; + } + + public String getTime() { + return this.time; + } + + public void setTime(final String time) { + this.time = time; + } + + public long getUtc() { + return this.utc; + } + + public void setUtc(final long utc) { + this.utc = utc; + } + + public long getSpace_time() { + return this.space_time; + } + + public void setSpace_time(final long space_time) { + this.space_time = space_time; + } + + @Override + public String get_id() { + return this._id; + } + + public void set_id(final String _id) { + this._id = _id; + } + + public Double getSog() { + return this.sog; + } + + public void setSog(final Double sog) { + this.sog = sog; + } + + public Double getCog() { + return this.cog; + } + + public void setCog(final Double cog) { + this.cog = cog; + } + + public String getNumber() { + return this.number; + } + + public void setNumber(final String number) { + this.number = number; + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/FuseDataThread.java b/src/main/java/com/zhichenhaixin/fusedata/FuseDataThread.java new file mode 100644 index 0000000..b0b2b53 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/FuseDataThread.java @@ -0,0 +1,66 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.List; + +public class FuseDataThread extends Thread +{ + private static Log log; + private String address; + private Integer port; + + static { + FuseDataThread.log = LogFactory.getLog(FuseDataThread.class); + } + + public String getAddress() { + return this.address; + } + + public void setAddress(final String address) { + this.address = address; + } + + public Integer getPort() { + return this.port; + } + + public void setPort(final Integer port) { + this.port = port; + } + + public FuseDataThread() { + } + + public FuseDataThread(final String address, final Integer port) { + this.address = address; + this.port = port; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final List fuseList = FuseDataUtil.fuseData(); + if (fuseList.size() > 0) { + FuseDataUtil.paresFuseData(fuseList); + } + Thread.sleep(2000L); + } + catch (Exception e) { + FuseDataThread.log.error("AIS\u548c\u96f7\u8fbe\u878d\u5408\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/FuseDataUtil.java b/src/main/java/com/zhichenhaixin/fusedata/FuseDataUtil.java new file mode 100644 index 0000000..958cdc8 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/FuseDataUtil.java @@ -0,0 +1,415 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.proto.ZCHXAISVessel; +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.thread.ZMQServerDyData; + +import java.text.SimpleDateFormat; +import java.util.*; + +public class FuseDataUtil +{ + private static double RADIUS; + private static double distance; + private static double sog; + private static float varaince_dis; + private static float varaince_cog; + private static float varaince_sog; + private static Map varianceMap; + private static float[] elemWight; + private static double cog; + static SimpleDateFormat fmt; + private static float t1; + private static float t2; + private static float t3; + private static float belongLimit; + private static float aisWight; + private static int timeSpan; + private static final long FUSE_TIME_SPAN; + private static String RADAR_TABLE; + private static String AIS_TABLE; + private static final String DISTANCE = "distance"; + private static final String COG = "cog"; + private static final String SOG = "sog"; + private static String time; + private static final String SIGN; + + static { + FuseDataUtil.RADIUS = Double.parseDouble(SpringPropertyUtil.getProperty("EARTH_RADIUS")); + FuseDataUtil.distance = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.distance")); + FuseDataUtil.sog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.sog")); + FuseDataUtil.varaince_dis = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.varaince_dis")); + FuseDataUtil.varaince_cog = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.varaince_cog")); + FuseDataUtil.varaince_sog = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.varaince_sog")); + FuseDataUtil.varianceMap = setVarianceMap(); + FuseDataUtil.elemWight = setElemWight(); + FuseDataUtil.cog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.cog")); + FuseDataUtil.fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); + FuseDataUtil.t1 = 0.001f; + FuseDataUtil.t2 = 0.1f; + FuseDataUtil.t3 = 0.1f; + FuseDataUtil.belongLimit = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.belongLimit")); + FuseDataUtil.aisWight = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.aisWight")); + FuseDataUtil.timeSpan = Integer.parseInt(SpringPropertyUtil.getProperty("fuse.time")); + FUSE_TIME_SPAN = Long.parseLong(SpringPropertyUtil.getProperty("FUSE_TIME_SPAN")); + FuseDataUtil.RADAR_TABLE = "radar"; + FuseDataUtil.AIS_TABLE = "ais"; + FuseDataUtil.time = ""; + SIGN = SpringPropertyUtil.getProperty("fuse.topic"); + } + + public static List fuseData() { + final List fuseList = new ArrayList(); + final long newTime = MongoUtil.getInstance().getMaxUtc(FuseDataUtil.RADAR_TABLE); + final String endTime = FuseDataUtil.fmt.format(new Date(newTime)); + final String startTime = FuseDataUtil.fmt.format(new Date(newTime - FuseDataUtil.timeSpan)); + final List radarList = MongoUtil.getInstance().getDataByTime(FuseDataUtil.RADAR_TABLE, startTime, endTime); + final List aisList = MongoUtil.getInstance().getDataByTime(FuseDataUtil.AIS_TABLE, startTime, endTime); + if (radarList.size() > 0 && aisList.size() > 0) { + float belong = 0.0f; + for (final EntityVo radar : radarList) { + for (final EntityVo aisInfo : aisList) { + final double shipDistance = getDistance(radar.getLon(), radar.getLat(), aisInfo.getLon(), aisInfo.getLat()); + final double gapCog = Math.abs(radar.getCog() - aisInfo.getCog()); + final double gapSog = Math.abs(radar.getSog() - aisInfo.getSog()); + if (shipDistance < FuseDataUtil.distance && gapSog < FuseDataUtil.sog && gapCog < FuseDataUtil.cog) { + belong = calculateFuseDgr(radar.getNumber(), aisInfo.getNumber()); + if (FuseDataUtil.belongLimit >= belong) { + continue; + } + final FuseVo fuseVo = new FuseVo(); + fuseVo.setAisId(aisInfo.getNumber()); + fuseVo.setRadarId(radar.getNumber()); + fuseList.add(fuseVo); + } + } + } + } + return fuseList; + } + + public static float calculateFuseDgr(final String radarId, final String aisId) { + float avgBelong = 0.0f; + final LocusVo radarLocus = MongoUtil.getInstance().query_radarLocus_ById(radarId); + final LocusVo aisLocus = MongoUtil.getInstance().query_aisLocus_ById(aisId); + final byte[] radarLocusData = radarLocus.getData(); + final byte[] aisLocusData = aisLocus.getData(); + if (aisLocusData != null && radarLocusData != null) { + ZCHXRadar.RadarHistoryTracks radarLocusList = null; + ZCHXAISVessel.AISHistoryTracks aisLocusList = null; + try { + radarLocusList = ZCHXRadar.RadarHistoryTracks.parseFrom(radarLocusData); + aisLocusList = ZCHXAISVessel.AISHistoryTracks.parseFrom(aisLocusData); + } + catch (InvalidProtocolBufferException e) { + System.out.println(e.getLocalizedMessage()); + } + final Map> syncMap = syncRadarAndAisData(radarLocusList, aisLocusList, radarId, aisId); + final List aisList = syncMap.get(FuseDataUtil.AIS_TABLE); + final List radarList = syncMap.get(FuseDataUtil.RADAR_TABLE); + if (aisList.size() > 1) { + final Map> insertMap = insertData(aisList, radarList); + final List aisInsertList = insertMap.get(FuseDataUtil.AIS_TABLE); + final List radarInsertList = insertMap.get(FuseDataUtil.RADAR_TABLE); + float belongSum = 0.0f; + final int aisSize = aisInsertList.size(); + final int radarSize = radarInsertList.size(); + for (int listSize = (aisSize < radarSize) ? aisSize : radarSize, i = 0; i < listSize; ++i) { + final float belong = cutSingleBln(radarInsertList.get(i), aisInsertList.get(i), FuseDataUtil.varianceMap); + belongSum += belong; + } + avgBelong = belongSum / radarList.size(); + } + } + return avgBelong; + } + + public static Map> syncRadarAndAisData(final ZCHXRadar.RadarHistoryTracks radarLocusList, final ZCHXAISVessel.AISHistoryTracks aisLocusList, final String radarId, final String aisId) { + final Map> resultMap = new HashMap>(); + final List radarTrackList = radarLocusList.getTracksList(); + final List aisTrackList = aisLocusList.getTracksList(); + final long endTime = System.currentTimeMillis() - FuseDataUtil.FUSE_TIME_SPAN; + final List aisList = new ArrayList(); + final List radarList = new ArrayList(); + for (int i = radarTrackList.size() - 1; i >= 0; --i) { + final ZCHXRadar.RadarHistoryTrack radarTrack = radarTrackList.get(i); + if (radarTrack.getUTC() < endTime) { + break; + } + final EntityVo radarVo = new EntityVo(); + radarVo.setNumber(radarId); + radarVo.setLon(radarTrack.getWgs84PosLong()); + radarVo.setLat(radarTrack.getWgs84PosLat()); + radarVo.setUtc(radarTrack.getUTC()); + radarVo.setSog(radarTrack.getSog()); + radarVo.setCog(radarTrack.getCog()); + radarList.add(radarVo); + } + resultMap.put(FuseDataUtil.RADAR_TABLE, radarList); + for (int j = aisTrackList.size() - 1; j >= 0; --j) { + final ZCHXAISVessel.AISHistoryTrack aisTrack = aisTrackList.get(j); + if (aisTrack.getUTC() < endTime) { + break; + } + final EntityVo aisVo = new EntityVo(); + aisVo.setNumber(aisId); + aisVo.setLon(aisTrack.getLon()); + aisVo.setLat(aisTrack.getLat()); + aisVo.setUtc(aisTrack.getUTC()); + aisVo.setSog((double)aisTrack.getSog()); + aisVo.setCog((double)aisTrack.getCog()); + aisList.add(aisVo); + } + resultMap.put(FuseDataUtil.AIS_TABLE, aisList); + return resultMap; + } + + public static Map setVarianceMap() { + final Map varianceMap = new HashMap(); + varianceMap.put("distance", FuseDataUtil.varaince_dis); + varianceMap.put("cog", FuseDataUtil.varaince_cog); + varianceMap.put("sog", FuseDataUtil.varaince_sog); + return varianceMap; + } + + public static float cutSingleBln(final EntityVo radarCalcul, final EntityVo aisCalcul, final Map varianceMap) { + final List singleElem = new ArrayList(); + final float[][] judgeMatrix = new float[3][2]; + final float dataDistance = (float)getDistance(radarCalcul.getLon(), radarCalcul.getLat(), aisCalcul.getLon(), aisCalcul.getLat()); + singleElem.add(dataDistance); + final float dataCog = (float)Math.abs(radarCalcul.getCog() - aisCalcul.getCog()); + singleElem.add(dataCog); + final float dataSog = (float)Math.abs(radarCalcul.getSog() - aisCalcul.getSog()); + singleElem.add(dataSog); + final float distanceBln = (float)Math.exp(-FuseDataUtil.t1 * (Math.pow(dataDistance, 2.0) / varianceMap.get("distance"))); + judgeMatrix[0][0] = distanceBln; + judgeMatrix[0][1] = 1.0f - distanceBln; + final float cogBln = (float)Math.exp(-FuseDataUtil.t2 * (Math.pow(dataCog, 2.0) / varianceMap.get("cog"))); + judgeMatrix[1][0] = cogBln; + judgeMatrix[1][1] = 1.0f - cogBln; + final float sogBln = (float)Math.exp(-FuseDataUtil.t3 * (Math.pow(dataSog, 2.0) / varianceMap.get("sog"))); + judgeMatrix[2][0] = sogBln; + judgeMatrix[2][1] = 1.0f - sogBln; + final float belong = FuseDataUtil.elemWight[0] * judgeMatrix[0][0] + FuseDataUtil.elemWight[1] * judgeMatrix[1][0] + FuseDataUtil.elemWight[2] * judgeMatrix[2][0]; + final float unbelong = FuseDataUtil.elemWight[0] * judgeMatrix[0][1] + FuseDataUtil.elemWight[1] * judgeMatrix[1][1] + FuseDataUtil.elemWight[2] * judgeMatrix[2][1]; + return belong; + } + + public static Map> insertData(final List aisList, final List radarList) { + final Map> resultMap = new HashMap>(); + final List radarDAis = new ArrayList(); + long tempTime = 300000L; + for (final EntityVo aisData : aisList) { + EntityVo tempRadar = new EntityVo(); + final long aisUtc = aisData.getUtc(); + for (final EntityVo radar : radarList) { + final long timesize = Math.abs(aisUtc - radar.getUtc()); + if (tempTime > timesize) { + tempTime = timesize; + tempRadar = radar; + } + } + tempTime = 300000L; + radarDAis.add(tempRadar); + } + final List aisInsertList = new ArrayList(); + List aisInsList = null; + for (int i = 0; i < aisList.size(); ++i) { + if (i < aisList.size() - 1) { + final int radarStartIndex = radarList.indexOf(radarDAis.get(i)); + final int radarEndIndex = radarList.indexOf(radarDAis.get(i + 1)); + final int insertNum = radarEndIndex - radarStartIndex - 1; + if (insertNum > 0) { + aisInsList = insertPoint(aisList.get(i), aisList.get(i + 1), insertNum); + if (aisInsList.size() > 0) { + aisInsertList.addAll(aisInsList); + } + } + } + } + resultMap.put("ais", aisInsertList); + resultMap.put("radar", radarList); + return resultMap; + } + + public static List insertPoint(final EntityVo startPoint, final EntityVo endPoint, final int insertNumber) { + final List aisInsertList = new ArrayList(); + aisInsertList.add(startPoint); + final double dvCog = endPoint.getCog() - startPoint.getCog(); + final double dvSog = endPoint.getSog() - startPoint.getSog(); + final double dvLon = endPoint.getLon() - startPoint.getLon(); + final double dvLat = endPoint.getLat() - startPoint.getLat(); + final long dvUtc = endPoint.getUtc() - startPoint.getUtc(); + final double averageCog = dvCog / insertNumber; + final double averageSog = dvSog / insertNumber; + final double averageLon = dvLon / insertNumber; + final double averageLat = dvLat / insertNumber; + final long averageUtc = dvUtc / insertNumber; + for (int i = 0; i < insertNumber; ++i) { + final EntityVo aisData = new EntityVo(); + aisData.set_id(startPoint.get_id()); + aisData.setNumber(startPoint.getNumber()); + aisData.setLon(startPoint.getLon() + (i + 1) * averageLon); + aisData.setLat(startPoint.getLat() + (i + 1) * averageLat); + aisData.setTime(FuseDataUtil.fmt.format(new Date(startPoint.getUtc() + (i + 1) * averageUtc))); + aisData.setUtc(startPoint.getUtc() + (i + 1) * averageUtc); + aisData.setSpace_time(startPoint.getSpace_time()); + aisData.setSog(startPoint.getSog() + (i + 1) * averageSog); + aisData.setCog(startPoint.getCog() + (i + 1) * averageCog); + aisInsertList.add(aisData); + } + return aisInsertList; + } + + public static float[] setElemWight() { + final float[] elemWight = { 0.45f, 0.25f, 0.3f }; + return elemWight; + } + + public static double getDistance(final double lon1, final double lat1, final double lon2, final double lat2) { + final double q1 = Math.toRadians(lat1); + final double q2 = Math.toRadians(lat2); + final double q3 = Math.toRadians(lat2 - lat1); + final double y = Math.toRadians(lon2 - lon1); + final double a = Math.sin(q3 / 2.0) * Math.sin(q3 / 2.0) + Math.cos(q1) * Math.cos(q2) * Math.sin(y / 2.0) * Math.sin(y / 2.0); + final double c = 2.0 * Math.atan2(Math.sqrt(a), Math.sqrt(1.0 - a)); + final double d = FuseDataUtil.RADIUS * c; + return d; + } + + public static Map> getLocusDataByMgdb(final String aisId, final String radarId) { + Map> resultMap = new HashMap>(); + final LocusVo radarLocus = MongoUtil.getInstance().query_radarLocus_ById(radarId); + final LocusVo aisLocus = MongoUtil.getInstance().query_aisLocus_ById(aisId); + final byte[] radarLocusData = radarLocus.getData(); + final byte[] aisLocusData = aisLocus.getData(); + if (aisLocusData != null && radarLocusData != null) { + ZCHXRadar.RadarHistoryTracks radarLocusList = null; + ZCHXAISVessel.AISHistoryTracks aisLocusList = null; + try { + radarLocusList = ZCHXRadar.RadarHistoryTracks.parseFrom(radarLocusData); + aisLocusList = ZCHXAISVessel.AISHistoryTracks.parseFrom(aisLocusData); + } + catch (InvalidProtocolBufferException e) { + System.out.println(e.getLocalizedMessage()); + } + resultMap = covertData(radarLocusList.getTracksList(), aisLocusList.getTracksList(), radarId, aisId); + } + return resultMap; + } + + public static Map> covertData(final List radarTrackList, final List aisTrackList, final String radarId, final String aisId) { + final Map> resultMap = new HashMap>(); + final List aisList = new ArrayList(); + final List radarList = new ArrayList(); + for (final ZCHXRadar.RadarHistoryTrack radarTrack : radarTrackList) { + final EntityVo radarVo = new EntityVo(); + radarVo.setNumber(radarId); + radarVo.setLon(radarTrack.getWgs84PosLong()); + radarVo.setLat(radarTrack.getWgs84PosLat()); + radarVo.setUtc(radarTrack.getUTC()); + radarVo.setSog(radarTrack.getSog()); + radarVo.setCog(radarTrack.getCog()); + radarList.add(radarVo); + } + resultMap.put(FuseDataUtil.RADAR_TABLE, radarList); + for (final ZCHXAISVessel.AISHistoryTrack aisTrack : aisTrackList) { + final EntityVo aisVo = new EntityVo(); + aisVo.setNumber(aisId); + aisVo.setLon(aisTrack.getLon()); + aisVo.setLat(aisTrack.getLat()); + aisVo.setUtc(aisTrack.getUTC()); + aisVo.setSog((double)aisTrack.getSog()); + aisVo.setCog((double)aisTrack.getCog()); + aisList.add(aisVo); + } + resultMap.put(FuseDataUtil.AIS_TABLE, aisList); + return resultMap; + } + + public static void paresFuseData(final List fuseList) { + final ZCHXAISVessel.AISVesselDataList.Builder aisVesselList = ZCHXAISVessel.AISVesselDataList.newBuilder(); + int dataSize = 0; + Map> resultMap = new HashMap>(); + for (final FuseVo fuseVo : fuseList) { + final ZCHXAISVessel.AISVesselData.Builder aisVessel = ZCHXAISVessel.AISVesselData.newBuilder(); + final ZCHXAISVessel.AISHistoryTracks.Builder aisHistoryTracks = ZCHXAISVessel.AISHistoryTracks.newBuilder(); + resultMap = getLocusDataByMgdb(fuseVo.getAisId(), fuseVo.getRadarId()); + final Map> insertMap = insertData(resultMap.get(FuseDataUtil.AIS_TABLE), resultMap.get(FuseDataUtil.RADAR_TABLE)); + final List radarList = insertMap.get(FuseDataUtil.RADAR_TABLE); + final List aisList = insertMap.get(FuseDataUtil.AIS_TABLE); + if (aisList.size() > 0) { + final int radarSize = radarList.size(); + final int aisSize = aisList.size(); + for (int listSize = (radarSize - aisSize > 0) ? aisSize : radarSize, i = 0; i < listSize; ++i) { + final EntityVo radar = radarList.get(i); + final EntityVo aisInfo = aisList.get(i); + final ZCHXAISVessel.AISHistoryTrack.Builder aisHistoryTrack = ZCHXAISVessel.AISHistoryTrack.newBuilder(); + aisHistoryTrack.setLon(aisInfo.getLon() * FuseDataUtil.aisWight + radar.getLon() * (1.0f - FuseDataUtil.aisWight)); + aisHistoryTrack.setLat(aisInfo.getLat() * FuseDataUtil.aisWight + radar.getLat() * (1.0f - FuseDataUtil.aisWight)); + aisHistoryTrack.setUTC(radar.getUtc()); + aisHistoryTrack.setSog((float)(aisInfo.getSog() * FuseDataUtil.aisWight + radar.getSog() * (1.0f - FuseDataUtil.aisWight))); + aisHistoryTrack.setCog((float)(aisInfo.getCog() * FuseDataUtil.aisWight + radar.getCog() * (1.0f - FuseDataUtil.aisWight))); + aisHistoryTrack.setHeading(0.0f); + aisHistoryTrack.setNavStatus(ZCHXAISVessel.NAVI_STATUS.valueOf(String.valueOf(0))); + aisHistoryTrack.setRot(0.0f); + aisHistoryTracks.addTracks(aisHistoryTrack.build()); + } + final EntityVo radar = radarList.get(0); + final EntityVo aisInfo = aisList.get(0); + final LocusVo aisVesselData = MongoUtil.getInstance().query_AISVessel_ById(aisInfo.getNumber()); + ZCHXAISVessel.VesselInfo vesselInfo = null; + if (aisVesselData.getData() == null) { + continue; + } + try { + vesselInfo = ZCHXAISVessel.VesselInfo.parseFrom(aisVesselData.getData()); + } + catch (InvalidProtocolBufferException e) { + System.out.println(e.getLocalizedMessage()); + } + aisVessel.setId(String.valueOf(aisInfo.getNumber()) + radar.getNumber()); + aisVessel.setLat(aisInfo.getLat() * FuseDataUtil.aisWight + radar.getLat() * (1.0f - FuseDataUtil.aisWight)); + aisVessel.setLon(aisInfo.getLat() * FuseDataUtil.aisWight + radar.getLat() * (1.0f - FuseDataUtil.aisWight)); + aisVessel.setSog((float)(aisInfo.getSog() * FuseDataUtil.aisWight + radar.getSog() * (1.0f - FuseDataUtil.aisWight))); + aisVessel.setCog((float)(aisInfo.getCog() * FuseDataUtil.aisWight + radar.getCog() * (1.0f - FuseDataUtil.aisWight))); + aisVessel.setUTC(radar.getUtc()); + aisVessel.setTracks(aisHistoryTracks.build()); + aisVessel.setMmsi(vesselInfo.getMmsi()); + aisVessel.setShiptype(vesselInfo.getShipType()); + aisVessel.setNavStatus(ZCHXAISVessel.NAVI_STATUS.valueOf(String.valueOf(0))); + aisVessel.setRot(0.0f); + aisVessel.setHeading(0.0f); + aisVessel.setImo(vesselInfo.getImo()); + aisVessel.setCallSign(vesselInfo.getCallSign()); + aisVessel.setShipName(vesselInfo.getShipName()); + aisVessel.setCargoType(vesselInfo.getCargoType()); + aisVessel.setCountry(vesselInfo.getCountry()); + aisVessel.setVendorID(vesselInfo.getVendorID()); + aisVessel.setShipLength(vesselInfo.getShipLength()); + aisVessel.setShipWidth(vesselInfo.getShipWidth()); + aisVessel.setToBow(vesselInfo.getToBow()); + aisVessel.setToStern(vesselInfo.getToStern()); + aisVessel.setToPort(vesselInfo.getToPort()); + aisVessel.setToStarboard(vesselInfo.getToStarboard()); + aisVessel.setFixType(vesselInfo.getFixType()); + aisVessel.setEta(vesselInfo.getEta()); + aisVessel.setDraught(vesselInfo.getDraught()); + aisVessel.setDest(vesselInfo.getDest()); + aisVesselList.addAisData(aisVessel.build()); + FuseDataUtil.time = String.valueOf(radar.getUtc()); + dataSize = aisVesselList.build().getAisDataList().size(); + if (dataSize <= 0) { + continue; + } + ZMQServerDyData.getZMQPUB().sendData(FuseDataUtil.SIGN, FuseDataUtil.time, aisVesselList.build().toByteArray()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/FuseDataVo.java b/src/main/java/com/zhichenhaixin/fusedata/FuseDataVo.java new file mode 100644 index 0000000..37ab923 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/FuseDataVo.java @@ -0,0 +1,93 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import java.io.Serializable; + +public class FuseDataVo implements Serializable +{ + private static final long serialVersionUID = 1L; + private String aisId; + private Double lon; + private Double lat; + private String time; + private long utc; + private long space_time; + private Double sog; + private Double cog; + private String trackNumber; + + public String getAisId() { + return this.aisId; + } + + public void setAisId(final String aisId) { + this.aisId = aisId; + } + + public Double getLon() { + return this.lon; + } + + public void setLon(final Double lon) { + this.lon = lon; + } + + public Double getLat() { + return this.lat; + } + + public void setLat(final Double lat) { + this.lat = lat; + } + + public String getTime() { + return this.time; + } + + public void setTime(final String time) { + this.time = time; + } + + public long getUtc() { + return this.utc; + } + + public void setUtc(final long utc) { + this.utc = utc; + } + + public long getSpace_time() { + return this.space_time; + } + + public void setSpace_time(final long space_time) { + this.space_time = space_time; + } + + public Double getSog() { + return this.sog; + } + + public void setSog(final Double sog) { + this.sog = sog; + } + + public Double getCog() { + return this.cog; + } + + public void setCog(final Double cog) { + this.cog = cog; + } + + public String getTrackNumber() { + return this.trackNumber; + } + + public void setTrackNumber(final String trackNumber) { + this.trackNumber = trackNumber; + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/FuseRadarThread.java b/src/main/java/com/zhichenhaixin/fusedata/FuseRadarThread.java new file mode 100644 index 0000000..0dc2d49 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/FuseRadarThread.java @@ -0,0 +1,230 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import com.zhichenhaixin.base.util.DistanceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.AgilTrackEhcache; +import com.zhichenhaixin.cache.util.TrackPointEhcache; +import com.zhichenhaixin.proto.ZCHXRadar; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class FuseRadarThread extends Thread +{ + private static Log log; + private static float belongLimit; + private static double distance; + private static double sog; + private static double cog; + private static float varaince_dis; + private static float varaince_cog; + private static float varaince_sog; + private static final long FUSE_TIME_SPAN; + private static float t1; + private static float t2; + private static float t3; + private static Map varianceMap; + private static float[] elemWight; + private static final String DISTANCE = "distance"; + private static final String COG = "cog"; + private static final String SOG = "sog"; + + static { + FuseRadarThread.log = LogFactory.getLog(FuseRadarThread.class); + FuseRadarThread.belongLimit = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.belongLimit")); + FuseRadarThread.distance = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.radar.distance")); + FuseRadarThread.sog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.radar.sog")); + FuseRadarThread.cog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.radar.cog")); + FuseRadarThread.varaince_dis = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.varaince_dis")); + FuseRadarThread.varaince_cog = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.varaince_cog")); + FuseRadarThread.varaince_sog = Float.parseFloat(SpringPropertyUtil.getProperty("fuse.radar.varaince_sog")); + FUSE_TIME_SPAN = Long.parseLong(SpringPropertyUtil.getProperty("fuse.radar.time.span")); + FuseRadarThread.t1 = 0.001f; + FuseRadarThread.t2 = 0.1f; + FuseRadarThread.t3 = 0.1f; + FuseRadarThread.varianceMap = setVarianceMap(); + FuseRadarThread.elemWight = setElemWight(); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final List pointList = TrackPointEhcache.getAll(); + this.handleFuseRadar(pointList); + Thread.sleep(1500L); + } + catch (Exception e) { + FuseRadarThread.log.error("\u5904\u7406\u591a\u96f7\u8fbe\u878d\u5408\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void handleFuseRadar(final List pointList) { + for (final ZCHXRadar.TrackPoint trackPoint : pointList) { + for (final ZCHXRadar.TrackPoint trackPoint2 : pointList) { + final String radarType1 = String.valueOf(trackPoint.getTrackNumber()).substring(0, 1); + final String radarType2 = String.valueOf(trackPoint2.getTrackNumber()).substring(0, 1); + final ZCHXRadar.TrackPoint tpoint = TrackPointEhcache.get(trackPoint.getTrackNumber()); + final ZCHXRadar.TrackPoint tpoint2 = TrackPointEhcache.get(trackPoint2.getTrackNumber()); + if (!radarType1.equals(radarType2) && tpoint != null && tpoint2 != null) { + final double shipDistance = DistanceUtil.getDistance(trackPoint.getWgs84PosLat(), trackPoint.getWgs84PosLong(), trackPoint2.getWgs84PosLat(), trackPoint2.getWgs84PosLong()); + final double gapCog = Math.abs(trackPoint.getCog() - trackPoint2.getCog()); + final double gapSog = Math.abs(trackPoint.getSog() - trackPoint2.getSog()); + if (shipDistance >= FuseRadarThread.distance || gapSog >= FuseRadarThread.sog || gapCog >= FuseRadarThread.cog) { + continue; + } + final float belong = calculateFuseDgr(trackPoint, trackPoint2); + if (FuseRadarThread.belongLimit >= belong) { + continue; + } + TrackPointEhcache.remove(trackPoint2.getTrackNumber()); + AgilTrackEhcache.remove(trackPoint2.getTrackNumber()); + FuseRadarThread.log.info(String.valueOf(trackPoint.getTrackNumber()) + "\u548c" + trackPoint2.getTrackNumber() + "\u662f\u540c\u4e00\u4e2a\u76ee\u6807\uff0c\u4fdd\u7559" + trackPoint.getTrackNumber()); + } + } + } + } + + public static Map setVarianceMap() { + final Map varianceMap = new HashMap(); + varianceMap.put("distance", FuseRadarThread.varaince_dis); + varianceMap.put("cog", FuseRadarThread.varaince_cog); + varianceMap.put("sog", FuseRadarThread.varaince_sog); + return varianceMap; + } + + public static float[] setElemWight() { + final float[] elemWight = { 0.45f, 0.25f, 0.3f }; + return elemWight; + } + + public static float cutSingleBln(final EntityVo radarCalcul1, final EntityVo radarCalcul2, final Map varianceMap) { + final float dataDistance = (float)DistanceUtil.getDistance(radarCalcul1.getLat(), radarCalcul1.getLon(), radarCalcul2.getLat(), radarCalcul2.getLon()); + final float dataCog = (float)Math.abs(radarCalcul1.getCog() - radarCalcul2.getCog()); + final float dataSog = (float)Math.abs(radarCalcul1.getSog() - radarCalcul2.getSog()); + final float distanceBln = (float)Math.exp(-FuseRadarThread.t1 * (Math.pow(dataDistance, 2.0) / varianceMap.get("distance"))); + final float cogBln = (float)Math.exp(-FuseRadarThread.t2 * (Math.pow(dataCog, 2.0) / varianceMap.get("cog"))); + final float sogBln = (float)Math.exp(-FuseRadarThread.t3 * (Math.pow(dataSog, 2.0) / varianceMap.get("sog"))); + final float belong = FuseRadarThread.elemWight[0] * distanceBln + FuseRadarThread.elemWight[1] * cogBln + FuseRadarThread.elemWight[2] * sogBln; + return belong; + } + + public static float calculateFuseDgr(final ZCHXRadar.TrackPoint radarCalcul1, final ZCHXRadar.TrackPoint radarCalcul2) { + float avgBelong = 0.0f; + final Map> syncMap = syncRadarData(radarCalcul1.getTracks(), radarCalcul2.getTracks()); + final List radarList1 = syncMap.get("1"); + final List radarList2 = syncMap.get("2"); + float belongSum = 0.0f; + final int radarSize1 = radarList1.size(); + final int radarSize2 = radarList2.size(); + if (radarSize1 != 0 && radarSize2 != 0) { + final int listSize = (radarSize1 < radarSize2) ? radarSize1 : radarSize2; + for (int i = 0; i < listSize; ++i) { + final float belong = cutSingleBln(radarList1.get(i), radarList2.get(i), FuseRadarThread.varianceMap); + belongSum += belong; + } + avgBelong = belongSum / listSize; + } + return avgBelong; + } + + public static Map> syncRadarData(final ZCHXRadar.RadarHistoryTracks radarLocusList1, final ZCHXRadar.RadarHistoryTracks radarLocusList2) { + final Map> resultMap = new HashMap>(); + final List radarTrackList1 = radarLocusList1.getTracksList(); + final List radarTrackList2 = radarLocusList2.getTracksList(); + final List radarList1 = new ArrayList(); + final List radarList2 = new ArrayList(); + final long endTime = System.currentTimeMillis() - FuseRadarThread.FUSE_TIME_SPAN; + int size = radarTrackList1.size(); + for (int i = size - 1; i >= 0; --i) { + final ZCHXRadar.RadarHistoryTrack radarTrack = radarTrackList1.get(i); + if (radarTrack.getUTC() < endTime) { + break; + } + final EntityVo radarVo = new EntityVo(); + radarVo.setNumber(String.valueOf(radarTrack.getTrackNumber())); + radarVo.setLon(radarTrack.getWgs84PosLong()); + radarVo.setLat(radarTrack.getWgs84PosLat()); + radarVo.setUtc(radarTrack.getUTC()); + radarVo.setSog(radarTrack.getSog()); + radarVo.setCog(radarTrack.getCog()); + radarList1.add(radarVo); + } + resultMap.put("1", radarList1); + size = radarTrackList2.size(); + for (int i = size - 1; i >= 0; --i) { + final ZCHXRadar.RadarHistoryTrack radarTrack = radarTrackList2.get(i); + if (radarTrack.getUTC() < endTime) { + break; + } + final EntityVo radarVo = new EntityVo(); + radarVo.setNumber(String.valueOf(radarTrack.getTrackNumber())); + radarVo.setLon(radarTrack.getWgs84PosLong()); + radarVo.setLat(radarTrack.getWgs84PosLat()); + radarVo.setUtc(radarTrack.getUTC()); + radarVo.setSog(radarTrack.getSog()); + radarVo.setCog(radarTrack.getCog()); + radarList2.add(radarVo); + } + resultMap.put("2", radarList2); + return resultMap; + } + + public static List computeVariance(final List radarList1, final List radarList2) { + final List resultList = new ArrayList(); + final List distanceList = new ArrayList(); + final List cogList = new ArrayList(); + final List sogList = new ArrayList(); + float distanceSum = 0.0f; + float cogSum = 0.0f; + float sogSum = 0.0f; + EntityVo radarCalcul1 = null; + EntityVo radarCalcul2 = null; + final int size = radarList2.size(); + for (int i = 0; i < size; ++i) { + radarCalcul1 = radarList1.get(i); + radarCalcul2 = radarList2.get(i); + final float dataDistance = (float)DistanceUtil.getDistance(radarCalcul1.getLat(), radarCalcul1.getLon(), radarCalcul2.getLat(), radarCalcul2.getLon()); + distanceList.add(dataDistance); + distanceSum += dataDistance; + final float dataCog = (float)Math.abs(radarCalcul1.getCog() - radarCalcul2.getCog()); + cogList.add(dataCog); + cogSum += dataCog; + final float dataSog = (float)Math.abs(radarCalcul1.getSog() - radarCalcul2.getSog()); + sogList.add(dataSog); + sogSum += dataSog; + } + final float distanceAverage = distanceSum / size; + final float cogAverage = cogSum / size; + final float sogAverage = sogSum / size; + float distancePowSum = 0.0f; + float cogPowSum = 0.0f; + float sogPowSum = 0.0f; + for (int j = 0; j < size; ++j) { + distancePowSum += (float)Math.pow(distanceList.get(j) - distanceAverage, 2.0); + cogPowSum += (float)Math.pow(cogList.get(j) - cogAverage, 2.0); + sogPowSum += (float)Math.pow(sogList.get(j) - sogAverage, 2.0); + } + final float distanceVariance = distancePowSum / size; + resultList.add(0, distanceVariance); + final float cogVariance = cogPowSum / size; + resultList.add(1, cogVariance); + final float sogVariance = sogPowSum / size; + resultList.add(2, sogVariance); + return resultList; + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/FuseVo.java b/src/main/java/com/zhichenhaixin/fusedata/FuseVo.java new file mode 100644 index 0000000..29a6d39 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/FuseVo.java @@ -0,0 +1,27 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +public class FuseVo +{ + private String aisId; + private String radarId; + + public String getAisId() { + return this.aisId; + } + + public void setAisId(final String aisId) { + this.aisId = aisId; + } + + public String getRadarId() { + return this.radarId; + } + + public void setRadarId(final String radarId) { + this.radarId = radarId; + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/LocusVo.java b/src/main/java/com/zhichenhaixin/fusedata/LocusVo.java new file mode 100644 index 0000000..b5d9c7b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/LocusVo.java @@ -0,0 +1,44 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import com.mongodb.ReflectionDBObject; + +public class LocusVo extends ReflectionDBObject implements Cloneable +{ + private String _id; + private byte[] data; + private static LocusVo BaseCredit; + + static { + LocusVo.BaseCredit = new LocusVo(); + } + + public static LocusVo getClone() { + try { + return (LocusVo)LocusVo.BaseCredit.clone(); + } + catch (CloneNotSupportedException e) { + return new LocusVo(); + } + } + + @Override + public String get_id() { + return this._id; + } + + public void set_id(final String _id) { + this._id = _id; + } + + public byte[] getData() { + return this.data; + } + + public void setData(final byte[] data) { + this.data = data; + } +} diff --git a/src/main/java/com/zhichenhaixin/fusedata/MongoUtil.java b/src/main/java/com/zhichenhaixin/fusedata/MongoUtil.java new file mode 100644 index 0000000..edf8874 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/fusedata/MongoUtil.java @@ -0,0 +1,340 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.fusedata; + +import com.mongodb.*; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; + +public class MongoUtil +{ + private static final Log log; + private static final String MONGO_URL; + private static final String MONGO_DB; + private static MongoUtil util; + private static DBCollection ais_collect; + private static DBCollection radar_collect; + private static DBCollection ais_locus_collect; + private static DBCollection radar_locus_collect; + private static DBCollection ais_vessel_collect; + private static DBCollection video_warn_info_collect; + private static DBCollection video_warn_infos_collect; + private static DBCollection video_warn_target_collect; + private static DBCollection gps_collect; + private Mongo m; + static SimpleDateFormat fmt; + + static { + log = LogFactory.getLog(MongoUtil.class); + MONGO_URL = SpringPropertyUtil.getProperty("mongo.hostport"); + MONGO_DB = SpringPropertyUtil.getProperty("mongo.dbname"); + MongoUtil.util = null; + MongoUtil.fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); + } + + public MongoUtil() { + try { + this.m = new Mongo(MongoUtil.MONGO_URL); + final DB db = this.m.getDB(MongoUtil.MONGO_DB); + (MongoUtil.ais_collect = db.getCollection("com_ais_anys")).setObjectClass(EntityVo.class); + (MongoUtil.radar_collect = db.getCollection("com_radar_anys")).setObjectClass(EntityVo.class); + MongoUtil.ais_locus_collect = db.getCollection("AIS_Track"); + MongoUtil.radar_locus_collect = db.getCollection("Radar_Track"); + MongoUtil.ais_vessel_collect = db.getCollection("AIS_Info"); + MongoUtil.video_warn_info_collect = db.getCollection("VideoWarn_Track"); + MongoUtil.video_warn_infos_collect = db.getCollection("VideoWarns_Track"); + MongoUtil.video_warn_target_collect = db.getCollection("VideoWarnTarget_Track"); + MongoUtil.gps_collect = db.getCollection("gps_Track"); + } + catch (Exception e) { + MongoUtil.log.error("mogodb \u521d\u59cb\u5316\u5931\u8d25\uff01", e.fillInStackTrace()); + } + } + + public static MongoUtil getInstance() { + if (MongoUtil.util == null) { + MongoUtil.util = new MongoUtil(); + } + return MongoUtil.util; + } + + public EntityVo query_ais_ById(final String id) { + final BasicDBObject query = new BasicDBObject(); + query.append("_id", id); + final EntityVo evo = (EntityVo)MongoUtil.ais_collect.findOne(query); + return evo; + } + + public EntityVo query_ais_ByUtc(final long utc) { + final BasicDBObject query = new BasicDBObject(); + query.append("Utc", utc); + final EntityVo evo = (EntityVo)MongoUtil.ais_collect.findOne(query); + return evo; + } + + public void save(final EntityVo vo) { + MongoUtil.ais_collect.save(vo); + } + + public EntityVo query_radar_ById(final String id) { + final BasicDBObject query = new BasicDBObject(); + query.append("_id", id); + final EntityVo evo = (EntityVo)MongoUtil.radar_collect.findOne(query); + return evo; + } + + public LocusVo query_radarLocus_ById(final String id) { + final LocusVo vo = LocusVo.getClone(); + DBObject dbObject = null; + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put("_id", id); + final DBCursor cursor = MongoUtil.radar_locus_collect.find(queryObject); + byte[] vess = null; + while (cursor.hasNext()) { + dbObject = cursor.next(); + vess = (byte[])dbObject.get("data"); + } + vo.setData(vess); + return vo; + } + + public LocusVo query_aisLocus_ById(final String id) { + final LocusVo vo = LocusVo.getClone(); + DBObject dbObject = null; + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put("_id", id); + final DBCursor cursor = MongoUtil.ais_locus_collect.find(queryObject); + byte[] vess = null; + while (cursor.hasNext()) { + dbObject = cursor.next(); + vess = (byte[])dbObject.get("data"); + } + vo.setData(vess); + return vo; + } + + public LocusVo query_AISVessel_ById(final String id) { + final LocusVo vo = LocusVo.getClone(); + DBObject dbObject = null; + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put("_id", id); + final DBCursor cursor = MongoUtil.ais_vessel_collect.find(queryObject); + byte[] vess = null; + while (cursor.hasNext()) { + dbObject = cursor.next(); + vess = (byte[])dbObject.get("data"); + } + vo.setData(vess); + return vo; + } + + public void save_radar(final EntityVo vo) { + MongoUtil.radar_collect.save(vo); + } + + public void save_radar_track(final BasicDBObject record) { + MongoUtil.radar_locus_collect.save(record); + } + + public void deleteByPrimaryKey(final String collectionName, final String id) { + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put("_id", id); + if ("Radar_Track".equals(collectionName)) { + MongoUtil.radar_locus_collect.remove(queryObject); + } + else if ("AIS_Track".equals(collectionName)) { + MongoUtil.ais_locus_collect.remove(queryObject); + } + else if ("VideoWarn_Track".equals(collectionName)) { + MongoUtil.video_warn_info_collect.remove(queryObject); + } + else if ("VideoWarns_Track".equals(collectionName)) { + MongoUtil.video_warn_infos_collect.remove(queryObject); + } + else if ("VideoWarnTarget_Track".equals(collectionName)) { + MongoUtil.video_warn_target_collect.remove(queryObject); + } + else if ("gps_Track".equals(collectionName)) { + MongoUtil.gps_collect.remove(queryObject); + } + } + + public DBObject selectByPrimaryKey(final String collectionName, final String id) { + DBObject dbObject = null; + final BasicDBObject queryObject = new BasicDBObject(); + DBCursor cursor = null; + queryObject.put("_id", id); + if ("Radar_Track".equals(collectionName)) { + cursor = MongoUtil.radar_locus_collect.find(queryObject); + } + else if ("AIS_Track".equals(collectionName)) { + cursor = MongoUtil.ais_locus_collect.find(queryObject); + } + else if ("AIS_Info".equals(collectionName)) { + cursor = MongoUtil.ais_vessel_collect.find(queryObject); + } + else if ("VideoWarn_Track".equals(collectionName)) { + cursor = MongoUtil.video_warn_info_collect.find(queryObject); + } + else if ("VideoWarns_Track".equals(collectionName)) { + cursor = MongoUtil.video_warn_infos_collect.find(queryObject); + } + else if ("VideoWarnTarget_Track".equals(collectionName)) { + cursor = MongoUtil.video_warn_target_collect.find(queryObject); + } + else if ("gps_Track".equals(collectionName)) { + cursor = MongoUtil.gps_collect.find(queryObject); + } + if (cursor == null) { + return null; + } + while (cursor.hasNext()) { + dbObject = cursor.next(); + } + cursor.close(); + return dbObject; + } + + public List selectAll(final String collectionName) { + final List dbList = new ArrayList(); + DBCursor cursor = null; + if ("Radar_Track".equals(collectionName)) { + cursor = MongoUtil.radar_locus_collect.find(); + } + else if ("AIS_Track".equals(collectionName)) { + cursor = MongoUtil.ais_locus_collect.find(); + } + if (cursor == null) { + return null; + } + while (cursor.hasNext()) { + dbList.add(cursor.next()); + } + cursor.close(); + return dbList; + } + + public List selectAllByField(final String collectionName, final String field1, final String field2) { + final List dbList = new ArrayList(); + final BasicDBObject queryObject = new BasicDBObject(); + queryObject.put(field1, true); + queryObject.put(field2, true); + DBCursor cursor = null; + if ("Radar_Track".equals(collectionName)) { + cursor = MongoUtil.radar_locus_collect.find(new BasicDBObject(), queryObject); + } + else if ("AIS_Track".equals(collectionName)) { + cursor = MongoUtil.ais_locus_collect.find(new BasicDBObject(), queryObject); + } + else if ("VideoWarn_Track".equals(collectionName)) { + cursor = MongoUtil.video_warn_info_collect.find(new BasicDBObject(), queryObject); + } + else if ("VideoWarns_Track".equals(collectionName)) { + cursor = MongoUtil.video_warn_infos_collect.find(new BasicDBObject(), queryObject); + } + else if ("VideoWarnTarget_Track".equals(collectionName)) { + cursor = MongoUtil.video_warn_target_collect.find(new BasicDBObject(), queryObject); + } + else if ("gps_Track".equals(collectionName)) { + cursor = MongoUtil.gps_collect.find(new BasicDBObject(), queryObject); + } + if (cursor == null) { + return null; + } + while (cursor.hasNext()) { + dbList.add(cursor.next()); + } + cursor.close(); + return dbList; + } + + public void save_ais_track(final BasicDBObject record) { + MongoUtil.ais_locus_collect.save(record); + } + + public void save_ais_Info(final BasicDBObject record) { + MongoUtil.ais_vessel_collect.save(record); + } + + public List getAllVesselInfo() { + final List dataList = new ArrayList(); + DBObject dbObject = null; + final DBCursor cursor = MongoUtil.ais_vessel_collect.find(); + LocusVo data = null; + byte[] vess = null; + while (cursor.hasNext()) { + data = new LocusVo(); + dbObject = cursor.next(); + vess = (byte[])dbObject.get("data"); + data.set_id(dbObject.get("_id")); + data.setData(vess); + dataList.add(data); + } + return dataList; + } + + public List getDataByTime(final String dataTable, final String startTime, final String endTime) { + final List entityList = new ArrayList(); + final BasicDBObject query = new BasicDBObject(); + try { + query.put("Utc", new BasicDBObject("$gte", MongoUtil.fmt.parse(startTime).getTime()).append("$lte", MongoUtil.fmt.parse(endTime).getTime())); + } + catch (ParseException e) { + System.out.println(e.getLocalizedMessage()); + } + DBCursor cursor = null; + if (dataTable.equals("radar")) { + cursor = MongoUtil.radar_collect.find(query); + } + if (dataTable.equals("ais")) { + cursor = MongoUtil.ais_collect.find(query); + } + EntityVo entity = null; + while (cursor.hasNext()) { + entity = new EntityVo(); + entity = (EntityVo)cursor.next(); + entityList.add(entity); + } + return entityList; + } + + public long getMaxUtc(final String dataTable) { + DBCursor cursor = null; + if (dataTable.equals("radar")) { + cursor = MongoUtil.radar_collect.find().sort(new BasicDBObject("Utc", -1)).limit(1); + } + if (dataTable.equals("ais")) { + cursor = MongoUtil.ais_collect.find().sort(new BasicDBObject("Utc", -1)).limit(1); + } + if (cursor.hasNext()) { + EntityVo entity = new EntityVo(); + entity = (EntityVo)cursor.next(); + return entity.getUtc(); + } + return 0L; + } + + public void saveVideoWarnInfo(final BasicDBObject record) { + MongoUtil.video_warn_info_collect.save(record); + } + + public void saveVideoWarnInfos(final BasicDBObject record) { + MongoUtil.video_warn_infos_collect.save(record); + } + + public void saveVideoWarnTargetInfo(final BasicDBObject record) { + MongoUtil.video_warn_target_collect.save(record); + } + + public void saveGPSInfo(final BasicDBObject record) { + MongoUtil.gps_collect.save(record); + } +} diff --git a/src/main/java/com/zhichenhaixin/gui/RadarHelperFrame.java b/src/main/java/com/zhichenhaixin/gui/RadarHelperFrame.java new file mode 100644 index 0000000..3e5c473 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/gui/RadarHelperFrame.java @@ -0,0 +1,213 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.gui; + +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.thread.RadarServer; +import com.zhichenhaixin.thread.ZMQPubServer; +import com.zhichenhaixin.util.IPUtil; + +import javax.swing.*; +import javax.swing.border.TitledBorder; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.List; + +public class RadarHelperFrame extends JFrame implements ActionListener +{ + private static final long serialVersionUID = 1L; + private int width; + private int height; + private int windowsWidth; + private int windowsHeight; + private Font font; + public static JTextArea textlog; + private JPanel topMainPanel; + private JTextField top_radar_port; + private JButton top_radar_button; + private JPanel bottomMainPanel; + private JPanel centerMainPanel; + private JTextField top_radar_ip; + private JTextField top_localhost_ip; + private JTextField top_localhost_port; + private JCheckBox top_radar_log_checkBox01; + private JButton top_localhost_button; + public static JLabel top_zoom_show_label; + public static JLabel top_radar_show_label; + public static int rightMainWidth; + public static int rightMainHigh; + private RadarServer radarServer; + private JTextField top_localhost_topic; + private static int LOG_DATA_ROW_LIMIT_NUM; + public static volatile ZMQPubServer zmqPubServer; + public static volatile String topic_string; + + + + static { + RadarHelperFrame.rightMainWidth = 0; + RadarHelperFrame.rightMainHigh = 0; + RadarHelperFrame.LOG_DATA_ROW_LIMIT_NUM = 20; + RadarHelperFrame.zmqPubServer = null; + RadarHelperFrame.topic_string = null; + } + + public RadarHelperFrame() { + this.width = Toolkit.getDefaultToolkit().getScreenSize().width; + this.height = Toolkit.getDefaultToolkit().getScreenSize().height; + this.windowsWidth = 500; + this.windowsHeight = 600; + this.radarServer = null; + this.setResizable(false); + this.setVisible(true); + // 雷达工具 + this.setTitle("\u96f7\u8fbe\u5de5\u5177"); + UIManager.put("Button.font", this.font = new Font("\u5fae\u8f6f\u96c5\u9ed1", 0, 12)); + UIManager.put("Label.font", this.font); + UIManager.put("RadioButton.font", this.font); + UIManager.put("ComboBox.font", this.font); + UIManager.put("Table.font", this.font); + UIManager.put("TextField.font", this.font); + UIManager.put("TextArea.font", this.font); + UIManager.put("TitledBorder.font", this.font); + this.setBounds((this.width - this.windowsWidth) / 2, (this.height - this.windowsHeight) / 2, this.windowsWidth, this.windowsHeight); + this.initMainPanel(); + this.initRadarConfig(); + this.initZMQModule(); + } + + private void initMainPanel() { + (this.topMainPanel = new JPanel()).setLayout(null); + this.topMainPanel.setPreferredSize(new Dimension(this.windowsWidth - 10, 60)); + // 雷达TCP-SERVER配置 + this.topMainPanel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u96f7\u8fbeTCP-SERVER\u914d\u7f6e", 4, 2, null, new Color(0, 0, 0))); + this.getContentPane().add(this.topMainPanel, "North"); + (this.centerMainPanel = new JPanel()).setLayout(null); + this.centerMainPanel.setPreferredSize(new Dimension(this.windowsWidth - 10, 60)); + // ZMQ发布配置 + this.centerMainPanel.setBorder(new TitledBorder(null, "ZMQ\u53d1\u5e03\u914d\u7f6e", 4, 2, null, null)); + this.getContentPane().add(this.centerMainPanel, "Center"); + (this.bottomMainPanel = new JPanel()).setBorder(new TitledBorder(null, "\u65e5\u5fd7", 4, 2, null, null)); + this.bottomMainPanel.setPreferredSize(new Dimension(this.windowsWidth - 10, 440)); + this.getContentPane().add(this.bottomMainPanel, "South"); + (RadarHelperFrame.textlog = new JTextArea()).setEditable(false); + RadarHelperFrame.textlog.setForeground(Color.RED); + RadarHelperFrame.textlog.setLineWrap(true); + final JScrollPane textlog_jsp = new JScrollPane(RadarHelperFrame.textlog); + textlog_jsp.setPreferredSize(new Dimension(this.windowsWidth - 10, 415)); + this.bottomMainPanel.add(textlog_jsp); + } + + private void initRadarConfig() { + // 服务IP + final JLabel top_radar_label_ip = new JLabel("\u670d\u52a1IP:"); + top_radar_label_ip.setBounds(10, 24, 60, 20); + this.topMainPanel.add(top_radar_label_ip); + (this.top_radar_ip = new JTextField("")).setBounds(60, 24, 110, 20); + this.topMainPanel.add(this.top_radar_ip); + // TCP端口 + final JLabel top_radar_label_port = new JLabel("TCP\u7aef\u53e3:"); + top_radar_label_port.setBounds(180, 24, 60, 20); + this.topMainPanel.add(top_radar_label_port); + (this.top_radar_port = new JTextField("8899")).setBounds(240, 24, 50, 20); + this.topMainPanel.add(this.top_radar_port); + // 点击开启 + (this.top_radar_button = new JButton("\u70b9\u51fb\u5f00\u542f")).setBounds(295, 24, 82, 20); + this.top_radar_button.addActionListener(this); + this.topMainPanel.add(this.top_radar_button); + // 开启日志打印 + final JLabel top_radar_label_log = new JLabel("\u5f00\u542f\u65e5\u5fd7\u6253\u5370"); + top_radar_label_log.setBounds(383, 24, 75, 20); + this.topMainPanel.add(top_radar_label_log); + (this.top_radar_log_checkBox01 = new JCheckBox()).setSelected(true); + this.top_radar_log_checkBox01.setBounds(460, 24, 20, 20); + this.topMainPanel.add(this.top_radar_log_checkBox01); + } + + private void initZMQModule() { + // 本机IP + final JLabel top_localhost_label_ip = new JLabel("\u672c\u673aIP:"); + top_localhost_label_ip.setBounds(10, 24, 60, 20); + this.centerMainPanel.add(top_localhost_label_ip); + (this.top_localhost_ip = new JTextField("")).setBounds(60, 24, 110, 20); + this.centerMainPanel.add(this.top_localhost_ip); + // TCP端口 + final JLabel top_localhost_label_port = new JLabel("TCP\u7aef\u53e3:"); + top_localhost_label_port.setBounds(180, 24, 60, 20); + this.centerMainPanel.add(top_localhost_label_port); + (this.top_localhost_port = new JTextField("5151")).setBounds(240, 24, 50, 20); + this.centerMainPanel.add(this.top_localhost_port); + final JLabel top_localhost_label_topic = new JLabel("TOPIC:"); + top_localhost_label_topic.setBounds(290, 24, 82, 20); + this.centerMainPanel.add(top_localhost_label_topic); + (this.top_localhost_topic = new JTextField("radar_surface_track")).setBounds(330, 24, 75, 20); + this.centerMainPanel.add(this.top_localhost_topic); + // 点击发布 + (this.top_localhost_button = new JButton("\u70b9\u51fb\u53d1\u5e03")).setBounds(405, 24, 84, 20); + this.top_localhost_button.addActionListener(this); + this.centerMainPanel.add(this.top_localhost_button); + final List iplist = IPUtil.getLocalIPList(); + if (iplist != null && iplist.size() > 0) { + this.top_radar_ip.setText(iplist.get(0)); + this.top_localhost_ip.setText(iplist.get(0)); + } + } + + public static void writeLog(final String msg) { + final String text = RadarHelperFrame.textlog.getText(); + final StringBuffer sb = new StringBuffer(); + if (StringUtil.notBlank(text)) { + final String[] contents = RadarHelperFrame.textlog.getText().split("\n"); + final int len = contents.length; + int start = 0; + if (len > RadarHelperFrame.LOG_DATA_ROW_LIMIT_NUM) { + start = len - RadarHelperFrame.LOG_DATA_ROW_LIMIT_NUM; + } + for (int i = start; i < len; ++i) { + sb.append(String.valueOf(contents[i]) + "\r\n"); + } + } + sb.append(String.valueOf(msg) + "\r\n"); + RadarHelperFrame.textlog.setText(null); + RadarHelperFrame.textlog.append(sb.toString()); + } + + @Override + public void actionPerformed(final ActionEvent e) { + if (e.getSource() == this.top_radar_button) { + // 点击开启 + if (this.top_radar_button.getText().equals("\u70b9\u51fb\u5f00\u542f")) { + (this.radarServer = new RadarServer(this.top_radar_ip.getText().trim(), Integer.parseInt(this.top_radar_port.getText().trim()))).start(); + // 点击停止 + this.top_radar_button.setText("\u70b9\u51fb\u505c\u6b62"); + } + else { + if (this.radarServer != null) { + this.radarServer.close(); + } + // 点击开启 + this.top_radar_button.setText("\u70b9\u51fb\u5f00\u542f"); + this.top_radar_button.setForeground(new Color(0, 0, 0)); + } + } + else if (e.getSource() == this.top_localhost_button) { + // 点击发布 + if (this.top_localhost_button.getText().equals("\u70b9\u51fb\u53d1\u5e03")) { + RadarHelperFrame.topic_string = this.top_localhost_topic.getText().trim(); + (RadarHelperFrame.zmqPubServer = new ZMQPubServer(this.top_localhost_ip.getText().trim(), Integer.parseInt(this.top_localhost_port.getText().trim()))).initZMQServerDy(); + // 停止发布 + this.top_localhost_button.setText("\u505c\u6b62\u53d1\u5e03"); + } + else { + if (RadarHelperFrame.zmqPubServer != null) { + RadarHelperFrame.zmqPubServer.close(); + } + this.top_localhost_button.setText("\u70b9\u51fb\u53d1\u5e03"); + this.top_localhost_button.setForeground(new Color(0, 0, 0)); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/hbase/CommonConfig.java b/src/main/java/com/zhichenhaixin/hbase/CommonConfig.java new file mode 100644 index 0000000..fa6ed36 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/hbase/CommonConfig.java @@ -0,0 +1,75 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.hbase; + +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.client.HTable; + +public class CommonConfig +{ + protected static Log log; + private static HBaseAdmin hbaseAdmin; + private static Configuration conf; + + static { + CommonConfig.log = LogFactory.getLog(CommonConfig.class); + try { + (CommonConfig.conf = HBaseConfiguration.create()).set("hbase.zookeeper.property.clientPort", SpringPropertyUtil.getProperty("hbase.zookeeper.clientPort")); + CommonConfig.conf.set("hbase.zookeeper.quorum", SpringPropertyUtil.getProperty("hbase.zookeeper.quorum")); + CommonConfig.conf.set("hbase.master", SpringPropertyUtil.getProperty("hbase.master")); + CommonConfig.conf.set("hbase.security.authorization", "false"); + CommonConfig.conf.set("hbase.client.keyvalue.maxsize", "838860800"); + CommonConfig.conf.setLong("hbase.rpc.timeout", 600000L); + CommonConfig.conf.setLong("hbase.client.scanner.caching", 5000L); + CommonConfig.conf.set("hbase.hstore.compaction.min.size", "10485760"); + CommonConfig.conf.set("hbase.hstore.compaction.max.size", "1073741824"); + CommonConfig.conf.set("hbase.hregion.majorcompaction", "86400000"); + CommonConfig.conf.set("hbase.hstore.compaction.max", "5"); + CommonConfig.conf.set("hbase.hstore.blockingStoreFiles", "7"); + CommonConfig.conf.set("hbase.hregion.max.filesize", "256"); + CommonConfig.hbaseAdmin = new HBaseAdmin(CommonConfig.conf); + } + catch (Exception e) { + CommonConfig.log.error("hbase \u521d\u59cb\u5316\u5931\u8d25\uff01", e.fillInStackTrace()); + } + } + + public static Configuration getConfiguration() { + return CommonConfig.conf; + } + + public static HBaseAdmin getHBaseAdmin() { + return CommonConfig.hbaseAdmin; + } + + public static HTable getTable(final String tableName, final int size) { + HTable table = null; + try { + table = new HTable(CommonConfig.conf, tableName); + table.setWriteBufferSize(size * 1024 * 1024); + table.setAutoFlush(false); + } + catch (Exception e) { + CommonConfig.log.error("hbase \u521d\u59cb\u5316\u5931\u8d25\uff01", e.fillInStackTrace()); + } + return table; + } + + public static HTable getIndexTable(final String tableName) { + HTable table = null; + try { + table = new HTable(CommonConfig.conf, tableName); + } + catch (Exception e) { + CommonConfig.log.error("hbase \u521d\u59cb\u5316\u5931\u8d25\uff01", e.fillInStackTrace()); + } + return table; + } +} diff --git a/src/main/java/com/zhichenhaixin/hbase/HBaseClient.java b/src/main/java/com/zhichenhaixin/hbase/HBaseClient.java new file mode 100644 index 0000000..ba8d710 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/hbase/HBaseClient.java @@ -0,0 +1,567 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.hbase; + +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.zmq.model.ResultData; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hbase.HColumnDescriptor; +import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.client.*; +import org.apache.hadoop.hbase.filter.KeyOnlyFilter; +import org.apache.hadoop.hbase.util.Bytes; + +import java.util.ArrayList; +import java.util.List; + +public class HBaseClient +{ + private static Log log; + private final String qaz_wsx_table = "qaz_wsx"; + private final String ais_tablename = "t_ais_data"; + private final String aisbyid_tablename = "t_aisbyid_data"; + private final String radar_tablename = "t_radar_data"; + private final String radarbyid_tablename = "t_radarbyid_data"; + private final String radarwarn_tablename = "t_radarwarn_data"; + private final String radarbyid_copy_tablename = "t_radarbyid_copy_data"; + private final String radarEcho_tablename = "t_radarEcho_data"; + private final String gps_trace_data = "gps_trace_data"; + private final String uavbyid_tablename = "t_uavbyid_data"; + private final byte[] sourceType; + private final byte[] theData; + private final byte[] theCode; + private static HBaseClient client; + private HTable qaz_wsx; + private HTable ais_table; + private HTable aisbyid_table; + private HTable radar_table; + private HTable radarbyid_table; + private HTable radarwarn_table; + private HTable radarbyid_copy_table; + private HTable radarEcho_table; + private HTable gps_trace_data_table; + private HTable uavbyid_table; + private final byte[] family; + + static { + HBaseClient.log = LogFactory.getLog(HBaseClient.class); + HBaseClient.client = new HBaseClient(); + } + + public HBaseClient() { + this.sourceType = Bytes.toBytes("sourceType"); + this.theData = Bytes.toBytes("theData"); + this.theCode = Bytes.toBytes("theCode"); + this.family = Bytes.toBytes("info"); + } + + public static HBaseClient getInstance() { + return HBaseClient.client; + } + + public void initHBase() { + this.ais_table = CommonConfig.getTable("t_ais_data", 1); + this.aisbyid_table = CommonConfig.getIndexTable("t_aisbyid_data"); + this.radar_table = CommonConfig.getTable("t_radar_data", 1); + this.radarbyid_table = CommonConfig.getIndexTable("t_radarbyid_data"); + this.radarwarn_table = CommonConfig.getIndexTable("t_radarwarn_data"); + this.radarbyid_copy_table = CommonConfig.getTable("t_radarbyid_copy_data", 1); + this.radarEcho_table = CommonConfig.getIndexTable("t_radarEcho_data"); + this.gps_trace_data_table = CommonConfig.getIndexTable("gps_trace_data"); + this.uavbyid_table = CommonConfig.getIndexTable("t_uavbyid_data"); + } + + public void createTable(final String tableName) { + try { + final HTableDescriptor tableDescriptor = new HTableDescriptor(tableName); + tableDescriptor.addFamily(new HColumnDescriptor("info")); + CommonConfig.getHBaseAdmin().createTable(tableDescriptor); + } + catch (Exception e) { + HBaseClient.log.error("\u521b\u5efaHBase\u6570\u636e\u8868\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public void deleteTable(final String tableName) { + try { + CommonConfig.getHBaseAdmin().disableTable(tableName); + CommonConfig.getHBaseAdmin().deleteTable(tableName); + } + catch (Exception e) { + HBaseClient.log.error("\u5220\u9664HBase\u6570\u636e\u8868\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List scanRadarData(final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.radar_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setStartRow(Bytes.toBytes(starttime)); + scan.setStopRow(Bytes.toBytes(endtime)); + ResultData data = null; + final ResultScanner scanner = this.radar_table.getScanner(scan); + for (final Result result : scanner) { + data = new ResultData(); + data.setTime(Long.parseLong(Bytes.toString(result.getRow()))); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public void saveRadarData(final String time, final byte[] data) { + if (this.radar_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.radar_table.put(put); + HBaseClient.log.debug("----->Radar Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public void saveRadarDataById(final String id, final String time, final byte[] data) { + if (this.radarbyid_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(String.valueOf(id) + "_" + time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.radarbyid_table.put(put); + HBaseClient.log.debug("--->RadarById Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public void saveRadarWarnData(final String time, final byte[] data) { + if (this.radarwarn_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.radarwarn_table.put(put); + HBaseClient.log.debug("----->RadarWarn Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58radar\u9884\u8b66\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List scanRadarWarnData(final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.radarwarn_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setStartRow(Bytes.toBytes(starttime)); + scan.setStopRow(Bytes.toBytes(endtime)); + ResultData data = null; + final ResultScanner scanner = this.radarwarn_table.getScanner(scan); + for (final Result result : scanner) { + data = new ResultData(); + data.setTime(Long.parseLong(Bytes.toString(result.getRow()))); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2radar\u9884\u8b66\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public void saveRadarDataByIdCopy(final String id, final String code, final String time, final byte[] data) { + if (this.radarbyid_copy_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(String.valueOf(id) + "_" + time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + put.add(this.family, this.theCode, code.getBytes()); + this.radarbyid_copy_table.put(put); + HBaseClient.log.debug("--->RadarByIdCopy Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List scanRadarDataById(final String id, final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.radarbyid_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setStartRow(Bytes.toBytes(String.valueOf(id) + "_" + starttime)); + scan.setStopRow(Bytes.toBytes(String.valueOf(id) + "_" + endtime)); + ResultData data = null; + final ResultScanner scanner = this.radarbyid_table.getScanner(scan); + for (final Result result : scanner) { + final String[] stringArray = Bytes.toString(result.getRow()).split("_"); + data = new ResultData(); + data.setTime(Long.parseLong(stringArray[stringArray.length - 1])); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public void deleteRadarById(final String id) { + if (this.radarbyid_table == null) { + return; + } + try { + final long theTime = System.currentTimeMillis(); + final long startTime = theTime - 1471228928L; + Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setFilter(new KeyOnlyFilter()); + scan.setStartRow(Bytes.toBytes(String.valueOf(id) + "_" + String.valueOf(startTime))); + scan.setStopRow(Bytes.toBytes(String.valueOf(id) + "_" + String.valueOf(theTime))); + List dbList = new ArrayList(); + Delete delete = null; + ResultScanner scanner = this.radarbyid_table.getScanner(scan); + for (final Result result : scanner) { + delete = new Delete(result.getRow()); + dbList.add(delete); + } + this.radarbyid_table.delete(dbList); + dbList = null; + scanner = null; + scan = null; + } + catch (Exception e) { + HBaseClient.log.error("\u6e05\u7406radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public void saveRadarEchoData(final String time, final byte[] data) { + if (this.radarEcho_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.radarEcho_table.put(put); + HBaseClient.log.debug("------>Echo Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58radar\u56de\u6ce2\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List scanRadarEchoData(final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.radarEcho_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setFilter(new KeyOnlyFilter()); + scan.setStartRow(Bytes.toBytes(starttime)); + scan.setStopRow(Bytes.toBytes(endtime)); + ResultData data = null; + final ResultScanner scanner = this.radarEcho_table.getScanner(scan); + for (final Result result : scanner) { + data = new ResultData(); + data.setTime(Long.parseLong(Bytes.toString(result.getRow()))); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2radar\u56de\u6ce2\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public void saveAISDataById(final String id, final String time, final byte[] data) { + try { + if (this.aisbyid_table == null) { + return; + } + final byte[] rowbt = Bytes.toBytes(String.valueOf(id) + "_" + time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.aisbyid_table.put(put); + HBaseClient.log.debug("--->AISById Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58AIS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List scanAISDataById(final String id, final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.aisbyid_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setStartRow(Bytes.toBytes(String.valueOf(id) + "_" + starttime)); + scan.setStopRow(Bytes.toBytes(String.valueOf(id) + "_" + endtime)); + ResultData data = null; + final ResultScanner scanner = this.aisbyid_table.getScanner(scan); + for (final Result result : scanner) { + final String[] stringArray = Bytes.toString(result.getRow()).split("_"); + data = new ResultData(); + data.setTime(Long.parseLong(stringArray[stringArray.length - 1])); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2AIS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public List scanAISData(final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.ais_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setStartRow(Bytes.toBytes(starttime)); + scan.setStopRow(Bytes.toBytes(endtime)); + ResultData data = null; + final ResultScanner scanner = this.ais_table.getScanner(scan); + for (final Result result : scanner) { + data = new ResultData(); + data.setTime(Long.parseLong(Bytes.toString(result.getRow()))); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2AIS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public void saveAISData(final String time, final byte[] data) { + if (this.ais_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.ais_table.put(put); + HBaseClient.log.debug("------->AIS Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58AIS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public void saveUAVDataById(final String id, final String time, final byte[] data) { + if (this.uavbyid_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(String.valueOf(id) + "_" + time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.uavbyid_table.put(put); + HBaseClient.log.debug("--->UAVById Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58\u65e0\u4eba\u673a\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public void saveUAVData(final String time, final byte[] data) { + if (this.uavbyid_table == null) { + return; + } + try { + final byte[] rowbt = Bytes.toBytes(time); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.uavbyid_table.put(put); + HBaseClient.log.debug("--->UAVById Save ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58\u65e0\u4eba\u673a\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List scanUAVData(final String id, final String starttime, final String endtime) { + final List dbList = new ArrayList(); + if (this.uavbyid_table == null) { + return dbList; + } + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + if (StringUtil.notBlank(id)) { + scan.setStartRow(Bytes.toBytes(String.valueOf(id) + "_" + starttime)); + scan.setStopRow(Bytes.toBytes(String.valueOf(id) + "_" + endtime)); + } + else { + scan.setStartRow(Bytes.toBytes(starttime)); + scan.setStopRow(Bytes.toBytes(endtime)); + } + ResultData data = null; + final ResultScanner scanner = this.uavbyid_table.getScanner(scan); + for (final Result result : scanner) { + final String[] stringArray = Bytes.toString(result.getRow()).split("_"); + data = new ResultData(); + data.setTime(Long.parseLong(stringArray[stringArray.length - 1])); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2\u65e0\u4eba\u673a\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public List scanSeaState(final long starttime, final long endtime) { + final List dbList = new ArrayList(); + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + scan.setFilter(new KeyOnlyFilter()); + scan.setStartRow(Bytes.toBytes(String.valueOf(starttime))); + scan.setStopRow(Bytes.toBytes(String.valueOf(endtime))); + ResultData data = null; + final ResultScanner scanner = this.qaz_wsx.getScanner(scan); + for (final Result result : scanner) { + data = new ResultData(); + data.setTime(Long.parseLong(Bytes.toString(result.getRow()))); + data.setData(result.getValue(this.family, Bytes.toBytes("qaz_wsx_data"))); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2\u6d4b\u8bd5\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } + + public synchronized void saveTestData(final byte[] data) { + try { + final byte[] rowbt = Bytes.toBytes(System.currentTimeMillis()); + final Put put = new Put(rowbt); + put.setWriteToWAL(false); + put.add(this.family, Bytes.toBytes("qaz_wsx_data"), data); + this.qaz_wsx.put(put); + HBaseClient.log.debug("-------------->ok"); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58\u6d4b\u8bd5\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public synchronized void saveGpsTraceByTime(final String time, final byte[] data) { + try { + final byte[] rowid = Bytes.toBytes(time); + final Put put = new Put(rowid); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.gps_trace_data_table.put(put); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58GPS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public synchronized void saveGpsTraceByImeiAndTime(final String imei, final byte[] data) { + try { + final byte[] rowid = Bytes.toBytes(String.valueOf(imei) + "_" + String.valueOf(System.currentTimeMillis())); + final Put put = new Put(rowid); + put.setWriteToWAL(false); + put.add(this.family, this.theData, data); + this.gps_trace_data_table.put(put); + } + catch (Exception e) { + HBaseClient.log.error("\u4fdd\u5b58GPS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public List queryGpsTrace(final String imei, final String starttime, final String endtime) { + final List dbList = new ArrayList(); + try { + final Scan scan = new Scan(); + scan.setBatch(500); + scan.setCacheBlocks(true); + if (StringUtil.notBlank(imei)) { + scan.setStartRow(Bytes.toBytes(String.valueOf(imei) + "_" + starttime)); + scan.setStopRow(Bytes.toBytes(String.valueOf(imei) + "_" + endtime)); + } + else { + scan.setStartRow(Bytes.toBytes(starttime)); + scan.setStopRow(Bytes.toBytes(endtime)); + } + ResultData data = null; + final ResultScanner scanner = this.gps_trace_data_table.getScanner(scan); + for (final Result result : scanner) { + final String[] stringArray = Bytes.toString(result.getRow()).split("_"); + data = new ResultData(); + data.setTime(Long.parseLong(stringArray[stringArray.length - 1])); + data.setData(result.getValue(this.family, this.theData)); + dbList.add(data); + } + } + catch (Exception e) { + HBaseClient.log.error("\u67e5\u8be2GPS\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return dbList; + } +} diff --git a/src/main/java/com/zhichenhaixin/http/sys/model/RongkeInfo.java b/src/main/java/com/zhichenhaixin/http/sys/model/RongkeInfo.java new file mode 100644 index 0000000..7704517 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/http/sys/model/RongkeInfo.java @@ -0,0 +1,96 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.http.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class RongkeInfo +implements Serializable { + private static final long serialVersionUID = -4644991203691658628L; + private String id; + private String name; + private String imei; + + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RongkeInfo)) { + return false; + } + RongkeInfo other = (RongkeInfo)o; + if (!other.canEqual(this)) { + return false; + } + String this$id = this.getId(); + String other$id = other.getId(); + if (this$id == null ? other$id != null : !this$id.equals(other$id)) { + return false; + } + String this$name = this.getName(); + String other$name = other.getName(); + if (this$name == null ? other$name != null : !this$name.equals(other$name)) { + return false; + } + String this$imei = this.getImei(); + String other$imei = other.getImei(); + return !(this$imei == null ? other$imei != null : !this$imei.equals(other$imei)); + } + + protected boolean canEqual(Object other) { + return other instanceof RongkeInfo; + } + + public int hashCode() { + int PRIME = 59; + int result = 1; + String $id = this.getId(); + result = result * 59 + ($id == null ? 43 : $id.hashCode()); + String $name = this.getName(); + result = result * 59 + ($name == null ? 43 : $name.hashCode()); + String $imei = this.getImei(); + result = result * 59 + ($imei == null ? 43 : $imei.hashCode()); + return result; + } + + public String toString() { + return "RongkeInfo(id=" + this.getId() + ", name=" + this.getName() + ", imei=" + this.getImei() + ")"; + } + + public void setId(String id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setImei(String imei) { + this.imei = imei; + } + + public String getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public String getImei() { + return this.imei; + } + + @ConstructorProperties(value={"id", "name", "imei"}) + public RongkeInfo(String id, String name, String imei) { + this.id = id; + this.name = name; + this.imei = imei; + } + + public RongkeInfo() { + } +} + diff --git a/src/main/java/com/zhichenhaixin/http/sys/model/RongkeVo.java b/src/main/java/com/zhichenhaixin/http/sys/model/RongkeVo.java new file mode 100644 index 0000000..a9215ff --- /dev/null +++ b/src/main/java/com/zhichenhaixin/http/sys/model/RongkeVo.java @@ -0,0 +1,147 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.http.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class RongkeVo +implements Serializable { + private static final long serialVersionUID = -4644991203691658628L; + private String operateId; + private String uiSaveDataFlag; + private String msgCode; + private String msgContent; + private String msgType; + private String data; + + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RongkeVo)) { + return false; + } + RongkeVo other = (RongkeVo)o; + if (!other.canEqual(this)) { + return false; + } + String this$operateId = this.getOperateId(); + String other$operateId = other.getOperateId(); + if (this$operateId == null ? other$operateId != null : !this$operateId.equals(other$operateId)) { + return false; + } + String this$uiSaveDataFlag = this.getUiSaveDataFlag(); + String other$uiSaveDataFlag = other.getUiSaveDataFlag(); + if (this$uiSaveDataFlag == null ? other$uiSaveDataFlag != null : !this$uiSaveDataFlag.equals(other$uiSaveDataFlag)) { + return false; + } + String this$msgCode = this.getMsgCode(); + String other$msgCode = other.getMsgCode(); + if (this$msgCode == null ? other$msgCode != null : !this$msgCode.equals(other$msgCode)) { + return false; + } + String this$msgContent = this.getMsgContent(); + String other$msgContent = other.getMsgContent(); + if (this$msgContent == null ? other$msgContent != null : !this$msgContent.equals(other$msgContent)) { + return false; + } + String this$msgType = this.getMsgType(); + String other$msgType = other.getMsgType(); + if (this$msgType == null ? other$msgType != null : !this$msgType.equals(other$msgType)) { + return false; + } + String this$data = this.getData(); + String other$data = other.getData(); + return !(this$data == null ? other$data != null : !this$data.equals(other$data)); + } + + protected boolean canEqual(Object other) { + return other instanceof RongkeVo; + } + + public int hashCode() { + int PRIME = 59; + int result = 1; + String $operateId = this.getOperateId(); + result = result * 59 + ($operateId == null ? 43 : $operateId.hashCode()); + String $uiSaveDataFlag = this.getUiSaveDataFlag(); + result = result * 59 + ($uiSaveDataFlag == null ? 43 : $uiSaveDataFlag.hashCode()); + String $msgCode = this.getMsgCode(); + result = result * 59 + ($msgCode == null ? 43 : $msgCode.hashCode()); + String $msgContent = this.getMsgContent(); + result = result * 59 + ($msgContent == null ? 43 : $msgContent.hashCode()); + String $msgType = this.getMsgType(); + result = result * 59 + ($msgType == null ? 43 : $msgType.hashCode()); + String $data = this.getData(); + result = result * 59 + ($data == null ? 43 : $data.hashCode()); + return result; + } + + public String toString() { + return "RongkeVo(operateId=" + this.getOperateId() + ", uiSaveDataFlag=" + this.getUiSaveDataFlag() + ", msgCode=" + this.getMsgCode() + ", msgContent=" + this.getMsgContent() + ", msgType=" + this.getMsgType() + ", data=" + this.getData() + ")"; + } + + public void setOperateId(String operateId) { + this.operateId = operateId; + } + + public void setUiSaveDataFlag(String uiSaveDataFlag) { + this.uiSaveDataFlag = uiSaveDataFlag; + } + + public void setMsgCode(String msgCode) { + this.msgCode = msgCode; + } + + public void setMsgContent(String msgContent) { + this.msgContent = msgContent; + } + + public void setMsgType(String msgType) { + this.msgType = msgType; + } + + public void setData(String data) { + this.data = data; + } + + public String getOperateId() { + return this.operateId; + } + + public String getUiSaveDataFlag() { + return this.uiSaveDataFlag; + } + + public String getMsgCode() { + return this.msgCode; + } + + public String getMsgContent() { + return this.msgContent; + } + + public String getMsgType() { + return this.msgType; + } + + public String getData() { + return this.data; + } + + @ConstructorProperties(value={"operateId", "uiSaveDataFlag", "msgCode", "msgContent", "msgType", "data"}) + public RongkeVo(String operateId, String uiSaveDataFlag, String msgCode, String msgContent, String msgType, String data) { + this.operateId = operateId; + this.uiSaveDataFlag = uiSaveDataFlag; + this.msgCode = msgCode; + this.msgContent = msgContent; + this.msgType = msgType; + this.data = data; + } + + public RongkeVo() { + } +} + diff --git a/src/main/java/com/zhichenhaixin/interceptor/CacheInterceptor.java b/src/main/java/com/zhichenhaixin/interceptor/CacheInterceptor.java new file mode 100644 index 0000000..0508f6b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/interceptor/CacheInterceptor.java @@ -0,0 +1,67 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.interceptor; + +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.util.Assert; + +import java.io.Serializable; + +public class CacheInterceptor +implements MethodInterceptor, +InitializingBean { + private static final Log logger = LogFactory.getLog(CacheInterceptor.class); + private Cache cache; + + public void setCache(Cache cache) { + this.cache = cache; + } + + public Cache getCache() { + return this.cache; + } + + @Override + public Object invoke(MethodInvocation invocation) throws Throwable { + Object[] arguments; + String methodName; + String targetName = invocation.getThis().getClass().getName(); + String cacheKey = this.getCacheKey(targetName, methodName = invocation.getMethod().getName(), arguments = invocation.getArguments()); + Element element = this.cache.get((Serializable)((Object)cacheKey)); + if (element == null) { + logger.debug("\u7b2c\u4e00\u6b21\u8c03\u7528\u65b9\u6cd5\u5e76\u7f13\u5b58\u5176\u503c"); + Object result = invocation.proceed(); + element = new Element((Serializable)((Object)cacheKey), (Serializable)result); + this.cache.put(element); + } else { + logger.debug("\u4ece\u7f13\u5b58\u4e2d\u67e5\u8be2: " + this.cache.getName()); + } + return element.getValue(); + } + + protected String getCacheKey(String targetName, String methodName, Object[] arguments) { + StringBuffer sb = new StringBuffer(); + sb.append(targetName).append(".").append(methodName); + if (arguments != null && arguments.length != 0) { + int i = 0; + while (i < arguments.length) { + sb.append(".").append(arguments[i]); + ++i; + } + } + return sb.toString(); + } + + @Override + public void afterPropertiesSet() throws Exception { + Assert.notNull(this.cache, "Need a cache. Please use setCache(Cache) create it."); + } +} + diff --git a/src/main/java/com/zhichenhaixin/interceptor/MethodCacheAfterAdvice.java b/src/main/java/com/zhichenhaixin/interceptor/MethodCacheAfterAdvice.java new file mode 100644 index 0000000..e6695d8 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/interceptor/MethodCacheAfterAdvice.java @@ -0,0 +1,52 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.interceptor; + +import net.sf.ehcache.Cache; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.aop.AfterReturningAdvice; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.util.Assert; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.List; + +public class MethodCacheAfterAdvice +implements AfterReturningAdvice, +InitializingBean, +Serializable { + private static final Log logger = LogFactory.getLog(MethodCacheAfterAdvice.class); + private Cache cache; + + public void setCache(Cache cache) { + this.cache = cache; + } + + public Cache getCache() { + return this.cache; + } + + @Override + public void afterReturning(Object arg0, Method arg1, Object[] arg2, Object arg3) throws Throwable { + String className = arg3.getClass().getName(); + List list = this.cache.getKeys(); + int i = 0; + while (i < list.size()) { + String cacheKey = String.valueOf(list.get(i)); + if (cacheKey.startsWith(className)) { + this.cache.remove((Serializable)((Object)cacheKey)); + logger.debug("remove cache " + cacheKey); + } + ++i; + } + } + + @Override + public void afterPropertiesSet() throws Exception { + Assert.notNull(this.cache, "Need a cache. Please use setCache(Cache) create it."); + } +} + diff --git a/src/main/java/com/zhichenhaixin/interceptor/PaginationInterceptor.java b/src/main/java/com/zhichenhaixin/interceptor/PaginationInterceptor.java new file mode 100644 index 0000000..cbba621 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/interceptor/PaginationInterceptor.java @@ -0,0 +1,96 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.interceptor; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.ibatis.executor.statement.StatementHandler; +import org.apache.ibatis.plugin.*; +import org.apache.ibatis.reflection.MetaObject; +import org.apache.ibatis.reflection.factory.DefaultObjectFactory; +import org.apache.ibatis.reflection.factory.ObjectFactory; +import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; +import org.apache.ibatis.reflection.wrapper.ObjectWrapperFactory; +import org.apache.ibatis.scripting.defaults.DefaultParameterHandler; +import org.apache.ibatis.session.RowBounds; + +import java.sql.Connection; +import java.util.Map; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@Intercepts(value={@Signature(type=StatementHandler.class, method="prepare", args={Connection.class})}) +public class PaginationInterceptor +implements Interceptor { + private static Log log = LogFactory.getLog(PaginationInterceptor.class); + public static final String QUERY_PAGED_FLAG = "_QUERY_PAGED_FLAG_"; + public static final String QUERY_COUNT_FLAG = "_QUERY_COUNT_FLAG_"; + private String pagedSqlid; + private static final ObjectFactory DEFAULT_OBJECT_FACTORY = new DefaultObjectFactory(); + private static final ObjectWrapperFactory DEFAULT_OBJECT_WRAPPER_FACTORY = new DefaultObjectWrapperFactory(); + + @Override + public Object intercept(Invocation invocation) throws Throwable { + StatementHandler statementHandler = (StatementHandler)invocation.getTarget(); + MetaObject metaStatementHandler = MetaObject.forObject(statementHandler, DEFAULT_OBJECT_FACTORY, DEFAULT_OBJECT_WRAPPER_FACTORY); + String sqlid = (String)metaStatementHandler.getValue("delegate.mappedStatement.id"); + if (!this.validSqlid(sqlid)) { + return invocation.proceed(); + } + DefaultParameterHandler defaultParameterHandler = (DefaultParameterHandler)metaStatementHandler.getValue("delegate.parameterHandler"); + Object paramObject = defaultParameterHandler.getParameterObject(); + if (!(paramObject instanceof Map)) { + return invocation.proceed(); + } + Map parameterMap = (Map)defaultParameterHandler.getParameterObject(); + String originalSql = (String)metaStatementHandler.getValue("delegate.boundSql.sql"); + if (parameterMap.containsKey(QUERY_COUNT_FLAG) && parameterMap.get(QUERY_COUNT_FLAG) != null) { + log.debug("\u5206\u9875\u67e5\u8be2\uff0c\u7edf\u8ba1\u603b\u6570"); + metaStatementHandler.setValue("delegate.boundSql.sql", this.getCountSql(originalSql)); + } else if (parameterMap.containsKey(QUERY_PAGED_FLAG) && parameterMap.get(QUERY_PAGED_FLAG) != null) { + RowBounds rowBounds = (RowBounds)metaStatementHandler.getValue("delegate.rowBounds"); + log.debug("\u5206\u9875\u67e5\u8be2\uff0c[" + rowBounds.getOffset() + "," + rowBounds.getLimit() + "]"); + metaStatementHandler.setValue("delegate.boundSql.sql", this.getPagedSql(originalSql, rowBounds.getOffset(), rowBounds.getLimit())); + metaStatementHandler.setValue("delegate.rowBounds.offset", 0); + metaStatementHandler.setValue("delegate.rowBounds.limit", Integer.MAX_VALUE); + } + return invocation.proceed(); + } + + @Override + public Object plugin(Object target) { + if (target instanceof StatementHandler) { + return Plugin.wrap(target, this); + } + return target; + } + + @Override + public void setProperties(Properties properties) { + this.pagedSqlid = properties.getProperty("pagedSqlid", "\\.(qry|query|select|get)"); + log.debug(properties); + } + + private String getPagedSql(String originalSql, int offset, int limit) { + StringBuffer sql = new StringBuffer(originalSql.length() + 100); + sql.append("SELECT ROW2_.* FROM (SELECT ROW_.*, row_number() over() ROWNUM_ FROM ("); + sql.append(originalSql); + sql.append(") ROW_)ROW2_ WHERE ROW2_.ROWNUM_ >" + offset); + sql.append(" and ROW2_.ROWNUM_ <=" + (offset + limit)); + return sql.toString(); + } + + private String getCountSql(String originalSql) { + String countSql = "SELECT COUNT(0) AS CNT_TOTAL FROM (" + originalSql + ") CT__"; + return countSql; + } + + private boolean validSqlid(String sqlid) { + Pattern pattern = Pattern.compile(this.pagedSqlid); + Matcher matcher = pattern.matcher(sqlid); + return matcher.find(); + } +} + diff --git a/src/main/java/com/zhichenhaixin/interceptor/QuartzTask.java b/src/main/java/com/zhichenhaixin/interceptor/QuartzTask.java new file mode 100644 index 0000000..d35ffca --- /dev/null +++ b/src/main/java/com/zhichenhaixin/interceptor/QuartzTask.java @@ -0,0 +1,17 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.interceptor; + +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; + +public class QuartzTask +extends BaseDaoImpl { + public void intervalometer() { + this.log.info("quartz start!"); + long now = System.currentTimeMillis(); + long alter = System.currentTimeMillis(); + this.log.info("quartz stop! ------------------->total time use: " + (alter - now)); + } +} + diff --git a/src/main/java/com/zhichenhaixin/interceptor/RequiredInterceptor.java b/src/main/java/com/zhichenhaixin/interceptor/RequiredInterceptor.java new file mode 100644 index 0000000..bb23a85 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/interceptor/RequiredInterceptor.java @@ -0,0 +1,14 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.interceptor; + +import java.lang.annotation.*; + +@Target(value={ElementType.METHOD}) +@Retention(value=RetentionPolicy.RUNTIME) +@Documented +public @interface RequiredInterceptor { + public boolean required() default true; +} + diff --git a/src/main/java/com/zhichenhaixin/list/dao/DbAlarmInfoDao.java b/src/main/java/com/zhichenhaixin/list/dao/DbAlarmInfoDao.java new file mode 100644 index 0000000..c1e8dc5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/dao/DbAlarmInfoDao.java @@ -0,0 +1,34 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.dao; + +import com.zhichenhaixin.base.dao.BaseDao; +import com.zhichenhaixin.list.model.AlarmInfoSearch; +import com.zhichenhaixin.list.model.StatisticsInfo; +import com.zhichenhaixin.sys.model.WarnComposeVideoVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; + +import java.util.List; + +public interface DbAlarmInfoDao extends BaseDao +{ + StatisticsInfo getStatistics(final AlarmInfoSearch p0); + + List selectWarnAll(final AlarmInfoSearch p0); + + int selectWarnAlarmCount(final AlarmInfoSearch p0); + + StatisticsInfo getStatisticsRadar(final AlarmInfoSearch p0); + + List selectWarnAllRadar(final AlarmInfoSearch p0); + + int selectWarnAlarmCountRadar(final AlarmInfoSearch p0); + + void andComposeVideo(final WarnComposeVideoVo p0); + + List queryComposeVideo(final String p0); + + String queryCamTime(final String p0); +} diff --git a/src/main/java/com/zhichenhaixin/list/dao/DbDeviceDao.java b/src/main/java/com/zhichenhaixin/list/dao/DbDeviceDao.java new file mode 100644 index 0000000..a7da40b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/dao/DbDeviceDao.java @@ -0,0 +1,23 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.dao; + +import com.zhichenhaixin.list.model.ClsDev; +import com.zhichenhaixin.list.model.SmsDev; +import com.zhichenhaixin.list.model.VasDev; +import com.zhichenhaixin.list.model.WmsDev; + +import java.util.List; + +public interface DbDeviceDao +{ + List selectAllClsDev(); + + List selectAllSmsDev(); + + List selectAllVasDev(); + + List selectAllWmsDev(); +} diff --git a/src/main/java/com/zhichenhaixin/list/dao/DbSiteInfoDao.java b/src/main/java/com/zhichenhaixin/list/dao/DbSiteInfoDao.java new file mode 100644 index 0000000..23a3309 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/dao/DbSiteInfoDao.java @@ -0,0 +1,19 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.dao; + +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.list.model.SiteInfo; + +import java.util.List; + +public interface DbSiteInfoDao +{ + ResMsg insertSiteInfo(final SiteInfo p0); + + List selectAllSiteInfo(); + + ResMsg delSiteInfo(final SiteInfo p0); +} diff --git a/src/main/java/com/zhichenhaixin/list/dao/impl/DbAlarmInfoDaoImpl.java b/src/main/java/com/zhichenhaixin/list/dao/impl/DbAlarmInfoDaoImpl.java new file mode 100644 index 0000000..2f7b721 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/dao/impl/DbAlarmInfoDaoImpl.java @@ -0,0 +1,258 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.dao.impl; + +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.base.util.HttpUtils; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.cache.util.WarnAlarmCountEhcache; +import com.zhichenhaixin.list.dao.DbAlarmInfoDao; +import com.zhichenhaixin.list.model.AlarmInfoSearch; +import com.zhichenhaixin.list.model.StatisticsInfo; +import com.zhichenhaixin.list.model.StatisticsVo; +import com.zhichenhaixin.sys.model.WarnComposeVideoVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.springframework.stereotype.Repository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Repository("dbAlarmInfoDaoImpl") +public class DbAlarmInfoDaoImpl extends BaseDaoImpl implements DbAlarmInfoDao +{ + @Override + public List selectWarnAll(final AlarmInfoSearch record) { + final Map param = new HashMap(); + param.put("nBeginTime", record.getNBeginTime()); + param.put("nEndTime", record.getNEndTime()); + param.put("t", String.valueOf(record.getT())); + param.put("strSiteName", record.getStrSiteName()); + param.put("cameraName", record.getCameraName()); + param.put("handler", record.getHandler()); + param.put("handleStatus", record.getHandleStatus()); + param.put("curPage", record.getCurPage()); + param.put("size", record.getSize()); + final List selectList = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectWarnAll", param); + for (final WarnInfoBean warnInfoBean : selectList) { + final List list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectWarnComposeVideoNoFalseAlarm", warnInfoBean.getId()); + warnInfoBean.setCompose_Video_list(list); + } + return selectList; + } + + @Override + public int selectWarnAlarmCount(final AlarmInfoSearch record) { + final Map param = new HashMap(); + param.put("nBeginTime", record.getNBeginTime()); + param.put("nEndTime", record.getNEndTime()); + param.put("t", String.valueOf(record.getT())); + param.put("strSiteName", record.getStrSiteName()); + param.put("cameraName", record.getCameraName()); + param.put("handler", record.getHandler()); + param.put("handleStatus", record.getHandleStatus()); + final int selectOne = this.pg_template.selectOne("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectWarnAllByNum", param); + return selectOne; + } + + @Override + public StatisticsInfo getStatistics(final AlarmInfoSearch record) { + final StatisticsInfo statisticsInfo = new StatisticsInfo(); + final Map map = new HashMap(); + map.put("type", record.getType()); + map.put("begin_time", record.getNBeginTime()); + map.put("end_time", record.getNEndTime()); + map.put("sitename", record.getStrSiteName()); + map.put("camera_name", record.getCameraName()); + map.put("handler", record.getHandler()); + map.put("handle_status", record.getHandleStatus()); + map.put("t", String.valueOf(record.getT())); + if (record.getType() == 3) { + final StatisticsVo statisticsVo = this.pg_template.selectOne("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectMaxMinTime", map); + final String[] max = statisticsVo.getMax().split("-"); + final String[] min = statisticsVo.getMin().split("-"); + if (max[2].equals(min[2])) { + map.put("moldtype", "hh24:00:00"); + } + else if (max[1].equals(min[1])) { + map.put("moldtype", "YYYY-MM-DD"); + } + else if (max[0].equals(min[0])) { + map.put("moldtype", "YYYY-MM"); + } + else { + map.put("moldtype", "YYYY"); + } + } + final List selectList = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectByGroupByNum", map); + final Map map2 = new HashMap(); + for (final StatisticsVo statisticsVo2 : selectList) { + if (StringUtil.notBlank(statisticsVo2.getKey())) { + map2.put(statisticsVo2.getKey(), statisticsVo2.getNumber()); + } + } + statisticsInfo.setKey_number(map2); + return statisticsInfo; + } + + @Override + public List selectWarnAllRadar(final AlarmInfoSearch record) { + final Map param = new HashMap(); + param.put("nBeginTime", record.getNBeginTime()); + param.put("nEndTime", record.getNEndTime()); + param.put("t", String.valueOf(record.getT())); + param.put("strSiteName", record.getStrSiteName()); + param.put("cameraName", record.getCameraName()); + param.put("handler", record.getHandler()); + param.put("handleStatus", record.getHandleStatus()); + param.put("curPage", record.getCurPage()); + param.put("size", record.getSize()); + final List selectList = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectRadarWarnAll", param); + for (final WarnInfoBean warnInfoBean : selectList) { + final List list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectWarnComposeVideoNoFalseAlarm", warnInfoBean.getId()); + warnInfoBean.setCompose_Video_list(list); + } + return selectList; + } + + @Override + public int selectWarnAlarmCountRadar(final AlarmInfoSearch record) { + final Map param = new HashMap(); + param.put("nBeginTime", record.getNBeginTime()); + param.put("nEndTime", record.getNEndTime()); + param.put("t", String.valueOf(record.getT())); + param.put("strSiteName", record.getStrSiteName()); + param.put("cameraName", record.getCameraName()); + param.put("handler", record.getHandler()); + param.put("handleStatus", record.getHandleStatus()); + final int selectOne = this.pg_template.selectOne("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectRadarWarnAllByNum", param); + return selectOne; + } + + @Override + public StatisticsInfo getStatisticsRadar(final AlarmInfoSearch record) { + final StatisticsInfo statisticsInfo = new StatisticsInfo(); + final Map map = new HashMap(); + map.put("type", record.getType()); + map.put("begin_time", record.getNBeginTime()); + map.put("end_time", record.getNEndTime()); + map.put("sitename", record.getStrSiteName()); + map.put("camera_name", record.getCameraName()); + map.put("handler", record.getHandler()); + map.put("handle_status", record.getHandleStatus()); + map.put("t", String.valueOf(record.getT())); + if (record.getType() == 3) { + final StatisticsVo statisticsVo = this.pg_template.selectOne("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectRadarMaxMinTime", map); + final String[] max = statisticsVo.getMax().split("-"); + final String[] min = statisticsVo.getMin().split("-"); + if (max[2].equals(min[2])) { + map.put("moldtype", "hh24:00:00"); + } + else if (max[1].equals(min[1])) { + map.put("moldtype", "YYYY-MM-DD"); + } + else if (max[0].equals(min[0])) { + map.put("moldtype", "YYYY-MM"); + } + else { + map.put("moldtype", "YYYY"); + } + } + final List selectList = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectRadarByGroupByNum", map); + final Map map2 = new HashMap(); + for (final StatisticsVo statisticsVo2 : selectList) { + if (StringUtil.notBlank(statisticsVo2.getKey())) { + map2.put(statisticsVo2.getKey(), statisticsVo2.getNumber()); + } + } + statisticsInfo.setKey_number(map2); + return statisticsInfo; + } + + public void saveWarnRecord(final WarnInfoBean bean) { + final WarnInfoBean warnId = this.queryWarnId(bean.getId()); + if (warnId != null) { + return; + } + final String time = String.valueOf(bean.getBegintime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 13) ? (date / 1000L) : date; + bean.setBegintime(begintime); + this.pg_template.insert("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.insertWarnInfoBean", bean); + bean.setSign("1"); + bean.setAlarm_status("3"); + bean.setUntreated_alarm_count(WarnAlarmCountEhcache.get() + 1); + Constant.sendClient(bean); + bean.setRtsp(null); + HttpUtils.sendWarnToRongKe(bean); + } + + public void saveWarn(final WarnInfoBean bean) { + final WarnInfoBean warnId = this.queryWarnId(bean.getId()); + if (warnId != null) { + return; + } + final String time = String.valueOf(bean.getBegintime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 13) ? (date / 1000L) : date; + bean.setBegintime(begintime); + this.pg_template.insert("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.insertWarnInfoBean", bean); + } + + public void updateWarnStatus(final WarnInfoBean vo) { + this.pg_template.update("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.updateWarnStatus", vo); + } + + public WarnInfoBean queryWarnId(final String id) { + final List selectList = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.queryWarnId", id); + return (selectList != null && selectList.size() > 0) ? selectList.get(0) : null; + } + + public void updateWarnParam(final WarnInfoBean bean) { + this.pg_template.update("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.updateWarnParam", bean); + } + + @Override + public void andComposeVideo(final WarnComposeVideoVo vo) { + final WarnInfoBean warnId = this.queryWarnId(vo.getAlarm_id()); + if (warnId == null) { + return; + } + final List list = this.queryComposeVideo(vo.getAlarm_id()); + for (final WarnComposeVideoVo warnComposeVideoVo : list) { + if (warnComposeVideoVo.getRtsp() != null && warnComposeVideoVo.getRtsp().equals(vo.getRtsp())) { + return; + } + if (warnComposeVideoVo.getFalse_alarm_rtsp() != null && warnComposeVideoVo.getFalse_alarm_rtsp().equals(vo.getFalse_alarm_rtsp())) { + return; + } + } + this.pg_template.insert("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.insertComposeVideo", vo); + if (StringUtil.notBlank(vo.getFalse_alarm_rtsp())) { + return; + } + WarnAlarmCountEhcache.put(WarnAlarmCountEhcache.get() + 1); + } + + @Override + public List queryComposeVideo(final String alarm_id) { + final List list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.selectWarnComposeVideo", alarm_id); + return list; + } + + public void initWarnAlarmCount() { + final AlarmInfoSearch record = new AlarmInfoSearch(); + record.setHandleStatus(2); + final int count = this.selectWarnAlarmCount(record); + WarnAlarmCountEhcache.put(count); + } + + @Override + public String queryCamTime(final String camera_id) { + final String time = this.pg_template.selectOne("com.com.zhichenhaixin.list.dao.DbAlarmInfoDao.queryCamTime", camera_id); + return time; + } +} diff --git a/src/main/java/com/zhichenhaixin/list/dao/impl/DbDeviceDaoImpl.java b/src/main/java/com/zhichenhaixin/list/dao/impl/DbDeviceDaoImpl.java new file mode 100644 index 0000000..09607b3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/dao/impl/DbDeviceDaoImpl.java @@ -0,0 +1,39 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.dao.impl; + +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.list.dao.DbDeviceDao; +import com.zhichenhaixin.list.model.ClsDev; +import com.zhichenhaixin.list.model.SmsDev; +import com.zhichenhaixin.list.model.VasDev; +import com.zhichenhaixin.list.model.WmsDev; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository("dbDeviceDaoImpl") +public class DbDeviceDaoImpl extends BaseDaoImpl implements DbDeviceDao +{ + @Override + public List selectAllClsDev() { + return this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbClsDeviceDao.selectAll"); + } + + @Override + public List selectAllSmsDev() { + return this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbSmsDeviceDao.selectAll"); + } + + @Override + public List selectAllVasDev() { + return this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbVasDeviceDao.selectAll"); + } + + @Override + public List selectAllWmsDev() { + return this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbWmsDeviceDao.selectAll"); + } +} diff --git a/src/main/java/com/zhichenhaixin/list/dao/impl/DbSiteInfoDaoImpl.java b/src/main/java/com/zhichenhaixin/list/dao/impl/DbSiteInfoDaoImpl.java new file mode 100644 index 0000000..5947bd8 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/dao/impl/DbSiteInfoDaoImpl.java @@ -0,0 +1,65 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.dao.impl; + +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.list.dao.DbSiteInfoDao; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.list.model.SiteInfo; +import com.zhichenhaixin.sys.model.CameraInfo; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository("dbSiteInfoDaoImpl") +public class DbSiteInfoDaoImpl extends BaseDaoImpl implements DbSiteInfoDao +{ + @CacheEvict(value = { "daoCache" }, allEntries = true) + @Override + public ResMsg insertSiteInfo(final SiteInfo record) { + final ResMsg msg = new ResMsg(); + List list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbSiteInfoDao.selectByPrimaryKey", record.getSbid()); + if (list != null && list.size() > 0) { + msg.setCode(1); + msg.setMsg("\u7f16\u53f7\u5df2\u7ecf\u5b58\u5728\uff01"); + return msg; + } + list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbSiteInfoDao.selectByPrimaryName", record.getName()); + if (list != null && list.size() > 0) { + msg.setCode(1); + msg.setMsg("\u7ad9\u70b9\u540d\u79f0\u5df2\u7ecf\u5b58\u5728\uff01"); + return msg; + } + this.pg_template.insert("com.com.zhichenhaixin.list.dao.DbSiteInfoDao.insert", record); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u7ad9\u70b9\u6dfb\u52a0\u6210\u529f\uff01"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + @Override + public List selectAllSiteInfo() { + final List list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbSiteInfoDao.selectAll"); + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + @Override + public ResMsg delSiteInfo(final SiteInfo info) { + final ResMsg msg = new ResMsg(); + final List list = this.pg_template.selectList("com.com.zhichenhaixin.list.dao.DbSiteInfoDao.queryIsCamera", info); + if (list != null && list.size() > 0) { + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u6746\u6709\u76f8\u673a\u5b58\u5728\uff0c\u65e0\u6cd5\u5220\u9664\u76f8\u673a\u6746"); + return msg; + } + this.pg_template.delete("com.com.zhichenhaixin.list.dao.DbSiteInfoDao.deleteSiteInfo", info); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u6746\u5220\u9664\u6210\u529f"); + return msg; + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/AlarmInfoSearch.java b/src/main/java/com/zhichenhaixin/list/model/AlarmInfoSearch.java new file mode 100644 index 0000000..82936fb --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/AlarmInfoSearch.java @@ -0,0 +1,102 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import com.zhichenhaixin.base.model.ReqPage; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class AlarmInfoSearch extends ReqPage implements Serializable +{ + private static final long serialVersionUID = 1049469804934728000L; + private int nBeginTime; + private int nEndTime; + private int t; + private String strSiteName; + private String cameraName; + private String handler; + private int handleStatus; + private int type; + + public void setNBeginTime(final int nBeginTime) { + this.nBeginTime = nBeginTime; + } + + public void setNEndTime(final int nEndTime) { + this.nEndTime = nEndTime; + } + + public void setT(final int t) { + this.t = t; + } + + public void setStrSiteName(final String strSiteName) { + this.strSiteName = strSiteName; + } + + public void setCameraName(final String cameraName) { + this.cameraName = cameraName; + } + + public void setHandler(final String handler) { + this.handler = handler; + } + + public void setHandleStatus(final int handleStatus) { + this.handleStatus = handleStatus; + } + + public void setType(final int type) { + this.type = type; + } + + public int getNBeginTime() { + return this.nBeginTime; + } + + public int getNEndTime() { + return this.nEndTime; + } + + public int getT() { + return this.t; + } + + public String getStrSiteName() { + return this.strSiteName; + } + + public String getCameraName() { + return this.cameraName; + } + + public String getHandler() { + return this.handler; + } + + public int getHandleStatus() { + return this.handleStatus; + } + + public int getType() { + return this.type; + } + + @ConstructorProperties({ "nBeginTime", "nEndTime", "t", "strSiteName", "cameraName", "handler", "handleStatus", "type" }) + public AlarmInfoSearch(final int nBeginTime, final int nEndTime, final int t, final String strSiteName, final String cameraName, final String handler, final int handleStatus, final int type) { + this.nBeginTime = nBeginTime; + this.nEndTime = nEndTime; + this.t = t; + this.strSiteName = strSiteName; + this.cameraName = cameraName; + this.handler = handler; + this.handleStatus = handleStatus; + this.type = type; + } + + public AlarmInfoSearch() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/AlarmListDto.java b/src/main/java/com/zhichenhaixin/list/model/AlarmListDto.java new file mode 100644 index 0000000..c268c10 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/AlarmListDto.java @@ -0,0 +1,15 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import com.zhichenhaixin.base.model.ResPage; +import com.zhichenhaixin.sys.model.WarnInfoBean; + +import java.io.Serializable; + +public class AlarmListDto extends ResPage implements Serializable +{ + private static final long serialVersionUID = 3034377749571056719L; +} diff --git a/src/main/java/com/zhichenhaixin/list/model/ClsDev.java b/src/main/java/com/zhichenhaixin/list/model/ClsDev.java new file mode 100644 index 0000000..d51c36e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/ClsDev.java @@ -0,0 +1,201 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class ClsDev implements Serializable +{ + private static final long serialVersionUID = 5468774681646446079L; + private int nDBID; + private int nPort; + private String szName; + private String szDesc; + private String szIP; + private String szUid; + private String szPwd; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ClsDev)) { + return false; + } + final ClsDev other = (ClsDev)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getNDBID() != other.getNDBID()) { + return false; + } + if (this.getNPort() != other.getNPort()) { + return false; + } + final Object this$szName = this.getSzName(); + final Object other$szName = other.getSzName(); + Label_0091: { + if (this$szName == null) { + if (other$szName == null) { + break Label_0091; + } + } + else if (this$szName.equals(other$szName)) { + break Label_0091; + } + return false; + } + final Object this$szDesc = this.getSzDesc(); + final Object other$szDesc = other.getSzDesc(); + Label_0128: { + if (this$szDesc == null) { + if (other$szDesc == null) { + break Label_0128; + } + } + else if (this$szDesc.equals(other$szDesc)) { + break Label_0128; + } + return false; + } + final Object this$szIP = this.getSzIP(); + final Object other$szIP = other.getSzIP(); + Label_0165: { + if (this$szIP == null) { + if (other$szIP == null) { + break Label_0165; + } + } + else if (this$szIP.equals(other$szIP)) { + break Label_0165; + } + return false; + } + final Object this$szUid = this.getSzUid(); + final Object other$szUid = other.getSzUid(); + Label_0202: { + if (this$szUid == null) { + if (other$szUid == null) { + break Label_0202; + } + } + else if (this$szUid.equals(other$szUid)) { + break Label_0202; + } + return false; + } + final Object this$szPwd = this.getSzPwd(); + final Object other$szPwd = other.getSzPwd(); + if (this$szPwd == null) { + if (other$szPwd == null) { + return true; + } + } + else if (this$szPwd.equals(other$szPwd)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof ClsDev; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getNDBID(); + result = result * 59 + this.getNPort(); + final Object $szName = this.getSzName(); + result = result * 59 + (($szName == null) ? 43 : $szName.hashCode()); + final Object $szDesc = this.getSzDesc(); + result = result * 59 + (($szDesc == null) ? 43 : $szDesc.hashCode()); + final Object $szIP = this.getSzIP(); + result = result * 59 + (($szIP == null) ? 43 : $szIP.hashCode()); + final Object $szUid = this.getSzUid(); + result = result * 59 + (($szUid == null) ? 43 : $szUid.hashCode()); + final Object $szPwd = this.getSzPwd(); + result = result * 59 + (($szPwd == null) ? 43 : $szPwd.hashCode()); + return result; + } + + @Override + public String toString() { + return "ClsDev(nDBID=" + this.getNDBID() + ", nPort=" + this.getNPort() + ", szName=" + this.getSzName() + ", szDesc=" + this.getSzDesc() + ", szIP=" + this.getSzIP() + ", szUid=" + this.getSzUid() + ", szPwd=" + this.getSzPwd() + ")"; + } + + public void setNDBID(final int nDBID) { + this.nDBID = nDBID; + } + + public void setNPort(final int nPort) { + this.nPort = nPort; + } + + public void setSzName(final String szName) { + this.szName = szName; + } + + public void setSzDesc(final String szDesc) { + this.szDesc = szDesc; + } + + public void setSzIP(final String szIP) { + this.szIP = szIP; + } + + public void setSzUid(final String szUid) { + this.szUid = szUid; + } + + public void setSzPwd(final String szPwd) { + this.szPwd = szPwd; + } + + public int getNDBID() { + return this.nDBID; + } + + public int getNPort() { + return this.nPort; + } + + public String getSzName() { + return this.szName; + } + + public String getSzDesc() { + return this.szDesc; + } + + public String getSzIP() { + return this.szIP; + } + + public String getSzUid() { + return this.szUid; + } + + public String getSzPwd() { + return this.szPwd; + } + + @ConstructorProperties({ "nDBID", "nPort", "szName", "szDesc", "szIP", "szUid", "szPwd" }) + public ClsDev(final int nDBID, final int nPort, final String szName, final String szDesc, final String szIP, final String szUid, final String szPwd) { + this.nDBID = nDBID; + this.nPort = nPort; + this.szName = szName; + this.szDesc = szDesc; + this.szIP = szIP; + this.szUid = szUid; + this.szPwd = szPwd; + } + + public ClsDev() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/ResMsg.java b/src/main/java/com/zhichenhaixin/list/model/ResMsg.java new file mode 100644 index 0000000..d64a839 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/ResMsg.java @@ -0,0 +1,87 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class ResMsg implements Serializable +{ + private static final long serialVersionUID = -2906951484469395361L; + private int code; + private String msg; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResMsg)) { + return false; + } + final ResMsg other = (ResMsg)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getCode() != other.getCode()) { + return false; + } + final Object this$msg = this.getMsg(); + final Object other$msg = other.getMsg(); + if (this$msg == null) { + if (other$msg == null) { + return true; + } + } + else if (this$msg.equals(other$msg)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof ResMsg; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getCode(); + final Object $msg = this.getMsg(); + result = result * 59 + (($msg == null) ? 43 : $msg.hashCode()); + return result; + } + + @Override + public String toString() { + return "ResMsg(code=" + this.getCode() + ", msg=" + this.getMsg() + ")"; + } + + public void setCode(final int code) { + this.code = code; + } + + public void setMsg(final String msg) { + this.msg = msg; + } + + public int getCode() { + return this.code; + } + + public String getMsg() { + return this.msg; + } + + @ConstructorProperties({ "code", "msg" }) + public ResMsg(final int code, final String msg) { + this.code = code; + this.msg = msg; + } + + public ResMsg() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/SiteInfo.java b/src/main/java/com/zhichenhaixin/list/model/SiteInfo.java new file mode 100644 index 0000000..13aa244 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/SiteInfo.java @@ -0,0 +1,122 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class SiteInfo implements Serializable +{ + private static final long serialVersionUID = 1251571029621722205L; + private String sbid; + private String name; + private double lon; + private double lat; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SiteInfo)) { + return false; + } + final SiteInfo other = (SiteInfo)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$sbid = this.getSbid(); + final Object other$sbid = other.getSbid(); + Label_0065: { + if (this$sbid == null) { + if (other$sbid == null) { + break Label_0065; + } + } + else if (this$sbid.equals(other$sbid)) { + break Label_0065; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null) { + if (other$name == null) { + return Double.compare(this.getLon(), other.getLon()) == 0 && Double.compare(this.getLat(), other.getLat()) == 0; + } + } + else if (this$name.equals(other$name)) { + return Double.compare(this.getLon(), other.getLon()) == 0 && Double.compare(this.getLat(), other.getLat()) == 0; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof SiteInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $sbid = this.getSbid(); + result = result * 59 + (($sbid == null) ? 43 : $sbid.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + return result; + } + + @Override + public String toString() { + return "SiteInfo(sbid=" + this.getSbid() + ", name=" + this.getName() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ")"; + } + + public void setSbid(final String sbid) { + this.sbid = sbid; + } + + public void setName(final String name) { + this.name = name; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public String getSbid() { + return this.sbid; + } + + public String getName() { + return this.name; + } + + public double getLon() { + return this.lon; + } + + public double getLat() { + return this.lat; + } + + @ConstructorProperties({ "sbid", "name", "lon", "lat" }) + public SiteInfo(final String sbid, final String name, final double lon, final double lat) { + this.sbid = sbid; + this.name = name; + this.lon = lon; + this.lat = lat; + } + + public SiteInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/SmsDev.java b/src/main/java/com/zhichenhaixin/list/model/SmsDev.java new file mode 100644 index 0000000..0b25d9a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/SmsDev.java @@ -0,0 +1,329 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class SmsDev implements Serializable +{ + private static final long serialVersionUID = -4104373385105487128L; + private int nDBID; + private int nPort; + private int nRtspPort; + private int nFtpPort; + private String szName; + private String szDesc; + private String szIP; + private String szUid; + private String szPwd; + private String szRtspUid; + private String szRtspPwd; + private String szFtpUid; + private String szFtpPwd; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SmsDev)) { + return false; + } + final SmsDev other = (SmsDev)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getNDBID() != other.getNDBID()) { + return false; + } + if (this.getNPort() != other.getNPort()) { + return false; + } + if (this.getNRtspPort() != other.getNRtspPort()) { + return false; + } + if (this.getNFtpPort() != other.getNFtpPort()) { + return false; + } + final Object this$szName = this.getSzName(); + final Object other$szName = other.getSzName(); + Label_0117: { + if (this$szName == null) { + if (other$szName == null) { + break Label_0117; + } + } + else if (this$szName.equals(other$szName)) { + break Label_0117; + } + return false; + } + final Object this$szDesc = this.getSzDesc(); + final Object other$szDesc = other.getSzDesc(); + Label_0154: { + if (this$szDesc == null) { + if (other$szDesc == null) { + break Label_0154; + } + } + else if (this$szDesc.equals(other$szDesc)) { + break Label_0154; + } + return false; + } + final Object this$szIP = this.getSzIP(); + final Object other$szIP = other.getSzIP(); + Label_0191: { + if (this$szIP == null) { + if (other$szIP == null) { + break Label_0191; + } + } + else if (this$szIP.equals(other$szIP)) { + break Label_0191; + } + return false; + } + final Object this$szUid = this.getSzUid(); + final Object other$szUid = other.getSzUid(); + Label_0228: { + if (this$szUid == null) { + if (other$szUid == null) { + break Label_0228; + } + } + else if (this$szUid.equals(other$szUid)) { + break Label_0228; + } + return false; + } + final Object this$szPwd = this.getSzPwd(); + final Object other$szPwd = other.getSzPwd(); + Label_0265: { + if (this$szPwd == null) { + if (other$szPwd == null) { + break Label_0265; + } + } + else if (this$szPwd.equals(other$szPwd)) { + break Label_0265; + } + return false; + } + final Object this$szRtspUid = this.getSzRtspUid(); + final Object other$szRtspUid = other.getSzRtspUid(); + Label_0302: { + if (this$szRtspUid == null) { + if (other$szRtspUid == null) { + break Label_0302; + } + } + else if (this$szRtspUid.equals(other$szRtspUid)) { + break Label_0302; + } + return false; + } + final Object this$szRtspPwd = this.getSzRtspPwd(); + final Object other$szRtspPwd = other.getSzRtspPwd(); + Label_0339: { + if (this$szRtspPwd == null) { + if (other$szRtspPwd == null) { + break Label_0339; + } + } + else if (this$szRtspPwd.equals(other$szRtspPwd)) { + break Label_0339; + } + return false; + } + final Object this$szFtpUid = this.getSzFtpUid(); + final Object other$szFtpUid = other.getSzFtpUid(); + Label_0376: { + if (this$szFtpUid == null) { + if (other$szFtpUid == null) { + break Label_0376; + } + } + else if (this$szFtpUid.equals(other$szFtpUid)) { + break Label_0376; + } + return false; + } + final Object this$szFtpPwd = this.getSzFtpPwd(); + final Object other$szFtpPwd = other.getSzFtpPwd(); + if (this$szFtpPwd == null) { + if (other$szFtpPwd == null) { + return true; + } + } + else if (this$szFtpPwd.equals(other$szFtpPwd)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof SmsDev; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getNDBID(); + result = result * 59 + this.getNPort(); + result = result * 59 + this.getNRtspPort(); + result = result * 59 + this.getNFtpPort(); + final Object $szName = this.getSzName(); + result = result * 59 + (($szName == null) ? 43 : $szName.hashCode()); + final Object $szDesc = this.getSzDesc(); + result = result * 59 + (($szDesc == null) ? 43 : $szDesc.hashCode()); + final Object $szIP = this.getSzIP(); + result = result * 59 + (($szIP == null) ? 43 : $szIP.hashCode()); + final Object $szUid = this.getSzUid(); + result = result * 59 + (($szUid == null) ? 43 : $szUid.hashCode()); + final Object $szPwd = this.getSzPwd(); + result = result * 59 + (($szPwd == null) ? 43 : $szPwd.hashCode()); + final Object $szRtspUid = this.getSzRtspUid(); + result = result * 59 + (($szRtspUid == null) ? 43 : $szRtspUid.hashCode()); + final Object $szRtspPwd = this.getSzRtspPwd(); + result = result * 59 + (($szRtspPwd == null) ? 43 : $szRtspPwd.hashCode()); + final Object $szFtpUid = this.getSzFtpUid(); + result = result * 59 + (($szFtpUid == null) ? 43 : $szFtpUid.hashCode()); + final Object $szFtpPwd = this.getSzFtpPwd(); + result = result * 59 + (($szFtpPwd == null) ? 43 : $szFtpPwd.hashCode()); + return result; + } + + @Override + public String toString() { + return "SmsDev(nDBID=" + this.getNDBID() + ", nPort=" + this.getNPort() + ", nRtspPort=" + this.getNRtspPort() + ", nFtpPort=" + this.getNFtpPort() + ", szName=" + this.getSzName() + ", szDesc=" + this.getSzDesc() + ", szIP=" + this.getSzIP() + ", szUid=" + this.getSzUid() + ", szPwd=" + this.getSzPwd() + ", szRtspUid=" + this.getSzRtspUid() + ", szRtspPwd=" + this.getSzRtspPwd() + ", szFtpUid=" + this.getSzFtpUid() + ", szFtpPwd=" + this.getSzFtpPwd() + ")"; + } + + public void setNDBID(final int nDBID) { + this.nDBID = nDBID; + } + + public void setNPort(final int nPort) { + this.nPort = nPort; + } + + public void setNRtspPort(final int nRtspPort) { + this.nRtspPort = nRtspPort; + } + + public void setNFtpPort(final int nFtpPort) { + this.nFtpPort = nFtpPort; + } + + public void setSzName(final String szName) { + this.szName = szName; + } + + public void setSzDesc(final String szDesc) { + this.szDesc = szDesc; + } + + public void setSzIP(final String szIP) { + this.szIP = szIP; + } + + public void setSzUid(final String szUid) { + this.szUid = szUid; + } + + public void setSzPwd(final String szPwd) { + this.szPwd = szPwd; + } + + public void setSzRtspUid(final String szRtspUid) { + this.szRtspUid = szRtspUid; + } + + public void setSzRtspPwd(final String szRtspPwd) { + this.szRtspPwd = szRtspPwd; + } + + public void setSzFtpUid(final String szFtpUid) { + this.szFtpUid = szFtpUid; + } + + public void setSzFtpPwd(final String szFtpPwd) { + this.szFtpPwd = szFtpPwd; + } + + public int getNDBID() { + return this.nDBID; + } + + public int getNPort() { + return this.nPort; + } + + public int getNRtspPort() { + return this.nRtspPort; + } + + public int getNFtpPort() { + return this.nFtpPort; + } + + public String getSzName() { + return this.szName; + } + + public String getSzDesc() { + return this.szDesc; + } + + public String getSzIP() { + return this.szIP; + } + + public String getSzUid() { + return this.szUid; + } + + public String getSzPwd() { + return this.szPwd; + } + + public String getSzRtspUid() { + return this.szRtspUid; + } + + public String getSzRtspPwd() { + return this.szRtspPwd; + } + + public String getSzFtpUid() { + return this.szFtpUid; + } + + public String getSzFtpPwd() { + return this.szFtpPwd; + } + + @ConstructorProperties({ "nDBID", "nPort", "nRtspPort", "nFtpPort", "szName", "szDesc", "szIP", "szUid", "szPwd", "szRtspUid", "szRtspPwd", "szFtpUid", "szFtpPwd" }) + public SmsDev(final int nDBID, final int nPort, final int nRtspPort, final int nFtpPort, final String szName, final String szDesc, final String szIP, final String szUid, final String szPwd, final String szRtspUid, final String szRtspPwd, final String szFtpUid, final String szFtpPwd) { + this.nDBID = nDBID; + this.nPort = nPort; + this.nRtspPort = nRtspPort; + this.nFtpPort = nFtpPort; + this.szName = szName; + this.szDesc = szDesc; + this.szIP = szIP; + this.szUid = szUid; + this.szPwd = szPwd; + this.szRtspUid = szRtspUid; + this.szRtspPwd = szRtspPwd; + this.szFtpUid = szFtpUid; + this.szFtpPwd = szFtpPwd; + } + + public SmsDev() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/StatisticsInfo.java b/src/main/java/com/zhichenhaixin/list/model/StatisticsInfo.java new file mode 100644 index 0000000..7447776 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/StatisticsInfo.java @@ -0,0 +1,74 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.Map; + +public class StatisticsInfo implements Serializable +{ + private static final long serialVersionUID = -8992235962267533057L; + private Map key_number; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StatisticsInfo)) { + return false; + } + final StatisticsInfo other = (StatisticsInfo)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$key_number = this.getKey_number(); + final Object other$key_number = other.getKey_number(); + if (this$key_number == null) { + if (other$key_number == null) { + return true; + } + } + else if (this$key_number.equals(other$key_number)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof StatisticsInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $key_number = this.getKey_number(); + result = result * 59 + (($key_number == null) ? 43 : $key_number.hashCode()); + return result; + } + + @Override + public String toString() { + return "StatisticsInfo(key_number=" + this.getKey_number() + ")"; + } + + public void setKey_number(final Map key_number) { + this.key_number = key_number; + } + + public Map getKey_number() { + return this.key_number; + } + + @ConstructorProperties({ "key_number" }) + public StatisticsInfo(final Map key_number) { + this.key_number = key_number; + } + + public StatisticsInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/StatisticsVo.java b/src/main/java/com/zhichenhaixin/list/model/StatisticsVo.java new file mode 100644 index 0000000..0e403c9 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/StatisticsVo.java @@ -0,0 +1,65 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class StatisticsVo implements Serializable +{ + private static final long serialVersionUID = -27356423661163970L; + private String key; + private int number; + private String max; + private String min; + + public void setKey(final String key) { + this.key = key; + } + + public void setNumber(final int number) { + this.number = number; + } + + public void setMax(final String max) { + this.max = max; + } + + public void setMin(final String min) { + this.min = min; + } + + public String getKey() { + return this.key; + } + + public int getNumber() { + return this.number; + } + + public String getMax() { + return this.max; + } + + public String getMin() { + return this.min; + } + + @Override + public String toString() { + return "StatisticsVo(key=" + this.getKey() + ", number=" + this.getNumber() + ", max=" + this.getMax() + ", min=" + this.getMin() + ")"; + } + + public StatisticsVo() { + } + + @ConstructorProperties({ "key", "number", "max", "min" }) + public StatisticsVo(final String key, final int number, final String max, final String min) { + this.key = key; + this.number = number; + this.max = max; + this.min = min; + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/VasDev.java b/src/main/java/com/zhichenhaixin/list/model/VasDev.java new file mode 100644 index 0000000..d5faf3f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/VasDev.java @@ -0,0 +1,201 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class VasDev implements Serializable +{ + private static final long serialVersionUID = 2005876476861286043L; + private int nDBID; + private int nPort; + private String szName; + private String szDesc; + private String szIP; + private String szUid; + private String szPwd; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VasDev)) { + return false; + } + final VasDev other = (VasDev)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getNDBID() != other.getNDBID()) { + return false; + } + if (this.getNPort() != other.getNPort()) { + return false; + } + final Object this$szName = this.getSzName(); + final Object other$szName = other.getSzName(); + Label_0091: { + if (this$szName == null) { + if (other$szName == null) { + break Label_0091; + } + } + else if (this$szName.equals(other$szName)) { + break Label_0091; + } + return false; + } + final Object this$szDesc = this.getSzDesc(); + final Object other$szDesc = other.getSzDesc(); + Label_0128: { + if (this$szDesc == null) { + if (other$szDesc == null) { + break Label_0128; + } + } + else if (this$szDesc.equals(other$szDesc)) { + break Label_0128; + } + return false; + } + final Object this$szIP = this.getSzIP(); + final Object other$szIP = other.getSzIP(); + Label_0165: { + if (this$szIP == null) { + if (other$szIP == null) { + break Label_0165; + } + } + else if (this$szIP.equals(other$szIP)) { + break Label_0165; + } + return false; + } + final Object this$szUid = this.getSzUid(); + final Object other$szUid = other.getSzUid(); + Label_0202: { + if (this$szUid == null) { + if (other$szUid == null) { + break Label_0202; + } + } + else if (this$szUid.equals(other$szUid)) { + break Label_0202; + } + return false; + } + final Object this$szPwd = this.getSzPwd(); + final Object other$szPwd = other.getSzPwd(); + if (this$szPwd == null) { + if (other$szPwd == null) { + return true; + } + } + else if (this$szPwd.equals(other$szPwd)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof VasDev; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getNDBID(); + result = result * 59 + this.getNPort(); + final Object $szName = this.getSzName(); + result = result * 59 + (($szName == null) ? 43 : $szName.hashCode()); + final Object $szDesc = this.getSzDesc(); + result = result * 59 + (($szDesc == null) ? 43 : $szDesc.hashCode()); + final Object $szIP = this.getSzIP(); + result = result * 59 + (($szIP == null) ? 43 : $szIP.hashCode()); + final Object $szUid = this.getSzUid(); + result = result * 59 + (($szUid == null) ? 43 : $szUid.hashCode()); + final Object $szPwd = this.getSzPwd(); + result = result * 59 + (($szPwd == null) ? 43 : $szPwd.hashCode()); + return result; + } + + @Override + public String toString() { + return "VasDev(nDBID=" + this.getNDBID() + ", nPort=" + this.getNPort() + ", szName=" + this.getSzName() + ", szDesc=" + this.getSzDesc() + ", szIP=" + this.getSzIP() + ", szUid=" + this.getSzUid() + ", szPwd=" + this.getSzPwd() + ")"; + } + + public void setNDBID(final int nDBID) { + this.nDBID = nDBID; + } + + public void setNPort(final int nPort) { + this.nPort = nPort; + } + + public void setSzName(final String szName) { + this.szName = szName; + } + + public void setSzDesc(final String szDesc) { + this.szDesc = szDesc; + } + + public void setSzIP(final String szIP) { + this.szIP = szIP; + } + + public void setSzUid(final String szUid) { + this.szUid = szUid; + } + + public void setSzPwd(final String szPwd) { + this.szPwd = szPwd; + } + + public int getNDBID() { + return this.nDBID; + } + + public int getNPort() { + return this.nPort; + } + + public String getSzName() { + return this.szName; + } + + public String getSzDesc() { + return this.szDesc; + } + + public String getSzIP() { + return this.szIP; + } + + public String getSzUid() { + return this.szUid; + } + + public String getSzPwd() { + return this.szPwd; + } + + @ConstructorProperties({ "nDBID", "nPort", "szName", "szDesc", "szIP", "szUid", "szPwd" }) + public VasDev(final int nDBID, final int nPort, final String szName, final String szDesc, final String szIP, final String szUid, final String szPwd) { + this.nDBID = nDBID; + this.nPort = nPort; + this.szName = szName; + this.szDesc = szDesc; + this.szIP = szIP; + this.szUid = szUid; + this.szPwd = szPwd; + } + + public VasDev() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/WmsDev.java b/src/main/java/com/zhichenhaixin/list/model/WmsDev.java new file mode 100644 index 0000000..1fd425c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/WmsDev.java @@ -0,0 +1,201 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class WmsDev implements Serializable +{ + private static final long serialVersionUID = -727584424115861465L; + private int nDBID; + private int nPort; + private String szName; + private String szDesc; + private String szIP; + private String szUid; + private String szPwd; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WmsDev)) { + return false; + } + final WmsDev other = (WmsDev)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getNDBID() != other.getNDBID()) { + return false; + } + if (this.getNPort() != other.getNPort()) { + return false; + } + final Object this$szName = this.getSzName(); + final Object other$szName = other.getSzName(); + Label_0091: { + if (this$szName == null) { + if (other$szName == null) { + break Label_0091; + } + } + else if (this$szName.equals(other$szName)) { + break Label_0091; + } + return false; + } + final Object this$szDesc = this.getSzDesc(); + final Object other$szDesc = other.getSzDesc(); + Label_0128: { + if (this$szDesc == null) { + if (other$szDesc == null) { + break Label_0128; + } + } + else if (this$szDesc.equals(other$szDesc)) { + break Label_0128; + } + return false; + } + final Object this$szIP = this.getSzIP(); + final Object other$szIP = other.getSzIP(); + Label_0165: { + if (this$szIP == null) { + if (other$szIP == null) { + break Label_0165; + } + } + else if (this$szIP.equals(other$szIP)) { + break Label_0165; + } + return false; + } + final Object this$szUid = this.getSzUid(); + final Object other$szUid = other.getSzUid(); + Label_0202: { + if (this$szUid == null) { + if (other$szUid == null) { + break Label_0202; + } + } + else if (this$szUid.equals(other$szUid)) { + break Label_0202; + } + return false; + } + final Object this$szPwd = this.getSzPwd(); + final Object other$szPwd = other.getSzPwd(); + if (this$szPwd == null) { + if (other$szPwd == null) { + return true; + } + } + else if (this$szPwd.equals(other$szPwd)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof WmsDev; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getNDBID(); + result = result * 59 + this.getNPort(); + final Object $szName = this.getSzName(); + result = result * 59 + (($szName == null) ? 43 : $szName.hashCode()); + final Object $szDesc = this.getSzDesc(); + result = result * 59 + (($szDesc == null) ? 43 : $szDesc.hashCode()); + final Object $szIP = this.getSzIP(); + result = result * 59 + (($szIP == null) ? 43 : $szIP.hashCode()); + final Object $szUid = this.getSzUid(); + result = result * 59 + (($szUid == null) ? 43 : $szUid.hashCode()); + final Object $szPwd = this.getSzPwd(); + result = result * 59 + (($szPwd == null) ? 43 : $szPwd.hashCode()); + return result; + } + + @Override + public String toString() { + return "WmsDev(nDBID=" + this.getNDBID() + ", nPort=" + this.getNPort() + ", szName=" + this.getSzName() + ", szDesc=" + this.getSzDesc() + ", szIP=" + this.getSzIP() + ", szUid=" + this.getSzUid() + ", szPwd=" + this.getSzPwd() + ")"; + } + + public void setNDBID(final int nDBID) { + this.nDBID = nDBID; + } + + public void setNPort(final int nPort) { + this.nPort = nPort; + } + + public void setSzName(final String szName) { + this.szName = szName; + } + + public void setSzDesc(final String szDesc) { + this.szDesc = szDesc; + } + + public void setSzIP(final String szIP) { + this.szIP = szIP; + } + + public void setSzUid(final String szUid) { + this.szUid = szUid; + } + + public void setSzPwd(final String szPwd) { + this.szPwd = szPwd; + } + + public int getNDBID() { + return this.nDBID; + } + + public int getNPort() { + return this.nPort; + } + + public String getSzName() { + return this.szName; + } + + public String getSzDesc() { + return this.szDesc; + } + + public String getSzIP() { + return this.szIP; + } + + public String getSzUid() { + return this.szUid; + } + + public String getSzPwd() { + return this.szPwd; + } + + @ConstructorProperties({ "nDBID", "nPort", "szName", "szDesc", "szIP", "szUid", "szPwd" }) + public WmsDev(final int nDBID, final int nPort, final String szName, final String szDesc, final String szIP, final String szUid, final String szPwd) { + this.nDBID = nDBID; + this.nPort = nPort; + this.szName = szName; + this.szDesc = szDesc; + this.szIP = szIP; + this.szUid = szUid; + this.szPwd = szPwd; + } + + public WmsDev() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/dto/RectListDto.java b/src/main/java/com/zhichenhaixin/list/model/dto/RectListDto.java new file mode 100644 index 0000000..6ffcf38 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/dto/RectListDto.java @@ -0,0 +1,132 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model.dto; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class RectListDto implements Serializable +{ + private static final long serialVersionUID = -1455994879817102985L; + private long Time; + private double Lon; + private double Lat; + private double X; + private double Y; + private double W; + private double H; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RectListDto)) { + return false; + } + final RectListDto other = (RectListDto)o; + return other.canEqual(this) && this.getTime() == other.getTime() && Double.compare(this.getLon(), other.getLon()) == 0 && Double.compare(this.getLat(), other.getLat()) == 0 && Double.compare(this.getX(), other.getX()) == 0 && Double.compare(this.getY(), other.getY()) == 0 && Double.compare(this.getW(), other.getW()) == 0 && Double.compare(this.getH(), other.getH()) == 0; + } + + protected boolean canEqual(final Object other) { + return other instanceof RectListDto; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final long $Time = this.getTime(); + result = result * 59 + (int)($Time ^ $Time >>> 32); + final long $Lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($Lon ^ $Lon >>> 32); + final long $Lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($Lat ^ $Lat >>> 32); + final long $X = Double.doubleToLongBits(this.getX()); + result = result * 59 + (int)($X ^ $X >>> 32); + final long $Y = Double.doubleToLongBits(this.getY()); + result = result * 59 + (int)($Y ^ $Y >>> 32); + final long $W = Double.doubleToLongBits(this.getW()); + result = result * 59 + (int)($W ^ $W >>> 32); + final long $H = Double.doubleToLongBits(this.getH()); + result = result * 59 + (int)($H ^ $H >>> 32); + return result; + } + + @Override + public String toString() { + return "RectListDto(Time=" + this.getTime() + ", Lon=" + this.getLon() + ", Lat=" + this.getLat() + ", X=" + this.getX() + ", Y=" + this.getY() + ", W=" + this.getW() + ", H=" + this.getH() + ")"; + } + + public void setTime(final long Time) { + this.Time = Time; + } + + public void setLon(final double Lon) { + this.Lon = Lon; + } + + public void setLat(final double Lat) { + this.Lat = Lat; + } + + public void setX(final double X) { + this.X = X; + } + + public void setY(final double Y) { + this.Y = Y; + } + + public void setW(final double W) { + this.W = W; + } + + public void setH(final double H) { + this.H = H; + } + + public long getTime() { + return this.Time; + } + + public double getLon() { + return this.Lon; + } + + public double getLat() { + return this.Lat; + } + + public double getX() { + return this.X; + } + + public double getY() { + return this.Y; + } + + public double getW() { + return this.W; + } + + public double getH() { + return this.H; + } + + @ConstructorProperties({ "Time", "Lon", "Lat", "X", "Y", "W", "H" }) + public RectListDto(final long Time, final double Lon, final double Lat, final double X, final double Y, final double W, final double H) { + this.Time = Time; + this.Lon = Lon; + this.Lat = Lat; + this.X = X; + this.Y = Y; + this.W = W; + this.H = H; + } + + public RectListDto() { + } +} diff --git a/src/main/java/com/zhichenhaixin/list/model/dto/TheDto.java b/src/main/java/com/zhichenhaixin/list/model/dto/TheDto.java new file mode 100644 index 0000000..7fb8e57 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/model/dto/TheDto.java @@ -0,0 +1,20 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.model.dto; + +import java.util.List; + +public class TheDto +{ + private List RectList; + + public List getRectList() { + return this.RectList; + } + + public void setRectList(final List rectList) { + this.RectList = rectList; + } +} diff --git a/src/main/java/com/zhichenhaixin/list/service/impl/LSWRServiceImpl.java b/src/main/java/com/zhichenhaixin/list/service/impl/LSWRServiceImpl.java new file mode 100644 index 0000000..3c903af --- /dev/null +++ b/src/main/java/com/zhichenhaixin/list/service/impl/LSWRServiceImpl.java @@ -0,0 +1,174 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.list.service.impl; + +import com.alibaba.fastjson.JSON; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.service.impl.BaseServiceImpl; +import com.zhichenhaixin.base.util.JsonValidator; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.list.dao.impl.DbDeviceDaoImpl; +import com.zhichenhaixin.list.dao.impl.DbSiteInfoDaoImpl; +import com.zhichenhaixin.list.model.*; +import com.zhichenhaixin.list.model.dto.RectListDto; +import com.zhichenhaixin.list.model.dto.TheDto; +import com.zhichenhaixin.sys.dao.impl.IslandCruiseDaoImpl; +import com.zhichenhaixin.sys.model.SurLineInfo; +import com.zhichenhaixin.sys.model.Targit; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service("lSWRServiceImpl") +public class LSWRServiceImpl extends BaseServiceImpl +{ + private Log log; + static SimpleDateFormat sdf; + @Resource(name = "dbSiteInfoDaoImpl") + private DbSiteInfoDaoImpl dbSiteInfoDaoImpl; + @Resource(name = "dbDeviceDaoImpl") + private DbDeviceDaoImpl dbDeviceDaoImpl; + @Resource(name = "dbAlarmInfoDaoImpl") + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + @Resource(name = "islandCruiseDaoImpl") + private IslandCruiseDaoImpl islandCruiseDaoImpl; + + static { + LSWRServiceImpl.sdf = new SimpleDateFormat("yyyy-MM-dd HH\uff1amm\uff1ass"); + } + + public LSWRServiceImpl() { + this.log = LogFactory.getLog(LSWRServiceImpl.class); + } + + public ResMsg addSiteInfo(final SiteInfo record) { + return this.dbSiteInfoDaoImpl.insertSiteInfo(record); + } + + public List findAllSiteInfo() { + final List list = this.dbSiteInfoDaoImpl.selectAllSiteInfo(); + return list; + } + + public ResMsg delSiteInfo(final SiteInfo info) { + return this.dbSiteInfoDaoImpl.delSiteInfo(info); + } + + public List findVasList() { + return this.dbDeviceDaoImpl.selectAllVasDev(); + } + + public List getWmsDevice() { + return this.dbDeviceDaoImpl.selectAllWmsDev(); + } + + public List getSmsDevice() { + return this.dbDeviceDaoImpl.selectAllSmsDev(); + } + + public List getClsDevice() { + return this.dbDeviceDaoImpl.selectAllClsDev(); + } + + public AlarmListDto queryAlarmList(final AlarmInfoSearch record) { + final AlarmListDto dto = new AlarmListDto(); + final List list = this.dbAlarmInfoDaoImpl.selectWarnAll(record); + final List infoList = new ArrayList(); + for (final WarnInfoBean db : list) { + db.setObject_type(new StringBuilder(String.valueOf(GlobalVariable.getCilentType(Integer.parseInt(db.getObject_type())))).toString()); + db.setAlarm_source(db.getAlarm_source().equals("1") ? "0" : db.getAlarm_source()); + final List tList = this.toTargitList(db.getParam()); + db.setATargit(tList); + infoList.add(db); + db.setParam(null); + } + final int count = this.dbAlarmInfoDaoImpl.selectWarnAlarmCount(record); + dto.setRowTotal(count); + dto.setInfoContent(infoList); + return dto; + } + + public AlarmListDto queryAlarmListRadar(final AlarmInfoSearch record) { + final AlarmListDto dto = new AlarmListDto(); + final List list = this.dbAlarmInfoDaoImpl.selectWarnAllRadar(record); + final List infoList = new ArrayList(); + for (final WarnInfoBean db : list) { + db.setObject_type(new StringBuilder(String.valueOf(GlobalVariable.getCilentType(Integer.parseInt(db.getObject_type())))).toString()); + db.setAlarm_source(db.getAlarm_source().equals("1") ? "0" : db.getAlarm_source()); + final List tList = this.toTargitList(db.getParam()); + db.setATargit(tList); + infoList.add(db); + db.setParam(null); + } + final int count = this.dbAlarmInfoDaoImpl.selectWarnAlarmCountRadar(record); + dto.setRowTotal(count); + dto.setInfoContent(infoList); + return dto; + } + + public StatisticsInfo getStatistics(final AlarmInfoSearch record) { + StatisticsInfo statistics = new StatisticsInfo(); + if (record.getType() == 4) { + final List surLines = this.islandCruiseDaoImpl.statisSurLineWarn(record); + final Map map = new HashMap(); + for (final SurLineInfo surLine : surLines) { + map.put(surLine.getName(), surLine.getWarnNum()); + } + statistics.setKey_number(map); + } + else { + statistics = this.dbAlarmInfoDaoImpl.getStatistics(record); + } + return statistics; + } + + public StatisticsInfo getStatisticsRadar(final AlarmInfoSearch record) { + StatisticsInfo statistics = new StatisticsInfo(); + if (record.getType() == 4) { + final List surLines = this.islandCruiseDaoImpl.statisSurLineWarn(record); + final Map map = new HashMap(); + for (final SurLineInfo surLine : surLines) { + map.put(surLine.getName(), surLine.getWarnNum()); + } + statistics.setKey_number(map); + } + else { + statistics = this.dbAlarmInfoDaoImpl.getStatisticsRadar(record); + } + return statistics; + } + + public List toTargitList(final String param) { + final List tList = new ArrayList(); + if (JsonValidator.validate(param)) { + try { + final TheDto data = JSON.parseObject(param, TheDto.class); + for (final RectListDto re : data.getRectList()) { + final Targit targit = new Targit(); + targit.setNTime(re.getTime()); + targit.setNPtx(re.getX()); + targit.setNPty(re.getY()); + targit.setNWidth(re.getW()); + targit.setNHeight(re.getH()); + targit.setNLat(re.getLat()); + targit.setNLon(re.getLon()); + tList.add(targit); + } + } + catch (Exception e) { + this.log.error("JSON Exception!"); + } + } + return tList; + } +} diff --git a/src/main/java/com/zhichenhaixin/listener/StartupListener.java b/src/main/java/com/zhichenhaixin/listener/StartupListener.java new file mode 100644 index 0000000..66eafc2 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/listener/StartupListener.java @@ -0,0 +1,49 @@ +/* + * Decompiled with CFR 0.152. + */ +package com.zhichenhaixin.listener; + +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.ExecutorsUtils; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.sys.dao.impl.IslandCruiseDaoImpl; +import com.zhichenhaixin.sys.dao.impl.NewlyDaoImpl; +import com.zhichenhaixin.sys.service.impl.DefenceServiceImpl; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import javax.servlet.ServletContext; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import java.util.concurrent.TimeUnit; + +public class StartupListener +implements ServletContextListener { + private Log log = LogFactory.getLog(StartupListener.class); + + @Override + public void contextDestroyed(ServletContextEvent sce) { + ExecutorsUtils.shutdownAndAwaitTermination(Constant.cachedThreadPool, 1, TimeUnit.SECONDS); + Constant.timer.cancel(); + this.log.info("-> \u7cfb\u7edf\u5173\u95ed"); + System.exit(0); + } + + @Override + public void contextInitialized(ServletContextEvent sce) { + ServletContext context = sce.getServletContext(); + WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(context); + DefenceServiceImpl defenceServiceImpl = (DefenceServiceImpl)ctx.getBean("defenceServiceImpl"); + defenceServiceImpl.initDefences(); + IslandCruiseDaoImpl islandCruiseDaoImpl = (IslandCruiseDaoImpl)ctx.getBean("islandCruiseDaoImpl"); + islandCruiseDaoImpl.initSurLineData(); + DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl = (DbAlarmInfoDaoImpl)ctx.getBean("dbAlarmInfoDaoImpl"); + dbAlarmInfoDaoImpl.initWarnAlarmCount(); + NewlyDaoImpl newlyDaoImpl = (NewlyDaoImpl)ctx.getBean("newlyDaoImpl"); + newlyDaoImpl.initNightMode(); + newlyDaoImpl.initSmuggle(); + } +} + diff --git a/src/main/java/com/zhichenhaixin/main/RadarHelperMain.java b/src/main/java/com/zhichenhaixin/main/RadarHelperMain.java new file mode 100644 index 0000000..fb78578 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/main/RadarHelperMain.java @@ -0,0 +1,34 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.main; + +import com.zhichenhaixin.gui.RadarHelperFrame; + +import java.awt.*; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +public class RadarHelperMain +{ + public static void main(final String[] args) { + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + try { + new RadarHelperFrame().addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(final WindowEvent e) { + System.exit(0); + } + }); + } + catch (Exception e) { + System.err.println("\u5f02\u5e38"); + System.exit(0); + } + } + }); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXAISVessel.java b/src/main/java/com/zhichenhaixin/proto/ZCHXAISVessel.java new file mode 100644 index 0000000..9978fc6 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXAISVessel.java @@ -0,0 +1,11983 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXAISVessel { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public enum EPFD implements ProtocolMessageEnum { + UNDEFINED( + + 0, 0), + GPS( + + 1, 1), + GLONASS( + + 2, 2), + COMBINED_GPS_AND_GLONASS( + + 3, 3), + LORAN_C( + + 4, 4), + CHAYKA( + + 5, 5), + INTEGRATED_NAVIGATION_SYSTEM( + + 6, 6), + SURVEYED( + + 7, 7), + GALILEO( + + 8, 8); + + public static final int UNDEFINED_VALUE = 0; + + public static final int GPS_VALUE = 1; + + public static final int GLONASS_VALUE = 2; + + public static final int COMBINED_GPS_AND_GLONASS_VALUE = 3; + + public static final int LORAN_C_VALUE = 4; + + public static final int CHAYKA_VALUE = 5; + + public static final int INTEGRATED_NAVIGATION_SYSTEM_VALUE = 6; + + public static final int SURVEYED_VALUE = 7; + + public static final int GALILEO_VALUE = 8; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public EPFD findValueByNumber(int number) { + return EPFD.valueOf(String.valueOf(number)); + } + }; + + private static final EPFD[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXAISVessel.getDescriptor().getEnumTypes().get(0); + } + + EPFD(int index, int value) { + this.index = index; + this.value = value; + } + } + + public enum NAVI_STATUS implements ProtocolMessageEnum { + UNDER_WAY_USING_ENGINE( + + 0, 0), + AT_ANCHOR( + + 1, 1), + NOT_UNDER_COMMAND( + + 2, 2), + RESTRICTED_MANOEUVER( + + 3, 3), + CONSTRAINED_BY_DRAUGHT( + + 4, 4), + MOORED( + + 5, 5), + AGROUND( + + 6, 6), + ENGAGED_IN_FISHING( + + 7, 7), + UNDER_WAY_SAILING( + + 8, 8), + RESERVED_FOR_FUTURE_AMENDMENT_FOR_HSC( + + 9, 9), + RESERVED_FOR_FUTURE_AMENDMENT_FOR_WIG( + + 10, 10), + RESERVED_FOR_FUTURE_USE_1( + + 11, 11), + RESERVED_FOR_FUTURE_USE_2( + + 12, 12), + RESERVED_FOR_FUTURE_USE_3( + + 13, 13), + RESERVED_FOR_FUTURE_USE_4( + + 14, 14), + NOT_DEFINED( + + 15, 15); + + public static final int UNDER_WAY_USING_ENGINE_VALUE = 0; + + public static final int AT_ANCHOR_VALUE = 1; + + public static final int NOT_UNDER_COMMAND_VALUE = 2; + + public static final int RESTRICTED_MANOEUVER_VALUE = 3; + + public static final int CONSTRAINED_BY_DRAUGHT_VALUE = 4; + + public static final int MOORED_VALUE = 5; + + public static final int AGROUND_VALUE = 6; + + public static final int ENGAGED_IN_FISHING_VALUE = 7; + + public static final int UNDER_WAY_SAILING_VALUE = 8; + + public static final int RESERVED_FOR_FUTURE_AMENDMENT_FOR_HSC_VALUE = 9; + + public static final int RESERVED_FOR_FUTURE_AMENDMENT_FOR_WIG_VALUE = 10; + + public static final int RESERVED_FOR_FUTURE_USE_1_VALUE = 11; + + public static final int RESERVED_FOR_FUTURE_USE_2_VALUE = 12; + + public static final int RESERVED_FOR_FUTURE_USE_3_VALUE = 13; + + public static final int RESERVED_FOR_FUTURE_USE_4_VALUE = 14; + + public static final int NOT_DEFINED_VALUE = 15; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public NAVI_STATUS findValueByNumber(int number) { + return NAVI_STATUS.valueOf(String.valueOf(number)); + } + }; + + private static final NAVI_STATUS[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXAISVessel.getDescriptor().getEnumTypes().get(1); + } + + NAVI_STATUS(int index, int value) { + this.index = index; + this.value = value; + } + } + + public enum ATON_TYPE implements ProtocolMessageEnum { + DEFAULT( + + 0, 0), + REFERENCE_POINT( + + 1, 1), + RACON( + + 2, 2), + FIXED_STRUCTURE_OFF_SHORE( + + 3, 3), + SPARE( + + 4, 4), + LIGHT_WITHOUT_SECTORS( + + 5, 5), + LIGHT_WITH_SECTORS( + + 6, 6), + LEADING_LIGHT_FRONT( + + 7, 7), + LEADING_LIGHT_REAR( + + 8, 8), + BEACON_CARDINAL_N( + + 9, 9), + BEACON_CARDINAL_E( + + 10, 10), + BEACON_CARDINAL_S( + + 11, 11), + BEACON_CARDINAL_W( + + 12, 12), + BEACON_PORT_HAND( + + 13, 13), + BEACON_STARBOARD_HAND( + + 14, 14), + BEACON_PREFERRED_CHANNEL_PORT_HAND( + + 15, 15), + BEACON_PREFERRED_CHANNEL_STARBOARD_HAND( + + 16, 16), + BEACON_ISOLATED_DANGER( + + 17, 17), + BEACON_SAFE_WATER( + + 18, 18), + BEACON_SPECIAL_MARK( + + 19, 19), + CARDINAL_MARK_N( + + 20, 20), + CARDINAL_MARK_E( + + 21, 21), + CARDINAL_MARK_S( + + 22, 22), + CARDINAL_MARK_W( + + 23, 23), + PORT_HAND_MARK( + + 24, 24), + STARBOARD_HAND_MARK( + + 25, 25), + PREFERRED_CHANNEL_PORT_HAND( + + 26, 26), + PREFERRED_CHANNEL_STARBOARD_HAND( + + 27, 27), + ISOLATED_DANGER( + + 28, 28), + SAFE_WATER( + + 29, 29), + SPECIAL_MARK( + + 30, 30), + LIGHT_VESSEL_LANBY_RIGS( + + 31, 31); + + public static final int DEFAULT_VALUE = 0; + + public static final int REFERENCE_POINT_VALUE = 1; + + public static final int RACON_VALUE = 2; + + public static final int FIXED_STRUCTURE_OFF_SHORE_VALUE = 3; + + public static final int SPARE_VALUE = 4; + + public static final int LIGHT_WITHOUT_SECTORS_VALUE = 5; + + public static final int LIGHT_WITH_SECTORS_VALUE = 6; + + public static final int LEADING_LIGHT_FRONT_VALUE = 7; + + public static final int LEADING_LIGHT_REAR_VALUE = 8; + + public static final int BEACON_CARDINAL_N_VALUE = 9; + + public static final int BEACON_CARDINAL_E_VALUE = 10; + + public static final int BEACON_CARDINAL_S_VALUE = 11; + + public static final int BEACON_CARDINAL_W_VALUE = 12; + + public static final int BEACON_PORT_HAND_VALUE = 13; + + public static final int BEACON_STARBOARD_HAND_VALUE = 14; + + public static final int BEACON_PREFERRED_CHANNEL_PORT_HAND_VALUE = 15; + + public static final int BEACON_PREFERRED_CHANNEL_STARBOARD_HAND_VALUE = 16; + + public static final int BEACON_ISOLATED_DANGER_VALUE = 17; + + public static final int BEACON_SAFE_WATER_VALUE = 18; + + public static final int BEACON_SPECIAL_MARK_VALUE = 19; + + public static final int CARDINAL_MARK_N_VALUE = 20; + + public static final int CARDINAL_MARK_E_VALUE = 21; + + public static final int CARDINAL_MARK_S_VALUE = 22; + + public static final int CARDINAL_MARK_W_VALUE = 23; + + public static final int PORT_HAND_MARK_VALUE = 24; + + public static final int STARBOARD_HAND_MARK_VALUE = 25; + + public static final int PREFERRED_CHANNEL_PORT_HAND_VALUE = 26; + + public static final int PREFERRED_CHANNEL_STARBOARD_HAND_VALUE = 27; + + public static final int ISOLATED_DANGER_VALUE = 28; + + public static final int SAFE_WATER_VALUE = 29; + + public static final int SPECIAL_MARK_VALUE = 30; + + public static final int LIGHT_VESSEL_LANBY_RIGS_VALUE = 31; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public ATON_TYPE findValueByNumber(int number) { + return ATON_TYPE.valueOf(String.valueOf(number)); + } + }; + + private static final ATON_TYPE[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXAISVessel.getDescriptor().getEnumTypes().get(2); + } + + ATON_TYPE(int index, int value) { + this.index = index; + this.value = value; + } + } + + public static final class VesselInfo extends GeneratedMessage implements VesselInfoOrBuilder { + private static final VesselInfo defaultInstance = new VesselInfo(true); + + private final UnknownFieldSet unknownFields; + + private VesselInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private VesselInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static VesselInfo getDefaultInstance() { + return defaultInstance; + } + + public VesselInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VesselInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString byteString1; + int rawValue; + ByteString bs; + EPFD value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x1; + this.id_ = byteString1; + break; + case 16: + this.bitField0_ |= 0x2; + this.mmsi_ = input.readInt32(); + break; + case 26: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x4; + this.shipType_ = byteString1; + break; + case 32: + this.bitField0_ |= 0x8; + this.imo_ = input.readInt32(); + break; + case 42: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x10; + this.callSign_ = byteString1; + break; + case 50: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x20; + this.shipName_ = byteString1; + break; + case 56: + this.bitField0_ |= 0x40; + this.cargoType_ = input.readInt32(); + break; + case 66: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x80; + this.country_ = byteString1; + break; + case 74: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x100; + this.vendorID_ = byteString1; + break; + case 80: + this.bitField0_ |= 0x200; + this.shipLength_ = input.readInt32(); + break; + case 88: + this.bitField0_ |= 0x400; + this.shipWidth_ = input.readInt32(); + break; + case 96: + this.bitField0_ |= 0x800; + this.toBow_ = input.readInt32(); + break; + case 104: + this.bitField0_ |= 0x1000; + this.toStern_ = input.readInt32(); + break; + case 112: + this.bitField0_ |= 0x2000; + this.toPort_ = input.readInt32(); + break; + case 120: + this.bitField0_ |= 0x4000; + this.toStarboard_ = input.readInt32(); + break; + case 128: + rawValue = input.readEnum(); + value = EPFD.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(16, rawValue); + break; + } + this.bitField0_ |= 0x8000; + this.fixType_ = value; + break; + case 138: + bs = input.readBytes(); + this.bitField0_ |= 0x10000; + this.eta_ = bs; + break; + case 149: + this.bitField0_ |= 0x20000; + this.draught_ = input.readFloat(); + break; + case 154: + bs = input.readBytes(); + this.bitField0_ |= 0x40000; + this.dest_ = bs; + break; + case 160: + this.bitField0_ |= 0x80000; + this.uTC_ = input.readUInt64(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(VesselInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public VesselInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new VesselInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int ID_FIELD_NUMBER = 1; + + private Object id_; + + public static final int MMSI_FIELD_NUMBER = 2; + + private int mmsi_; + + public static final int SHIPTYPE_FIELD_NUMBER = 3; + + private Object shipType_; + + public static final int IMO_FIELD_NUMBER = 4; + + private int imo_; + + public static final int CALLSIGN_FIELD_NUMBER = 5; + + private Object callSign_; + + public static final int SHIPNAME_FIELD_NUMBER = 6; + + private Object shipName_; + + public static final int CARGOTYPE_FIELD_NUMBER = 7; + + private int cargoType_; + + public static final int COUNTRY_FIELD_NUMBER = 8; + + private Object country_; + + public static final int VENDORID_FIELD_NUMBER = 9; + + private Object vendorID_; + + public static final int SHIPLENGTH_FIELD_NUMBER = 10; + + private int shipLength_; + + public static final int SHIPWIDTH_FIELD_NUMBER = 11; + + private int shipWidth_; + + public static final int TOBOW_FIELD_NUMBER = 12; + + private int toBow_; + + public static final int TOSTERN_FIELD_NUMBER = 13; + + private int toStern_; + + public static final int TOPORT_FIELD_NUMBER = 14; + + private int toPort_; + + public static final int TOSTARBOARD_FIELD_NUMBER = 15; + + private int toStarboard_; + + public static final int FIXTYPE_FIELD_NUMBER = 16; + + private EPFD fixType_; + + public static final int ETA_FIELD_NUMBER = 17; + + private Object eta_; + + public static final int DRAUGHT_FIELD_NUMBER = 18; + + private float draught_; + + public static final int DEST_FIELD_NUMBER = 19; + + private Object dest_; + + public static final int UTC_FIELD_NUMBER = 20; + + private long uTC_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getId() { + Object ref = this.id_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.id_ = s; + return s; + } + + public ByteString getIdBytes() { + Object ref = this.id_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.id_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMmsi() { + return this.mmsi_; + } + + public boolean hasShipType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getShipType() { + Object ref = this.shipType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shipType_ = s; + return s; + } + + public ByteString getShipTypeBytes() { + Object ref = this.shipType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shipType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasImo() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getImo() { + return this.imo_; + } + + public boolean hasCallSign() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCallSign() { + Object ref = this.callSign_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.callSign_ = s; + return s; + } + + public ByteString getCallSignBytes() { + Object ref = this.callSign_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.callSign_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasShipName() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getShipName() { + Object ref = this.shipName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shipName_ = s; + return s; + } + + public ByteString getShipNameBytes() { + Object ref = this.shipName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shipName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCargoType() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getCargoType() { + return this.cargoType_; + } + + public boolean hasCountry() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getCountry() { + Object ref = this.country_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.country_ = s; + return s; + } + + public ByteString getCountryBytes() { + Object ref = this.country_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.country_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasVendorID() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getVendorID() { + Object ref = this.vendorID_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.vendorID_ = s; + return s; + } + + public ByteString getVendorIDBytes() { + Object ref = this.vendorID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.vendorID_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasShipLength() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getShipLength() { + return this.shipLength_; + } + + public boolean hasShipWidth() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getShipWidth() { + return this.shipWidth_; + } + + public boolean hasToBow() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getToBow() { + return this.toBow_; + } + + public boolean hasToStern() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public int getToStern() { + return this.toStern_; + } + + public boolean hasToPort() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public int getToPort() { + return this.toPort_; + } + + public boolean hasToStarboard() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public int getToStarboard() { + return this.toStarboard_; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public boolean hasEta() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public String getEta() { + Object ref = this.eta_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.eta_ = s; + return s; + } + + public ByteString getEtaBytes() { + Object ref = this.eta_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.eta_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDraught() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getDraught() { + return this.draught_; + } + + public boolean hasDest() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public String getDest() { + Object ref = this.dest_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dest_ = s; + return s; + } + + public ByteString getDestBytes() { + Object ref = this.dest_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dest_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public long getUTC() { + return this.uTC_; + } + + private void initFields() { + this.id_ = ""; + this.mmsi_ = 0; + this.shipType_ = ""; + this.imo_ = 0; + this.callSign_ = ""; + this.shipName_ = ""; + this.cargoType_ = 0; + this.country_ = ""; + this.vendorID_ = ""; + this.shipLength_ = 0; + this.shipWidth_ = 0; + this.toBow_ = 0; + this.toStern_ = 0; + this.toPort_ = 0; + this.toStarboard_ = 0; + this.fixType_ = EPFD.UNDEFINED; + this.eta_ = ""; + this.draught_ = 0.0F; + this.dest_ = ""; + this.uTC_ = 0L; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMmsi()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasImo()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCallSign()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCargoType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCountry()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasVendorID()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipLength()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipWidth()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToBow()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToStern()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToStarboard()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasFixType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasEta()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDraught()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDest()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.mmsi_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getShipTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.imo_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getCallSignBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getShipNameBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.cargoType_); + if ((this.bitField0_ & 0x80) == 128) + output.writeBytes(8, getCountryBytes()); + if ((this.bitField0_ & 0x100) == 256) + output.writeBytes(9, getVendorIDBytes()); + if ((this.bitField0_ & 0x200) == 512) + output.writeInt32(10, this.shipLength_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeInt32(11, this.shipWidth_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeInt32(12, this.toBow_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeInt32(13, this.toStern_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeInt32(14, this.toPort_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeInt32(15, this.toStarboard_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeEnum(16, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeBytes(17, getEtaBytes()); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeFloat(18, this.draught_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeBytes(19, getDestBytes()); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeUInt64(20, this.uTC_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.mmsi_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getShipTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.imo_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getCallSignBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getShipNameBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.cargoType_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeBytesSize(8, getCountryBytes()); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeBytesSize(9, getVendorIDBytes()); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeInt32Size(10, this.shipLength_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeInt32Size(11, this.shipWidth_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeInt32Size(12, this.toBow_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeInt32Size(13, this.toStern_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeInt32Size(14, this.toPort_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeInt32Size(15, this.toStarboard_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeEnumSize(16, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeBytesSize(17, getEtaBytes()); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeFloatSize(18, this.draught_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeBytesSize(19, getDestBytes()); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeUInt64Size(20, this.uTC_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static VesselInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (VesselInfo)PARSER.parseFrom(data); + } + + public static VesselInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VesselInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static VesselInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (VesselInfo)PARSER.parseFrom(data); + } + + public static VesselInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VesselInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static VesselInfo parseFrom(InputStream input) throws IOException { + return (VesselInfo)PARSER.parseFrom(input); + } + + public static VesselInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VesselInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static VesselInfo parseDelimitedFrom(InputStream input) throws IOException { + return (VesselInfo)PARSER.parseDelimitedFrom(input); + } + + public static VesselInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VesselInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static VesselInfo parseFrom(CodedInputStream input) throws IOException { + return (VesselInfo)PARSER.parseFrom(input); + } + + public static VesselInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VesselInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(VesselInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements VesselInfoOrBuilder { + private int bitField0_; + + private Object id_; + + private int mmsi_; + + private Object shipType_; + + private int imo_; + + private Object callSign_; + + private Object shipName_; + + private int cargoType_; + + private Object country_; + + private Object vendorID_; + + private int shipLength_; + + private int shipWidth_; + + private int toBow_; + + private int toStern_; + + private int toPort_; + + private int toStarboard_; + + private EPFD fixType_; + + private Object eta_; + + private float draught_; + + private Object dest_; + + private long uTC_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(VesselInfo.class, Builder.class); + } + + private Builder() { + this.id_ = ""; + this.shipType_ = ""; + this.callSign_ = ""; + this.shipName_ = ""; + this.country_ = ""; + this.vendorID_ = ""; + this.fixType_ = EPFD.UNDEFINED; + this.eta_ = ""; + this.dest_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.id_ = ""; + this.shipType_ = ""; + this.callSign_ = ""; + this.shipName_ = ""; + this.country_ = ""; + this.vendorID_ = ""; + this.fixType_ = EPFD.UNDEFINED; + this.eta_ = ""; + this.dest_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = VesselInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.id_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.mmsi_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.shipType_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.imo_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.callSign_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.shipName_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.cargoType_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.country_ = ""; + this.bitField0_ &= 0xFFFFFF7F; + this.vendorID_ = ""; + this.bitField0_ &= 0xFFFFFEFF; + this.shipLength_ = 0; + this.bitField0_ &= 0xFFFFFDFF; + this.shipWidth_ = 0; + this.bitField0_ &= 0xFFFFFBFF; + this.toBow_ = 0; + this.bitField0_ &= 0xFFFFF7FF; + this.toStern_ = 0; + this.bitField0_ &= 0xFFFFEFFF; + this.toPort_ = 0; + this.bitField0_ &= 0xFFFFDFFF; + this.toStarboard_ = 0; + this.bitField0_ &= 0xFFFFBFFF; + this.fixType_ = EPFD.UNDEFINED; + this.bitField0_ &= 0xFFFF7FFF; + this.eta_ = ""; + this.bitField0_ &= 0xFFFEFFFF; + this.draught_ = 0.0F; + this.bitField0_ &= 0xFFFDFFFF; + this.dest_ = ""; + this.bitField0_ &= 0xFFFBFFFF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFF7FFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselInfo_descriptor; + } + + public VesselInfo getDefaultInstanceForType() { + return VesselInfo.getDefaultInstance(); + } + + public VesselInfo build() { + VesselInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public VesselInfo buildPartial() { + VesselInfo result = new VesselInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.id_ = this.id_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.mmsi_ = this.mmsi_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.shipType_ = this.shipType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.imo_ = this.imo_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.callSign_ = this.callSign_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.shipName_ = this.shipName_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.cargoType_ = this.cargoType_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.country_ = this.country_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.vendorID_ = this.vendorID_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.shipLength_ = this.shipLength_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.shipWidth_ = this.shipWidth_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.toBow_ = this.toBow_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.toStern_ = this.toStern_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.toPort_ = this.toPort_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.toStarboard_ = this.toStarboard_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.fixType_ = this.fixType_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.eta_ = this.eta_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.draught_ = this.draught_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.dest_ = this.dest_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.uTC_ = this.uTC_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof VesselInfo) + return mergeFrom((VesselInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(VesselInfo other) { + if (other == VesselInfo.getDefaultInstance()) + return this; + if (other.hasId()) { + this.bitField0_ |= 0x1; + this.id_ = other.id_; + onChanged(); + } + if (other.hasMmsi()) + setMmsi(other.getMmsi()); + if (other.hasShipType()) { + this.bitField0_ |= 0x4; + this.shipType_ = other.shipType_; + onChanged(); + } + if (other.hasImo()) + setImo(other.getImo()); + if (other.hasCallSign()) { + this.bitField0_ |= 0x10; + this.callSign_ = other.callSign_; + onChanged(); + } + if (other.hasShipName()) { + this.bitField0_ |= 0x20; + this.shipName_ = other.shipName_; + onChanged(); + } + if (other.hasCargoType()) + setCargoType(other.getCargoType()); + if (other.hasCountry()) { + this.bitField0_ |= 0x80; + this.country_ = other.country_; + onChanged(); + } + if (other.hasVendorID()) { + this.bitField0_ |= 0x100; + this.vendorID_ = other.vendorID_; + onChanged(); + } + if (other.hasShipLength()) + setShipLength(other.getShipLength()); + if (other.hasShipWidth()) + setShipWidth(other.getShipWidth()); + if (other.hasToBow()) + setToBow(other.getToBow()); + if (other.hasToStern()) + setToStern(other.getToStern()); + if (other.hasToPort()) + setToPort(other.getToPort()); + if (other.hasToStarboard()) + setToStarboard(other.getToStarboard()); + if (other.hasFixType()) + setFixType(other.getFixType()); + if (other.hasEta()) { + this.bitField0_ |= 0x10000; + this.eta_ = other.eta_; + onChanged(); + } + if (other.hasDraught()) + setDraught(other.getDraught()); + if (other.hasDest()) { + this.bitField0_ |= 0x40000; + this.dest_ = other.dest_; + onChanged(); + } + if (other.hasUTC()) + setUTC(other.getUTC()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasId()) + return false; + if (!hasMmsi()) + return false; + if (!hasShipType()) + return false; + if (!hasImo()) + return false; + if (!hasCallSign()) + return false; + if (!hasShipName()) + return false; + if (!hasCargoType()) + return false; + if (!hasCountry()) + return false; + if (!hasVendorID()) + return false; + if (!hasShipLength()) + return false; + if (!hasShipWidth()) + return false; + if (!hasToBow()) + return false; + if (!hasToStern()) + return false; + if (!hasToPort()) + return false; + if (!hasToStarboard()) + return false; + if (!hasFixType()) + return false; + if (!hasEta()) + return false; + if (!hasDraught()) + return false; + if (!hasDest()) + return false; + if (!hasUTC()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + VesselInfo parsedMessage = null; + try { + parsedMessage = (VesselInfo) VesselInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (VesselInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getId() { + Object ref = this.id_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.id_ = s; + return s; + } + return (String)ref; + } + + public ByteString getIdBytes() { + Object ref = this.id_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.id_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public Builder clearId() { + this.bitField0_ &= 0xFFFFFFFE; + this.id_ = VesselInfo.getDefaultInstance().getId(); + onChanged(); + return this; + } + + public Builder setIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMmsi() { + return this.mmsi_; + } + + public Builder setMmsi(int value) { + this.bitField0_ |= 0x2; + this.mmsi_ = value; + onChanged(); + return this; + } + + public Builder clearMmsi() { + this.bitField0_ &= 0xFFFFFFFD; + this.mmsi_ = 0; + onChanged(); + return this; + } + + public boolean hasShipType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getShipType() { + Object ref = this.shipType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shipType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getShipTypeBytes() { + Object ref = this.shipType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shipType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setShipType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.shipType_ = value; + onChanged(); + return this; + } + + public Builder clearShipType() { + this.bitField0_ &= 0xFFFFFFFB; + this.shipType_ = VesselInfo.getDefaultInstance().getShipType(); + onChanged(); + return this; + } + + public Builder setShipTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.shipType_ = value; + onChanged(); + return this; + } + + public boolean hasImo() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getImo() { + return this.imo_; + } + + public Builder setImo(int value) { + this.bitField0_ |= 0x8; + this.imo_ = value; + onChanged(); + return this; + } + + public Builder clearImo() { + this.bitField0_ &= 0xFFFFFFF7; + this.imo_ = 0; + onChanged(); + return this; + } + + public boolean hasCallSign() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCallSign() { + Object ref = this.callSign_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.callSign_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCallSignBytes() { + Object ref = this.callSign_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.callSign_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCallSign(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.callSign_ = value; + onChanged(); + return this; + } + + public Builder clearCallSign() { + this.bitField0_ &= 0xFFFFFFEF; + this.callSign_ = VesselInfo.getDefaultInstance().getCallSign(); + onChanged(); + return this; + } + + public Builder setCallSignBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.callSign_ = value; + onChanged(); + return this; + } + + public boolean hasShipName() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getShipName() { + Object ref = this.shipName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shipName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getShipNameBytes() { + Object ref = this.shipName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shipName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setShipName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.shipName_ = value; + onChanged(); + return this; + } + + public Builder clearShipName() { + this.bitField0_ &= 0xFFFFFFDF; + this.shipName_ = VesselInfo.getDefaultInstance().getShipName(); + onChanged(); + return this; + } + + public Builder setShipNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.shipName_ = value; + onChanged(); + return this; + } + + public boolean hasCargoType() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getCargoType() { + return this.cargoType_; + } + + public Builder setCargoType(int value) { + this.bitField0_ |= 0x40; + this.cargoType_ = value; + onChanged(); + return this; + } + + public Builder clearCargoType() { + this.bitField0_ &= 0xFFFFFFBF; + this.cargoType_ = 0; + onChanged(); + return this; + } + + public boolean hasCountry() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getCountry() { + Object ref = this.country_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.country_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCountryBytes() { + Object ref = this.country_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.country_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCountry(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.country_ = value; + onChanged(); + return this; + } + + public Builder clearCountry() { + this.bitField0_ &= 0xFFFFFF7F; + this.country_ = VesselInfo.getDefaultInstance().getCountry(); + onChanged(); + return this; + } + + public Builder setCountryBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.country_ = value; + onChanged(); + return this; + } + + public boolean hasVendorID() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getVendorID() { + Object ref = this.vendorID_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.vendorID_ = s; + return s; + } + return (String)ref; + } + + public ByteString getVendorIDBytes() { + Object ref = this.vendorID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.vendorID_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setVendorID(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.vendorID_ = value; + onChanged(); + return this; + } + + public Builder clearVendorID() { + this.bitField0_ &= 0xFFFFFEFF; + this.vendorID_ = VesselInfo.getDefaultInstance().getVendorID(); + onChanged(); + return this; + } + + public Builder setVendorIDBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.vendorID_ = value; + onChanged(); + return this; + } + + public boolean hasShipLength() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getShipLength() { + return this.shipLength_; + } + + public Builder setShipLength(int value) { + this.bitField0_ |= 0x200; + this.shipLength_ = value; + onChanged(); + return this; + } + + public Builder clearShipLength() { + this.bitField0_ &= 0xFFFFFDFF; + this.shipLength_ = 0; + onChanged(); + return this; + } + + public boolean hasShipWidth() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getShipWidth() { + return this.shipWidth_; + } + + public Builder setShipWidth(int value) { + this.bitField0_ |= 0x400; + this.shipWidth_ = value; + onChanged(); + return this; + } + + public Builder clearShipWidth() { + this.bitField0_ &= 0xFFFFFBFF; + this.shipWidth_ = 0; + onChanged(); + return this; + } + + public boolean hasToBow() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getToBow() { + return this.toBow_; + } + + public Builder setToBow(int value) { + this.bitField0_ |= 0x800; + this.toBow_ = value; + onChanged(); + return this; + } + + public Builder clearToBow() { + this.bitField0_ &= 0xFFFFF7FF; + this.toBow_ = 0; + onChanged(); + return this; + } + + public boolean hasToStern() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public int getToStern() { + return this.toStern_; + } + + public Builder setToStern(int value) { + this.bitField0_ |= 0x1000; + this.toStern_ = value; + onChanged(); + return this; + } + + public Builder clearToStern() { + this.bitField0_ &= 0xFFFFEFFF; + this.toStern_ = 0; + onChanged(); + return this; + } + + public boolean hasToPort() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public int getToPort() { + return this.toPort_; + } + + public Builder setToPort(int value) { + this.bitField0_ |= 0x2000; + this.toPort_ = value; + onChanged(); + return this; + } + + public Builder clearToPort() { + this.bitField0_ &= 0xFFFFDFFF; + this.toPort_ = 0; + onChanged(); + return this; + } + + public boolean hasToStarboard() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public int getToStarboard() { + return this.toStarboard_; + } + + public Builder setToStarboard(int value) { + this.bitField0_ |= 0x4000; + this.toStarboard_ = value; + onChanged(); + return this; + } + + public Builder clearToStarboard() { + this.bitField0_ &= 0xFFFFBFFF; + this.toStarboard_ = 0; + onChanged(); + return this; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public Builder setFixType(EPFD value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.fixType_ = value; + onChanged(); + return this; + } + + public Builder clearFixType() { + this.bitField0_ &= 0xFFFF7FFF; + this.fixType_ = EPFD.UNDEFINED; + onChanged(); + return this; + } + + public boolean hasEta() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public String getEta() { + Object ref = this.eta_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.eta_ = s; + return s; + } + return (String)ref; + } + + public ByteString getEtaBytes() { + Object ref = this.eta_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.eta_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setEta(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10000; + this.eta_ = value; + onChanged(); + return this; + } + + public Builder clearEta() { + this.bitField0_ &= 0xFFFEFFFF; + this.eta_ = VesselInfo.getDefaultInstance().getEta(); + onChanged(); + return this; + } + + public Builder setEtaBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10000; + this.eta_ = value; + onChanged(); + return this; + } + + public boolean hasDraught() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getDraught() { + return this.draught_; + } + + public Builder setDraught(float value) { + this.bitField0_ |= 0x20000; + this.draught_ = value; + onChanged(); + return this; + } + + public Builder clearDraught() { + this.bitField0_ &= 0xFFFDFFFF; + this.draught_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasDest() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public String getDest() { + Object ref = this.dest_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dest_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDestBytes() { + Object ref = this.dest_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dest_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDest(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40000; + this.dest_ = value; + onChanged(); + return this; + } + + public Builder clearDest() { + this.bitField0_ &= 0xFFFBFFFF; + this.dest_ = VesselInfo.getDefaultInstance().getDest(); + onChanged(); + return this; + } + + public Builder setDestBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40000; + this.dest_ = value; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x80000; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFF7FFFF; + this.uTC_ = 0L; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AISHistoryTrack extends GeneratedMessage implements AISHistoryTrackOrBuilder { + private static final AISHistoryTrack defaultInstance = new AISHistoryTrack(true); + + private final UnknownFieldSet unknownFields; + + private AISHistoryTrack(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AISHistoryTrack(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AISHistoryTrack getDefaultInstance() { + return defaultInstance; + } + + public AISHistoryTrack getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AISHistoryTrack(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int rawValue; + NAVI_STATUS value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + this.bitField0_ |= 0x1; + this.sog_ = input.readFloat(); + break; + case 17: + this.bitField0_ |= 0x2; + this.lon_ = input.readDouble(); + break; + case 25: + this.bitField0_ |= 0x4; + this.lat_ = input.readDouble(); + break; + case 37: + this.bitField0_ |= 0x8; + this.cog_ = input.readFloat(); + break; + case 45: + this.bitField0_ |= 0x10; + this.heading_ = input.readFloat(); + break; + case 48: + rawValue = input.readEnum(); + value = NAVI_STATUS.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(6, rawValue); + break; + } + this.bitField0_ |= 0x20; + this.navStatus_ = value; + break; + case 61: + this.bitField0_ |= 0x40; + this.rot_ = input.readFloat(); + break; + case 64: + this.bitField0_ |= 0x80; + this.uTC_ = input.readUInt64(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(AISHistoryTrack.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AISHistoryTrack parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AISHistoryTrack(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int SOG_FIELD_NUMBER = 1; + + private float sog_; + + public static final int LON_FIELD_NUMBER = 2; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 3; + + private double lat_; + + public static final int COG_FIELD_NUMBER = 4; + + private float cog_; + + public static final int HEADING_FIELD_NUMBER = 5; + + private float heading_; + + public static final int NAVSTATUS_FIELD_NUMBER = 6; + + private NAVI_STATUS navStatus_; + + public static final int ROT_FIELD_NUMBER = 7; + + private float rot_; + + public static final int UTC_FIELD_NUMBER = 8; + + private long uTC_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x1) == 1); + } + + public float getSog() { + return this.sog_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getCog() { + return this.cog_; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getHeading() { + return this.heading_; + } + + public boolean hasNavStatus() { + return ((this.bitField0_ & 0x20) == 32); + } + + public NAVI_STATUS getNavStatus() { + return this.navStatus_; + } + + public boolean hasRot() { + return ((this.bitField0_ & 0x40) == 64); + } + + public float getRot() { + return this.rot_; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x80) == 128); + } + + public long getUTC() { + return this.uTC_; + } + + private void initFields() { + this.sog_ = 0.0F; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.cog_ = 0.0F; + this.heading_ = 0.0F; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.rot_ = 0.0F; + this.uTC_ = 0L; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasSog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasHeading()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasNavStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRot()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeFloat(1, this.sog_); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + output.writeDouble(3, this.lat_); + if ((this.bitField0_ & 0x8) == 8) + output.writeFloat(4, this.cog_); + if ((this.bitField0_ & 0x10) == 16) + output.writeFloat(5, this.heading_); + if ((this.bitField0_ & 0x20) == 32) + output.writeEnum(6, this.navStatus_.getNumber()); + if ((this.bitField0_ & 0x40) == 64) + output.writeFloat(7, this.rot_); + if ((this.bitField0_ & 0x80) == 128) + output.writeUInt64(8, this.uTC_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeFloatSize(1, this.sog_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeDoubleSize(3, this.lat_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeFloatSize(4, this.cog_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeFloatSize(5, this.heading_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeEnumSize(6, this.navStatus_.getNumber()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeFloatSize(7, this.rot_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeUInt64Size(8, this.uTC_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AISHistoryTrack parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AISHistoryTrack)PARSER.parseFrom(data); + } + + public static AISHistoryTrack parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISHistoryTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISHistoryTrack parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AISHistoryTrack)PARSER.parseFrom(data); + } + + public static AISHistoryTrack parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISHistoryTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISHistoryTrack parseFrom(InputStream input) throws IOException { + return (AISHistoryTrack)PARSER.parseFrom(input); + } + + public static AISHistoryTrack parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISHistoryTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static AISHistoryTrack parseDelimitedFrom(InputStream input) throws IOException { + return (AISHistoryTrack)PARSER.parseDelimitedFrom(input); + } + + public static AISHistoryTrack parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISHistoryTrack)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AISHistoryTrack parseFrom(CodedInputStream input) throws IOException { + return (AISHistoryTrack)PARSER.parseFrom(input); + } + + public static AISHistoryTrack parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISHistoryTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AISHistoryTrack prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AISHistoryTrackOrBuilder { + private int bitField0_; + + private float sog_; + + private double lon_; + + private double lat_; + + private float cog_; + + private float heading_; + + private NAVI_STATUS navStatus_; + + private float rot_; + + private long uTC_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(AISHistoryTrack.class, Builder.class); + } + + private Builder() { + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = AISHistoryTrack.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.sog_ = 0.0F; + this.bitField0_ &= 0xFFFFFFFE; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFB; + this.cog_ = 0.0F; + this.bitField0_ &= 0xFFFFFFF7; + this.heading_ = 0.0F; + this.bitField0_ &= 0xFFFFFFEF; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.bitField0_ &= 0xFFFFFFDF; + this.rot_ = 0.0F; + this.bitField0_ &= 0xFFFFFFBF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFF7F; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTrack_descriptor; + } + + public AISHistoryTrack getDefaultInstanceForType() { + return AISHistoryTrack.getDefaultInstance(); + } + + public AISHistoryTrack build() { + AISHistoryTrack result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AISHistoryTrack buildPartial() { + AISHistoryTrack result = new AISHistoryTrack(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.sog_ = this.sog_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.cog_ = this.cog_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.heading_ = this.heading_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.navStatus_ = this.navStatus_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.rot_ = this.rot_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.uTC_ = this.uTC_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AISHistoryTrack) + return mergeFrom((AISHistoryTrack)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AISHistoryTrack other) { + if (other == AISHistoryTrack.getDefaultInstance()) + return this; + if (other.hasSog()) + setSog(other.getSog()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasCog()) + setCog(other.getCog()); + if (other.hasHeading()) + setHeading(other.getHeading()); + if (other.hasNavStatus()) + setNavStatus(other.getNavStatus()); + if (other.hasRot()) + setRot(other.getRot()); + if (other.hasUTC()) + setUTC(other.getUTC()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasSog()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasCog()) + return false; + if (!hasHeading()) + return false; + if (!hasNavStatus()) + return false; + if (!hasRot()) + return false; + if (!hasUTC()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AISHistoryTrack parsedMessage = null; + try { + parsedMessage = (AISHistoryTrack) AISHistoryTrack.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AISHistoryTrack)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x1) == 1); + } + + public float getSog() { + return this.sog_; + } + + public Builder setSog(float value) { + this.bitField0_ |= 0x1; + this.sog_ = value; + onChanged(); + return this; + } + + public Builder clearSog() { + this.bitField0_ &= 0xFFFFFFFE; + this.sog_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x2; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFFD; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x4; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFFFB; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getCog() { + return this.cog_; + } + + public Builder setCog(float value) { + this.bitField0_ |= 0x8; + this.cog_ = value; + onChanged(); + return this; + } + + public Builder clearCog() { + this.bitField0_ &= 0xFFFFFFF7; + this.cog_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getHeading() { + return this.heading_; + } + + public Builder setHeading(float value) { + this.bitField0_ |= 0x10; + this.heading_ = value; + onChanged(); + return this; + } + + public Builder clearHeading() { + this.bitField0_ &= 0xFFFFFFEF; + this.heading_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasNavStatus() { + return ((this.bitField0_ & 0x20) == 32); + } + + public NAVI_STATUS getNavStatus() { + return this.navStatus_; + } + + public Builder setNavStatus(NAVI_STATUS value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.navStatus_ = value; + onChanged(); + return this; + } + + public Builder clearNavStatus() { + this.bitField0_ &= 0xFFFFFFDF; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + onChanged(); + return this; + } + + public boolean hasRot() { + return ((this.bitField0_ & 0x40) == 64); + } + + public float getRot() { + return this.rot_; + } + + public Builder setRot(float value) { + this.bitField0_ |= 0x40; + this.rot_ = value; + onChanged(); + return this; + } + + public Builder clearRot() { + this.bitField0_ &= 0xFFFFFFBF; + this.rot_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x80) == 128); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x80; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFF7F; + this.uTC_ = 0L; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AISHistoryTracks extends GeneratedMessage implements AISHistoryTracksOrBuilder { + private static final AISHistoryTracks defaultInstance = new AISHistoryTracks(true); + + private final UnknownFieldSet unknownFields; + + private AISHistoryTracks(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AISHistoryTracks(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AISHistoryTracks getDefaultInstance() { + return defaultInstance; + } + + public AISHistoryTracks getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AISHistoryTracks(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 226: + if ((mutable_bitField0_ & 0x1) != 1) { + this.tracks_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.tracks_.add((AISHistoryTrack)input.readMessage(AISHistoryTrack.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.tracks_ = Collections.unmodifiableList(this.tracks_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTracks_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTracks_fieldAccessorTable.ensureFieldAccessorsInitialized(AISHistoryTracks.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AISHistoryTracks parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AISHistoryTracks(input, extensionRegistry); + } + }; + + public static final int TRACKS_FIELD_NUMBER = 28; + + private List tracks_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getTracksList() { + return this.tracks_; + } + + public List getTracksOrBuilderList() { + return (List)this.tracks_; + } + + public int getTracksCount() { + return this.tracks_.size(); + } + + public AISHistoryTrack getTracks(int index) { + return this.tracks_.get(index); + } + + public AISHistoryTrackOrBuilder getTracksOrBuilder(int index) { + return this.tracks_.get(index); + } + + private void initFields() { + this.tracks_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getTracksCount(); i++) { + if (!getTracks(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.tracks_.size(); i++) + output.writeMessage(28, (MessageLite)this.tracks_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.tracks_.size(); i++) + size += CodedOutputStream.computeMessageSize(28, (MessageLite)this.tracks_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AISHistoryTracks parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AISHistoryTracks)PARSER.parseFrom(data); + } + + public static AISHistoryTracks parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISHistoryTracks)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISHistoryTracks parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AISHistoryTracks)PARSER.parseFrom(data); + } + + public static AISHistoryTracks parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISHistoryTracks)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISHistoryTracks parseFrom(InputStream input) throws IOException { + return (AISHistoryTracks)PARSER.parseFrom(input); + } + + public static AISHistoryTracks parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISHistoryTracks)PARSER.parseFrom(input, extensionRegistry); + } + + public static AISHistoryTracks parseDelimitedFrom(InputStream input) throws IOException { + return (AISHistoryTracks)PARSER.parseDelimitedFrom(input); + } + + public static AISHistoryTracks parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISHistoryTracks)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AISHistoryTracks parseFrom(CodedInputStream input) throws IOException { + return (AISHistoryTracks)PARSER.parseFrom(input); + } + + public static AISHistoryTracks parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISHistoryTracks)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AISHistoryTracks prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AISHistoryTracksOrBuilder { + private int bitField0_; + + private List tracks_; + + private RepeatedFieldBuilder tracksBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTracks_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTracks_fieldAccessorTable.ensureFieldAccessorsInitialized(AISHistoryTracks.class, Builder.class); + } + + private Builder() { + this.tracks_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.tracks_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (AISHistoryTracks.alwaysUseFieldBuilders) + getTracksFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.tracksBuilder_ == null) { + this.tracks_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.tracksBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISHistoryTracks_descriptor; + } + + public AISHistoryTracks getDefaultInstanceForType() { + return AISHistoryTracks.getDefaultInstance(); + } + + public AISHistoryTracks build() { + AISHistoryTracks result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AISHistoryTracks buildPartial() { + AISHistoryTracks result = new AISHistoryTracks(this); + int from_bitField0_ = this.bitField0_; + if (this.tracksBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.tracks_ = Collections.unmodifiableList(this.tracks_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.tracks_ = this.tracks_; + } else { + result.tracks_ = this.tracksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AISHistoryTracks) + return mergeFrom((AISHistoryTracks)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AISHistoryTracks other) { + if (other == AISHistoryTracks.getDefaultInstance()) + return this; + if (this.tracksBuilder_ == null) { + if (!other.tracks_.isEmpty()) { + if (this.tracks_.isEmpty()) { + this.tracks_ = other.tracks_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureTracksIsMutable(); + this.tracks_.addAll(other.tracks_); + } + onChanged(); + } + } else if (!other.tracks_.isEmpty()) { + if (this.tracksBuilder_.isEmpty()) { + this.tracksBuilder_.dispose(); + this.tracksBuilder_ = null; + this.tracks_ = other.tracks_; + this.bitField0_ &= 0xFFFFFFFE; + this.tracksBuilder_ = AISHistoryTracks.alwaysUseFieldBuilders ? getTracksFieldBuilder() : null; + } else { + this.tracksBuilder_.addAllMessages(other.tracks_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTracksCount(); i++) { + if (!getTracks(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AISHistoryTracks parsedMessage = null; + try { + parsedMessage = (AISHistoryTracks) AISHistoryTracks.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AISHistoryTracks)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureTracksIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.tracks_ = new ArrayList(this.tracks_); + this.bitField0_ |= 0x1; + } + } + + public List getTracksList() { + if (this.tracksBuilder_ == null) + return Collections.unmodifiableList(this.tracks_); + return this.tracksBuilder_.getMessageList(); + } + + public int getTracksCount() { + if (this.tracksBuilder_ == null) + return this.tracks_.size(); + return this.tracksBuilder_.getCount(); + } + + public AISHistoryTrack getTracks(int index) { + if (this.tracksBuilder_ == null) + return this.tracks_.get(index); + return (AISHistoryTrack)this.tracksBuilder_.getMessage(index); + } + + public Builder setTracks(int index, AISHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.set(index, value); + onChanged(); + } else { + this.tracksBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setTracks(int index, AISHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.set(index, builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addTracks(AISHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.add(value); + onChanged(); + } else { + this.tracksBuilder_.addMessage(value); + } + return this; + } + + public Builder addTracks(int index, AISHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.add(index, value); + onChanged(); + } else { + this.tracksBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addTracks(AISHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.add(builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addTracks(int index, AISHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.add(index, builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllTracks(Iterable values) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.tracks_); + onChanged(); + } else { + this.tracksBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearTracks() { + if (this.tracksBuilder_ == null) { + this.tracks_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.tracksBuilder_.clear(); + } + return this; + } + + public Builder removeTracks(int index) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.remove(index); + onChanged(); + } else { + this.tracksBuilder_.remove(index); + } + return this; + } + + public AISHistoryTrack.Builder getTracksBuilder(int index) { + return (AISHistoryTrack.Builder)getTracksFieldBuilder().getBuilder(index); + } + + public AISHistoryTrackOrBuilder getTracksOrBuilder(int index) { + if (this.tracksBuilder_ == null) + return this.tracks_.get(index); + return (AISHistoryTrackOrBuilder)this.tracksBuilder_.getMessageOrBuilder(index); + } + + public List getTracksOrBuilderList() { + if (this.tracksBuilder_ != null) + return this.tracksBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.tracks_); + } + + public AISHistoryTrack.Builder addTracksBuilder() { + return (AISHistoryTrack.Builder)getTracksFieldBuilder().addBuilder(AISHistoryTrack.getDefaultInstance()); + } + + public AISHistoryTrack.Builder addTracksBuilder(int index) { + return (AISHistoryTrack.Builder)getTracksFieldBuilder().addBuilder(index, AISHistoryTrack.getDefaultInstance()); + } + + public List getTracksBuilderList() { + return getTracksFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getTracksFieldBuilder() { + if (this.tracksBuilder_ == null) { + this.tracksBuilder_ = new RepeatedFieldBuilder(this.tracks_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.tracks_ = null; + } + return this.tracksBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AISVesselData extends GeneratedMessage implements AISVesselDataOrBuilder { + private static final AISVesselData defaultInstance = new AISVesselData(true); + + private final UnknownFieldSet unknownFields; + + private AISVesselData(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AISVesselData(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AISVesselData getDefaultInstance() { + return defaultInstance; + } + + public AISVesselData getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AISVesselData(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString byteString2; + int i; + ByteString byteString1; + int rawValue; + ByteString bs; + AISHistoryTracks.Builder subBuilder; + NAVI_STATUS nAVI_STATUS; + EPFD value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + byteString2 = input.readBytes(); + this.bitField0_ |= 0x1; + this.id_ = byteString2; + break; + case 16: + this.bitField0_ |= 0x2; + this.mmsi_ = input.readInt32(); + break; + case 26: + byteString2 = input.readBytes(); + this.bitField0_ |= 0x4; + this.shiptype_ = byteString2; + break; + case 32: + i = input.readEnum(); + nAVI_STATUS = NAVI_STATUS.valueOf(String.valueOf(i)); + if (nAVI_STATUS == null) { + unknownFields.mergeVarintField(4, i); + break; + } + this.bitField0_ |= 0x8; + this.navStatus_ = nAVI_STATUS; + break; + case 45: + this.bitField0_ |= 0x10; + this.rot_ = input.readFloat(); + break; + case 53: + this.bitField0_ |= 0x20; + this.sog_ = input.readFloat(); + break; + case 57: + this.bitField0_ |= 0x40; + this.lon_ = input.readDouble(); + break; + case 65: + this.bitField0_ |= 0x80; + this.lat_ = input.readDouble(); + break; + case 77: + this.bitField0_ |= 0x100; + this.cog_ = input.readFloat(); + break; + case 85: + this.bitField0_ |= 0x200; + this.heading_ = input.readFloat(); + break; + case 88: + this.bitField0_ |= 0x400; + this.imo_ = input.readInt32(); + break; + case 98: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x800; + this.callSign_ = byteString1; + break; + case 106: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x1000; + this.shipName_ = byteString1; + break; + case 112: + this.bitField0_ |= 0x2000; + this.cargoType_ = input.readInt32(); + break; + case 122: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x4000; + this.country_ = byteString1; + break; + case 130: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x8000; + this.vendorID_ = byteString1; + break; + case 136: + this.bitField0_ |= 0x10000; + this.shipLength_ = input.readInt32(); + break; + case 144: + this.bitField0_ |= 0x20000; + this.shipWidth_ = input.readInt32(); + break; + case 152: + this.bitField0_ |= 0x40000; + this.toBow_ = input.readInt32(); + break; + case 160: + this.bitField0_ |= 0x80000; + this.toStern_ = input.readInt32(); + break; + case 168: + this.bitField0_ |= 0x100000; + this.toPort_ = input.readInt32(); + break; + case 176: + this.bitField0_ |= 0x200000; + this.toStarboard_ = input.readInt32(); + break; + case 184: + rawValue = input.readEnum(); + value = EPFD.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(23, rawValue); + break; + } + this.bitField0_ |= 0x400000; + this.fixType_ = value; + break; + case 194: + bs = input.readBytes(); + this.bitField0_ |= 0x800000; + this.eta_ = bs; + break; + case 205: + this.bitField0_ |= 0x1000000; + this.draught_ = input.readFloat(); + break; + case 210: + bs = input.readBytes(); + this.bitField0_ |= 0x2000000; + this.dest_ = bs; + break; + case 216: + this.bitField0_ |= 0x4000000; + this.uTC_ = input.readUInt64(); + break; + case 226: + subBuilder = null; + if ((this.bitField0_ & 0x8000000) == 134217728) + subBuilder = this.tracks_.toBuilder(); + this.tracks_ = (AISHistoryTracks)input.readMessage(AISHistoryTracks.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.tracks_); + this.tracks_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x8000000; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselData_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselData_fieldAccessorTable.ensureFieldAccessorsInitialized(AISVesselData.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AISVesselData parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AISVesselData(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int ID_FIELD_NUMBER = 1; + + private Object id_; + + public static final int MMSI_FIELD_NUMBER = 2; + + private int mmsi_; + + public static final int SHIPTYPE_FIELD_NUMBER = 3; + + private Object shiptype_; + + public static final int NAVSTATUS_FIELD_NUMBER = 4; + + private NAVI_STATUS navStatus_; + + public static final int ROT_FIELD_NUMBER = 5; + + private float rot_; + + public static final int SOG_FIELD_NUMBER = 6; + + private float sog_; + + public static final int LON_FIELD_NUMBER = 7; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 8; + + private double lat_; + + public static final int COG_FIELD_NUMBER = 9; + + private float cog_; + + public static final int HEADING_FIELD_NUMBER = 10; + + private float heading_; + + public static final int IMO_FIELD_NUMBER = 11; + + private int imo_; + + public static final int CALLSIGN_FIELD_NUMBER = 12; + + private Object callSign_; + + public static final int SHIPNAME_FIELD_NUMBER = 13; + + private Object shipName_; + + public static final int CARGOTYPE_FIELD_NUMBER = 14; + + private int cargoType_; + + public static final int COUNTRY_FIELD_NUMBER = 15; + + private Object country_; + + public static final int VENDORID_FIELD_NUMBER = 16; + + private Object vendorID_; + + public static final int SHIPLENGTH_FIELD_NUMBER = 17; + + private int shipLength_; + + public static final int SHIPWIDTH_FIELD_NUMBER = 18; + + private int shipWidth_; + + public static final int TOBOW_FIELD_NUMBER = 19; + + private int toBow_; + + public static final int TOSTERN_FIELD_NUMBER = 20; + + private int toStern_; + + public static final int TOPORT_FIELD_NUMBER = 21; + + private int toPort_; + + public static final int TOSTARBOARD_FIELD_NUMBER = 22; + + private int toStarboard_; + + public static final int FIXTYPE_FIELD_NUMBER = 23; + + private EPFD fixType_; + + public static final int ETA_FIELD_NUMBER = 24; + + private Object eta_; + + public static final int DRAUGHT_FIELD_NUMBER = 25; + + private float draught_; + + public static final int DEST_FIELD_NUMBER = 26; + + private Object dest_; + + public static final int UTC_FIELD_NUMBER = 27; + + private long uTC_; + + public static final int TRACKS_FIELD_NUMBER = 28; + + private AISHistoryTracks tracks_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getId() { + Object ref = this.id_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.id_ = s; + return s; + } + + public ByteString getIdBytes() { + Object ref = this.id_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.id_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMmsi() { + return this.mmsi_; + } + + public boolean hasShiptype() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getShiptype() { + Object ref = this.shiptype_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shiptype_ = s; + return s; + } + + public ByteString getShiptypeBytes() { + Object ref = this.shiptype_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shiptype_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasNavStatus() { + return ((this.bitField0_ & 0x8) == 8); + } + + public NAVI_STATUS getNavStatus() { + return this.navStatus_; + } + + public boolean hasRot() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getRot() { + return this.rot_; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getSog() { + return this.sog_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x100) == 256); + } + + public float getCog() { + return this.cog_; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x200) == 512); + } + + public float getHeading() { + return this.heading_; + } + + public boolean hasImo() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getImo() { + return this.imo_; + } + + public boolean hasCallSign() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getCallSign() { + Object ref = this.callSign_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.callSign_ = s; + return s; + } + + public ByteString getCallSignBytes() { + Object ref = this.callSign_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.callSign_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasShipName() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getShipName() { + Object ref = this.shipName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shipName_ = s; + return s; + } + + public ByteString getShipNameBytes() { + Object ref = this.shipName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shipName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCargoType() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public int getCargoType() { + return this.cargoType_; + } + + public boolean hasCountry() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public String getCountry() { + Object ref = this.country_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.country_ = s; + return s; + } + + public ByteString getCountryBytes() { + Object ref = this.country_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.country_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasVendorID() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getVendorID() { + Object ref = this.vendorID_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.vendorID_ = s; + return s; + } + + public ByteString getVendorIDBytes() { + Object ref = this.vendorID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.vendorID_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasShipLength() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public int getShipLength() { + return this.shipLength_; + } + + public boolean hasShipWidth() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public int getShipWidth() { + return this.shipWidth_; + } + + public boolean hasToBow() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getToBow() { + return this.toBow_; + } + + public boolean hasToStern() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public int getToStern() { + return this.toStern_; + } + + public boolean hasToPort() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getToPort() { + return this.toPort_; + } + + public boolean hasToStarboard() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public int getToStarboard() { + return this.toStarboard_; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public boolean hasEta() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public String getEta() { + Object ref = this.eta_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.eta_ = s; + return s; + } + + public ByteString getEtaBytes() { + Object ref = this.eta_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.eta_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDraught() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public float getDraught() { + return this.draught_; + } + + public boolean hasDest() { + return ((this.bitField0_ & 0x2000000) == 33554432); + } + + public String getDest() { + Object ref = this.dest_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dest_ = s; + return s; + } + + public ByteString getDestBytes() { + Object ref = this.dest_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dest_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x4000000) == 67108864); + } + + public long getUTC() { + return this.uTC_; + } + + public boolean hasTracks() { + return ((this.bitField0_ & 0x8000000) == 134217728); + } + + public AISHistoryTracks getTracks() { + return this.tracks_; + } + + public AISHistoryTracksOrBuilder getTracksOrBuilder() { + return this.tracks_; + } + + private void initFields() { + this.id_ = ""; + this.mmsi_ = 0; + this.shiptype_ = ""; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.rot_ = 0.0F; + this.sog_ = 0.0F; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.cog_ = 0.0F; + this.heading_ = 0.0F; + this.imo_ = 0; + this.callSign_ = ""; + this.shipName_ = ""; + this.cargoType_ = 0; + this.country_ = ""; + this.vendorID_ = ""; + this.shipLength_ = 0; + this.shipWidth_ = 0; + this.toBow_ = 0; + this.toStern_ = 0; + this.toPort_ = 0; + this.toStarboard_ = 0; + this.fixType_ = EPFD.UNDEFINED; + this.eta_ = ""; + this.draught_ = 0.0F; + this.dest_ = ""; + this.uTC_ = 0L; + this.tracks_ = AISHistoryTracks.getDefaultInstance(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMmsi()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShiptype()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasNavStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRot()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasHeading()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasImo()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCallSign()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCargoType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCountry()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasVendorID()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipLength()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShipWidth()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToBow()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToStern()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToStarboard()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasEta()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDraught()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDest()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasTracks() && !getTracks().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.mmsi_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getShiptypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeEnum(4, this.navStatus_.getNumber()); + if ((this.bitField0_ & 0x10) == 16) + output.writeFloat(5, this.rot_); + if ((this.bitField0_ & 0x20) == 32) + output.writeFloat(6, this.sog_); + if ((this.bitField0_ & 0x40) == 64) + output.writeDouble(7, this.lon_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.lat_); + if ((this.bitField0_ & 0x100) == 256) + output.writeFloat(9, this.cog_); + if ((this.bitField0_ & 0x200) == 512) + output.writeFloat(10, this.heading_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeInt32(11, this.imo_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeBytes(12, getCallSignBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeBytes(13, getShipNameBytes()); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeInt32(14, this.cargoType_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeBytes(15, getCountryBytes()); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeBytes(16, getVendorIDBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeInt32(17, this.shipLength_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeInt32(18, this.shipWidth_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeInt32(19, this.toBow_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeInt32(20, this.toStern_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeInt32(21, this.toPort_); + if ((this.bitField0_ & 0x200000) == 2097152) + output.writeInt32(22, this.toStarboard_); + if ((this.bitField0_ & 0x400000) == 4194304) + output.writeEnum(23, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x800000) == 8388608) + output.writeBytes(24, getEtaBytes()); + if ((this.bitField0_ & 0x1000000) == 16777216) + output.writeFloat(25, this.draught_); + if ((this.bitField0_ & 0x2000000) == 33554432) + output.writeBytes(26, getDestBytes()); + if ((this.bitField0_ & 0x4000000) == 67108864) + output.writeUInt64(27, this.uTC_); + if ((this.bitField0_ & 0x8000000) == 134217728) + output.writeMessage(28, (MessageLite)this.tracks_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.mmsi_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getShiptypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeEnumSize(4, this.navStatus_.getNumber()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeFloatSize(5, this.rot_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeFloatSize(6, this.sog_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeDoubleSize(7, this.lon_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.lat_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeFloatSize(9, this.cog_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeFloatSize(10, this.heading_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeInt32Size(11, this.imo_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeBytesSize(12, getCallSignBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeBytesSize(13, getShipNameBytes()); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeInt32Size(14, this.cargoType_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeBytesSize(15, getCountryBytes()); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeBytesSize(16, getVendorIDBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeInt32Size(17, this.shipLength_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeInt32Size(18, this.shipWidth_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeInt32Size(19, this.toBow_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeInt32Size(20, this.toStern_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeInt32Size(21, this.toPort_); + if ((this.bitField0_ & 0x200000) == 2097152) + size += CodedOutputStream.computeInt32Size(22, this.toStarboard_); + if ((this.bitField0_ & 0x400000) == 4194304) + size += CodedOutputStream.computeEnumSize(23, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x800000) == 8388608) + size += CodedOutputStream.computeBytesSize(24, getEtaBytes()); + if ((this.bitField0_ & 0x1000000) == 16777216) + size += CodedOutputStream.computeFloatSize(25, this.draught_); + if ((this.bitField0_ & 0x2000000) == 33554432) + size += CodedOutputStream.computeBytesSize(26, getDestBytes()); + if ((this.bitField0_ & 0x4000000) == 67108864) + size += CodedOutputStream.computeUInt64Size(27, this.uTC_); + if ((this.bitField0_ & 0x8000000) == 134217728) + size += CodedOutputStream.computeMessageSize(28, (MessageLite)this.tracks_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AISVesselData parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AISVesselData)PARSER.parseFrom(data); + } + + public static AISVesselData parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISVesselData)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISVesselData parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AISVesselData)PARSER.parseFrom(data); + } + + public static AISVesselData parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISVesselData)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISVesselData parseFrom(InputStream input) throws IOException { + return (AISVesselData)PARSER.parseFrom(input); + } + + public static AISVesselData parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISVesselData)PARSER.parseFrom(input, extensionRegistry); + } + + public static AISVesselData parseDelimitedFrom(InputStream input) throws IOException { + return (AISVesselData)PARSER.parseDelimitedFrom(input); + } + + public static AISVesselData parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISVesselData)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AISVesselData parseFrom(CodedInputStream input) throws IOException { + return (AISVesselData)PARSER.parseFrom(input); + } + + public static AISVesselData parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISVesselData)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AISVesselData prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AISVesselDataOrBuilder { + private int bitField0_; + + private Object id_; + + private int mmsi_; + + private Object shiptype_; + + private NAVI_STATUS navStatus_; + + private float rot_; + + private float sog_; + + private double lon_; + + private double lat_; + + private float cog_; + + private float heading_; + + private int imo_; + + private Object callSign_; + + private Object shipName_; + + private int cargoType_; + + private Object country_; + + private Object vendorID_; + + private int shipLength_; + + private int shipWidth_; + + private int toBow_; + + private int toStern_; + + private int toPort_; + + private int toStarboard_; + + private EPFD fixType_; + + private Object eta_; + + private float draught_; + + private Object dest_; + + private long uTC_; + + private AISHistoryTracks tracks_; + + private SingleFieldBuilder tracksBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselData_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselData_fieldAccessorTable.ensureFieldAccessorsInitialized(AISVesselData.class, Builder.class); + } + + private Builder() { + this.id_ = ""; + this.shiptype_ = ""; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.callSign_ = ""; + this.shipName_ = ""; + this.country_ = ""; + this.vendorID_ = ""; + this.fixType_ = EPFD.UNDEFINED; + this.eta_ = ""; + this.dest_ = ""; + this.tracks_ = AISHistoryTracks.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.id_ = ""; + this.shiptype_ = ""; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.callSign_ = ""; + this.shipName_ = ""; + this.country_ = ""; + this.vendorID_ = ""; + this.fixType_ = EPFD.UNDEFINED; + this.eta_ = ""; + this.dest_ = ""; + this.tracks_ = AISHistoryTracks.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (AISVesselData.alwaysUseFieldBuilders) + getTracksFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.id_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.mmsi_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.shiptype_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.bitField0_ &= 0xFFFFFFF7; + this.rot_ = 0.0F; + this.bitField0_ &= 0xFFFFFFEF; + this.sog_ = 0.0F; + this.bitField0_ &= 0xFFFFFFDF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFBF; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.cog_ = 0.0F; + this.bitField0_ &= 0xFFFFFEFF; + this.heading_ = 0.0F; + this.bitField0_ &= 0xFFFFFDFF; + this.imo_ = 0; + this.bitField0_ &= 0xFFFFFBFF; + this.callSign_ = ""; + this.bitField0_ &= 0xFFFFF7FF; + this.shipName_ = ""; + this.bitField0_ &= 0xFFFFEFFF; + this.cargoType_ = 0; + this.bitField0_ &= 0xFFFFDFFF; + this.country_ = ""; + this.bitField0_ &= 0xFFFFBFFF; + this.vendorID_ = ""; + this.bitField0_ &= 0xFFFF7FFF; + this.shipLength_ = 0; + this.bitField0_ &= 0xFFFEFFFF; + this.shipWidth_ = 0; + this.bitField0_ &= 0xFFFDFFFF; + this.toBow_ = 0; + this.bitField0_ &= 0xFFFBFFFF; + this.toStern_ = 0; + this.bitField0_ &= 0xFFF7FFFF; + this.toPort_ = 0; + this.bitField0_ &= 0xFFEFFFFF; + this.toStarboard_ = 0; + this.bitField0_ &= 0xFFDFFFFF; + this.fixType_ = EPFD.UNDEFINED; + this.bitField0_ &= 0xFFBFFFFF; + this.eta_ = ""; + this.bitField0_ &= 0xFF7FFFFF; + this.draught_ = 0.0F; + this.bitField0_ &= 0xFEFFFFFF; + this.dest_ = ""; + this.bitField0_ &= 0xFDFFFFFF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFBFFFFFF; + if (this.tracksBuilder_ == null) { + this.tracks_ = AISHistoryTracks.getDefaultInstance(); + } else { + this.tracksBuilder_.clear(); + } + this.bitField0_ &= 0xF7FFFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselData_descriptor; + } + + public AISVesselData getDefaultInstanceForType() { + return AISVesselData.getDefaultInstance(); + } + + public AISVesselData build() { + AISVesselData result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AISVesselData buildPartial() { + AISVesselData result = new AISVesselData(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.id_ = this.id_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.mmsi_ = this.mmsi_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.shiptype_ = this.shiptype_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.navStatus_ = this.navStatus_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.rot_ = this.rot_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.sog_ = this.sog_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.cog_ = this.cog_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.heading_ = this.heading_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.imo_ = this.imo_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.callSign_ = this.callSign_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.shipName_ = this.shipName_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.cargoType_ = this.cargoType_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.country_ = this.country_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.vendorID_ = this.vendorID_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.shipLength_ = this.shipLength_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.shipWidth_ = this.shipWidth_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.toBow_ = this.toBow_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.toStern_ = this.toStern_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.toPort_ = this.toPort_; + if ((from_bitField0_ & 0x200000) == 2097152) + to_bitField0_ |= 0x200000; + result.toStarboard_ = this.toStarboard_; + if ((from_bitField0_ & 0x400000) == 4194304) + to_bitField0_ |= 0x400000; + result.fixType_ = this.fixType_; + if ((from_bitField0_ & 0x800000) == 8388608) + to_bitField0_ |= 0x800000; + result.eta_ = this.eta_; + if ((from_bitField0_ & 0x1000000) == 16777216) + to_bitField0_ |= 0x1000000; + result.draught_ = this.draught_; + if ((from_bitField0_ & 0x2000000) == 33554432) + to_bitField0_ |= 0x2000000; + result.dest_ = this.dest_; + if ((from_bitField0_ & 0x4000000) == 67108864) + to_bitField0_ |= 0x4000000; + result.uTC_ = this.uTC_; + if ((from_bitField0_ & 0x8000000) == 134217728) + to_bitField0_ |= 0x8000000; + if (this.tracksBuilder_ == null) { + result.tracks_ = this.tracks_; + } else { + result.tracks_ = (AISHistoryTracks)this.tracksBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AISVesselData) + return mergeFrom((AISVesselData)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AISVesselData other) { + if (other == AISVesselData.getDefaultInstance()) + return this; + if (other.hasId()) { + this.bitField0_ |= 0x1; + this.id_ = other.id_; + onChanged(); + } + if (other.hasMmsi()) + setMmsi(other.getMmsi()); + if (other.hasShiptype()) { + this.bitField0_ |= 0x4; + this.shiptype_ = other.shiptype_; + onChanged(); + } + if (other.hasNavStatus()) + setNavStatus(other.getNavStatus()); + if (other.hasRot()) + setRot(other.getRot()); + if (other.hasSog()) + setSog(other.getSog()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasCog()) + setCog(other.getCog()); + if (other.hasHeading()) + setHeading(other.getHeading()); + if (other.hasImo()) + setImo(other.getImo()); + if (other.hasCallSign()) { + this.bitField0_ |= 0x800; + this.callSign_ = other.callSign_; + onChanged(); + } + if (other.hasShipName()) { + this.bitField0_ |= 0x1000; + this.shipName_ = other.shipName_; + onChanged(); + } + if (other.hasCargoType()) + setCargoType(other.getCargoType()); + if (other.hasCountry()) { + this.bitField0_ |= 0x4000; + this.country_ = other.country_; + onChanged(); + } + if (other.hasVendorID()) { + this.bitField0_ |= 0x8000; + this.vendorID_ = other.vendorID_; + onChanged(); + } + if (other.hasShipLength()) + setShipLength(other.getShipLength()); + if (other.hasShipWidth()) + setShipWidth(other.getShipWidth()); + if (other.hasToBow()) + setToBow(other.getToBow()); + if (other.hasToStern()) + setToStern(other.getToStern()); + if (other.hasToPort()) + setToPort(other.getToPort()); + if (other.hasToStarboard()) + setToStarboard(other.getToStarboard()); + if (other.hasFixType()) + setFixType(other.getFixType()); + if (other.hasEta()) { + this.bitField0_ |= 0x800000; + this.eta_ = other.eta_; + onChanged(); + } + if (other.hasDraught()) + setDraught(other.getDraught()); + if (other.hasDest()) { + this.bitField0_ |= 0x2000000; + this.dest_ = other.dest_; + onChanged(); + } + if (other.hasUTC()) + setUTC(other.getUTC()); + if (other.hasTracks()) + mergeTracks(other.getTracks()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasId()) + return false; + if (!hasMmsi()) + return false; + if (!hasShiptype()) + return false; + if (!hasNavStatus()) + return false; + if (!hasRot()) + return false; + if (!hasSog()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasCog()) + return false; + if (!hasHeading()) + return false; + if (!hasImo()) + return false; + if (!hasCallSign()) + return false; + if (!hasShipName()) + return false; + if (!hasCargoType()) + return false; + if (!hasCountry()) + return false; + if (!hasVendorID()) + return false; + if (!hasShipLength()) + return false; + if (!hasShipWidth()) + return false; + if (!hasToBow()) + return false; + if (!hasToStern()) + return false; + if (!hasToPort()) + return false; + if (!hasToStarboard()) + return false; + if (!hasEta()) + return false; + if (!hasDraught()) + return false; + if (!hasDest()) + return false; + if (!hasUTC()) + return false; + if (hasTracks() && !getTracks().isInitialized()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AISVesselData parsedMessage = null; + try { + parsedMessage = (AISVesselData) AISVesselData.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AISVesselData)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getId() { + Object ref = this.id_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.id_ = s; + return s; + } + return (String)ref; + } + + public ByteString getIdBytes() { + Object ref = this.id_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.id_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public Builder clearId() { + this.bitField0_ &= 0xFFFFFFFE; + this.id_ = AISVesselData.getDefaultInstance().getId(); + onChanged(); + return this; + } + + public Builder setIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMmsi() { + return this.mmsi_; + } + + public Builder setMmsi(int value) { + this.bitField0_ |= 0x2; + this.mmsi_ = value; + onChanged(); + return this; + } + + public Builder clearMmsi() { + this.bitField0_ &= 0xFFFFFFFD; + this.mmsi_ = 0; + onChanged(); + return this; + } + + public boolean hasShiptype() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getShiptype() { + Object ref = this.shiptype_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shiptype_ = s; + return s; + } + return (String)ref; + } + + public ByteString getShiptypeBytes() { + Object ref = this.shiptype_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shiptype_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setShiptype(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.shiptype_ = value; + onChanged(); + return this; + } + + public Builder clearShiptype() { + this.bitField0_ &= 0xFFFFFFFB; + this.shiptype_ = AISVesselData.getDefaultInstance().getShiptype(); + onChanged(); + return this; + } + + public Builder setShiptypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.shiptype_ = value; + onChanged(); + return this; + } + + public boolean hasNavStatus() { + return ((this.bitField0_ & 0x8) == 8); + } + + public NAVI_STATUS getNavStatus() { + return this.navStatus_; + } + + public Builder setNavStatus(NAVI_STATUS value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.navStatus_ = value; + onChanged(); + return this; + } + + public Builder clearNavStatus() { + this.bitField0_ &= 0xFFFFFFF7; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + onChanged(); + return this; + } + + public boolean hasRot() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getRot() { + return this.rot_; + } + + public Builder setRot(float value) { + this.bitField0_ |= 0x10; + this.rot_ = value; + onChanged(); + return this; + } + + public Builder clearRot() { + this.bitField0_ &= 0xFFFFFFEF; + this.rot_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getSog() { + return this.sog_; + } + + public Builder setSog(float value) { + this.bitField0_ |= 0x20; + this.sog_ = value; + onChanged(); + return this; + } + + public Builder clearSog() { + this.bitField0_ &= 0xFFFFFFDF; + this.sog_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x40; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFBF; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x80; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFF7F; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x100) == 256); + } + + public float getCog() { + return this.cog_; + } + + public Builder setCog(float value) { + this.bitField0_ |= 0x100; + this.cog_ = value; + onChanged(); + return this; + } + + public Builder clearCog() { + this.bitField0_ &= 0xFFFFFEFF; + this.cog_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x200) == 512); + } + + public float getHeading() { + return this.heading_; + } + + public Builder setHeading(float value) { + this.bitField0_ |= 0x200; + this.heading_ = value; + onChanged(); + return this; + } + + public Builder clearHeading() { + this.bitField0_ &= 0xFFFFFDFF; + this.heading_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasImo() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getImo() { + return this.imo_; + } + + public Builder setImo(int value) { + this.bitField0_ |= 0x400; + this.imo_ = value; + onChanged(); + return this; + } + + public Builder clearImo() { + this.bitField0_ &= 0xFFFFFBFF; + this.imo_ = 0; + onChanged(); + return this; + } + + public boolean hasCallSign() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getCallSign() { + Object ref = this.callSign_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.callSign_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCallSignBytes() { + Object ref = this.callSign_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.callSign_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCallSign(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.callSign_ = value; + onChanged(); + return this; + } + + public Builder clearCallSign() { + this.bitField0_ &= 0xFFFFF7FF; + this.callSign_ = AISVesselData.getDefaultInstance().getCallSign(); + onChanged(); + return this; + } + + public Builder setCallSignBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.callSign_ = value; + onChanged(); + return this; + } + + public boolean hasShipName() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getShipName() { + Object ref = this.shipName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shipName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getShipNameBytes() { + Object ref = this.shipName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shipName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setShipName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.shipName_ = value; + onChanged(); + return this; + } + + public Builder clearShipName() { + this.bitField0_ &= 0xFFFFEFFF; + this.shipName_ = AISVesselData.getDefaultInstance().getShipName(); + onChanged(); + return this; + } + + public Builder setShipNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.shipName_ = value; + onChanged(); + return this; + } + + public boolean hasCargoType() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public int getCargoType() { + return this.cargoType_; + } + + public Builder setCargoType(int value) { + this.bitField0_ |= 0x2000; + this.cargoType_ = value; + onChanged(); + return this; + } + + public Builder clearCargoType() { + this.bitField0_ &= 0xFFFFDFFF; + this.cargoType_ = 0; + onChanged(); + return this; + } + + public boolean hasCountry() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public String getCountry() { + Object ref = this.country_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.country_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCountryBytes() { + Object ref = this.country_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.country_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCountry(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4000; + this.country_ = value; + onChanged(); + return this; + } + + public Builder clearCountry() { + this.bitField0_ &= 0xFFFFBFFF; + this.country_ = AISVesselData.getDefaultInstance().getCountry(); + onChanged(); + return this; + } + + public Builder setCountryBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4000; + this.country_ = value; + onChanged(); + return this; + } + + public boolean hasVendorID() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getVendorID() { + Object ref = this.vendorID_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.vendorID_ = s; + return s; + } + return (String)ref; + } + + public ByteString getVendorIDBytes() { + Object ref = this.vendorID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.vendorID_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setVendorID(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.vendorID_ = value; + onChanged(); + return this; + } + + public Builder clearVendorID() { + this.bitField0_ &= 0xFFFF7FFF; + this.vendorID_ = AISVesselData.getDefaultInstance().getVendorID(); + onChanged(); + return this; + } + + public Builder setVendorIDBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.vendorID_ = value; + onChanged(); + return this; + } + + public boolean hasShipLength() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public int getShipLength() { + return this.shipLength_; + } + + public Builder setShipLength(int value) { + this.bitField0_ |= 0x10000; + this.shipLength_ = value; + onChanged(); + return this; + } + + public Builder clearShipLength() { + this.bitField0_ &= 0xFFFEFFFF; + this.shipLength_ = 0; + onChanged(); + return this; + } + + public boolean hasShipWidth() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public int getShipWidth() { + return this.shipWidth_; + } + + public Builder setShipWidth(int value) { + this.bitField0_ |= 0x20000; + this.shipWidth_ = value; + onChanged(); + return this; + } + + public Builder clearShipWidth() { + this.bitField0_ &= 0xFFFDFFFF; + this.shipWidth_ = 0; + onChanged(); + return this; + } + + public boolean hasToBow() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getToBow() { + return this.toBow_; + } + + public Builder setToBow(int value) { + this.bitField0_ |= 0x40000; + this.toBow_ = value; + onChanged(); + return this; + } + + public Builder clearToBow() { + this.bitField0_ &= 0xFFFBFFFF; + this.toBow_ = 0; + onChanged(); + return this; + } + + public boolean hasToStern() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public int getToStern() { + return this.toStern_; + } + + public Builder setToStern(int value) { + this.bitField0_ |= 0x80000; + this.toStern_ = value; + onChanged(); + return this; + } + + public Builder clearToStern() { + this.bitField0_ &= 0xFFF7FFFF; + this.toStern_ = 0; + onChanged(); + return this; + } + + public boolean hasToPort() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getToPort() { + return this.toPort_; + } + + public Builder setToPort(int value) { + this.bitField0_ |= 0x100000; + this.toPort_ = value; + onChanged(); + return this; + } + + public Builder clearToPort() { + this.bitField0_ &= 0xFFEFFFFF; + this.toPort_ = 0; + onChanged(); + return this; + } + + public boolean hasToStarboard() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public int getToStarboard() { + return this.toStarboard_; + } + + public Builder setToStarboard(int value) { + this.bitField0_ |= 0x200000; + this.toStarboard_ = value; + onChanged(); + return this; + } + + public Builder clearToStarboard() { + this.bitField0_ &= 0xFFDFFFFF; + this.toStarboard_ = 0; + onChanged(); + return this; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public Builder setFixType(EPFD value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400000; + this.fixType_ = value; + onChanged(); + return this; + } + + public Builder clearFixType() { + this.bitField0_ &= 0xFFBFFFFF; + this.fixType_ = EPFD.UNDEFINED; + onChanged(); + return this; + } + + public boolean hasEta() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public String getEta() { + Object ref = this.eta_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.eta_ = s; + return s; + } + return (String)ref; + } + + public ByteString getEtaBytes() { + Object ref = this.eta_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.eta_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setEta(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800000; + this.eta_ = value; + onChanged(); + return this; + } + + public Builder clearEta() { + this.bitField0_ &= 0xFF7FFFFF; + this.eta_ = AISVesselData.getDefaultInstance().getEta(); + onChanged(); + return this; + } + + public Builder setEtaBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800000; + this.eta_ = value; + onChanged(); + return this; + } + + public boolean hasDraught() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public float getDraught() { + return this.draught_; + } + + public Builder setDraught(float value) { + this.bitField0_ |= 0x1000000; + this.draught_ = value; + onChanged(); + return this; + } + + public Builder clearDraught() { + this.bitField0_ &= 0xFEFFFFFF; + this.draught_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasDest() { + return ((this.bitField0_ & 0x2000000) == 33554432); + } + + public String getDest() { + Object ref = this.dest_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dest_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDestBytes() { + Object ref = this.dest_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dest_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDest(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2000000; + this.dest_ = value; + onChanged(); + return this; + } + + public Builder clearDest() { + this.bitField0_ &= 0xFDFFFFFF; + this.dest_ = AISVesselData.getDefaultInstance().getDest(); + onChanged(); + return this; + } + + public Builder setDestBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2000000; + this.dest_ = value; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x4000000) == 67108864); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x4000000; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFBFFFFFF; + this.uTC_ = 0L; + onChanged(); + return this; + } + + public boolean hasTracks() { + return ((this.bitField0_ & 0x8000000) == 134217728); + } + + public AISHistoryTracks getTracks() { + if (this.tracksBuilder_ == null) + return this.tracks_; + return (AISHistoryTracks)this.tracksBuilder_.getMessage(); + } + + public Builder setTracks(AISHistoryTracks value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.tracks_ = value; + onChanged(); + } else { + this.tracksBuilder_.setMessage(value); + } + this.bitField0_ |= 0x8000000; + return this; + } + + public Builder setTracks(AISHistoryTracks.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + this.tracks_ = builderForValue.build(); + onChanged(); + } else { + this.tracksBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x8000000; + return this; + } + + public Builder mergeTracks(AISHistoryTracks value) { + if (this.tracksBuilder_ == null) { + if ((this.bitField0_ & 0x8000000) == 134217728 && this.tracks_ != AISHistoryTracks.getDefaultInstance()) { + this.tracks_ = AISHistoryTracks.newBuilder(this.tracks_).mergeFrom(value).buildPartial(); + } else { + this.tracks_ = value; + } + onChanged(); + } else { + this.tracksBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x8000000; + return this; + } + + public Builder clearTracks() { + if (this.tracksBuilder_ == null) { + this.tracks_ = AISHistoryTracks.getDefaultInstance(); + onChanged(); + } else { + this.tracksBuilder_.clear(); + } + this.bitField0_ &= 0xF7FFFFFF; + return this; + } + + public AISHistoryTracks.Builder getTracksBuilder() { + this.bitField0_ |= 0x8000000; + onChanged(); + return (AISHistoryTracks.Builder)getTracksFieldBuilder().getBuilder(); + } + + public AISHistoryTracksOrBuilder getTracksOrBuilder() { + if (this.tracksBuilder_ != null) + return (AISHistoryTracksOrBuilder)this.tracksBuilder_.getMessageOrBuilder(); + return this.tracks_; + } + + private SingleFieldBuilder getTracksFieldBuilder() { + if (this.tracksBuilder_ == null) { + this.tracksBuilder_ = new SingleFieldBuilder(getTracks(), getParentForChildren(), isClean()); + this.tracks_ = null; + } + return this.tracksBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AISVesselDataList extends GeneratedMessage implements AISVesselDataListOrBuilder { + private static final AISVesselDataList defaultInstance = new AISVesselDataList(true); + + private final UnknownFieldSet unknownFields; + + private AISVesselDataList(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AISVesselDataList(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AISVesselDataList getDefaultInstance() { + return defaultInstance; + } + + public AISVesselDataList getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AISVesselDataList(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.aisData_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.aisData_.add((AISVesselData)input.readMessage(AISVesselData.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.aisData_ = Collections.unmodifiableList(this.aisData_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselDataList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselDataList_fieldAccessorTable.ensureFieldAccessorsInitialized(AISVesselDataList.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AISVesselDataList parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AISVesselDataList(input, extensionRegistry); + } + }; + + public static final int AISDATA_FIELD_NUMBER = 1; + + private List aisData_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getAisDataList() { + return this.aisData_; + } + + public List getAisDataOrBuilderList() { + return (List)this.aisData_; + } + + public int getAisDataCount() { + return this.aisData_.size(); + } + + public AISVesselData getAisData(int index) { + return this.aisData_.get(index); + } + + public AISVesselDataOrBuilder getAisDataOrBuilder(int index) { + return this.aisData_.get(index); + } + + private void initFields() { + this.aisData_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getAisDataCount(); i++) { + if (!getAisData(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.aisData_.size(); i++) + output.writeMessage(1, (MessageLite)this.aisData_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.aisData_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.aisData_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AISVesselDataList parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AISVesselDataList)PARSER.parseFrom(data); + } + + public static AISVesselDataList parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISVesselDataList)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISVesselDataList parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AISVesselDataList)PARSER.parseFrom(data); + } + + public static AISVesselDataList parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISVesselDataList)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISVesselDataList parseFrom(InputStream input) throws IOException { + return (AISVesselDataList)PARSER.parseFrom(input); + } + + public static AISVesselDataList parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISVesselDataList)PARSER.parseFrom(input, extensionRegistry); + } + + public static AISVesselDataList parseDelimitedFrom(InputStream input) throws IOException { + return (AISVesselDataList)PARSER.parseDelimitedFrom(input); + } + + public static AISVesselDataList parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISVesselDataList)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AISVesselDataList parseFrom(CodedInputStream input) throws IOException { + return (AISVesselDataList)PARSER.parseFrom(input); + } + + public static AISVesselDataList parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISVesselDataList)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AISVesselDataList prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AISVesselDataListOrBuilder { + private int bitField0_; + + private List aisData_; + + private RepeatedFieldBuilder aisDataBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselDataList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselDataList_fieldAccessorTable.ensureFieldAccessorsInitialized(AISVesselDataList.class, Builder.class); + } + + private Builder() { + this.aisData_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.aisData_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (AISVesselDataList.alwaysUseFieldBuilders) + getAisDataFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.aisDataBuilder_ == null) { + this.aisData_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.aisDataBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISVesselDataList_descriptor; + } + + public AISVesselDataList getDefaultInstanceForType() { + return AISVesselDataList.getDefaultInstance(); + } + + public AISVesselDataList build() { + AISVesselDataList result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AISVesselDataList buildPartial() { + AISVesselDataList result = new AISVesselDataList(this); + int from_bitField0_ = this.bitField0_; + if (this.aisDataBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.aisData_ = Collections.unmodifiableList(this.aisData_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.aisData_ = this.aisData_; + } else { + result.aisData_ = this.aisDataBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AISVesselDataList) + return mergeFrom((AISVesselDataList)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AISVesselDataList other) { + if (other == AISVesselDataList.getDefaultInstance()) + return this; + if (this.aisDataBuilder_ == null) { + if (!other.aisData_.isEmpty()) { + if (this.aisData_.isEmpty()) { + this.aisData_ = other.aisData_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureAisDataIsMutable(); + this.aisData_.addAll(other.aisData_); + } + onChanged(); + } + } else if (!other.aisData_.isEmpty()) { + if (this.aisDataBuilder_.isEmpty()) { + this.aisDataBuilder_.dispose(); + this.aisDataBuilder_ = null; + this.aisData_ = other.aisData_; + this.bitField0_ &= 0xFFFFFFFE; + this.aisDataBuilder_ = AISVesselDataList.alwaysUseFieldBuilders ? getAisDataFieldBuilder() : null; + } else { + this.aisDataBuilder_.addAllMessages(other.aisData_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getAisDataCount(); i++) { + if (!getAisData(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AISVesselDataList parsedMessage = null; + try { + parsedMessage = (AISVesselDataList) AISVesselDataList.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AISVesselDataList)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureAisDataIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.aisData_ = new ArrayList(this.aisData_); + this.bitField0_ |= 0x1; + } + } + + public List getAisDataList() { + if (this.aisDataBuilder_ == null) + return Collections.unmodifiableList(this.aisData_); + return this.aisDataBuilder_.getMessageList(); + } + + public int getAisDataCount() { + if (this.aisDataBuilder_ == null) + return this.aisData_.size(); + return this.aisDataBuilder_.getCount(); + } + + public AISVesselData getAisData(int index) { + if (this.aisDataBuilder_ == null) + return this.aisData_.get(index); + return (AISVesselData)this.aisDataBuilder_.getMessage(index); + } + + public Builder setAisData(int index, AISVesselData value) { + if (this.aisDataBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureAisDataIsMutable(); + this.aisData_.set(index, value); + onChanged(); + } else { + this.aisDataBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setAisData(int index, AISVesselData.Builder builderForValue) { + if (this.aisDataBuilder_ == null) { + ensureAisDataIsMutable(); + this.aisData_.set(index, builderForValue.build()); + onChanged(); + } else { + this.aisDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAisData(AISVesselData value) { + if (this.aisDataBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureAisDataIsMutable(); + this.aisData_.add(value); + onChanged(); + } else { + this.aisDataBuilder_.addMessage(value); + } + return this; + } + + public Builder addAisData(int index, AISVesselData value) { + if (this.aisDataBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureAisDataIsMutable(); + this.aisData_.add(index, value); + onChanged(); + } else { + this.aisDataBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addAisData(AISVesselData.Builder builderForValue) { + if (this.aisDataBuilder_ == null) { + ensureAisDataIsMutable(); + this.aisData_.add(builderForValue.build()); + onChanged(); + } else { + this.aisDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addAisData(int index, AISVesselData.Builder builderForValue) { + if (this.aisDataBuilder_ == null) { + ensureAisDataIsMutable(); + this.aisData_.add(index, builderForValue.build()); + onChanged(); + } else { + this.aisDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllAisData(Iterable values) { + if (this.aisDataBuilder_ == null) { + ensureAisDataIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.aisData_); + onChanged(); + } else { + this.aisDataBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearAisData() { + if (this.aisDataBuilder_ == null) { + this.aisData_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.aisDataBuilder_.clear(); + } + return this; + } + + public Builder removeAisData(int index) { + if (this.aisDataBuilder_ == null) { + ensureAisDataIsMutable(); + this.aisData_.remove(index); + onChanged(); + } else { + this.aisDataBuilder_.remove(index); + } + return this; + } + + public AISVesselData.Builder getAisDataBuilder(int index) { + return (AISVesselData.Builder)getAisDataFieldBuilder().getBuilder(index); + } + + public AISVesselDataOrBuilder getAisDataOrBuilder(int index) { + if (this.aisDataBuilder_ == null) + return this.aisData_.get(index); + return (AISVesselDataOrBuilder)this.aisDataBuilder_.getMessageOrBuilder(index); + } + + public List getAisDataOrBuilderList() { + if (this.aisDataBuilder_ != null) + return this.aisDataBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.aisData_); + } + + public AISVesselData.Builder addAisDataBuilder() { + return (AISVesselData.Builder)getAisDataFieldBuilder().addBuilder(AISVesselData.getDefaultInstance()); + } + + public AISVesselData.Builder addAisDataBuilder(int index) { + return (AISVesselData.Builder)getAisDataFieldBuilder().addBuilder(index, AISVesselData.getDefaultInstance()); + } + + public List getAisDataBuilderList() { + return getAisDataFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getAisDataFieldBuilder() { + if (this.aisDataBuilder_ == null) { + this.aisDataBuilder_ = new RepeatedFieldBuilder(this.aisData_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.aisData_ = null; + } + return this.aisDataBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class VesselTrack extends GeneratedMessage implements VesselTrackOrBuilder { + private static final VesselTrack defaultInstance = new VesselTrack(true); + + private final UnknownFieldSet unknownFields; + + private VesselTrack(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private VesselTrack(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static VesselTrack getDefaultInstance() { + return defaultInstance; + } + + public VesselTrack getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VesselTrack(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int rawValue; + NAVI_STATUS value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.id_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.mmsi_ = input.readInt32(); + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.shiptype_ = bs; + break; + case 32: + rawValue = input.readEnum(); + value = NAVI_STATUS.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + break; + } + this.bitField0_ |= 0x8; + this.navStatus_ = value; + break; + case 45: + this.bitField0_ |= 0x10; + this.rot_ = input.readFloat(); + break; + case 53: + this.bitField0_ |= 0x20; + this.sog_ = input.readFloat(); + break; + case 57: + this.bitField0_ |= 0x40; + this.lon_ = input.readDouble(); + break; + case 65: + this.bitField0_ |= 0x80; + this.lat_ = input.readDouble(); + break; + case 77: + this.bitField0_ |= 0x100; + this.cog_ = input.readFloat(); + break; + case 85: + this.bitField0_ |= 0x200; + this.heading_ = input.readFloat(); + break; + case 88: + this.bitField0_ |= 0x400; + this.uTC_ = input.readUInt64(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(VesselTrack.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public VesselTrack parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new VesselTrack(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int ID_FIELD_NUMBER = 1; + + private Object id_; + + public static final int MMSI_FIELD_NUMBER = 2; + + private int mmsi_; + + public static final int SHIPTYPE_FIELD_NUMBER = 3; + + private Object shiptype_; + + public static final int NAVSTATUS_FIELD_NUMBER = 4; + + private NAVI_STATUS navStatus_; + + public static final int ROT_FIELD_NUMBER = 5; + + private float rot_; + + public static final int SOG_FIELD_NUMBER = 6; + + private float sog_; + + public static final int LON_FIELD_NUMBER = 7; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 8; + + private double lat_; + + public static final int COG_FIELD_NUMBER = 9; + + private float cog_; + + public static final int HEADING_FIELD_NUMBER = 10; + + private float heading_; + + public static final int UTC_FIELD_NUMBER = 11; + + private long uTC_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getId() { + Object ref = this.id_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.id_ = s; + return s; + } + + public ByteString getIdBytes() { + Object ref = this.id_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.id_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMmsi() { + return this.mmsi_; + } + + public boolean hasShiptype() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getShiptype() { + Object ref = this.shiptype_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shiptype_ = s; + return s; + } + + public ByteString getShiptypeBytes() { + Object ref = this.shiptype_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shiptype_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasNavStatus() { + return ((this.bitField0_ & 0x8) == 8); + } + + public NAVI_STATUS getNavStatus() { + return this.navStatus_; + } + + public boolean hasRot() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getRot() { + return this.rot_; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getSog() { + return this.sog_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x100) == 256); + } + + public float getCog() { + return this.cog_; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x200) == 512); + } + + public float getHeading() { + return this.heading_; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public long getUTC() { + return this.uTC_; + } + + private void initFields() { + this.id_ = ""; + this.mmsi_ = 0; + this.shiptype_ = ""; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.rot_ = 0.0F; + this.sog_ = 0.0F; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.cog_ = 0.0F; + this.heading_ = 0.0F; + this.uTC_ = 0L; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMmsi()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasShiptype()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasNavStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRot()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasHeading()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.mmsi_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getShiptypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeEnum(4, this.navStatus_.getNumber()); + if ((this.bitField0_ & 0x10) == 16) + output.writeFloat(5, this.rot_); + if ((this.bitField0_ & 0x20) == 32) + output.writeFloat(6, this.sog_); + if ((this.bitField0_ & 0x40) == 64) + output.writeDouble(7, this.lon_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.lat_); + if ((this.bitField0_ & 0x100) == 256) + output.writeFloat(9, this.cog_); + if ((this.bitField0_ & 0x200) == 512) + output.writeFloat(10, this.heading_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeUInt64(11, this.uTC_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.mmsi_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getShiptypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeEnumSize(4, this.navStatus_.getNumber()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeFloatSize(5, this.rot_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeFloatSize(6, this.sog_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeDoubleSize(7, this.lon_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.lat_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeFloatSize(9, this.cog_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeFloatSize(10, this.heading_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeUInt64Size(11, this.uTC_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static VesselTrack parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (VesselTrack)PARSER.parseFrom(data); + } + + public static VesselTrack parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VesselTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static VesselTrack parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (VesselTrack)PARSER.parseFrom(data); + } + + public static VesselTrack parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VesselTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static VesselTrack parseFrom(InputStream input) throws IOException { + return (VesselTrack)PARSER.parseFrom(input); + } + + public static VesselTrack parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VesselTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static VesselTrack parseDelimitedFrom(InputStream input) throws IOException { + return (VesselTrack)PARSER.parseDelimitedFrom(input); + } + + public static VesselTrack parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VesselTrack)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static VesselTrack parseFrom(CodedInputStream input) throws IOException { + return (VesselTrack)PARSER.parseFrom(input); + } + + public static VesselTrack parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VesselTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(VesselTrack prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements VesselTrackOrBuilder { + private int bitField0_; + + private Object id_; + + private int mmsi_; + + private Object shiptype_; + + private NAVI_STATUS navStatus_; + + private float rot_; + + private float sog_; + + private double lon_; + + private double lat_; + + private float cog_; + + private float heading_; + + private long uTC_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(VesselTrack.class, Builder.class); + } + + private Builder() { + this.id_ = ""; + this.shiptype_ = ""; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.id_ = ""; + this.shiptype_ = ""; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = VesselTrack.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.id_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.mmsi_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.shiptype_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + this.bitField0_ &= 0xFFFFFFF7; + this.rot_ = 0.0F; + this.bitField0_ &= 0xFFFFFFEF; + this.sog_ = 0.0F; + this.bitField0_ &= 0xFFFFFFDF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFBF; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.cog_ = 0.0F; + this.bitField0_ &= 0xFFFFFEFF; + this.heading_ = 0.0F; + this.bitField0_ &= 0xFFFFFDFF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFBFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_VesselTrack_descriptor; + } + + public VesselTrack getDefaultInstanceForType() { + return VesselTrack.getDefaultInstance(); + } + + public VesselTrack build() { + VesselTrack result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public VesselTrack buildPartial() { + VesselTrack result = new VesselTrack(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.id_ = this.id_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.mmsi_ = this.mmsi_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.shiptype_ = this.shiptype_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.navStatus_ = this.navStatus_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.rot_ = this.rot_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.sog_ = this.sog_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.cog_ = this.cog_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.heading_ = this.heading_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.uTC_ = this.uTC_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof VesselTrack) + return mergeFrom((VesselTrack)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(VesselTrack other) { + if (other == VesselTrack.getDefaultInstance()) + return this; + if (other.hasId()) { + this.bitField0_ |= 0x1; + this.id_ = other.id_; + onChanged(); + } + if (other.hasMmsi()) + setMmsi(other.getMmsi()); + if (other.hasShiptype()) { + this.bitField0_ |= 0x4; + this.shiptype_ = other.shiptype_; + onChanged(); + } + if (other.hasNavStatus()) + setNavStatus(other.getNavStatus()); + if (other.hasRot()) + setRot(other.getRot()); + if (other.hasSog()) + setSog(other.getSog()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasCog()) + setCog(other.getCog()); + if (other.hasHeading()) + setHeading(other.getHeading()); + if (other.hasUTC()) + setUTC(other.getUTC()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasId()) + return false; + if (!hasMmsi()) + return false; + if (!hasShiptype()) + return false; + if (!hasNavStatus()) + return false; + if (!hasRot()) + return false; + if (!hasSog()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasCog()) + return false; + if (!hasHeading()) + return false; + if (!hasUTC()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + VesselTrack parsedMessage = null; + try { + parsedMessage = (VesselTrack) VesselTrack.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (VesselTrack)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getId() { + Object ref = this.id_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.id_ = s; + return s; + } + return (String)ref; + } + + public ByteString getIdBytes() { + Object ref = this.id_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.id_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public Builder clearId() { + this.bitField0_ &= 0xFFFFFFFE; + this.id_ = VesselTrack.getDefaultInstance().getId(); + onChanged(); + return this; + } + + public Builder setIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMmsi() { + return this.mmsi_; + } + + public Builder setMmsi(int value) { + this.bitField0_ |= 0x2; + this.mmsi_ = value; + onChanged(); + return this; + } + + public Builder clearMmsi() { + this.bitField0_ &= 0xFFFFFFFD; + this.mmsi_ = 0; + onChanged(); + return this; + } + + public boolean hasShiptype() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getShiptype() { + Object ref = this.shiptype_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.shiptype_ = s; + return s; + } + return (String)ref; + } + + public ByteString getShiptypeBytes() { + Object ref = this.shiptype_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.shiptype_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setShiptype(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.shiptype_ = value; + onChanged(); + return this; + } + + public Builder clearShiptype() { + this.bitField0_ &= 0xFFFFFFFB; + this.shiptype_ = VesselTrack.getDefaultInstance().getShiptype(); + onChanged(); + return this; + } + + public Builder setShiptypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.shiptype_ = value; + onChanged(); + return this; + } + + public boolean hasNavStatus() { + return ((this.bitField0_ & 0x8) == 8); + } + + public NAVI_STATUS getNavStatus() { + return this.navStatus_; + } + + public Builder setNavStatus(NAVI_STATUS value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.navStatus_ = value; + onChanged(); + return this; + } + + public Builder clearNavStatus() { + this.bitField0_ &= 0xFFFFFFF7; + this.navStatus_ = NAVI_STATUS.UNDER_WAY_USING_ENGINE; + onChanged(); + return this; + } + + public boolean hasRot() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getRot() { + return this.rot_; + } + + public Builder setRot(float value) { + this.bitField0_ |= 0x10; + this.rot_ = value; + onChanged(); + return this; + } + + public Builder clearRot() { + this.bitField0_ &= 0xFFFFFFEF; + this.rot_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getSog() { + return this.sog_; + } + + public Builder setSog(float value) { + this.bitField0_ |= 0x20; + this.sog_ = value; + onChanged(); + return this; + } + + public Builder clearSog() { + this.bitField0_ &= 0xFFFFFFDF; + this.sog_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x40; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFBF; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x80; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFF7F; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x100) == 256); + } + + public float getCog() { + return this.cog_; + } + + public Builder setCog(float value) { + this.bitField0_ |= 0x100; + this.cog_ = value; + onChanged(); + return this; + } + + public Builder clearCog() { + this.bitField0_ &= 0xFFFFFEFF; + this.cog_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x200) == 512); + } + + public float getHeading() { + return this.heading_; + } + + public Builder setHeading(float value) { + this.bitField0_ |= 0x200; + this.heading_ = value; + onChanged(); + return this; + } + + public Builder clearHeading() { + this.bitField0_ &= 0xFFFFFDFF; + this.heading_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x400; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFBFF; + this.uTC_ = 0L; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class BaseStationReport extends GeneratedMessage implements BaseStationReportOrBuilder { + private static final BaseStationReport defaultInstance = new BaseStationReport(true); + + private final UnknownFieldSet unknownFields; + + private BaseStationReport(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private BaseStationReport(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static BaseStationReport getDefaultInstance() { + return defaultInstance; + } + + public BaseStationReport getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BaseStationReport(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int rawValue; + EPFD value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.id_ = input.readInt32(); + break; + case 16: + this.bitField0_ |= 0x2; + this.repeatIndicator_ = input.readInt32(); + break; + case 24: + this.bitField0_ |= 0x4; + this.mmsi_ = input.readInt32(); + break; + case 32: + this.bitField0_ |= 0x8; + this.year_ = input.readInt32(); + break; + case 40: + this.bitField0_ |= 0x10; + this.month_ = input.readInt32(); + break; + case 48: + this.bitField0_ |= 0x20; + this.day_ = input.readInt32(); + break; + case 56: + this.bitField0_ |= 0x40; + this.hour_ = input.readInt32(); + break; + case 64: + this.bitField0_ |= 0x80; + this.minute_ = input.readInt32(); + break; + case 72: + this.bitField0_ |= 0x100; + this.second_ = input.readInt32(); + break; + case 80: + this.bitField0_ |= 0x200; + this.positionAccuracy_ = input.readInt32(); + break; + case 89: + this.bitField0_ |= 0x400; + this.lon_ = input.readDouble(); + break; + case 97: + this.bitField0_ |= 0x800; + this.lat_ = input.readDouble(); + break; + case 104: + rawValue = input.readEnum(); + value = EPFD.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(13, rawValue); + break; + } + this.bitField0_ |= 0x1000; + this.fixType_ = value; + break; + case 112: + this.bitField0_ |= 0x2000; + this.uTC_ = input.readUInt64(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_BaseStationReport_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_BaseStationReport_fieldAccessorTable.ensureFieldAccessorsInitialized(BaseStationReport.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public BaseStationReport parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new BaseStationReport(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int ID_FIELD_NUMBER = 1; + + private int id_; + + public static final int REPEATINDICATOR_FIELD_NUMBER = 2; + + private int repeatIndicator_; + + public static final int MMSI_FIELD_NUMBER = 3; + + private int mmsi_; + + public static final int YEAR_FIELD_NUMBER = 4; + + private int year_; + + public static final int MONTH_FIELD_NUMBER = 5; + + private int month_; + + public static final int DAY_FIELD_NUMBER = 6; + + private int day_; + + public static final int HOUR_FIELD_NUMBER = 7; + + private int hour_; + + public static final int MINUTE_FIELD_NUMBER = 8; + + private int minute_; + + public static final int SECOND_FIELD_NUMBER = 9; + + private int second_; + + public static final int POSITIONACCURACY_FIELD_NUMBER = 10; + + private int positionAccuracy_; + + public static final int LON_FIELD_NUMBER = 11; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 12; + + private double lat_; + + public static final int FIXTYPE_FIELD_NUMBER = 13; + + private EPFD fixType_; + + public static final int UTC_FIELD_NUMBER = 14; + + private long uTC_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getId() { + return this.id_; + } + + public boolean hasRepeatIndicator() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getRepeatIndicator() { + return this.repeatIndicator_; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getMmsi() { + return this.mmsi_; + } + + public boolean hasYear() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getYear() { + return this.year_; + } + + public boolean hasMonth() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getMonth() { + return this.month_; + } + + public boolean hasDay() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getDay() { + return this.day_; + } + + public boolean hasHour() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getHour() { + return this.hour_; + } + + public boolean hasMinute() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getMinute() { + return this.minute_; + } + + public boolean hasSecond() { + return ((this.bitField0_ & 0x100) == 256); + } + + public int getSecond() { + return this.second_; + } + + public boolean hasPositionAccuracy() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getPositionAccuracy() { + return this.positionAccuracy_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public long getUTC() { + return this.uTC_; + } + + private void initFields() { + this.id_ = 0; + this.repeatIndicator_ = 0; + this.mmsi_ = 0; + this.year_ = 0; + this.month_ = 0; + this.day_ = 0; + this.hour_ = 0; + this.minute_ = 0; + this.second_ = 0; + this.positionAccuracy_ = 0; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.fixType_ = EPFD.UNDEFINED; + this.uTC_ = 0L; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRepeatIndicator()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMmsi()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasYear()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMonth()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDay()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasHour()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMinute()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSecond()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasPositionAccuracy()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasFixType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.id_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.repeatIndicator_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.mmsi_); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.year_); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt32(5, this.month_); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(6, this.day_); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.hour_); + if ((this.bitField0_ & 0x80) == 128) + output.writeInt32(8, this.minute_); + if ((this.bitField0_ & 0x100) == 256) + output.writeInt32(9, this.second_); + if ((this.bitField0_ & 0x200) == 512) + output.writeInt32(10, this.positionAccuracy_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeDouble(11, this.lon_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeDouble(12, this.lat_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeEnum(13, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeUInt64(14, this.uTC_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.id_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.repeatIndicator_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.mmsi_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.year_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt32Size(5, this.month_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(6, this.day_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.hour_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeInt32Size(8, this.minute_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeInt32Size(9, this.second_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeInt32Size(10, this.positionAccuracy_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeDoubleSize(11, this.lon_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeDoubleSize(12, this.lat_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeEnumSize(13, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeUInt64Size(14, this.uTC_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static BaseStationReport parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (BaseStationReport)PARSER.parseFrom(data); + } + + public static BaseStationReport parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (BaseStationReport)PARSER.parseFrom(data, extensionRegistry); + } + + public static BaseStationReport parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (BaseStationReport)PARSER.parseFrom(data); + } + + public static BaseStationReport parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (BaseStationReport)PARSER.parseFrom(data, extensionRegistry); + } + + public static BaseStationReport parseFrom(InputStream input) throws IOException { + return (BaseStationReport)PARSER.parseFrom(input); + } + + public static BaseStationReport parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (BaseStationReport)PARSER.parseFrom(input, extensionRegistry); + } + + public static BaseStationReport parseDelimitedFrom(InputStream input) throws IOException { + return (BaseStationReport)PARSER.parseDelimitedFrom(input); + } + + public static BaseStationReport parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (BaseStationReport)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static BaseStationReport parseFrom(CodedInputStream input) throws IOException { + return (BaseStationReport)PARSER.parseFrom(input); + } + + public static BaseStationReport parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (BaseStationReport)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(BaseStationReport prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements BaseStationReportOrBuilder { + private int bitField0_; + + private int id_; + + private int repeatIndicator_; + + private int mmsi_; + + private int year_; + + private int month_; + + private int day_; + + private int hour_; + + private int minute_; + + private int second_; + + private int positionAccuracy_; + + private double lon_; + + private double lat_; + + private EPFD fixType_; + + private long uTC_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_BaseStationReport_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_BaseStationReport_fieldAccessorTable.ensureFieldAccessorsInitialized(BaseStationReport.class, Builder.class); + } + + private Builder() { + this.fixType_ = EPFD.UNDEFINED; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.fixType_ = EPFD.UNDEFINED; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = BaseStationReport.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.id_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.repeatIndicator_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.mmsi_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.year_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.month_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + this.day_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + this.hour_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.minute_ = 0; + this.bitField0_ &= 0xFFFFFF7F; + this.second_ = 0; + this.bitField0_ &= 0xFFFFFEFF; + this.positionAccuracy_ = 0; + this.bitField0_ &= 0xFFFFFDFF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFBFF; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFF7FF; + this.fixType_ = EPFD.UNDEFINED; + this.bitField0_ &= 0xFFFFEFFF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFDFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_BaseStationReport_descriptor; + } + + public BaseStationReport getDefaultInstanceForType() { + return BaseStationReport.getDefaultInstance(); + } + + public BaseStationReport build() { + BaseStationReport result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public BaseStationReport buildPartial() { + BaseStationReport result = new BaseStationReport(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.id_ = this.id_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.repeatIndicator_ = this.repeatIndicator_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.mmsi_ = this.mmsi_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.year_ = this.year_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.month_ = this.month_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.day_ = this.day_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.hour_ = this.hour_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.minute_ = this.minute_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.second_ = this.second_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.positionAccuracy_ = this.positionAccuracy_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.fixType_ = this.fixType_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.uTC_ = this.uTC_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof BaseStationReport) + return mergeFrom((BaseStationReport)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(BaseStationReport other) { + if (other == BaseStationReport.getDefaultInstance()) + return this; + if (other.hasId()) + setId(other.getId()); + if (other.hasRepeatIndicator()) + setRepeatIndicator(other.getRepeatIndicator()); + if (other.hasMmsi()) + setMmsi(other.getMmsi()); + if (other.hasYear()) + setYear(other.getYear()); + if (other.hasMonth()) + setMonth(other.getMonth()); + if (other.hasDay()) + setDay(other.getDay()); + if (other.hasHour()) + setHour(other.getHour()); + if (other.hasMinute()) + setMinute(other.getMinute()); + if (other.hasSecond()) + setSecond(other.getSecond()); + if (other.hasPositionAccuracy()) + setPositionAccuracy(other.getPositionAccuracy()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasFixType()) + setFixType(other.getFixType()); + if (other.hasUTC()) + setUTC(other.getUTC()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasId()) + return false; + if (!hasRepeatIndicator()) + return false; + if (!hasMmsi()) + return false; + if (!hasYear()) + return false; + if (!hasMonth()) + return false; + if (!hasDay()) + return false; + if (!hasHour()) + return false; + if (!hasMinute()) + return false; + if (!hasSecond()) + return false; + if (!hasPositionAccuracy()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasFixType()) + return false; + if (!hasUTC()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + BaseStationReport parsedMessage = null; + try { + parsedMessage = (BaseStationReport) BaseStationReport.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (BaseStationReport)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getId() { + return this.id_; + } + + public Builder setId(int value) { + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public Builder clearId() { + this.bitField0_ &= 0xFFFFFFFE; + this.id_ = 0; + onChanged(); + return this; + } + + public boolean hasRepeatIndicator() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getRepeatIndicator() { + return this.repeatIndicator_; + } + + public Builder setRepeatIndicator(int value) { + this.bitField0_ |= 0x2; + this.repeatIndicator_ = value; + onChanged(); + return this; + } + + public Builder clearRepeatIndicator() { + this.bitField0_ &= 0xFFFFFFFD; + this.repeatIndicator_ = 0; + onChanged(); + return this; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getMmsi() { + return this.mmsi_; + } + + public Builder setMmsi(int value) { + this.bitField0_ |= 0x4; + this.mmsi_ = value; + onChanged(); + return this; + } + + public Builder clearMmsi() { + this.bitField0_ &= 0xFFFFFFFB; + this.mmsi_ = 0; + onChanged(); + return this; + } + + public boolean hasYear() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getYear() { + return this.year_; + } + + public Builder setYear(int value) { + this.bitField0_ |= 0x8; + this.year_ = value; + onChanged(); + return this; + } + + public Builder clearYear() { + this.bitField0_ &= 0xFFFFFFF7; + this.year_ = 0; + onChanged(); + return this; + } + + public boolean hasMonth() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getMonth() { + return this.month_; + } + + public Builder setMonth(int value) { + this.bitField0_ |= 0x10; + this.month_ = value; + onChanged(); + return this; + } + + public Builder clearMonth() { + this.bitField0_ &= 0xFFFFFFEF; + this.month_ = 0; + onChanged(); + return this; + } + + public boolean hasDay() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getDay() { + return this.day_; + } + + public Builder setDay(int value) { + this.bitField0_ |= 0x20; + this.day_ = value; + onChanged(); + return this; + } + + public Builder clearDay() { + this.bitField0_ &= 0xFFFFFFDF; + this.day_ = 0; + onChanged(); + return this; + } + + public boolean hasHour() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getHour() { + return this.hour_; + } + + public Builder setHour(int value) { + this.bitField0_ |= 0x40; + this.hour_ = value; + onChanged(); + return this; + } + + public Builder clearHour() { + this.bitField0_ &= 0xFFFFFFBF; + this.hour_ = 0; + onChanged(); + return this; + } + + public boolean hasMinute() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getMinute() { + return this.minute_; + } + + public Builder setMinute(int value) { + this.bitField0_ |= 0x80; + this.minute_ = value; + onChanged(); + return this; + } + + public Builder clearMinute() { + this.bitField0_ &= 0xFFFFFF7F; + this.minute_ = 0; + onChanged(); + return this; + } + + public boolean hasSecond() { + return ((this.bitField0_ & 0x100) == 256); + } + + public int getSecond() { + return this.second_; + } + + public Builder setSecond(int value) { + this.bitField0_ |= 0x100; + this.second_ = value; + onChanged(); + return this; + } + + public Builder clearSecond() { + this.bitField0_ &= 0xFFFFFEFF; + this.second_ = 0; + onChanged(); + return this; + } + + public boolean hasPositionAccuracy() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getPositionAccuracy() { + return this.positionAccuracy_; + } + + public Builder setPositionAccuracy(int value) { + this.bitField0_ |= 0x200; + this.positionAccuracy_ = value; + onChanged(); + return this; + } + + public Builder clearPositionAccuracy() { + this.bitField0_ &= 0xFFFFFDFF; + this.positionAccuracy_ = 0; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x400; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFBFF; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x800; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFF7FF; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public Builder setFixType(EPFD value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.fixType_ = value; + onChanged(); + return this; + } + + public Builder clearFixType() { + this.bitField0_ &= 0xFFFFEFFF; + this.fixType_ = EPFD.UNDEFINED; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x2000; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFDFFF; + this.uTC_ = 0L; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AidtoNavigationReport extends GeneratedMessage implements AidtoNavigationReportOrBuilder { + private static final AidtoNavigationReport defaultInstance = new AidtoNavigationReport(true); + + private final UnknownFieldSet unknownFields; + + private AidtoNavigationReport(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AidtoNavigationReport(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AidtoNavigationReport getDefaultInstance() { + return defaultInstance; + } + + public AidtoNavigationReport getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AidtoNavigationReport(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int i; + ByteString bs; + int rawValue; + ATON_TYPE aTON_TYPE; + EPFD value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.id_ = input.readInt32(); + break; + case 16: + this.bitField0_ |= 0x2; + this.repeatIndicator_ = input.readInt32(); + break; + case 24: + this.bitField0_ |= 0x4; + this.mmsi_ = input.readInt32(); + break; + case 32: + i = input.readEnum(); + aTON_TYPE = ATON_TYPE.valueOf(String.valueOf(i)); + if (aTON_TYPE == null) { + unknownFields.mergeVarintField(4, i); + break; + } + this.bitField0_ |= 0x8; + this.atonType_ = aTON_TYPE; + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.name_ = bs; + break; + case 48: + this.bitField0_ |= 0x20; + this.positionAccuracy_ = input.readInt32(); + break; + case 57: + this.bitField0_ |= 0x40; + this.lon_ = input.readDouble(); + break; + case 65: + this.bitField0_ |= 0x80; + this.lat_ = input.readDouble(); + break; + case 72: + this.bitField0_ |= 0x100; + this.toBow_ = input.readInt32(); + break; + case 80: + this.bitField0_ |= 0x200; + this.toStern_ = input.readInt32(); + break; + case 88: + this.bitField0_ |= 0x400; + this.toPort_ = input.readInt32(); + break; + case 96: + this.bitField0_ |= 0x800; + this.toStarboard_ = input.readInt32(); + break; + case 104: + rawValue = input.readEnum(); + value = EPFD.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(13, rawValue); + break; + } + this.bitField0_ |= 0x1000; + this.fixType_ = value; + break; + case 112: + this.bitField0_ |= 0x2000; + this.uTC_ = input.readUInt64(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_fieldAccessorTable.ensureFieldAccessorsInitialized(AidtoNavigationReport.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AidtoNavigationReport parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AidtoNavigationReport(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int ID_FIELD_NUMBER = 1; + + private int id_; + + public static final int REPEATINDICATOR_FIELD_NUMBER = 2; + + private int repeatIndicator_; + + public static final int MMSI_FIELD_NUMBER = 3; + + private int mmsi_; + + public static final int ATONTYPE_FIELD_NUMBER = 4; + + private ATON_TYPE atonType_; + + public static final int NAME_FIELD_NUMBER = 5; + + private Object name_; + + public static final int POSITIONACCURACY_FIELD_NUMBER = 6; + + private int positionAccuracy_; + + public static final int LON_FIELD_NUMBER = 7; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 8; + + private double lat_; + + public static final int TOBOW_FIELD_NUMBER = 9; + + private int toBow_; + + public static final int TOSTERN_FIELD_NUMBER = 10; + + private int toStern_; + + public static final int TOPORT_FIELD_NUMBER = 11; + + private int toPort_; + + public static final int TOSTARBOARD_FIELD_NUMBER = 12; + + private int toStarboard_; + + public static final int FIXTYPE_FIELD_NUMBER = 13; + + private EPFD fixType_; + + public static final int UTC_FIELD_NUMBER = 14; + + private long uTC_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getId() { + return this.id_; + } + + public boolean hasRepeatIndicator() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getRepeatIndicator() { + return this.repeatIndicator_; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getMmsi() { + return this.mmsi_; + } + + public boolean hasAtonType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public ATON_TYPE getAtonType() { + return this.atonType_; + } + + public boolean hasName() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getName() { + Object ref = this.name_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.name_ = s; + return s; + } + + public ByteString getNameBytes() { + Object ref = this.name_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.name_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasPositionAccuracy() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getPositionAccuracy() { + return this.positionAccuracy_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasToBow() { + return ((this.bitField0_ & 0x100) == 256); + } + + public int getToBow() { + return this.toBow_; + } + + public boolean hasToStern() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getToStern() { + return this.toStern_; + } + + public boolean hasToPort() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getToPort() { + return this.toPort_; + } + + public boolean hasToStarboard() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getToStarboard() { + return this.toStarboard_; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public long getUTC() { + return this.uTC_; + } + + private void initFields() { + this.id_ = 0; + this.repeatIndicator_ = 0; + this.mmsi_ = 0; + this.atonType_ = ATON_TYPE.DEFAULT; + this.name_ = ""; + this.positionAccuracy_ = 0; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.toBow_ = 0; + this.toStern_ = 0; + this.toPort_ = 0; + this.toStarboard_ = 0; + this.fixType_ = EPFD.UNDEFINED; + this.uTC_ = 0L; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRepeatIndicator()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMmsi()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAtonType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasPositionAccuracy()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToBow()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToStern()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasToStarboard()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasFixType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.id_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.repeatIndicator_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.mmsi_); + if ((this.bitField0_ & 0x8) == 8) + output.writeEnum(4, this.atonType_.getNumber()); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getNameBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(6, this.positionAccuracy_); + if ((this.bitField0_ & 0x40) == 64) + output.writeDouble(7, this.lon_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.lat_); + if ((this.bitField0_ & 0x100) == 256) + output.writeInt32(9, this.toBow_); + if ((this.bitField0_ & 0x200) == 512) + output.writeInt32(10, this.toStern_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeInt32(11, this.toPort_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeInt32(12, this.toStarboard_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeEnum(13, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeUInt64(14, this.uTC_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.id_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.repeatIndicator_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.mmsi_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeEnumSize(4, this.atonType_.getNumber()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getNameBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(6, this.positionAccuracy_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeDoubleSize(7, this.lon_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.lat_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeInt32Size(9, this.toBow_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeInt32Size(10, this.toStern_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeInt32Size(11, this.toPort_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeInt32Size(12, this.toStarboard_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeEnumSize(13, this.fixType_.getNumber()); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeUInt64Size(14, this.uTC_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AidtoNavigationReport parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AidtoNavigationReport)PARSER.parseFrom(data); + } + + public static AidtoNavigationReport parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AidtoNavigationReport)PARSER.parseFrom(data, extensionRegistry); + } + + public static AidtoNavigationReport parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AidtoNavigationReport)PARSER.parseFrom(data); + } + + public static AidtoNavigationReport parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AidtoNavigationReport)PARSER.parseFrom(data, extensionRegistry); + } + + public static AidtoNavigationReport parseFrom(InputStream input) throws IOException { + return (AidtoNavigationReport)PARSER.parseFrom(input); + } + + public static AidtoNavigationReport parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AidtoNavigationReport)PARSER.parseFrom(input, extensionRegistry); + } + + public static AidtoNavigationReport parseDelimitedFrom(InputStream input) throws IOException { + return (AidtoNavigationReport)PARSER.parseDelimitedFrom(input); + } + + public static AidtoNavigationReport parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AidtoNavigationReport)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AidtoNavigationReport parseFrom(CodedInputStream input) throws IOException { + return (AidtoNavigationReport)PARSER.parseFrom(input); + } + + public static AidtoNavigationReport parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AidtoNavigationReport)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AidtoNavigationReport prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AidtoNavigationReportOrBuilder { + private int bitField0_; + + private int id_; + + private int repeatIndicator_; + + private int mmsi_; + + private ATON_TYPE atonType_; + + private Object name_; + + private int positionAccuracy_; + + private double lon_; + + private double lat_; + + private int toBow_; + + private int toStern_; + + private int toPort_; + + private int toStarboard_; + + private EPFD fixType_; + + private long uTC_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_fieldAccessorTable.ensureFieldAccessorsInitialized(AidtoNavigationReport.class, Builder.class); + } + + private Builder() { + this.atonType_ = ATON_TYPE.DEFAULT; + this.name_ = ""; + this.fixType_ = EPFD.UNDEFINED; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.atonType_ = ATON_TYPE.DEFAULT; + this.name_ = ""; + this.fixType_ = EPFD.UNDEFINED; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = AidtoNavigationReport.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.id_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.repeatIndicator_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.mmsi_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.atonType_ = ATON_TYPE.DEFAULT; + this.bitField0_ &= 0xFFFFFFF7; + this.name_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.positionAccuracy_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFBF; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.toBow_ = 0; + this.bitField0_ &= 0xFFFFFEFF; + this.toStern_ = 0; + this.bitField0_ &= 0xFFFFFDFF; + this.toPort_ = 0; + this.bitField0_ &= 0xFFFFFBFF; + this.toStarboard_ = 0; + this.bitField0_ &= 0xFFFFF7FF; + this.fixType_ = EPFD.UNDEFINED; + this.bitField0_ &= 0xFFFFEFFF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFDFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_descriptor; + } + + public AidtoNavigationReport getDefaultInstanceForType() { + return AidtoNavigationReport.getDefaultInstance(); + } + + public AidtoNavigationReport build() { + AidtoNavigationReport result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AidtoNavigationReport buildPartial() { + AidtoNavigationReport result = new AidtoNavigationReport(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.id_ = this.id_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.repeatIndicator_ = this.repeatIndicator_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.mmsi_ = this.mmsi_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.atonType_ = this.atonType_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.name_ = this.name_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.positionAccuracy_ = this.positionAccuracy_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.toBow_ = this.toBow_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.toStern_ = this.toStern_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.toPort_ = this.toPort_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.toStarboard_ = this.toStarboard_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.fixType_ = this.fixType_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.uTC_ = this.uTC_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AidtoNavigationReport) + return mergeFrom((AidtoNavigationReport)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AidtoNavigationReport other) { + if (other == AidtoNavigationReport.getDefaultInstance()) + return this; + if (other.hasId()) + setId(other.getId()); + if (other.hasRepeatIndicator()) + setRepeatIndicator(other.getRepeatIndicator()); + if (other.hasMmsi()) + setMmsi(other.getMmsi()); + if (other.hasAtonType()) + setAtonType(other.getAtonType()); + if (other.hasName()) { + this.bitField0_ |= 0x10; + this.name_ = other.name_; + onChanged(); + } + if (other.hasPositionAccuracy()) + setPositionAccuracy(other.getPositionAccuracy()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasToBow()) + setToBow(other.getToBow()); + if (other.hasToStern()) + setToStern(other.getToStern()); + if (other.hasToPort()) + setToPort(other.getToPort()); + if (other.hasToStarboard()) + setToStarboard(other.getToStarboard()); + if (other.hasFixType()) + setFixType(other.getFixType()); + if (other.hasUTC()) + setUTC(other.getUTC()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasId()) + return false; + if (!hasRepeatIndicator()) + return false; + if (!hasMmsi()) + return false; + if (!hasAtonType()) + return false; + if (!hasName()) + return false; + if (!hasPositionAccuracy()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasToBow()) + return false; + if (!hasToStern()) + return false; + if (!hasToPort()) + return false; + if (!hasToStarboard()) + return false; + if (!hasFixType()) + return false; + if (!hasUTC()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AidtoNavigationReport parsedMessage = null; + try { + parsedMessage = (AidtoNavigationReport) AidtoNavigationReport.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AidtoNavigationReport)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getId() { + return this.id_; + } + + public Builder setId(int value) { + this.bitField0_ |= 0x1; + this.id_ = value; + onChanged(); + return this; + } + + public Builder clearId() { + this.bitField0_ &= 0xFFFFFFFE; + this.id_ = 0; + onChanged(); + return this; + } + + public boolean hasRepeatIndicator() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getRepeatIndicator() { + return this.repeatIndicator_; + } + + public Builder setRepeatIndicator(int value) { + this.bitField0_ |= 0x2; + this.repeatIndicator_ = value; + onChanged(); + return this; + } + + public Builder clearRepeatIndicator() { + this.bitField0_ &= 0xFFFFFFFD; + this.repeatIndicator_ = 0; + onChanged(); + return this; + } + + public boolean hasMmsi() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getMmsi() { + return this.mmsi_; + } + + public Builder setMmsi(int value) { + this.bitField0_ |= 0x4; + this.mmsi_ = value; + onChanged(); + return this; + } + + public Builder clearMmsi() { + this.bitField0_ &= 0xFFFFFFFB; + this.mmsi_ = 0; + onChanged(); + return this; + } + + public boolean hasAtonType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public ATON_TYPE getAtonType() { + return this.atonType_; + } + + public Builder setAtonType(ATON_TYPE value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.atonType_ = value; + onChanged(); + return this; + } + + public Builder clearAtonType() { + this.bitField0_ &= 0xFFFFFFF7; + this.atonType_ = ATON_TYPE.DEFAULT; + onChanged(); + return this; + } + + public boolean hasName() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getName() { + Object ref = this.name_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.name_ = s; + return s; + } + return (String)ref; + } + + public ByteString getNameBytes() { + Object ref = this.name_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.name_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.name_ = value; + onChanged(); + return this; + } + + public Builder clearName() { + this.bitField0_ &= 0xFFFFFFEF; + this.name_ = AidtoNavigationReport.getDefaultInstance().getName(); + onChanged(); + return this; + } + + public Builder setNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.name_ = value; + onChanged(); + return this; + } + + public boolean hasPositionAccuracy() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getPositionAccuracy() { + return this.positionAccuracy_; + } + + public Builder setPositionAccuracy(int value) { + this.bitField0_ |= 0x20; + this.positionAccuracy_ = value; + onChanged(); + return this; + } + + public Builder clearPositionAccuracy() { + this.bitField0_ &= 0xFFFFFFDF; + this.positionAccuracy_ = 0; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x40; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFBF; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x80; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFF7F; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasToBow() { + return ((this.bitField0_ & 0x100) == 256); + } + + public int getToBow() { + return this.toBow_; + } + + public Builder setToBow(int value) { + this.bitField0_ |= 0x100; + this.toBow_ = value; + onChanged(); + return this; + } + + public Builder clearToBow() { + this.bitField0_ &= 0xFFFFFEFF; + this.toBow_ = 0; + onChanged(); + return this; + } + + public boolean hasToStern() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getToStern() { + return this.toStern_; + } + + public Builder setToStern(int value) { + this.bitField0_ |= 0x200; + this.toStern_ = value; + onChanged(); + return this; + } + + public Builder clearToStern() { + this.bitField0_ &= 0xFFFFFDFF; + this.toStern_ = 0; + onChanged(); + return this; + } + + public boolean hasToPort() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getToPort() { + return this.toPort_; + } + + public Builder setToPort(int value) { + this.bitField0_ |= 0x400; + this.toPort_ = value; + onChanged(); + return this; + } + + public Builder clearToPort() { + this.bitField0_ &= 0xFFFFFBFF; + this.toPort_ = 0; + onChanged(); + return this; + } + + public boolean hasToStarboard() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getToStarboard() { + return this.toStarboard_; + } + + public Builder setToStarboard(int value) { + this.bitField0_ |= 0x800; + this.toStarboard_ = value; + onChanged(); + return this; + } + + public Builder clearToStarboard() { + this.bitField0_ &= 0xFFFFF7FF; + this.toStarboard_ = 0; + onChanged(); + return this; + } + + public boolean hasFixType() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public EPFD getFixType() { + return this.fixType_; + } + + public Builder setFixType(EPFD value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.fixType_ = value; + onChanged(); + return this; + } + + public Builder clearFixType() { + this.bitField0_ &= 0xFFFFEFFF; + this.fixType_ = EPFD.UNDEFINED; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x2000; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFDFFF; + this.uTC_ = 0L; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AIS extends GeneratedMessage implements AISOrBuilder { + private static final AIS defaultInstance = new AIS(true); + + private final UnknownFieldSet unknownFields; + + private AIS(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AIS(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AIS getDefaultInstance() { + return defaultInstance; + } + + public AIS getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AIS(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + VesselInfo.Builder builder2; + VesselTrack.Builder builder1; + BaseStationReport.Builder builder; + AidtoNavigationReport.Builder subBuilder; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.flag_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.sourceId_ = bs; + break; + case 26: + builder2 = null; + if ((this.bitField0_ & 0x4) == 4) + builder2 = this.vesselInfo_.toBuilder(); + this.vesselInfo_ = (VesselInfo)input.readMessage(VesselInfo.PARSER, extensionRegistry); + if (builder2 != null) { + builder2.mergeFrom(this.vesselInfo_); + this.vesselInfo_ = builder2.buildPartial(); + } + this.bitField0_ |= 0x4; + break; + case 34: + builder1 = null; + if ((this.bitField0_ & 0x8) == 8) + builder1 = this.vesselTrack_.toBuilder(); + this.vesselTrack_ = (VesselTrack)input.readMessage(VesselTrack.PARSER, extensionRegistry); + if (builder1 != null) { + builder1.mergeFrom(this.vesselTrack_); + this.vesselTrack_ = builder1.buildPartial(); + } + this.bitField0_ |= 0x8; + break; + case 42: + builder = null; + if ((this.bitField0_ & 0x10) == 16) + builder = this.baseStationReport_.toBuilder(); + this.baseStationReport_ = (BaseStationReport)input.readMessage(BaseStationReport.PARSER, extensionRegistry); + if (builder != null) { + builder.mergeFrom(this.baseStationReport_); + this.baseStationReport_ = builder.buildPartial(); + } + this.bitField0_ |= 0x10; + break; + case 50: + subBuilder = null; + if ((this.bitField0_ & 0x20) == 32) + subBuilder = this.aidtoNavigationReport_.toBuilder(); + this.aidtoNavigationReport_ = (AidtoNavigationReport)input.readMessage(AidtoNavigationReport.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.aidtoNavigationReport_); + this.aidtoNavigationReport_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x20; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AIS_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AIS_fieldAccessorTable.ensureFieldAccessorsInitialized(AIS.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AIS parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AIS(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int FLAG_FIELD_NUMBER = 1; + + private int flag_; + + public static final int SOURCEID_FIELD_NUMBER = 2; + + private Object sourceId_; + + public static final int VESSELINFO_FIELD_NUMBER = 3; + + private VesselInfo vesselInfo_; + + public static final int VESSELTRACK_FIELD_NUMBER = 4; + + private VesselTrack vesselTrack_; + + public static final int BASESTATIONREPORT_FIELD_NUMBER = 5; + + private BaseStationReport baseStationReport_; + + public static final int AIDTONAVIGATIONREPORT_FIELD_NUMBER = 6; + + private AidtoNavigationReport aidtoNavigationReport_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getFlag() { + return this.flag_; + } + + public boolean hasSourceId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getSourceId() { + Object ref = this.sourceId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sourceId_ = s; + return s; + } + + public ByteString getSourceIdBytes() { + Object ref = this.sourceId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sourceId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasVesselInfo() { + return ((this.bitField0_ & 0x4) == 4); + } + + public VesselInfo getVesselInfo() { + return this.vesselInfo_; + } + + public VesselInfoOrBuilder getVesselInfoOrBuilder() { + return this.vesselInfo_; + } + + public boolean hasVesselTrack() { + return ((this.bitField0_ & 0x8) == 8); + } + + public VesselTrack getVesselTrack() { + return this.vesselTrack_; + } + + public VesselTrackOrBuilder getVesselTrackOrBuilder() { + return this.vesselTrack_; + } + + public boolean hasBaseStationReport() { + return ((this.bitField0_ & 0x10) == 16); + } + + public BaseStationReport getBaseStationReport() { + return this.baseStationReport_; + } + + public BaseStationReportOrBuilder getBaseStationReportOrBuilder() { + return this.baseStationReport_; + } + + public boolean hasAidtoNavigationReport() { + return ((this.bitField0_ & 0x20) == 32); + } + + public AidtoNavigationReport getAidtoNavigationReport() { + return this.aidtoNavigationReport_; + } + + public AidtoNavigationReportOrBuilder getAidtoNavigationReportOrBuilder() { + return this.aidtoNavigationReport_; + } + + private void initFields() { + this.flag_ = 0; + this.sourceId_ = ""; + this.vesselInfo_ = VesselInfo.getDefaultInstance(); + this.vesselTrack_ = VesselTrack.getDefaultInstance(); + this.baseStationReport_ = BaseStationReport.getDefaultInstance(); + this.aidtoNavigationReport_ = AidtoNavigationReport.getDefaultInstance(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasFlag()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSourceId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasVesselInfo() && !getVesselInfo().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasVesselTrack() && !getVesselTrack().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasBaseStationReport() && !getBaseStationReport().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasAidtoNavigationReport() && !getAidtoNavigationReport().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getSourceIdBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeMessage(3, (MessageLite)this.vesselInfo_); + if ((this.bitField0_ & 0x8) == 8) + output.writeMessage(4, (MessageLite)this.vesselTrack_); + if ((this.bitField0_ & 0x10) == 16) + output.writeMessage(5, (MessageLite)this.baseStationReport_); + if ((this.bitField0_ & 0x20) == 32) + output.writeMessage(6, (MessageLite)this.aidtoNavigationReport_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getSourceIdBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeMessageSize(3, (MessageLite)this.vesselInfo_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeMessageSize(4, (MessageLite)this.vesselTrack_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeMessageSize(5, (MessageLite)this.baseStationReport_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeMessageSize(6, (MessageLite)this.aidtoNavigationReport_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AIS parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AIS)PARSER.parseFrom(data); + } + + public static AIS parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AIS)PARSER.parseFrom(data, extensionRegistry); + } + + public static AIS parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AIS)PARSER.parseFrom(data); + } + + public static AIS parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AIS)PARSER.parseFrom(data, extensionRegistry); + } + + public static AIS parseFrom(InputStream input) throws IOException { + return (AIS)PARSER.parseFrom(input); + } + + public static AIS parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AIS)PARSER.parseFrom(input, extensionRegistry); + } + + public static AIS parseDelimitedFrom(InputStream input) throws IOException { + return (AIS)PARSER.parseDelimitedFrom(input); + } + + public static AIS parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AIS)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AIS parseFrom(CodedInputStream input) throws IOException { + return (AIS)PARSER.parseFrom(input); + } + + public static AIS parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AIS)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AIS prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AISOrBuilder { + private int bitField0_; + + private int flag_; + + private Object sourceId_; + + private VesselInfo vesselInfo_; + + private SingleFieldBuilder vesselInfoBuilder_; + + private VesselTrack vesselTrack_; + + private SingleFieldBuilder vesselTrackBuilder_; + + private BaseStationReport baseStationReport_; + + private SingleFieldBuilder baseStationReportBuilder_; + + private AidtoNavigationReport aidtoNavigationReport_; + + private SingleFieldBuilder aidtoNavigationReportBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AIS_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AIS_fieldAccessorTable.ensureFieldAccessorsInitialized(AIS.class, Builder.class); + } + + private Builder() { + this.sourceId_ = ""; + this.vesselInfo_ = VesselInfo.getDefaultInstance(); + this.vesselTrack_ = VesselTrack.getDefaultInstance(); + this.baseStationReport_ = BaseStationReport.getDefaultInstance(); + this.aidtoNavigationReport_ = AidtoNavigationReport.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.sourceId_ = ""; + this.vesselInfo_ = VesselInfo.getDefaultInstance(); + this.vesselTrack_ = VesselTrack.getDefaultInstance(); + this.baseStationReport_ = BaseStationReport.getDefaultInstance(); + this.aidtoNavigationReport_ = AidtoNavigationReport.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (AIS.alwaysUseFieldBuilders) { + getVesselInfoFieldBuilder(); + getVesselTrackFieldBuilder(); + getBaseStationReportFieldBuilder(); + getAidtoNavigationReportFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.flag_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.sourceId_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + if (this.vesselInfoBuilder_ == null) { + this.vesselInfo_ = VesselInfo.getDefaultInstance(); + } else { + this.vesselInfoBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFFB; + if (this.vesselTrackBuilder_ == null) { + this.vesselTrack_ = VesselTrack.getDefaultInstance(); + } else { + this.vesselTrackBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFF7; + if (this.baseStationReportBuilder_ == null) { + this.baseStationReport_ = BaseStationReport.getDefaultInstance(); + } else { + this.baseStationReportBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFEF; + if (this.aidtoNavigationReportBuilder_ == null) { + this.aidtoNavigationReport_ = AidtoNavigationReport.getDefaultInstance(); + } else { + this.aidtoNavigationReportBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFDF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AIS_descriptor; + } + + public AIS getDefaultInstanceForType() { + return AIS.getDefaultInstance(); + } + + public AIS build() { + AIS result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AIS buildPartial() { + AIS result = new AIS(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.flag_ = this.flag_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.sourceId_ = this.sourceId_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + if (this.vesselInfoBuilder_ == null) { + result.vesselInfo_ = this.vesselInfo_; + } else { + result.vesselInfo_ = (VesselInfo)this.vesselInfoBuilder_.build(); + } + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + if (this.vesselTrackBuilder_ == null) { + result.vesselTrack_ = this.vesselTrack_; + } else { + result.vesselTrack_ = (VesselTrack)this.vesselTrackBuilder_.build(); + } + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + if (this.baseStationReportBuilder_ == null) { + result.baseStationReport_ = this.baseStationReport_; + } else { + result.baseStationReport_ = (BaseStationReport)this.baseStationReportBuilder_.build(); + } + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + if (this.aidtoNavigationReportBuilder_ == null) { + result.aidtoNavigationReport_ = this.aidtoNavigationReport_; + } else { + result.aidtoNavigationReport_ = (AidtoNavigationReport)this.aidtoNavigationReportBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AIS) + return mergeFrom((AIS)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AIS other) { + if (other == AIS.getDefaultInstance()) + return this; + if (other.hasFlag()) + setFlag(other.getFlag()); + if (other.hasSourceId()) { + this.bitField0_ |= 0x2; + this.sourceId_ = other.sourceId_; + onChanged(); + } + if (other.hasVesselInfo()) + mergeVesselInfo(other.getVesselInfo()); + if (other.hasVesselTrack()) + mergeVesselTrack(other.getVesselTrack()); + if (other.hasBaseStationReport()) + mergeBaseStationReport(other.getBaseStationReport()); + if (other.hasAidtoNavigationReport()) + mergeAidtoNavigationReport(other.getAidtoNavigationReport()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasFlag()) + return false; + if (!hasSourceId()) + return false; + if (hasVesselInfo() && !getVesselInfo().isInitialized()) + return false; + if (hasVesselTrack() && !getVesselTrack().isInitialized()) + return false; + if (hasBaseStationReport() && !getBaseStationReport().isInitialized()) + return false; + if (hasAidtoNavigationReport() && !getAidtoNavigationReport().isInitialized()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AIS parsedMessage = null; + try { + parsedMessage = (AIS) AIS.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AIS)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getFlag() { + return this.flag_; + } + + public Builder setFlag(int value) { + this.bitField0_ |= 0x1; + this.flag_ = value; + onChanged(); + return this; + } + + public Builder clearFlag() { + this.bitField0_ &= 0xFFFFFFFE; + this.flag_ = 0; + onChanged(); + return this; + } + + public boolean hasSourceId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getSourceId() { + Object ref = this.sourceId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sourceId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getSourceIdBytes() { + Object ref = this.sourceId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sourceId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setSourceId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.sourceId_ = value; + onChanged(); + return this; + } + + public Builder clearSourceId() { + this.bitField0_ &= 0xFFFFFFFD; + this.sourceId_ = AIS.getDefaultInstance().getSourceId(); + onChanged(); + return this; + } + + public Builder setSourceIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.sourceId_ = value; + onChanged(); + return this; + } + + public boolean hasVesselInfo() { + return ((this.bitField0_ & 0x4) == 4); + } + + public VesselInfo getVesselInfo() { + if (this.vesselInfoBuilder_ == null) + return this.vesselInfo_; + return (VesselInfo)this.vesselInfoBuilder_.getMessage(); + } + + public Builder setVesselInfo(VesselInfo value) { + if (this.vesselInfoBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.vesselInfo_ = value; + onChanged(); + } else { + this.vesselInfoBuilder_.setMessage(value); + } + this.bitField0_ |= 0x4; + return this; + } + + public Builder setVesselInfo(VesselInfo.Builder builderForValue) { + if (this.vesselInfoBuilder_ == null) { + this.vesselInfo_ = builderForValue.build(); + onChanged(); + } else { + this.vesselInfoBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x4; + return this; + } + + public Builder mergeVesselInfo(VesselInfo value) { + if (this.vesselInfoBuilder_ == null) { + if ((this.bitField0_ & 0x4) == 4 && this.vesselInfo_ != VesselInfo.getDefaultInstance()) { + this.vesselInfo_ = VesselInfo.newBuilder(this.vesselInfo_).mergeFrom(value).buildPartial(); + } else { + this.vesselInfo_ = value; + } + onChanged(); + } else { + this.vesselInfoBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x4; + return this; + } + + public Builder clearVesselInfo() { + if (this.vesselInfoBuilder_ == null) { + this.vesselInfo_ = VesselInfo.getDefaultInstance(); + onChanged(); + } else { + this.vesselInfoBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFFB; + return this; + } + + public VesselInfo.Builder getVesselInfoBuilder() { + this.bitField0_ |= 0x4; + onChanged(); + return (VesselInfo.Builder)getVesselInfoFieldBuilder().getBuilder(); + } + + public VesselInfoOrBuilder getVesselInfoOrBuilder() { + if (this.vesselInfoBuilder_ != null) + return (VesselInfoOrBuilder)this.vesselInfoBuilder_.getMessageOrBuilder(); + return this.vesselInfo_; + } + + private SingleFieldBuilder getVesselInfoFieldBuilder() { + if (this.vesselInfoBuilder_ == null) { + this.vesselInfoBuilder_ = new SingleFieldBuilder(getVesselInfo(), getParentForChildren(), isClean()); + this.vesselInfo_ = null; + } + return this.vesselInfoBuilder_; + } + + public boolean hasVesselTrack() { + return ((this.bitField0_ & 0x8) == 8); + } + + public VesselTrack getVesselTrack() { + if (this.vesselTrackBuilder_ == null) + return this.vesselTrack_; + return (VesselTrack)this.vesselTrackBuilder_.getMessage(); + } + + public Builder setVesselTrack(VesselTrack value) { + if (this.vesselTrackBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.vesselTrack_ = value; + onChanged(); + } else { + this.vesselTrackBuilder_.setMessage(value); + } + this.bitField0_ |= 0x8; + return this; + } + + public Builder setVesselTrack(VesselTrack.Builder builderForValue) { + if (this.vesselTrackBuilder_ == null) { + this.vesselTrack_ = builderForValue.build(); + onChanged(); + } else { + this.vesselTrackBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x8; + return this; + } + + public Builder mergeVesselTrack(VesselTrack value) { + if (this.vesselTrackBuilder_ == null) { + if ((this.bitField0_ & 0x8) == 8 && this.vesselTrack_ != VesselTrack.getDefaultInstance()) { + this.vesselTrack_ = VesselTrack.newBuilder(this.vesselTrack_).mergeFrom(value).buildPartial(); + } else { + this.vesselTrack_ = value; + } + onChanged(); + } else { + this.vesselTrackBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x8; + return this; + } + + public Builder clearVesselTrack() { + if (this.vesselTrackBuilder_ == null) { + this.vesselTrack_ = VesselTrack.getDefaultInstance(); + onChanged(); + } else { + this.vesselTrackBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFF7; + return this; + } + + public VesselTrack.Builder getVesselTrackBuilder() { + this.bitField0_ |= 0x8; + onChanged(); + return (VesselTrack.Builder)getVesselTrackFieldBuilder().getBuilder(); + } + + public VesselTrackOrBuilder getVesselTrackOrBuilder() { + if (this.vesselTrackBuilder_ != null) + return (VesselTrackOrBuilder)this.vesselTrackBuilder_.getMessageOrBuilder(); + return this.vesselTrack_; + } + + private SingleFieldBuilder getVesselTrackFieldBuilder() { + if (this.vesselTrackBuilder_ == null) { + this.vesselTrackBuilder_ = new SingleFieldBuilder(getVesselTrack(), getParentForChildren(), isClean()); + this.vesselTrack_ = null; + } + return this.vesselTrackBuilder_; + } + + public boolean hasBaseStationReport() { + return ((this.bitField0_ & 0x10) == 16); + } + + public BaseStationReport getBaseStationReport() { + if (this.baseStationReportBuilder_ == null) + return this.baseStationReport_; + return (BaseStationReport)this.baseStationReportBuilder_.getMessage(); + } + + public Builder setBaseStationReport(BaseStationReport value) { + if (this.baseStationReportBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.baseStationReport_ = value; + onChanged(); + } else { + this.baseStationReportBuilder_.setMessage(value); + } + this.bitField0_ |= 0x10; + return this; + } + + public Builder setBaseStationReport(BaseStationReport.Builder builderForValue) { + if (this.baseStationReportBuilder_ == null) { + this.baseStationReport_ = builderForValue.build(); + onChanged(); + } else { + this.baseStationReportBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x10; + return this; + } + + public Builder mergeBaseStationReport(BaseStationReport value) { + if (this.baseStationReportBuilder_ == null) { + if ((this.bitField0_ & 0x10) == 16 && this.baseStationReport_ != BaseStationReport.getDefaultInstance()) { + this.baseStationReport_ = BaseStationReport.newBuilder(this.baseStationReport_).mergeFrom(value).buildPartial(); + } else { + this.baseStationReport_ = value; + } + onChanged(); + } else { + this.baseStationReportBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x10; + return this; + } + + public Builder clearBaseStationReport() { + if (this.baseStationReportBuilder_ == null) { + this.baseStationReport_ = BaseStationReport.getDefaultInstance(); + onChanged(); + } else { + this.baseStationReportBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFEF; + return this; + } + + public BaseStationReport.Builder getBaseStationReportBuilder() { + this.bitField0_ |= 0x10; + onChanged(); + return (BaseStationReport.Builder)getBaseStationReportFieldBuilder().getBuilder(); + } + + public BaseStationReportOrBuilder getBaseStationReportOrBuilder() { + if (this.baseStationReportBuilder_ != null) + return (BaseStationReportOrBuilder)this.baseStationReportBuilder_.getMessageOrBuilder(); + return this.baseStationReport_; + } + + private SingleFieldBuilder getBaseStationReportFieldBuilder() { + if (this.baseStationReportBuilder_ == null) { + this.baseStationReportBuilder_ = new SingleFieldBuilder(getBaseStationReport(), getParentForChildren(), isClean()); + this.baseStationReport_ = null; + } + return this.baseStationReportBuilder_; + } + + public boolean hasAidtoNavigationReport() { + return ((this.bitField0_ & 0x20) == 32); + } + + public AidtoNavigationReport getAidtoNavigationReport() { + if (this.aidtoNavigationReportBuilder_ == null) + return this.aidtoNavigationReport_; + return (AidtoNavigationReport)this.aidtoNavigationReportBuilder_.getMessage(); + } + + public Builder setAidtoNavigationReport(AidtoNavigationReport value) { + if (this.aidtoNavigationReportBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.aidtoNavigationReport_ = value; + onChanged(); + } else { + this.aidtoNavigationReportBuilder_.setMessage(value); + } + this.bitField0_ |= 0x20; + return this; + } + + public Builder setAidtoNavigationReport(AidtoNavigationReport.Builder builderForValue) { + if (this.aidtoNavigationReportBuilder_ == null) { + this.aidtoNavigationReport_ = builderForValue.build(); + onChanged(); + } else { + this.aidtoNavigationReportBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x20; + return this; + } + + public Builder mergeAidtoNavigationReport(AidtoNavigationReport value) { + if (this.aidtoNavigationReportBuilder_ == null) { + if ((this.bitField0_ & 0x20) == 32 && this.aidtoNavigationReport_ != AidtoNavigationReport.getDefaultInstance()) { + this.aidtoNavigationReport_ = AidtoNavigationReport.newBuilder(this.aidtoNavigationReport_).mergeFrom(value).buildPartial(); + } else { + this.aidtoNavigationReport_ = value; + } + onChanged(); + } else { + this.aidtoNavigationReportBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x20; + return this; + } + + public Builder clearAidtoNavigationReport() { + if (this.aidtoNavigationReportBuilder_ == null) { + this.aidtoNavigationReport_ = AidtoNavigationReport.getDefaultInstance(); + onChanged(); + } else { + this.aidtoNavigationReportBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFDF; + return this; + } + + public AidtoNavigationReport.Builder getAidtoNavigationReportBuilder() { + this.bitField0_ |= 0x20; + onChanged(); + return (AidtoNavigationReport.Builder)getAidtoNavigationReportFieldBuilder().getBuilder(); + } + + public AidtoNavigationReportOrBuilder getAidtoNavigationReportOrBuilder() { + if (this.aidtoNavigationReportBuilder_ != null) + return (AidtoNavigationReportOrBuilder)this.aidtoNavigationReportBuilder_.getMessageOrBuilder(); + return this.aidtoNavigationReport_; + } + + private SingleFieldBuilder getAidtoNavigationReportFieldBuilder() { + if (this.aidtoNavigationReportBuilder_ == null) { + this.aidtoNavigationReportBuilder_ = new SingleFieldBuilder(getAidtoNavigationReport(), getParentForChildren(), isClean()); + this.aidtoNavigationReport_ = null; + } + return this.aidtoNavigationReportBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class AISList extends GeneratedMessage implements AISListOrBuilder { + private static final AISList defaultInstance = new AISList(true); + + private final UnknownFieldSet unknownFields; + + private AISList(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private AISList(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static AISList getDefaultInstance() { + return defaultInstance; + } + + public AISList getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AISList(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.uTC_ = input.readUInt64(); + break; + case 18: + if ((mutable_bitField0_ & 0x2) != 2) { + this.ais_ = new ArrayList(); + mutable_bitField0_ |= 0x2; + } + this.ais_.add((AIS)input.readMessage(AIS.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x2) == 2) + this.ais_ = Collections.unmodifiableList(this.ais_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISList_fieldAccessorTable.ensureFieldAccessorsInitialized(AISList.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public AISList parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new AISList(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int UTC_FIELD_NUMBER = 1; + + private long uTC_; + + public static final int AIS_FIELD_NUMBER = 2; + + private List ais_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x1) == 1); + } + + public long getUTC() { + return this.uTC_; + } + + public List getAisList() { + return this.ais_; + } + + public List getAisOrBuilderList() { + return (List)this.ais_; + } + + public int getAisCount() { + return this.ais_.size(); + } + + public AIS getAis(int index) { + return this.ais_.get(index); + } + + public AISOrBuilder getAisOrBuilder(int index) { + return this.ais_.get(index); + } + + private void initFields() { + this.uTC_ = 0L; + this.ais_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getAisCount(); i++) { + if (!getAis(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeUInt64(1, this.uTC_); + for (int i = 0; i < this.ais_.size(); i++) + output.writeMessage(2, (MessageLite)this.ais_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeUInt64Size(1, this.uTC_); + for (int i = 0; i < this.ais_.size(); i++) + size += CodedOutputStream.computeMessageSize(2, (MessageLite)this.ais_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static AISList parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (AISList)PARSER.parseFrom(data); + } + + public static AISList parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISList)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISList parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (AISList)PARSER.parseFrom(data); + } + + public static AISList parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (AISList)PARSER.parseFrom(data, extensionRegistry); + } + + public static AISList parseFrom(InputStream input) throws IOException { + return (AISList)PARSER.parseFrom(input); + } + + public static AISList parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISList)PARSER.parseFrom(input, extensionRegistry); + } + + public static AISList parseDelimitedFrom(InputStream input) throws IOException { + return (AISList)PARSER.parseDelimitedFrom(input); + } + + public static AISList parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISList)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static AISList parseFrom(CodedInputStream input) throws IOException { + return (AISList)PARSER.parseFrom(input); + } + + public static AISList parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (AISList)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(AISList prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements AISListOrBuilder { + private int bitField0_; + + private long uTC_; + + private List ais_; + + private RepeatedFieldBuilder aisBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISList_fieldAccessorTable.ensureFieldAccessorsInitialized(AISList.class, Builder.class); + } + + private Builder() { + this.ais_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.ais_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (AISList.alwaysUseFieldBuilders) + getAisFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFFFE; + if (this.aisBuilder_ == null) { + this.ais_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + } else { + this.aisBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXAISVessel.internal_static_com_zhichenhaixin_proto_AISList_descriptor; + } + + public AISList getDefaultInstanceForType() { + return AISList.getDefaultInstance(); + } + + public AISList build() { + AISList result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public AISList buildPartial() { + AISList result = new AISList(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.uTC_ = this.uTC_; + if (this.aisBuilder_ == null) { + if ((this.bitField0_ & 0x2) == 2) { + this.ais_ = Collections.unmodifiableList(this.ais_); + this.bitField0_ &= 0xFFFFFFFD; + } + result.ais_ = this.ais_; + } else { + result.ais_ = this.aisBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof AISList) + return mergeFrom((AISList)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(AISList other) { + if (other == AISList.getDefaultInstance()) + return this; + if (other.hasUTC()) + setUTC(other.getUTC()); + if (this.aisBuilder_ == null) { + if (!other.ais_.isEmpty()) { + if (this.ais_.isEmpty()) { + this.ais_ = other.ais_; + this.bitField0_ &= 0xFFFFFFFD; + } else { + ensureAisIsMutable(); + this.ais_.addAll(other.ais_); + } + onChanged(); + } + } else if (!other.ais_.isEmpty()) { + if (this.aisBuilder_.isEmpty()) { + this.aisBuilder_.dispose(); + this.aisBuilder_ = null; + this.ais_ = other.ais_; + this.bitField0_ &= 0xFFFFFFFD; + this.aisBuilder_ = AISList.alwaysUseFieldBuilders ? getAisFieldBuilder() : null; + } else { + this.aisBuilder_.addAllMessages(other.ais_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasUTC()) + return false; + for (int i = 0; i < getAisCount(); i++) { + if (!getAis(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + AISList parsedMessage = null; + try { + parsedMessage = (AISList) AISList.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (AISList)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x1) == 1); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x1; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFFFE; + this.uTC_ = 0L; + onChanged(); + return this; + } + + private void ensureAisIsMutable() { + if ((this.bitField0_ & 0x2) != 2) { + this.ais_ = new ArrayList(this.ais_); + this.bitField0_ |= 0x2; + } + } + + public List getAisList() { + if (this.aisBuilder_ == null) + return Collections.unmodifiableList(this.ais_); + return this.aisBuilder_.getMessageList(); + } + + public int getAisCount() { + if (this.aisBuilder_ == null) + return this.ais_.size(); + return this.aisBuilder_.getCount(); + } + + public AIS getAis(int index) { + if (this.aisBuilder_ == null) + return this.ais_.get(index); + return (AIS)this.aisBuilder_.getMessage(index); + } + + public Builder setAis(int index, AIS value) { + if (this.aisBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureAisIsMutable(); + this.ais_.set(index, value); + onChanged(); + } else { + this.aisBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setAis(int index, AIS.Builder builderForValue) { + if (this.aisBuilder_ == null) { + ensureAisIsMutable(); + this.ais_.set(index, builderForValue.build()); + onChanged(); + } else { + this.aisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAis(AIS value) { + if (this.aisBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureAisIsMutable(); + this.ais_.add(value); + onChanged(); + } else { + this.aisBuilder_.addMessage(value); + } + return this; + } + + public Builder addAis(int index, AIS value) { + if (this.aisBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureAisIsMutable(); + this.ais_.add(index, value); + onChanged(); + } else { + this.aisBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addAis(AIS.Builder builderForValue) { + if (this.aisBuilder_ == null) { + ensureAisIsMutable(); + this.ais_.add(builderForValue.build()); + onChanged(); + } else { + this.aisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addAis(int index, AIS.Builder builderForValue) { + if (this.aisBuilder_ == null) { + ensureAisIsMutable(); + this.ais_.add(index, builderForValue.build()); + onChanged(); + } else { + this.aisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllAis(Iterable values) { + if (this.aisBuilder_ == null) { + ensureAisIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.ais_); + onChanged(); + } else { + this.aisBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearAis() { + if (this.aisBuilder_ == null) { + this.ais_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + onChanged(); + } else { + this.aisBuilder_.clear(); + } + return this; + } + + public Builder removeAis(int index) { + if (this.aisBuilder_ == null) { + ensureAisIsMutable(); + this.ais_.remove(index); + onChanged(); + } else { + this.aisBuilder_.remove(index); + } + return this; + } + + public AIS.Builder getAisBuilder(int index) { + return (AIS.Builder)getAisFieldBuilder().getBuilder(index); + } + + public AISOrBuilder getAisOrBuilder(int index) { + if (this.aisBuilder_ == null) + return this.ais_.get(index); + return (AISOrBuilder)this.aisBuilder_.getMessageOrBuilder(index); + } + + public List getAisOrBuilderList() { + if (this.aisBuilder_ != null) + return this.aisBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.ais_); + } + + public AIS.Builder addAisBuilder() { + return (AIS.Builder)getAisFieldBuilder().addBuilder(AIS.getDefaultInstance()); + } + + public AIS.Builder addAisBuilder(int index) { + return (AIS.Builder)getAisFieldBuilder().addBuilder(index, AIS.getDefaultInstance()); + } + + public List getAisBuilderList() { + return getAisFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getAisFieldBuilder() { + if (this.aisBuilder_ == null) { + this.aisBuilder_ = new RepeatedFieldBuilder(this.ais_, ((this.bitField0_ & 0x2) == 2), getParentForChildren(), isClean()); + this.ais_ = null; + } + return this.aisBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\023ZCHXAISVessel.proto\022\027com.com.zhichenhaixin.proto\"ô\002\n\nVesselInfo\022\n\n\002id\030\001 \002(\t\022\f\n\004mmsi\030\002 \002(\005\022\020\n\bshipType\030\003 \002(\t\022\013\n\003imo\030\004 \002(\005\022\020\n\bcallSign\030\005 \002(\t\022\020\n\bshipName\030\006 \002(\t\022\021\n\tcargoType\030\007 \002(\005\022\017\n\007country\030\b \002(\t\022\020\n\bvendorID\030\t \002(\t\022\022\n\nshipLength\030\n \002(\005\022\021\n\tshipWidth\030\013 \002(\005\022\r\n\005toBow\030\f \002(\005\022\017\n\007toStern\030\r \002(\005\022\016\n\006toPort\030\016 \002(\005\022\023\n\013toStarboard\030\017 \002(\005\022.\n\007fixType\030\020 \002(\0162\035.com.com.zhichenhaixin.proto.EPFD\022\013\n\003eta\030\021 \002(\t\022\017\n\007draught\030\022 \002(\002\022\f\n\004de", "st\030\023 \002(\t\022\013\n\003UTC\030\024 \002(\004\"©\001\n\017AISHistoryTrack\022\013\n\003sog\030\001 \002(\002\022\013\n\003lon\030\002 \002(\001\022\013\n\003lat\030\003 \002(\001\022\013\n\003cog\030\004 \002(\002\022\017\n\007heading\030\005 \002(\002\0227\n\tnavStatus\030\006 \002(\0162$.com.com.zhichenhaixin.proto.NAVI_STATUS\022\013\n\003rot\030\007 \002(\002\022\013\n\003UTC\030\b \002(\004\"L\n\020AISHistoryTracks\0228\n\006tracks\030\034 \003(\0132(.com.com.zhichenhaixin.proto.AISHistoryTrack\"½\004\n\rAISVesselData\022\n\n\002id\030\001 \002(\t\022\f\n\004mmsi\030\002 \002(\005\022\020\n\bshiptype\030\003 \002(\t\0227\n\tnavStatus\030\004 \002(\0162$.com.com.zhichenhaixin.proto.NAVI_STATUS\022\013\n\003rot\030\005 ", "\002(\002\022\013\n\003sog\030\006 \002(\002\022\013\n\003lon\030\007 \002(\001\022\013\n\003lat\030\b \002(\001\022\013\n\003cog\030\t \002(\002\022\017\n\007heading\030\n \002(\002\022\013\n\003imo\030\013 \002(\005\022\020\n\bcallSign\030\f \002(\t\022\020\n\bshipName\030\r \002(\t\022\021\n\tcargoType\030\016 \002(\005\022\017\n\007country\030\017 \002(\t\022\020\n\bvendorID\030\020 \002(\t\022\022\n\nshipLength\030\021 \002(\005\022\021\n\tshipWidth\030\022 \002(\005\022\r\n\005toBow\030\023 \002(\005\022\017\n\007toStern\030\024 \002(\005\022\016\n\006toPort\030\025 \002(\005\022\023\n\013toStarboard\030\026 \002(\005\022.\n\007fixType\030\027 \001(\0162\035.com.com.zhichenhaixin.proto.EPFD\022\013\n\003eta\030\030 \002(\t\022\017\n\007draught\030\031 \002(\002\022\f\n\004dest\030\032 \002(\t\022\013\n\003UTC\030\033 \002(\004\0229\n\006tracks\030\034", " \001(\0132).com.com.zhichenhaixin.proto.AISHistoryTracks\"L\n\021AISVesselDataList\0227\n\007aisData\030\001 \003(\0132&.com.com.zhichenhaixin.proto.AISVesselData\"Ñ\001\n\013VesselTrack\022\n\n\002id\030\001 \002(\t\022\f\n\004mmsi\030\002 \002(\005\022\020\n\bshiptype\030\003 \002(\t\0227\n\tnavStatus\030\004 \002(\0162$.com.com.zhichenhaixin.proto.NAVI_STATUS\022\013\n\003rot\030\005 \002(\002\022\013\n\003sog\030\006 \002(\002\022\013\n\003lon\030\007 \002(\001\022\013\n\003lat\030\b \002(\001\022\013\n\003cog\030\t \002(\002\022\017\n\007heading\030\n \002(\002\022\013\n\003UTC\030\013 \002(\004\"\002\n\021BaseStationReport\022\n\n\002id\030\001 \002(\005\022\027\n\017repeatIndicator\030\002 \002(\005\022\f\n\004", "mmsi\030\003 \002(\005\022\f\n\004year\030\004 \002(\005\022\r\n\005month\030\005 \002(\005\022\013\n\003day\030\006 \002(\005\022\f\n\004hour\030\007 \002(\005\022\016\n\006minute\030\b \002(\005\022\016\n\006second\030\t \002(\005\022\030\n\020positionAccuracy\030\n \002(\005\022\013\n\003lon\030\013 \002(\001\022\013\n\003lat\030\f \002(\001\022.\n\007fixType\030\r \002(\0162\035.com.com.zhichenhaixin.proto.EPFD\022\013\n\003UTC\030\016 \002(\004\"Ä\002\n\025AidtoNavigationReport\022\n\n\002id\030\001 \002(\005\022\027\n\017repeatIndicator\030\002 \002(\005\022\f\n\004mmsi\030\003 \002(\005\0224\n\batonType\030\004 \002(\0162\".com.com.zhichenhaixin.proto.ATON_TYPE\022\f\n\004name\030\005 \002(\t\022\030\n\020positionAccuracy\030\006 \002(\005\022\013\n\003lon\030\007 \002(\001\022\013\n\003l", "at\030\b \002(\001\022\r\n\005toBow\030\t \002(\005\022\017\n\007toStern\030\n \002(\005\022\016\n\006toPort\030\013 \002(\005\022\023\n\013toStarboard\030\f \002(\005\022.\n\007fixType\030\r \002(\0162\035.com.com.zhichenhaixin.proto.EPFD\022\013\n\003UTC\030\016 \002(\004\"¯\002\n\003AIS\022\f\n\004flag\030\001 \002(\005\022\020\n\bsourceId\030\002 \002(\t\0227\n\nvesselInfo\030\003 \001(\0132#.com.com.zhichenhaixin.proto.VesselInfo\0229\n\013vesselTrack\030\004 \001(\0132$.com.com.zhichenhaixin.proto.VesselTrack\022E\n\021baseStationReport\030\005 \001(\0132*.com.com.zhichenhaixin.proto.BaseStationReport\022M\n\025aidtoNavigationReport\030\006 \001(\0132..c", "om.com.zhichenhaixin.proto.AidtoNavigationReport\"A\n\007AISList\022\013\n\003UTC\030\001 \002(\004\022)\n\003ais\030\002 \003(\0132\034.com.com.zhichenhaixin.proto.AIS*Ÿ\001\n\004EPFD\022\r\n\tUNDEFINED\020\000\022\007\n\003GPS\020\001\022\013\n\007GLONASS\020\002\022\034\n\030COMBINED_GPS_AND_GLONASS\020\003\022\013\n\007LORAN_C\020\004\022\n\n\006CHAYKA\020\005\022 \n\034INTEGRATED_NAVIGATION_SYSTEM\020\006\022\f\n\bSURVEYED\020\007\022\013\n\007GALILEO\020\b*°\003\n\013NAVI_STATUS\022\032\n\026UNDER_WAY_USING_ENGINE\020\000\022\r\n\tAT_ANCHOR\020\001\022\025\n\021NOT_UNDER_COMMAND\020\002\022\030\n\024RESTRICTED_MANOEUVER\020\003\022\032\n\026CONSTRAINED_BY_", "DRAUGHT\020\004\022\n\n\006MOORED\020\005\022\013\n\007AGROUND\020\006\022\026\n\022ENGAGED_IN_FISHING\020\007\022\025\n\021UNDER_WAY_SAILING\020\b\022)\n%RESERVED_FOR_FUTURE_AMENDMENT_FOR_HSC\020\t\022)\n%RESERVED_FOR_FUTURE_AMENDMENT_FOR_WIG\020\n\022\035\n\031RESERVED_FOR_FUTURE_USE_1\020\013\022\035\n\031RESERVED_FOR_FUTURE_USE_2\020\f\022\035\n\031RESERVED_FOR_FUTURE_USE_3\020\r\022\035\n\031RESERVED_FOR_FUTURE_USE_4\020\016\022\017\n\013NOT_DEFINED\020\017*\006\n\tATON_TYPE\022\013\n\007DEFAULT\020\000\022\023\n\017REFERENCE_POINT\020\001\022\t\n\005RACON\020\002\022\035\n\031FIXED_STRUCTURE_OFF_SHORE\020\003\022\t", "\n\005SPARE\020\004\022\031\n\025LIGHT_WITHOUT_SECTORS\020\005\022\026\n\022LIGHT_WITH_SECTORS\020\006\022\027\n\023LEADING_LIGHT_FRONT\020\007\022\026\n\022LEADING_LIGHT_REAR\020\b\022\025\n\021BEACON_CARDINAL_N\020\t\022\025\n\021BEACON_CARDINAL_E\020\n\022\025\n\021BEACON_CARDINAL_S\020\013\022\025\n\021BEACON_CARDINAL_W\020\f\022\024\n\020BEACON_PORT_HAND\020\r\022\031\n\025BEACON_STARBOARD_HAND\020\016\022&\n\"BEACON_PREFERRED_CHANNEL_PORT_HAND\020\017\022+\n'BEACON_PREFERRED_CHANNEL_STARBOARD_HAND\020\020\022\032\n\026BEACON_ISOLATED_DANGER\020\021\022\025\n\021BEACON_SAFE_WATER\020\022\022\027\n\023BEACON_SPE", "CIAL_MARK\020\023\022\023\n\017CARDINAL_MARK_N\020\024\022\023\n\017CARDINAL_MARK_E\020\025\022\023\n\017CARDINAL_MARK_S\020\026\022\023\n\017CARDINAL_MARK_W\020\027\022\022\n\016PORT_HAND_MARK\020\030\022\027\n\023STARBOARD_HAND_MARK\020\031\022\037\n\033PREFERRED_CHANNEL_PORT_HAND\020\032\022$\n PREFERRED_CHANNEL_STARBOARD_HAND\020\033\022\023\n\017ISOLATED_DANGER\020\034\022\016\n\nSAFE_WATER\020\035\022\020\n\fSPECIAL_MARK\020\036\022\033\n\027LIGHT_VESSEL_LANBY_RIGS\020\037" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXAISVessel.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_VesselInfo_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_VesselInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_VesselInfo_descriptor, new String[] { + "Id", "Mmsi", "ShipType", "Imo", "CallSign", "ShipName", "CargoType", "Country", "VendorID", "ShipLength", + "ShipWidth", "ToBow", "ToStern", "ToPort", "ToStarboard", "FixType", "Eta", "Draught", "Dest", "UTC" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AISHistoryTrack_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AISHistoryTrack_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AISHistoryTrack_descriptor, new String[] { "Sog", "Lon", "Lat", "Cog", "Heading", "NavStatus", "Rot", "UTC" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AISHistoryTracks_descriptor = getDescriptor().getMessageTypes().get(2); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AISHistoryTracks_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AISHistoryTracks_descriptor, new String[] { "Tracks" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AISVesselData_descriptor = getDescriptor().getMessageTypes().get(3); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AISVesselData_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AISVesselData_descriptor, new String[] { + "Id", "Mmsi", "Shiptype", "NavStatus", "Rot", "Sog", "Lon", "Lat", "Cog", "Heading", + "Imo", "CallSign", "ShipName", "CargoType", "Country", "VendorID", "ShipLength", "ShipWidth", "ToBow", "ToStern", + "ToPort", "ToStarboard", "FixType", "Eta", "Draught", "Dest", "UTC", "Tracks" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AISVesselDataList_descriptor = getDescriptor().getMessageTypes().get(4); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AISVesselDataList_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AISVesselDataList_descriptor, new String[] { "AisData" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_VesselTrack_descriptor = getDescriptor().getMessageTypes().get(5); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_VesselTrack_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_VesselTrack_descriptor, new String[] { + "Id", "Mmsi", "Shiptype", "NavStatus", "Rot", "Sog", "Lon", "Lat", "Cog", "Heading", + "UTC" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_BaseStationReport_descriptor = getDescriptor().getMessageTypes().get(6); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_BaseStationReport_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_BaseStationReport_descriptor, new String[] { + "Id", "RepeatIndicator", "Mmsi", "Year", "Month", "Day", "Hour", "Minute", "Second", "PositionAccuracy", + "Lon", "Lat", "FixType", "UTC" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_descriptor = getDescriptor().getMessageTypes().get(7); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AidtoNavigationReport_descriptor, new String[] { + "Id", "RepeatIndicator", "Mmsi", "AtonType", "Name", "PositionAccuracy", "Lon", "Lat", "ToBow", "ToStern", + "ToPort", "ToStarboard", "FixType", "UTC" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AIS_descriptor = getDescriptor().getMessageTypes().get(8); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AIS_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AIS_descriptor, new String[] { "Flag", "SourceId", "VesselInfo", "VesselTrack", "BaseStationReport", "AidtoNavigationReport" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_AISList_descriptor = getDescriptor().getMessageTypes().get(9); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_AISList_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_AISList_descriptor, new String[] { "UTC", "Ais" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface AISHistoryTrackOrBuilder extends MessageOrBuilder { + boolean hasSog(); + + float getSog(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasCog(); + + float getCog(); + + boolean hasHeading(); + + float getHeading(); + + boolean hasNavStatus(); + + NAVI_STATUS getNavStatus(); + + boolean hasRot(); + + float getRot(); + + boolean hasUTC(); + + long getUTC(); + } + + public static interface AISHistoryTracksOrBuilder extends MessageOrBuilder { + List getTracksList(); + + AISHistoryTrack getTracks(int param1Int); + + int getTracksCount(); + + List getTracksOrBuilderList(); + + AISHistoryTrackOrBuilder getTracksOrBuilder(int param1Int); + } + + public static interface AISListOrBuilder extends MessageOrBuilder { + boolean hasUTC(); + + long getUTC(); + + List getAisList(); + + AIS getAis(int param1Int); + + int getAisCount(); + + List getAisOrBuilderList(); + + AISOrBuilder getAisOrBuilder(int param1Int); + } + + public static interface AISOrBuilder extends MessageOrBuilder { + boolean hasFlag(); + + int getFlag(); + + boolean hasSourceId(); + + String getSourceId(); + + ByteString getSourceIdBytes(); + + boolean hasVesselInfo(); + + VesselInfo getVesselInfo(); + + VesselInfoOrBuilder getVesselInfoOrBuilder(); + + boolean hasVesselTrack(); + + VesselTrack getVesselTrack(); + + VesselTrackOrBuilder getVesselTrackOrBuilder(); + + boolean hasBaseStationReport(); + + BaseStationReport getBaseStationReport(); + + BaseStationReportOrBuilder getBaseStationReportOrBuilder(); + + boolean hasAidtoNavigationReport(); + + AidtoNavigationReport getAidtoNavigationReport(); + + AidtoNavigationReportOrBuilder getAidtoNavigationReportOrBuilder(); + } + + public static interface AISVesselDataListOrBuilder extends MessageOrBuilder { + List getAisDataList(); + + AISVesselData getAisData(int param1Int); + + int getAisDataCount(); + + List getAisDataOrBuilderList(); + + AISVesselDataOrBuilder getAisDataOrBuilder(int param1Int); + } + + public static interface AISVesselDataOrBuilder extends MessageOrBuilder { + boolean hasId(); + + String getId(); + + ByteString getIdBytes(); + + boolean hasMmsi(); + + int getMmsi(); + + boolean hasShiptype(); + + String getShiptype(); + + ByteString getShiptypeBytes(); + + boolean hasNavStatus(); + + NAVI_STATUS getNavStatus(); + + boolean hasRot(); + + float getRot(); + + boolean hasSog(); + + float getSog(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasCog(); + + float getCog(); + + boolean hasHeading(); + + float getHeading(); + + boolean hasImo(); + + int getImo(); + + boolean hasCallSign(); + + String getCallSign(); + + ByteString getCallSignBytes(); + + boolean hasShipName(); + + String getShipName(); + + ByteString getShipNameBytes(); + + boolean hasCargoType(); + + int getCargoType(); + + boolean hasCountry(); + + String getCountry(); + + ByteString getCountryBytes(); + + boolean hasVendorID(); + + String getVendorID(); + + ByteString getVendorIDBytes(); + + boolean hasShipLength(); + + int getShipLength(); + + boolean hasShipWidth(); + + int getShipWidth(); + + boolean hasToBow(); + + int getToBow(); + + boolean hasToStern(); + + int getToStern(); + + boolean hasToPort(); + + int getToPort(); + + boolean hasToStarboard(); + + int getToStarboard(); + + boolean hasFixType(); + + EPFD getFixType(); + + boolean hasEta(); + + String getEta(); + + ByteString getEtaBytes(); + + boolean hasDraught(); + + float getDraught(); + + boolean hasDest(); + + String getDest(); + + ByteString getDestBytes(); + + boolean hasUTC(); + + long getUTC(); + + boolean hasTracks(); + + AISHistoryTracks getTracks(); + + AISHistoryTracksOrBuilder getTracksOrBuilder(); + } + + public static interface AidtoNavigationReportOrBuilder extends MessageOrBuilder { + boolean hasId(); + + int getId(); + + boolean hasRepeatIndicator(); + + int getRepeatIndicator(); + + boolean hasMmsi(); + + int getMmsi(); + + boolean hasAtonType(); + + ATON_TYPE getAtonType(); + + boolean hasName(); + + String getName(); + + ByteString getNameBytes(); + + boolean hasPositionAccuracy(); + + int getPositionAccuracy(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasToBow(); + + int getToBow(); + + boolean hasToStern(); + + int getToStern(); + + boolean hasToPort(); + + int getToPort(); + + boolean hasToStarboard(); + + int getToStarboard(); + + boolean hasFixType(); + + EPFD getFixType(); + + boolean hasUTC(); + + long getUTC(); + } + + public static interface BaseStationReportOrBuilder extends MessageOrBuilder { + boolean hasId(); + + int getId(); + + boolean hasRepeatIndicator(); + + int getRepeatIndicator(); + + boolean hasMmsi(); + + int getMmsi(); + + boolean hasYear(); + + int getYear(); + + boolean hasMonth(); + + int getMonth(); + + boolean hasDay(); + + int getDay(); + + boolean hasHour(); + + int getHour(); + + boolean hasMinute(); + + int getMinute(); + + boolean hasSecond(); + + int getSecond(); + + boolean hasPositionAccuracy(); + + int getPositionAccuracy(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasFixType(); + + EPFD getFixType(); + + boolean hasUTC(); + + long getUTC(); + } + + public static interface VesselInfoOrBuilder extends MessageOrBuilder { + boolean hasId(); + + String getId(); + + ByteString getIdBytes(); + + boolean hasMmsi(); + + int getMmsi(); + + boolean hasShipType(); + + String getShipType(); + + ByteString getShipTypeBytes(); + + boolean hasImo(); + + int getImo(); + + boolean hasCallSign(); + + String getCallSign(); + + ByteString getCallSignBytes(); + + boolean hasShipName(); + + String getShipName(); + + ByteString getShipNameBytes(); + + boolean hasCargoType(); + + int getCargoType(); + + boolean hasCountry(); + + String getCountry(); + + ByteString getCountryBytes(); + + boolean hasVendorID(); + + String getVendorID(); + + ByteString getVendorIDBytes(); + + boolean hasShipLength(); + + int getShipLength(); + + boolean hasShipWidth(); + + int getShipWidth(); + + boolean hasToBow(); + + int getToBow(); + + boolean hasToStern(); + + int getToStern(); + + boolean hasToPort(); + + int getToPort(); + + boolean hasToStarboard(); + + int getToStarboard(); + + boolean hasFixType(); + + EPFD getFixType(); + + boolean hasEta(); + + String getEta(); + + ByteString getEtaBytes(); + + boolean hasDraught(); + + float getDraught(); + + boolean hasDest(); + + String getDest(); + + ByteString getDestBytes(); + + boolean hasUTC(); + + long getUTC(); + } + + public static interface VesselTrackOrBuilder extends MessageOrBuilder { + boolean hasId(); + + String getId(); + + ByteString getIdBytes(); + + boolean hasMmsi(); + + int getMmsi(); + + boolean hasShiptype(); + + String getShiptype(); + + ByteString getShiptypeBytes(); + + boolean hasNavStatus(); + + NAVI_STATUS getNavStatus(); + + boolean hasRot(); + + float getRot(); + + boolean hasSog(); + + float getSog(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasCog(); + + float getCog(); + + boolean hasHeading(); + + float getHeading(); + + boolean hasUTC(); + + long getUTC(); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXCamera.java b/src/main/java/com/zhichenhaixin/proto/ZCHXCamera.java new file mode 100644 index 0000000..e5b8673 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXCamera.java @@ -0,0 +1,6845 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXCamera { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public static final class Line_parameter extends GeneratedMessage implements Line_parameterOrBuilder { + private static final Line_parameter defaultInstance = new Line_parameter(true); + + private final UnknownFieldSet unknownFields; + + private Line_parameter(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private Line_parameter(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static Line_parameter getDefaultInstance() { + return defaultInstance; + } + + public Line_parameter getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Line_parameter(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + this.bitField0_ |= 0x1; + this.startX_ = input.readDouble(); + break; + case 17: + this.bitField0_ |= 0x2; + this.startY_ = input.readDouble(); + break; + case 25: + this.bitField0_ |= 0x4; + this.endX_ = input.readDouble(); + break; + case 33: + this.bitField0_ |= 0x8; + this.endY_ = input.readDouble(); + break; + case 41: + this.bitField0_ |= 0x10; + this.lineRealLen_ = input.readDouble(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Line_parameter_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Line_parameter_fieldAccessorTable.ensureFieldAccessorsInitialized(Line_parameter.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public Line_parameter parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new Line_parameter(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int START_X_FIELD_NUMBER = 1; + + private double startX_; + + public static final int START_Y_FIELD_NUMBER = 2; + + private double startY_; + + public static final int END_X_FIELD_NUMBER = 3; + + private double endX_; + + public static final int END_Y_FIELD_NUMBER = 4; + + private double endY_; + + public static final int LINEREALLEN_FIELD_NUMBER = 5; + + private double lineRealLen_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasStartX() { + return ((this.bitField0_ & 0x1) == 1); + } + + public double getStartX() { + return this.startX_; + } + + public boolean hasStartY() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getStartY() { + return this.startY_; + } + + public boolean hasEndX() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getEndX() { + return this.endX_; + } + + public boolean hasEndY() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getEndY() { + return this.endY_; + } + + public boolean hasLineRealLen() { + return ((this.bitField0_ & 0x10) == 16); + } + + public double getLineRealLen() { + return this.lineRealLen_; + } + + private void initFields() { + this.startX_ = 0.0D; + this.startY_ = 0.0D; + this.endX_ = 0.0D; + this.endY_ = 0.0D; + this.lineRealLen_ = 0.0D; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeDouble(1, this.startX_); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.startY_); + if ((this.bitField0_ & 0x4) == 4) + output.writeDouble(3, this.endX_); + if ((this.bitField0_ & 0x8) == 8) + output.writeDouble(4, this.endY_); + if ((this.bitField0_ & 0x10) == 16) + output.writeDouble(5, this.lineRealLen_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeDoubleSize(1, this.startX_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.startY_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeDoubleSize(3, this.endX_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeDoubleSize(4, this.endY_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeDoubleSize(5, this.lineRealLen_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static Line_parameter parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (Line_parameter)PARSER.parseFrom(data); + } + + public static Line_parameter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (Line_parameter)PARSER.parseFrom(data, extensionRegistry); + } + + public static Line_parameter parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (Line_parameter)PARSER.parseFrom(data); + } + + public static Line_parameter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (Line_parameter)PARSER.parseFrom(data, extensionRegistry); + } + + public static Line_parameter parseFrom(InputStream input) throws IOException { + return (Line_parameter)PARSER.parseFrom(input); + } + + public static Line_parameter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Line_parameter)PARSER.parseFrom(input, extensionRegistry); + } + + public static Line_parameter parseDelimitedFrom(InputStream input) throws IOException { + return (Line_parameter)PARSER.parseDelimitedFrom(input); + } + + public static Line_parameter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Line_parameter)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static Line_parameter parseFrom(CodedInputStream input) throws IOException { + return (Line_parameter)PARSER.parseFrom(input); + } + + public static Line_parameter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Line_parameter)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(Line_parameter prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements Line_parameterOrBuilder { + private int bitField0_; + + private double startX_; + + private double startY_; + + private double endX_; + + private double endY_; + + private double lineRealLen_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Line_parameter_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Line_parameter_fieldAccessorTable.ensureFieldAccessorsInitialized(Line_parameter.class, Builder.class); + } + + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = Line_parameter.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.startX_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFE; + this.startY_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.endX_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFB; + this.endY_ = 0.0D; + this.bitField0_ &= 0xFFFFFFF7; + this.lineRealLen_ = 0.0D; + this.bitField0_ &= 0xFFFFFFEF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Line_parameter_descriptor; + } + + public Line_parameter getDefaultInstanceForType() { + return Line_parameter.getDefaultInstance(); + } + + public Line_parameter build() { + Line_parameter result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public Line_parameter buildPartial() { + Line_parameter result = new Line_parameter(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.startX_ = this.startX_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.startY_ = this.startY_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.endX_ = this.endX_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.endY_ = this.endY_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.lineRealLen_ = this.lineRealLen_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof Line_parameter) + return mergeFrom((Line_parameter)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(Line_parameter other) { + if (other == Line_parameter.getDefaultInstance()) + return this; + if (other.hasStartX()) + setStartX(other.getStartX()); + if (other.hasStartY()) + setStartY(other.getStartY()); + if (other.hasEndX()) + setEndX(other.getEndX()); + if (other.hasEndY()) + setEndY(other.getEndY()); + if (other.hasLineRealLen()) + setLineRealLen(other.getLineRealLen()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + Line_parameter parsedMessage = null; + try { + parsedMessage = (Line_parameter) Line_parameter.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (Line_parameter)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasStartX() { + return ((this.bitField0_ & 0x1) == 1); + } + + public double getStartX() { + return this.startX_; + } + + public Builder setStartX(double value) { + this.bitField0_ |= 0x1; + this.startX_ = value; + onChanged(); + return this; + } + + public Builder clearStartX() { + this.bitField0_ &= 0xFFFFFFFE; + this.startX_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasStartY() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getStartY() { + return this.startY_; + } + + public Builder setStartY(double value) { + this.bitField0_ |= 0x2; + this.startY_ = value; + onChanged(); + return this; + } + + public Builder clearStartY() { + this.bitField0_ &= 0xFFFFFFFD; + this.startY_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasEndX() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getEndX() { + return this.endX_; + } + + public Builder setEndX(double value) { + this.bitField0_ |= 0x4; + this.endX_ = value; + onChanged(); + return this; + } + + public Builder clearEndX() { + this.bitField0_ &= 0xFFFFFFFB; + this.endX_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasEndY() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getEndY() { + return this.endY_; + } + + public Builder setEndY(double value) { + this.bitField0_ |= 0x8; + this.endY_ = value; + onChanged(); + return this; + } + + public Builder clearEndY() { + this.bitField0_ &= 0xFFFFFFF7; + this.endY_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLineRealLen() { + return ((this.bitField0_ & 0x10) == 16); + } + + public double getLineRealLen() { + return this.lineRealLen_; + } + + public Builder setLineRealLen(double value) { + this.bitField0_ |= 0x10; + this.lineRealLen_ = value; + onChanged(); + return this; + } + + public Builder clearLineRealLen() { + this.bitField0_ &= 0xFFFFFFEF; + this.lineRealLen_ = 0.0D; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class Camera_analyst_parameter extends GeneratedMessage implements Camera_analyst_parameterOrBuilder { + private static final Camera_analyst_parameter defaultInstance = new Camera_analyst_parameter(true); + + private final UnknownFieldSet unknownFields; + + private Camera_analyst_parameter(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private Camera_analyst_parameter(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static Camera_analyst_parameter getDefaultInstance() { + return defaultInstance; + } + + public Camera_analyst_parameter getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Camera_analyst_parameter(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + Line_parameter.Builder subBuilder; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.cameraId_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.cameraName_ = bs; + break; + case 56: + this.bitField0_ |= 0x4; + this.dome_ = input.readInt32(); + break; + case 65: + this.bitField0_ |= 0x8; + this.baseLon_ = input.readDouble(); + break; + case 73: + this.bitField0_ |= 0x10; + this.baseLat_ = input.readDouble(); + break; + case 200: + this.bitField0_ |= 0x20; + this.channel_ = input.readInt32(); + break; + case 208: + this.bitField0_ |= 0x40; + this.forceShipType_ = input.readInt32(); + break; + case 218: + subBuilder = null; + if ((this.bitField0_ & 0x80) == 128) + subBuilder = this.topLine_.toBuilder(); + this.topLine_ = (Line_parameter)input.readMessage(Line_parameter.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.topLine_); + this.topLine_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x80; + break; + case 226: + subBuilder = null; + if ((this.bitField0_ & 0x100) == 256) + subBuilder = this.rightLine_.toBuilder(); + this.rightLine_ = (Line_parameter)input.readMessage(Line_parameter.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.rightLine_); + this.rightLine_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x100; + break; + case 234: + subBuilder = null; + if ((this.bitField0_ & 0x200) == 512) + subBuilder = this.bottomLine_.toBuilder(); + this.bottomLine_ = (Line_parameter)input.readMessage(Line_parameter.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.bottomLine_); + this.bottomLine_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x200; + break; + case 242: + subBuilder = null; + if ((this.bitField0_ & 0x400) == 1024) + subBuilder = this.leftLine_.toBuilder(); + this.leftLine_ = (Line_parameter)input.readMessage(Line_parameter.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.leftLine_); + this.leftLine_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x400; + break; + case 250: + subBuilder = null; + if ((this.bitField0_ & 0x800) == 2048) + subBuilder = this.line2North_.toBuilder(); + this.line2North_ = (Line_parameter)input.readMessage(Line_parameter.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.line2North_); + this.line2North_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x800; + break; + case 256: + this.bitField0_ |= 0x1000; + this.hasVerPix_ = input.readInt32(); + break; + case 265: + this.bitField0_ |= 0x2000; + this.verPixPerMeter_ = input.readDouble(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_fieldAccessorTable.ensureFieldAccessorsInitialized(Camera_analyst_parameter.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public Camera_analyst_parameter parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new Camera_analyst_parameter(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERA_ID_FIELD_NUMBER = 1; + + private int cameraId_; + + public static final int CAMERA_NAME_FIELD_NUMBER = 2; + + private Object cameraName_; + + public static final int DOME_FIELD_NUMBER = 7; + + private int dome_; + + public static final int BASE_LON_FIELD_NUMBER = 8; + + private double baseLon_; + + public static final int BASE_LAT_FIELD_NUMBER = 9; + + private double baseLat_; + + public static final int CHANNEL_FIELD_NUMBER = 25; + + private int channel_; + + public static final int FORCE_SHIP_TYPE_FIELD_NUMBER = 26; + + private int forceShipType_; + + public static final int TOP_LINE_FIELD_NUMBER = 27; + + private Line_parameter topLine_; + + public static final int RIGHT_LINE_FIELD_NUMBER = 28; + + private Line_parameter rightLine_; + + public static final int BOTTOM_LINE_FIELD_NUMBER = 29; + + private Line_parameter bottomLine_; + + public static final int LEFT_LINE_FIELD_NUMBER = 30; + + private Line_parameter leftLine_; + + public static final int LINE2NORTH_FIELD_NUMBER = 31; + + private Line_parameter line2North_; + + public static final int HAS_VER_PIX_FIELD_NUMBER = 32; + + private int hasVerPix_; + + public static final int VER_PIX_PER_METER_FIELD_NUMBER = 33; + + private double verPixPerMeter_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getDome() { + return this.dome_; + } + + public boolean hasBaseLon() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getBaseLon() { + return this.baseLon_; + } + + public boolean hasBaseLat() { + return ((this.bitField0_ & 0x10) == 16); + } + + public double getBaseLat() { + return this.baseLat_; + } + + public boolean hasChannel() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getChannel() { + return this.channel_; + } + + public boolean hasForceShipType() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getForceShipType() { + return this.forceShipType_; + } + + public boolean hasTopLine() { + return ((this.bitField0_ & 0x80) == 128); + } + + public Line_parameter getTopLine() { + return this.topLine_; + } + + public Line_parameterOrBuilder getTopLineOrBuilder() { + return this.topLine_; + } + + public boolean hasRightLine() { + return ((this.bitField0_ & 0x100) == 256); + } + + public Line_parameter getRightLine() { + return this.rightLine_; + } + + public Line_parameterOrBuilder getRightLineOrBuilder() { + return this.rightLine_; + } + + public boolean hasBottomLine() { + return ((this.bitField0_ & 0x200) == 512); + } + + public Line_parameter getBottomLine() { + return this.bottomLine_; + } + + public Line_parameterOrBuilder getBottomLineOrBuilder() { + return this.bottomLine_; + } + + public boolean hasLeftLine() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public Line_parameter getLeftLine() { + return this.leftLine_; + } + + public Line_parameterOrBuilder getLeftLineOrBuilder() { + return this.leftLine_; + } + + public boolean hasLine2North() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public Line_parameter getLine2North() { + return this.line2North_; + } + + public Line_parameterOrBuilder getLine2NorthOrBuilder() { + return this.line2North_; + } + + public boolean hasHasVerPix() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public int getHasVerPix() { + return this.hasVerPix_; + } + + public boolean hasVerPixPerMeter() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getVerPixPerMeter() { + return this.verPixPerMeter_; + } + + private void initFields() { + this.cameraId_ = 0; + this.cameraName_ = ""; + this.dome_ = 0; + this.baseLon_ = 0.0D; + this.baseLat_ = 0.0D; + this.channel_ = 0; + this.forceShipType_ = 0; + this.topLine_ = Line_parameter.getDefaultInstance(); + this.rightLine_ = Line_parameter.getDefaultInstance(); + this.bottomLine_ = Line_parameter.getDefaultInstance(); + this.leftLine_ = Line_parameter.getDefaultInstance(); + this.line2North_ = Line_parameter.getDefaultInstance(); + this.hasVerPix_ = 0; + this.verPixPerMeter_ = 0.0D; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDome()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasBaseLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasBaseLat()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(7, this.dome_); + if ((this.bitField0_ & 0x8) == 8) + output.writeDouble(8, this.baseLon_); + if ((this.bitField0_ & 0x10) == 16) + output.writeDouble(9, this.baseLat_); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(25, this.channel_); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(26, this.forceShipType_); + if ((this.bitField0_ & 0x80) == 128) + output.writeMessage(27, (MessageLite)this.topLine_); + if ((this.bitField0_ & 0x100) == 256) + output.writeMessage(28, (MessageLite)this.rightLine_); + if ((this.bitField0_ & 0x200) == 512) + output.writeMessage(29, (MessageLite)this.bottomLine_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeMessage(30, (MessageLite)this.leftLine_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeMessage(31, (MessageLite)this.line2North_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeInt32(32, this.hasVerPix_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeDouble(33, this.verPixPerMeter_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(7, this.dome_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeDoubleSize(8, this.baseLon_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeDoubleSize(9, this.baseLat_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(25, this.channel_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(26, this.forceShipType_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeMessageSize(27, (MessageLite)this.topLine_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeMessageSize(28, (MessageLite)this.rightLine_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeMessageSize(29, (MessageLite)this.bottomLine_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeMessageSize(30, (MessageLite)this.leftLine_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeMessageSize(31, (MessageLite)this.line2North_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeInt32Size(32, this.hasVerPix_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeDoubleSize(33, this.verPixPerMeter_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static Camera_analyst_parameter parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (Camera_analyst_parameter)PARSER.parseFrom(data); + } + + public static Camera_analyst_parameter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (Camera_analyst_parameter)PARSER.parseFrom(data, extensionRegistry); + } + + public static Camera_analyst_parameter parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (Camera_analyst_parameter)PARSER.parseFrom(data); + } + + public static Camera_analyst_parameter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (Camera_analyst_parameter)PARSER.parseFrom(data, extensionRegistry); + } + + public static Camera_analyst_parameter parseFrom(InputStream input) throws IOException { + return (Camera_analyst_parameter)PARSER.parseFrom(input); + } + + public static Camera_analyst_parameter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Camera_analyst_parameter)PARSER.parseFrom(input, extensionRegistry); + } + + public static Camera_analyst_parameter parseDelimitedFrom(InputStream input) throws IOException { + return (Camera_analyst_parameter)PARSER.parseDelimitedFrom(input); + } + + public static Camera_analyst_parameter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Camera_analyst_parameter)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static Camera_analyst_parameter parseFrom(CodedInputStream input) throws IOException { + return (Camera_analyst_parameter)PARSER.parseFrom(input); + } + + public static Camera_analyst_parameter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Camera_analyst_parameter)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(Camera_analyst_parameter prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements Camera_analyst_parameterOrBuilder { + private int bitField0_; + + private int cameraId_; + + private Object cameraName_; + + private int dome_; + + private double baseLon_; + + private double baseLat_; + + private int channel_; + + private int forceShipType_; + + private Line_parameter topLine_; + + private SingleFieldBuilder topLineBuilder_; + + private Line_parameter rightLine_; + + private SingleFieldBuilder rightLineBuilder_; + + private Line_parameter bottomLine_; + + private SingleFieldBuilder bottomLineBuilder_; + + private Line_parameter leftLine_; + + private SingleFieldBuilder leftLineBuilder_; + + private Line_parameter line2North_; + + private SingleFieldBuilder line2NorthBuilder_; + + private int hasVerPix_; + + private double verPixPerMeter_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_fieldAccessorTable.ensureFieldAccessorsInitialized(Camera_analyst_parameter.class, Builder.class); + } + + private Builder() { + this.cameraName_ = ""; + this.topLine_ = Line_parameter.getDefaultInstance(); + this.rightLine_ = Line_parameter.getDefaultInstance(); + this.bottomLine_ = Line_parameter.getDefaultInstance(); + this.leftLine_ = Line_parameter.getDefaultInstance(); + this.line2North_ = Line_parameter.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.cameraName_ = ""; + this.topLine_ = Line_parameter.getDefaultInstance(); + this.rightLine_ = Line_parameter.getDefaultInstance(); + this.bottomLine_ = Line_parameter.getDefaultInstance(); + this.leftLine_ = Line_parameter.getDefaultInstance(); + this.line2North_ = Line_parameter.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (Camera_analyst_parameter.alwaysUseFieldBuilders) { + getTopLineFieldBuilder(); + getRightLineFieldBuilder(); + getBottomLineFieldBuilder(); + getLeftLineFieldBuilder(); + getLine2NorthFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraName_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.dome_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.baseLon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFF7; + this.baseLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFEF; + this.channel_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + this.forceShipType_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + if (this.topLineBuilder_ == null) { + this.topLine_ = Line_parameter.getDefaultInstance(); + } else { + this.topLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFF7F; + if (this.rightLineBuilder_ == null) { + this.rightLine_ = Line_parameter.getDefaultInstance(); + } else { + this.rightLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFEFF; + if (this.bottomLineBuilder_ == null) { + this.bottomLine_ = Line_parameter.getDefaultInstance(); + } else { + this.bottomLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFDFF; + if (this.leftLineBuilder_ == null) { + this.leftLine_ = Line_parameter.getDefaultInstance(); + } else { + this.leftLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFBFF; + if (this.line2NorthBuilder_ == null) { + this.line2North_ = Line_parameter.getDefaultInstance(); + } else { + this.line2NorthBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFF7FF; + this.hasVerPix_ = 0; + this.bitField0_ &= 0xFFFFEFFF; + this.verPixPerMeter_ = 0.0D; + this.bitField0_ &= 0xFFFFDFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_descriptor; + } + + public Camera_analyst_parameter getDefaultInstanceForType() { + return Camera_analyst_parameter.getDefaultInstance(); + } + + public Camera_analyst_parameter build() { + Camera_analyst_parameter result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public Camera_analyst_parameter buildPartial() { + Camera_analyst_parameter result = new Camera_analyst_parameter(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraName_ = this.cameraName_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.dome_ = this.dome_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.baseLon_ = this.baseLon_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.baseLat_ = this.baseLat_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.channel_ = this.channel_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.forceShipType_ = this.forceShipType_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + if (this.topLineBuilder_ == null) { + result.topLine_ = this.topLine_; + } else { + result.topLine_ = (Line_parameter)this.topLineBuilder_.build(); + } + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + if (this.rightLineBuilder_ == null) { + result.rightLine_ = this.rightLine_; + } else { + result.rightLine_ = (Line_parameter)this.rightLineBuilder_.build(); + } + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + if (this.bottomLineBuilder_ == null) { + result.bottomLine_ = this.bottomLine_; + } else { + result.bottomLine_ = (Line_parameter)this.bottomLineBuilder_.build(); + } + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + if (this.leftLineBuilder_ == null) { + result.leftLine_ = this.leftLine_; + } else { + result.leftLine_ = (Line_parameter)this.leftLineBuilder_.build(); + } + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + if (this.line2NorthBuilder_ == null) { + result.line2North_ = this.line2North_; + } else { + result.line2North_ = (Line_parameter)this.line2NorthBuilder_.build(); + } + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.hasVerPix_ = this.hasVerPix_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.verPixPerMeter_ = this.verPixPerMeter_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof Camera_analyst_parameter) + return mergeFrom((Camera_analyst_parameter)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(Camera_analyst_parameter other) { + if (other == Camera_analyst_parameter.getDefaultInstance()) + return this; + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasCameraName()) { + this.bitField0_ |= 0x2; + this.cameraName_ = other.cameraName_; + onChanged(); + } + if (other.hasDome()) + setDome(other.getDome()); + if (other.hasBaseLon()) + setBaseLon(other.getBaseLon()); + if (other.hasBaseLat()) + setBaseLat(other.getBaseLat()); + if (other.hasChannel()) + setChannel(other.getChannel()); + if (other.hasForceShipType()) + setForceShipType(other.getForceShipType()); + if (other.hasTopLine()) + mergeTopLine(other.getTopLine()); + if (other.hasRightLine()) + mergeRightLine(other.getRightLine()); + if (other.hasBottomLine()) + mergeBottomLine(other.getBottomLine()); + if (other.hasLeftLine()) + mergeLeftLine(other.getLeftLine()); + if (other.hasLine2North()) + mergeLine2North(other.getLine2North()); + if (other.hasHasVerPix()) + setHasVerPix(other.getHasVerPix()); + if (other.hasVerPixPerMeter()) + setVerPixPerMeter(other.getVerPixPerMeter()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasCameraId()) + return false; + if (!hasCameraName()) + return false; + if (!hasDome()) + return false; + if (!hasBaseLon()) + return false; + if (!hasBaseLat()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + Camera_analyst_parameter parsedMessage = null; + try { + parsedMessage = (Camera_analyst_parameter) Camera_analyst_parameter.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (Camera_analyst_parameter)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x1; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public Builder clearCameraName() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraName_ = Camera_analyst_parameter.getDefaultInstance().getCameraName(); + onChanged(); + return this; + } + + public Builder setCameraNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getDome() { + return this.dome_; + } + + public Builder setDome(int value) { + this.bitField0_ |= 0x4; + this.dome_ = value; + onChanged(); + return this; + } + + public Builder clearDome() { + this.bitField0_ &= 0xFFFFFFFB; + this.dome_ = 0; + onChanged(); + return this; + } + + public boolean hasBaseLon() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getBaseLon() { + return this.baseLon_; + } + + public Builder setBaseLon(double value) { + this.bitField0_ |= 0x8; + this.baseLon_ = value; + onChanged(); + return this; + } + + public Builder clearBaseLon() { + this.bitField0_ &= 0xFFFFFFF7; + this.baseLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasBaseLat() { + return ((this.bitField0_ & 0x10) == 16); + } + + public double getBaseLat() { + return this.baseLat_; + } + + public Builder setBaseLat(double value) { + this.bitField0_ |= 0x10; + this.baseLat_ = value; + onChanged(); + return this; + } + + public Builder clearBaseLat() { + this.bitField0_ &= 0xFFFFFFEF; + this.baseLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasChannel() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getChannel() { + return this.channel_; + } + + public Builder setChannel(int value) { + this.bitField0_ |= 0x20; + this.channel_ = value; + onChanged(); + return this; + } + + public Builder clearChannel() { + this.bitField0_ &= 0xFFFFFFDF; + this.channel_ = 0; + onChanged(); + return this; + } + + public boolean hasForceShipType() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getForceShipType() { + return this.forceShipType_; + } + + public Builder setForceShipType(int value) { + this.bitField0_ |= 0x40; + this.forceShipType_ = value; + onChanged(); + return this; + } + + public Builder clearForceShipType() { + this.bitField0_ &= 0xFFFFFFBF; + this.forceShipType_ = 0; + onChanged(); + return this; + } + + public boolean hasTopLine() { + return ((this.bitField0_ & 0x80) == 128); + } + + public Line_parameter getTopLine() { + if (this.topLineBuilder_ == null) + return this.topLine_; + return (Line_parameter)this.topLineBuilder_.getMessage(); + } + + public Builder setTopLine(Line_parameter value) { + if (this.topLineBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.topLine_ = value; + onChanged(); + } else { + this.topLineBuilder_.setMessage(value); + } + this.bitField0_ |= 0x80; + return this; + } + + public Builder setTopLine(Line_parameter.Builder builderForValue) { + if (this.topLineBuilder_ == null) { + this.topLine_ = builderForValue.build(); + onChanged(); + } else { + this.topLineBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x80; + return this; + } + + public Builder mergeTopLine(Line_parameter value) { + if (this.topLineBuilder_ == null) { + if ((this.bitField0_ & 0x80) == 128 && this.topLine_ != Line_parameter.getDefaultInstance()) { + this.topLine_ = Line_parameter.newBuilder(this.topLine_).mergeFrom(value).buildPartial(); + } else { + this.topLine_ = value; + } + onChanged(); + } else { + this.topLineBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x80; + return this; + } + + public Builder clearTopLine() { + if (this.topLineBuilder_ == null) { + this.topLine_ = Line_parameter.getDefaultInstance(); + onChanged(); + } else { + this.topLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFF7F; + return this; + } + + public Line_parameter.Builder getTopLineBuilder() { + this.bitField0_ |= 0x80; + onChanged(); + return (Line_parameter.Builder)getTopLineFieldBuilder().getBuilder(); + } + + public Line_parameterOrBuilder getTopLineOrBuilder() { + if (this.topLineBuilder_ != null) + return (Line_parameterOrBuilder)this.topLineBuilder_.getMessageOrBuilder(); + return this.topLine_; + } + + private SingleFieldBuilder getTopLineFieldBuilder() { + if (this.topLineBuilder_ == null) { + this.topLineBuilder_ = new SingleFieldBuilder(getTopLine(), getParentForChildren(), isClean()); + this.topLine_ = null; + } + return this.topLineBuilder_; + } + + public boolean hasRightLine() { + return ((this.bitField0_ & 0x100) == 256); + } + + public Line_parameter getRightLine() { + if (this.rightLineBuilder_ == null) + return this.rightLine_; + return (Line_parameter)this.rightLineBuilder_.getMessage(); + } + + public Builder setRightLine(Line_parameter value) { + if (this.rightLineBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.rightLine_ = value; + onChanged(); + } else { + this.rightLineBuilder_.setMessage(value); + } + this.bitField0_ |= 0x100; + return this; + } + + public Builder setRightLine(Line_parameter.Builder builderForValue) { + if (this.rightLineBuilder_ == null) { + this.rightLine_ = builderForValue.build(); + onChanged(); + } else { + this.rightLineBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x100; + return this; + } + + public Builder mergeRightLine(Line_parameter value) { + if (this.rightLineBuilder_ == null) { + if ((this.bitField0_ & 0x100) == 256 && this.rightLine_ != Line_parameter.getDefaultInstance()) { + this.rightLine_ = Line_parameter.newBuilder(this.rightLine_).mergeFrom(value).buildPartial(); + } else { + this.rightLine_ = value; + } + onChanged(); + } else { + this.rightLineBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x100; + return this; + } + + public Builder clearRightLine() { + if (this.rightLineBuilder_ == null) { + this.rightLine_ = Line_parameter.getDefaultInstance(); + onChanged(); + } else { + this.rightLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFEFF; + return this; + } + + public Line_parameter.Builder getRightLineBuilder() { + this.bitField0_ |= 0x100; + onChanged(); + return (Line_parameter.Builder)getRightLineFieldBuilder().getBuilder(); + } + + public Line_parameterOrBuilder getRightLineOrBuilder() { + if (this.rightLineBuilder_ != null) + return (Line_parameterOrBuilder)this.rightLineBuilder_.getMessageOrBuilder(); + return this.rightLine_; + } + + private SingleFieldBuilder getRightLineFieldBuilder() { + if (this.rightLineBuilder_ == null) { + this.rightLineBuilder_ = new SingleFieldBuilder(getRightLine(), getParentForChildren(), isClean()); + this.rightLine_ = null; + } + return this.rightLineBuilder_; + } + + public boolean hasBottomLine() { + return ((this.bitField0_ & 0x200) == 512); + } + + public Line_parameter getBottomLine() { + if (this.bottomLineBuilder_ == null) + return this.bottomLine_; + return (Line_parameter)this.bottomLineBuilder_.getMessage(); + } + + public Builder setBottomLine(Line_parameter value) { + if (this.bottomLineBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.bottomLine_ = value; + onChanged(); + } else { + this.bottomLineBuilder_.setMessage(value); + } + this.bitField0_ |= 0x200; + return this; + } + + public Builder setBottomLine(Line_parameter.Builder builderForValue) { + if (this.bottomLineBuilder_ == null) { + this.bottomLine_ = builderForValue.build(); + onChanged(); + } else { + this.bottomLineBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x200; + return this; + } + + public Builder mergeBottomLine(Line_parameter value) { + if (this.bottomLineBuilder_ == null) { + if ((this.bitField0_ & 0x200) == 512 && this.bottomLine_ != Line_parameter.getDefaultInstance()) { + this.bottomLine_ = Line_parameter.newBuilder(this.bottomLine_).mergeFrom(value).buildPartial(); + } else { + this.bottomLine_ = value; + } + onChanged(); + } else { + this.bottomLineBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x200; + return this; + } + + public Builder clearBottomLine() { + if (this.bottomLineBuilder_ == null) { + this.bottomLine_ = Line_parameter.getDefaultInstance(); + onChanged(); + } else { + this.bottomLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFDFF; + return this; + } + + public Line_parameter.Builder getBottomLineBuilder() { + this.bitField0_ |= 0x200; + onChanged(); + return (Line_parameter.Builder)getBottomLineFieldBuilder().getBuilder(); + } + + public Line_parameterOrBuilder getBottomLineOrBuilder() { + if (this.bottomLineBuilder_ != null) + return (Line_parameterOrBuilder)this.bottomLineBuilder_.getMessageOrBuilder(); + return this.bottomLine_; + } + + private SingleFieldBuilder getBottomLineFieldBuilder() { + if (this.bottomLineBuilder_ == null) { + this.bottomLineBuilder_ = new SingleFieldBuilder(getBottomLine(), getParentForChildren(), isClean()); + this.bottomLine_ = null; + } + return this.bottomLineBuilder_; + } + + public boolean hasLeftLine() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public Line_parameter getLeftLine() { + if (this.leftLineBuilder_ == null) + return this.leftLine_; + return (Line_parameter)this.leftLineBuilder_.getMessage(); + } + + public Builder setLeftLine(Line_parameter value) { + if (this.leftLineBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.leftLine_ = value; + onChanged(); + } else { + this.leftLineBuilder_.setMessage(value); + } + this.bitField0_ |= 0x400; + return this; + } + + public Builder setLeftLine(Line_parameter.Builder builderForValue) { + if (this.leftLineBuilder_ == null) { + this.leftLine_ = builderForValue.build(); + onChanged(); + } else { + this.leftLineBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x400; + return this; + } + + public Builder mergeLeftLine(Line_parameter value) { + if (this.leftLineBuilder_ == null) { + if ((this.bitField0_ & 0x400) == 1024 && this.leftLine_ != Line_parameter.getDefaultInstance()) { + this.leftLine_ = Line_parameter.newBuilder(this.leftLine_).mergeFrom(value).buildPartial(); + } else { + this.leftLine_ = value; + } + onChanged(); + } else { + this.leftLineBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x400; + return this; + } + + public Builder clearLeftLine() { + if (this.leftLineBuilder_ == null) { + this.leftLine_ = Line_parameter.getDefaultInstance(); + onChanged(); + } else { + this.leftLineBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFBFF; + return this; + } + + public Line_parameter.Builder getLeftLineBuilder() { + this.bitField0_ |= 0x400; + onChanged(); + return (Line_parameter.Builder)getLeftLineFieldBuilder().getBuilder(); + } + + public Line_parameterOrBuilder getLeftLineOrBuilder() { + if (this.leftLineBuilder_ != null) + return (Line_parameterOrBuilder)this.leftLineBuilder_.getMessageOrBuilder(); + return this.leftLine_; + } + + private SingleFieldBuilder getLeftLineFieldBuilder() { + if (this.leftLineBuilder_ == null) { + this.leftLineBuilder_ = new SingleFieldBuilder(getLeftLine(), getParentForChildren(), isClean()); + this.leftLine_ = null; + } + return this.leftLineBuilder_; + } + + public boolean hasLine2North() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public Line_parameter getLine2North() { + if (this.line2NorthBuilder_ == null) + return this.line2North_; + return (Line_parameter)this.line2NorthBuilder_.getMessage(); + } + + public Builder setLine2North(Line_parameter value) { + if (this.line2NorthBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.line2North_ = value; + onChanged(); + } else { + this.line2NorthBuilder_.setMessage(value); + } + this.bitField0_ |= 0x800; + return this; + } + + public Builder setLine2North(Line_parameter.Builder builderForValue) { + if (this.line2NorthBuilder_ == null) { + this.line2North_ = builderForValue.build(); + onChanged(); + } else { + this.line2NorthBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x800; + return this; + } + + public Builder mergeLine2North(Line_parameter value) { + if (this.line2NorthBuilder_ == null) { + if ((this.bitField0_ & 0x800) == 2048 && this.line2North_ != Line_parameter.getDefaultInstance()) { + this.line2North_ = Line_parameter.newBuilder(this.line2North_).mergeFrom(value).buildPartial(); + } else { + this.line2North_ = value; + } + onChanged(); + } else { + this.line2NorthBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x800; + return this; + } + + public Builder clearLine2North() { + if (this.line2NorthBuilder_ == null) { + this.line2North_ = Line_parameter.getDefaultInstance(); + onChanged(); + } else { + this.line2NorthBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFF7FF; + return this; + } + + public Line_parameter.Builder getLine2NorthBuilder() { + this.bitField0_ |= 0x800; + onChanged(); + return (Line_parameter.Builder)getLine2NorthFieldBuilder().getBuilder(); + } + + public Line_parameterOrBuilder getLine2NorthOrBuilder() { + if (this.line2NorthBuilder_ != null) + return (Line_parameterOrBuilder)this.line2NorthBuilder_.getMessageOrBuilder(); + return this.line2North_; + } + + private SingleFieldBuilder getLine2NorthFieldBuilder() { + if (this.line2NorthBuilder_ == null) { + this.line2NorthBuilder_ = new SingleFieldBuilder(getLine2North(), getParentForChildren(), isClean()); + this.line2North_ = null; + } + return this.line2NorthBuilder_; + } + + public boolean hasHasVerPix() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public int getHasVerPix() { + return this.hasVerPix_; + } + + public Builder setHasVerPix(int value) { + this.bitField0_ |= 0x1000; + this.hasVerPix_ = value; + onChanged(); + return this; + } + + public Builder clearHasVerPix() { + this.bitField0_ &= 0xFFFFEFFF; + this.hasVerPix_ = 0; + onChanged(); + return this; + } + + public boolean hasVerPixPerMeter() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getVerPixPerMeter() { + return this.verPixPerMeter_; + } + + public Builder setVerPixPerMeter(double value) { + this.bitField0_ |= 0x2000; + this.verPixPerMeter_ = value; + onChanged(); + return this; + } + + public Builder clearVerPixPerMeter() { + this.bitField0_ &= 0xFFFFDFFF; + this.verPixPerMeter_ = 0.0D; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CameraInfo extends GeneratedMessage implements CameraInfoOrBuilder { + private static final CameraInfo defaultInstance = new CameraInfo(true); + + private final UnknownFieldSet unknownFields; + + private CameraInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraInfo getDefaultInstance() { + return defaultInstance; + } + + public CameraInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.cameraId_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.cameraName_ = bs; + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.controlIp_ = bs; + break; + case 32: + this.bitField0_ |= 0x8; + this.controlPort_ = input.readUInt32(); + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.cameraUid_ = bs; + break; + case 50: + bs = input.readBytes(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = bs; + break; + case 56: + this.bitField0_ |= 0x40; + this.dome_ = input.readInt32(); + break; + case 65: + this.bitField0_ |= 0x80; + this.lon_ = input.readDouble(); + break; + case 73: + this.bitField0_ |= 0x100; + this.lat_ = input.readDouble(); + break; + case 82: + bs = input.readBytes(); + this.bitField0_ |= 0x200; + this.rtsp_ = bs; + break; + case 89: + this.bitField0_ |= 0x400; + this.destLat_ = input.readDouble(); + break; + case 97: + this.bitField0_ |= 0x800; + this.destLon_ = input.readDouble(); + break; + case 109: + this.bitField0_ |= 0x1000; + this.northAngle_ = input.readFloat(); + break; + case 117: + this.bitField0_ |= 0x2000; + this.camHeight_ = input.readFloat(); + break; + case 125: + this.bitField0_ |= 0x4000; + this.maxCamCentDist_ = input.readFloat(); + break; + case 133: + this.bitField0_ |= 0x8000; + this.targitW_ = input.readFloat(); + break; + case 141: + this.bitField0_ |= 0x10000; + this.zoomNearFac_ = input.readFloat(); + break; + case 149: + this.bitField0_ |= 0x20000; + this.zoomFarFac_ = input.readFloat(); + break; + case 152: + this.bitField0_ |= 0x40000; + this.cameraColor_ = input.readInt32(); + break; + case 161: + this.bitField0_ |= 0x80000; + this.maxRange_ = input.readDouble(); + break; + case 168: + this.bitField0_ |= 0x100000; + this.cameraType_ = input.readInt32(); + break; + case 178: + bs = input.readBytes(); + this.bitField0_ |= 0x200000; + this.mediaIp_ = bs; + break; + case 184: + this.bitField0_ |= 0x400000; + this.mediaPort_ = input.readInt32(); + break; + case 192: + this.bitField0_ |= 0x800000; + this.forceshipdect_ = input.readInt32(); + break; + case 200: + this.bitField0_ |= 0x1000000; + this.channelnum_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_CameraInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERAID_FIELD_NUMBER = 1; + + private int cameraId_; + + public static final int CAMERANAME_FIELD_NUMBER = 2; + + private Object cameraName_; + + public static final int CONTROLIP_FIELD_NUMBER = 3; + + private Object controlIp_; + + public static final int CONTROLPORT_FIELD_NUMBER = 4; + + private int controlPort_; + + public static final int CAMERAUID_FIELD_NUMBER = 5; + + private Object cameraUid_; + + public static final int CAMERAPWD_FIELD_NUMBER = 6; + + private Object cameraPwd_; + + public static final int DOME_FIELD_NUMBER = 7; + + private int dome_; + + public static final int LON_FIELD_NUMBER = 8; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 9; + + private double lat_; + + public static final int RTSP_FIELD_NUMBER = 10; + + private Object rtsp_; + + public static final int DESTLAT_FIELD_NUMBER = 11; + + private double destLat_; + + public static final int DESTLON_FIELD_NUMBER = 12; + + private double destLon_; + + public static final int NORTHANGLE_FIELD_NUMBER = 13; + + private float northAngle_; + + public static final int CAMHEIGHT_FIELD_NUMBER = 14; + + private float camHeight_; + + public static final int MAXCAMCENTDIST_FIELD_NUMBER = 15; + + private float maxCamCentDist_; + + public static final int TARGITW_FIELD_NUMBER = 16; + + private float targitW_; + + public static final int ZOOMNEARFAC_FIELD_NUMBER = 17; + + private float zoomNearFac_; + + public static final int ZOOMFARFAC_FIELD_NUMBER = 18; + + private float zoomFarFac_; + + public static final int CAMERACOLOR_FIELD_NUMBER = 19; + + private int cameraColor_; + + public static final int MAXRANGE_FIELD_NUMBER = 20; + + private double maxRange_; + + public static final int CAMERATYPE_FIELD_NUMBER = 21; + + private int cameraType_; + + public static final int MEDIAIP_FIELD_NUMBER = 22; + + private Object mediaIp_; + + public static final int MEDIAPORT_FIELD_NUMBER = 23; + + private int mediaPort_; + + public static final int FORCESHIPDECT_FIELD_NUMBER = 24; + + private int forceshipdect_; + + public static final int CHANNELNUM_FIELD_NUMBER = 25; + + private int channelnum_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasControlIp() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getControlIp() { + Object ref = this.controlIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.controlIp_ = s; + return s; + } + + public ByteString getControlIpBytes() { + Object ref = this.controlIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.controlIp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasControlPort() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getControlPort() { + return this.controlPort_; + } + + public boolean hasCameraUid() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCameraUid() { + Object ref = this.cameraUid_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraUid_ = s; + return s; + } + + public ByteString getCameraUidBytes() { + Object ref = this.cameraUid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraUid_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraPwd() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getCameraPwd() { + Object ref = this.cameraPwd_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraPwd_ = s; + return s; + } + + public ByteString getCameraPwdBytes() { + Object ref = this.cameraPwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraPwd_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getDome() { + return this.dome_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDestLat() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getDestLat() { + return this.destLat_; + } + + public boolean hasDestLon() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getDestLon() { + return this.destLon_; + } + + public boolean hasNorthAngle() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public float getNorthAngle() { + return this.northAngle_; + } + + public boolean hasCamHeight() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getCamHeight() { + return this.camHeight_; + } + + public boolean hasMaxCamCentDist() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getMaxCamCentDist() { + return this.maxCamCentDist_; + } + + public boolean hasTargitW() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getTargitW() { + return this.targitW_; + } + + public boolean hasZoomNearFac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getZoomNearFac() { + return this.zoomNearFac_; + } + + public boolean hasZoomFarFac() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getZoomFarFac() { + return this.zoomFarFac_; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public boolean hasMaxRange() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getMaxRange() { + return this.maxRange_; + } + + public boolean hasCameraType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getCameraType() { + return this.cameraType_; + } + + public boolean hasMediaIp() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public String getMediaIp() { + Object ref = this.mediaIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaIp_ = s; + return s; + } + + public ByteString getMediaIpBytes() { + Object ref = this.mediaIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaIp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMediaPort() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public int getMediaPort() { + return this.mediaPort_; + } + + public boolean hasForceshipdect() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public int getForceshipdect() { + return this.forceshipdect_; + } + + public boolean hasChannelnum() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public int getChannelnum() { + return this.channelnum_; + } + + private void initFields() { + this.cameraId_ = 0; + this.cameraName_ = ""; + this.controlIp_ = ""; + this.controlPort_ = 0; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.dome_ = 0; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.rtsp_ = ""; + this.destLat_ = 0.0D; + this.destLon_ = 0.0D; + this.northAngle_ = 0.0F; + this.camHeight_ = 0.0F; + this.maxCamCentDist_ = 0.0F; + this.targitW_ = 0.0F; + this.zoomNearFac_ = 0.0F; + this.zoomFarFac_ = 0.0F; + this.cameraColor_ = 0; + this.maxRange_ = 0.0D; + this.cameraType_ = 0; + this.mediaIp_ = ""; + this.mediaPort_ = 0; + this.forceshipdect_ = 0; + this.channelnum_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasControlIp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasControlPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraUid()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraPwd()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDome()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getControlIpBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeUInt32(4, this.controlPort_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getCameraUidBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getCameraPwdBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.dome_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.lon_); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.lat_); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getRtspBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeDouble(11, this.destLat_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeDouble(12, this.destLon_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeFloat(13, this.northAngle_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeFloat(14, this.camHeight_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeFloat(15, this.maxCamCentDist_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeFloat(16, this.targitW_); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeFloat(17, this.zoomNearFac_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeFloat(18, this.zoomFarFac_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeInt32(19, this.cameraColor_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeDouble(20, this.maxRange_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeInt32(21, this.cameraType_); + if ((this.bitField0_ & 0x200000) == 2097152) + output.writeBytes(22, getMediaIpBytes()); + if ((this.bitField0_ & 0x400000) == 4194304) + output.writeInt32(23, this.mediaPort_); + if ((this.bitField0_ & 0x800000) == 8388608) + output.writeInt32(24, this.forceshipdect_); + if ((this.bitField0_ & 0x1000000) == 16777216) + output.writeInt32(25, this.channelnum_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getControlIpBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeUInt32Size(4, this.controlPort_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getCameraUidBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getCameraPwdBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.dome_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.lon_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.lat_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getRtspBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeDoubleSize(11, this.destLat_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeDoubleSize(12, this.destLon_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeFloatSize(13, this.northAngle_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeFloatSize(14, this.camHeight_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeFloatSize(15, this.maxCamCentDist_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeFloatSize(16, this.targitW_); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeFloatSize(17, this.zoomNearFac_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeFloatSize(18, this.zoomFarFac_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeInt32Size(19, this.cameraColor_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeDoubleSize(20, this.maxRange_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeInt32Size(21, this.cameraType_); + if ((this.bitField0_ & 0x200000) == 2097152) + size += CodedOutputStream.computeBytesSize(22, getMediaIpBytes()); + if ((this.bitField0_ & 0x400000) == 4194304) + size += CodedOutputStream.computeInt32Size(23, this.mediaPort_); + if ((this.bitField0_ & 0x800000) == 8388608) + size += CodedOutputStream.computeInt32Size(24, this.forceshipdect_); + if ((this.bitField0_ & 0x1000000) == 16777216) + size += CodedOutputStream.computeInt32Size(25, this.channelnum_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data); + } + + public static CameraInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data); + } + + public static CameraInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraInfo parseFrom(InputStream input) throws IOException { + return (CameraInfo)PARSER.parseFrom(input); + } + + public static CameraInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraInfo parseDelimitedFrom(InputStream input) throws IOException { + return (CameraInfo)PARSER.parseDelimitedFrom(input); + } + + public static CameraInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraInfo parseFrom(CodedInputStream input) throws IOException { + return (CameraInfo)PARSER.parseFrom(input); + } + + public static CameraInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraInfoOrBuilder { + private int bitField0_; + + private int cameraId_; + + private Object cameraName_; + + private Object controlIp_; + + private int controlPort_; + + private Object cameraUid_; + + private Object cameraPwd_; + + private int dome_; + + private double lon_; + + private double lat_; + + private Object rtsp_; + + private double destLat_; + + private double destLon_; + + private float northAngle_; + + private float camHeight_; + + private float maxCamCentDist_; + + private float targitW_; + + private float zoomNearFac_; + + private float zoomFarFac_; + + private int cameraColor_; + + private double maxRange_; + + private int cameraType_; + + private Object mediaIp_; + + private int mediaPort_; + + private int forceshipdect_; + + private int channelnum_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_CameraInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraInfo.class, Builder.class); + } + + private Builder() { + this.cameraName_ = ""; + this.controlIp_ = ""; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.rtsp_ = ""; + this.mediaIp_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.cameraName_ = ""; + this.controlIp_ = ""; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.rtsp_ = ""; + this.mediaIp_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CameraInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraName_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.controlIp_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.controlPort_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.cameraUid_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.cameraPwd_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.dome_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.rtsp_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.destLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFBFF; + this.destLon_ = 0.0D; + this.bitField0_ &= 0xFFFFF7FF; + this.northAngle_ = 0.0F; + this.bitField0_ &= 0xFFFFEFFF; + this.camHeight_ = 0.0F; + this.bitField0_ &= 0xFFFFDFFF; + this.maxCamCentDist_ = 0.0F; + this.bitField0_ &= 0xFFFFBFFF; + this.targitW_ = 0.0F; + this.bitField0_ &= 0xFFFF7FFF; + this.zoomNearFac_ = 0.0F; + this.bitField0_ &= 0xFFFEFFFF; + this.zoomFarFac_ = 0.0F; + this.bitField0_ &= 0xFFFDFFFF; + this.cameraColor_ = 0; + this.bitField0_ &= 0xFFFBFFFF; + this.maxRange_ = 0.0D; + this.bitField0_ &= 0xFFF7FFFF; + this.cameraType_ = 0; + this.bitField0_ &= 0xFFEFFFFF; + this.mediaIp_ = ""; + this.bitField0_ &= 0xFFDFFFFF; + this.mediaPort_ = 0; + this.bitField0_ &= 0xFFBFFFFF; + this.forceshipdect_ = 0; + this.bitField0_ &= 0xFF7FFFFF; + this.channelnum_ = 0; + this.bitField0_ &= 0xFEFFFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor; + } + + public CameraInfo getDefaultInstanceForType() { + return CameraInfo.getDefaultInstance(); + } + + public CameraInfo build() { + CameraInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraInfo buildPartial() { + CameraInfo result = new CameraInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraName_ = this.cameraName_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.controlIp_ = this.controlIp_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.controlPort_ = this.controlPort_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.cameraUid_ = this.cameraUid_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.cameraPwd_ = this.cameraPwd_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.dome_ = this.dome_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.destLat_ = this.destLat_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.destLon_ = this.destLon_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.northAngle_ = this.northAngle_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.camHeight_ = this.camHeight_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.maxCamCentDist_ = this.maxCamCentDist_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.targitW_ = this.targitW_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.zoomNearFac_ = this.zoomNearFac_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.zoomFarFac_ = this.zoomFarFac_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.cameraColor_ = this.cameraColor_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.maxRange_ = this.maxRange_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.cameraType_ = this.cameraType_; + if ((from_bitField0_ & 0x200000) == 2097152) + to_bitField0_ |= 0x200000; + result.mediaIp_ = this.mediaIp_; + if ((from_bitField0_ & 0x400000) == 4194304) + to_bitField0_ |= 0x400000; + result.mediaPort_ = this.mediaPort_; + if ((from_bitField0_ & 0x800000) == 8388608) + to_bitField0_ |= 0x800000; + result.forceshipdect_ = this.forceshipdect_; + if ((from_bitField0_ & 0x1000000) == 16777216) + to_bitField0_ |= 0x1000000; + result.channelnum_ = this.channelnum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraInfo) + return mergeFrom((CameraInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraInfo other) { + if (other == CameraInfo.getDefaultInstance()) + return this; + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasCameraName()) { + this.bitField0_ |= 0x2; + this.cameraName_ = other.cameraName_; + onChanged(); + } + if (other.hasControlIp()) { + this.bitField0_ |= 0x4; + this.controlIp_ = other.controlIp_; + onChanged(); + } + if (other.hasControlPort()) + setControlPort(other.getControlPort()); + if (other.hasCameraUid()) { + this.bitField0_ |= 0x10; + this.cameraUid_ = other.cameraUid_; + onChanged(); + } + if (other.hasCameraPwd()) { + this.bitField0_ |= 0x20; + this.cameraPwd_ = other.cameraPwd_; + onChanged(); + } + if (other.hasDome()) + setDome(other.getDome()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasRtsp()) { + this.bitField0_ |= 0x200; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasDestLat()) + setDestLat(other.getDestLat()); + if (other.hasDestLon()) + setDestLon(other.getDestLon()); + if (other.hasNorthAngle()) + setNorthAngle(other.getNorthAngle()); + if (other.hasCamHeight()) + setCamHeight(other.getCamHeight()); + if (other.hasMaxCamCentDist()) + setMaxCamCentDist(other.getMaxCamCentDist()); + if (other.hasTargitW()) + setTargitW(other.getTargitW()); + if (other.hasZoomNearFac()) + setZoomNearFac(other.getZoomNearFac()); + if (other.hasZoomFarFac()) + setZoomFarFac(other.getZoomFarFac()); + if (other.hasCameraColor()) + setCameraColor(other.getCameraColor()); + if (other.hasMaxRange()) + setMaxRange(other.getMaxRange()); + if (other.hasCameraType()) + setCameraType(other.getCameraType()); + if (other.hasMediaIp()) { + this.bitField0_ |= 0x200000; + this.mediaIp_ = other.mediaIp_; + onChanged(); + } + if (other.hasMediaPort()) + setMediaPort(other.getMediaPort()); + if (other.hasForceshipdect()) + setForceshipdect(other.getForceshipdect()); + if (other.hasChannelnum()) + setChannelnum(other.getChannelnum()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasCameraId()) + return false; + if (!hasCameraName()) + return false; + if (!hasControlIp()) + return false; + if (!hasControlPort()) + return false; + if (!hasCameraUid()) + return false; + if (!hasCameraPwd()) + return false; + if (!hasDome()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraInfo parsedMessage = null; + try { + parsedMessage = (CameraInfo) CameraInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x1; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public Builder clearCameraName() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraName_ = CameraInfo.getDefaultInstance().getCameraName(); + onChanged(); + return this; + } + + public Builder setCameraNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public boolean hasControlIp() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getControlIp() { + Object ref = this.controlIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.controlIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getControlIpBytes() { + Object ref = this.controlIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.controlIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setControlIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.controlIp_ = value; + onChanged(); + return this; + } + + public Builder clearControlIp() { + this.bitField0_ &= 0xFFFFFFFB; + this.controlIp_ = CameraInfo.getDefaultInstance().getControlIp(); + onChanged(); + return this; + } + + public Builder setControlIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.controlIp_ = value; + onChanged(); + return this; + } + + public boolean hasControlPort() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getControlPort() { + return this.controlPort_; + } + + public Builder setControlPort(int value) { + this.bitField0_ |= 0x8; + this.controlPort_ = value; + onChanged(); + return this; + } + + public Builder clearControlPort() { + this.bitField0_ &= 0xFFFFFFF7; + this.controlPort_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraUid() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCameraUid() { + Object ref = this.cameraUid_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraUid_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraUidBytes() { + Object ref = this.cameraUid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraUid_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraUid(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.cameraUid_ = value; + onChanged(); + return this; + } + + public Builder clearCameraUid() { + this.bitField0_ &= 0xFFFFFFEF; + this.cameraUid_ = CameraInfo.getDefaultInstance().getCameraUid(); + onChanged(); + return this; + } + + public Builder setCameraUidBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.cameraUid_ = value; + onChanged(); + return this; + } + + public boolean hasCameraPwd() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getCameraPwd() { + Object ref = this.cameraPwd_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraPwd_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraPwdBytes() { + Object ref = this.cameraPwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraPwd_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraPwd(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = value; + onChanged(); + return this; + } + + public Builder clearCameraPwd() { + this.bitField0_ &= 0xFFFFFFDF; + this.cameraPwd_ = CameraInfo.getDefaultInstance().getCameraPwd(); + onChanged(); + return this; + } + + public Builder setCameraPwdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = value; + onChanged(); + return this; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getDome() { + return this.dome_; + } + + public Builder setDome(int value) { + this.bitField0_ |= 0x40; + this.dome_ = value; + onChanged(); + return this; + } + + public Builder clearDome() { + this.bitField0_ &= 0xFFFFFFBF; + this.dome_ = 0; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x80; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFF7F; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x100; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFEFF; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xFFFFFDFF; + this.rtsp_ = CameraInfo.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasDestLat() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getDestLat() { + return this.destLat_; + } + + public Builder setDestLat(double value) { + this.bitField0_ |= 0x400; + this.destLat_ = value; + onChanged(); + return this; + } + + public Builder clearDestLat() { + this.bitField0_ &= 0xFFFFFBFF; + this.destLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasDestLon() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getDestLon() { + return this.destLon_; + } + + public Builder setDestLon(double value) { + this.bitField0_ |= 0x800; + this.destLon_ = value; + onChanged(); + return this; + } + + public Builder clearDestLon() { + this.bitField0_ &= 0xFFFFF7FF; + this.destLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasNorthAngle() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public float getNorthAngle() { + return this.northAngle_; + } + + public Builder setNorthAngle(float value) { + this.bitField0_ |= 0x1000; + this.northAngle_ = value; + onChanged(); + return this; + } + + public Builder clearNorthAngle() { + this.bitField0_ &= 0xFFFFEFFF; + this.northAngle_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCamHeight() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getCamHeight() { + return this.camHeight_; + } + + public Builder setCamHeight(float value) { + this.bitField0_ |= 0x2000; + this.camHeight_ = value; + onChanged(); + return this; + } + + public Builder clearCamHeight() { + this.bitField0_ &= 0xFFFFDFFF; + this.camHeight_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasMaxCamCentDist() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getMaxCamCentDist() { + return this.maxCamCentDist_; + } + + public Builder setMaxCamCentDist(float value) { + this.bitField0_ |= 0x4000; + this.maxCamCentDist_ = value; + onChanged(); + return this; + } + + public Builder clearMaxCamCentDist() { + this.bitField0_ &= 0xFFFFBFFF; + this.maxCamCentDist_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasTargitW() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getTargitW() { + return this.targitW_; + } + + public Builder setTargitW(float value) { + this.bitField0_ |= 0x8000; + this.targitW_ = value; + onChanged(); + return this; + } + + public Builder clearTargitW() { + this.bitField0_ &= 0xFFFF7FFF; + this.targitW_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasZoomNearFac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getZoomNearFac() { + return this.zoomNearFac_; + } + + public Builder setZoomNearFac(float value) { + this.bitField0_ |= 0x10000; + this.zoomNearFac_ = value; + onChanged(); + return this; + } + + public Builder clearZoomNearFac() { + this.bitField0_ &= 0xFFFEFFFF; + this.zoomNearFac_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasZoomFarFac() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getZoomFarFac() { + return this.zoomFarFac_; + } + + public Builder setZoomFarFac(float value) { + this.bitField0_ |= 0x20000; + this.zoomFarFac_ = value; + onChanged(); + return this; + } + + public Builder clearZoomFarFac() { + this.bitField0_ &= 0xFFFDFFFF; + this.zoomFarFac_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public Builder setCameraColor(int value) { + this.bitField0_ |= 0x40000; + this.cameraColor_ = value; + onChanged(); + return this; + } + + public Builder clearCameraColor() { + this.bitField0_ &= 0xFFFBFFFF; + this.cameraColor_ = 0; + onChanged(); + return this; + } + + public boolean hasMaxRange() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getMaxRange() { + return this.maxRange_; + } + + public Builder setMaxRange(double value) { + this.bitField0_ |= 0x80000; + this.maxRange_ = value; + onChanged(); + return this; + } + + public Builder clearMaxRange() { + this.bitField0_ &= 0xFFF7FFFF; + this.maxRange_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCameraType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getCameraType() { + return this.cameraType_; + } + + public Builder setCameraType(int value) { + this.bitField0_ |= 0x100000; + this.cameraType_ = value; + onChanged(); + return this; + } + + public Builder clearCameraType() { + this.bitField0_ &= 0xFFEFFFFF; + this.cameraType_ = 0; + onChanged(); + return this; + } + + public boolean hasMediaIp() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public String getMediaIp() { + Object ref = this.mediaIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMediaIpBytes() { + Object ref = this.mediaIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMediaIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200000; + this.mediaIp_ = value; + onChanged(); + return this; + } + + public Builder clearMediaIp() { + this.bitField0_ &= 0xFFDFFFFF; + this.mediaIp_ = CameraInfo.getDefaultInstance().getMediaIp(); + onChanged(); + return this; + } + + public Builder setMediaIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200000; + this.mediaIp_ = value; + onChanged(); + return this; + } + + public boolean hasMediaPort() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public int getMediaPort() { + return this.mediaPort_; + } + + public Builder setMediaPort(int value) { + this.bitField0_ |= 0x400000; + this.mediaPort_ = value; + onChanged(); + return this; + } + + public Builder clearMediaPort() { + this.bitField0_ &= 0xFFBFFFFF; + this.mediaPort_ = 0; + onChanged(); + return this; + } + + public boolean hasForceshipdect() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public int getForceshipdect() { + return this.forceshipdect_; + } + + public Builder setForceshipdect(int value) { + this.bitField0_ |= 0x800000; + this.forceshipdect_ = value; + onChanged(); + return this; + } + + public Builder clearForceshipdect() { + this.bitField0_ &= 0xFF7FFFFF; + this.forceshipdect_ = 0; + onChanged(); + return this; + } + + public boolean hasChannelnum() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public int getChannelnum() { + return this.channelnum_; + } + + public Builder setChannelnum(int value) { + this.bitField0_ |= 0x1000000; + this.channelnum_ = value; + onChanged(); + return this; + } + + public Builder clearChannelnum() { + this.bitField0_ &= 0xFEFFFFFF; + this.channelnum_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class XideweiServerInfo extends GeneratedMessage implements XideweiServerInfoOrBuilder { + private static final XideweiServerInfo defaultInstance = new XideweiServerInfo(true); + + private final UnknownFieldSet unknownFields; + + private XideweiServerInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private XideweiServerInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static XideweiServerInfo getDefaultInstance() { + return defaultInstance; + } + + public XideweiServerInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private XideweiServerInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.ip_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.port_ = input.readInt32(); + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.uid_ = bs; + break; + case 34: + bs = input.readBytes(); + this.bitField0_ |= 0x8; + this.pwd_ = bs; + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.deviceName_ = bs; + break; + case 58: + if ((mutable_bitField0_ & 0x20) != 32) { + this.cameraAnalystParamList_ = new ArrayList(); + mutable_bitField0_ |= 0x20; + } + this.cameraAnalystParamList_.add((Camera_analyst_parameter)input.readMessage(Camera_analyst_parameter.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x20) == 32) + this.cameraAnalystParamList_ = Collections.unmodifiableList(this.cameraAnalystParamList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_XideweiServerInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_XideweiServerInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(XideweiServerInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public XideweiServerInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new XideweiServerInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int IP_FIELD_NUMBER = 1; + + private Object ip_; + + public static final int PORT_FIELD_NUMBER = 2; + + private int port_; + + public static final int UID_FIELD_NUMBER = 3; + + private Object uid_; + + public static final int PWD_FIELD_NUMBER = 4; + + private Object pwd_; + + public static final int DEVICE_NAME_FIELD_NUMBER = 5; + + private Object deviceName_; + + public static final int CAMERA_ANALYST_PARAM_LIST_FIELD_NUMBER = 7; + + private List cameraAnalystParamList_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasIp() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getIp() { + Object ref = this.ip_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.ip_ = s; + return s; + } + + public ByteString getIpBytes() { + Object ref = this.ip_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.ip_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasPort() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getPort() { + return this.port_; + } + + public boolean hasUid() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getUid() { + Object ref = this.uid_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.uid_ = s; + return s; + } + + public ByteString getUidBytes() { + Object ref = this.uid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.uid_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasPwd() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getPwd() { + Object ref = this.pwd_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.pwd_ = s; + return s; + } + + public ByteString getPwdBytes() { + Object ref = this.pwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.pwd_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public List getCameraAnalystParamListList() { + return this.cameraAnalystParamList_; + } + + public List getCameraAnalystParamListOrBuilderList() { + return (List)this.cameraAnalystParamList_; + } + + public int getCameraAnalystParamListCount() { + return this.cameraAnalystParamList_.size(); + } + + public Camera_analyst_parameter getCameraAnalystParamList(int index) { + return this.cameraAnalystParamList_.get(index); + } + + public Camera_analyst_parameterOrBuilder getCameraAnalystParamListOrBuilder(int index) { + return this.cameraAnalystParamList_.get(index); + } + + private void initFields() { + this.ip_ = ""; + this.port_ = 0; + this.uid_ = ""; + this.pwd_ = ""; + this.deviceName_ = ""; + this.cameraAnalystParamList_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasIp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUid()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasPwd()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDeviceName()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getCameraAnalystParamListCount(); i++) { + if (!getCameraAnalystParamList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getIpBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.port_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getUidBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeBytes(4, getPwdBytes()); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getDeviceNameBytes()); + for (int i = 0; i < this.cameraAnalystParamList_.size(); i++) + output.writeMessage(7, (MessageLite)this.cameraAnalystParamList_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getIpBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.port_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getUidBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeBytesSize(4, getPwdBytes()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getDeviceNameBytes()); + for (int i = 0; i < this.cameraAnalystParamList_.size(); i++) + size += CodedOutputStream.computeMessageSize(7, (MessageLite)this.cameraAnalystParamList_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static XideweiServerInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (XideweiServerInfo)PARSER.parseFrom(data); + } + + public static XideweiServerInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (XideweiServerInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static XideweiServerInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (XideweiServerInfo)PARSER.parseFrom(data); + } + + public static XideweiServerInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (XideweiServerInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static XideweiServerInfo parseFrom(InputStream input) throws IOException { + return (XideweiServerInfo)PARSER.parseFrom(input); + } + + public static XideweiServerInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (XideweiServerInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static XideweiServerInfo parseDelimitedFrom(InputStream input) throws IOException { + return (XideweiServerInfo)PARSER.parseDelimitedFrom(input); + } + + public static XideweiServerInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (XideweiServerInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static XideweiServerInfo parseFrom(CodedInputStream input) throws IOException { + return (XideweiServerInfo)PARSER.parseFrom(input); + } + + public static XideweiServerInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (XideweiServerInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(XideweiServerInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements XideweiServerInfoOrBuilder { + private int bitField0_; + + private Object ip_; + + private int port_; + + private Object uid_; + + private Object pwd_; + + private Object deviceName_; + + private List cameraAnalystParamList_; + + private RepeatedFieldBuilder cameraAnalystParamListBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_XideweiServerInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_XideweiServerInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(XideweiServerInfo.class, Builder.class); + } + + private Builder() { + this.ip_ = ""; + this.uid_ = ""; + this.pwd_ = ""; + this.deviceName_ = ""; + this.cameraAnalystParamList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.ip_ = ""; + this.uid_ = ""; + this.pwd_ = ""; + this.deviceName_ = ""; + this.cameraAnalystParamList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (XideweiServerInfo.alwaysUseFieldBuilders) + getCameraAnalystParamListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.ip_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.port_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.uid_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.pwd_ = ""; + this.bitField0_ &= 0xFFFFFFF7; + this.deviceName_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + if (this.cameraAnalystParamListBuilder_ == null) { + this.cameraAnalystParamList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFDF; + } else { + this.cameraAnalystParamListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_XideweiServerInfo_descriptor; + } + + public XideweiServerInfo getDefaultInstanceForType() { + return XideweiServerInfo.getDefaultInstance(); + } + + public XideweiServerInfo build() { + XideweiServerInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public XideweiServerInfo buildPartial() { + XideweiServerInfo result = new XideweiServerInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.ip_ = this.ip_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.port_ = this.port_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.uid_ = this.uid_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.pwd_ = this.pwd_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.deviceName_ = this.deviceName_; + if (this.cameraAnalystParamListBuilder_ == null) { + if ((this.bitField0_ & 0x20) == 32) { + this.cameraAnalystParamList_ = Collections.unmodifiableList(this.cameraAnalystParamList_); + this.bitField0_ &= 0xFFFFFFDF; + } + result.cameraAnalystParamList_ = this.cameraAnalystParamList_; + } else { + result.cameraAnalystParamList_ = this.cameraAnalystParamListBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof XideweiServerInfo) + return mergeFrom((XideweiServerInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(XideweiServerInfo other) { + if (other == XideweiServerInfo.getDefaultInstance()) + return this; + if (other.hasIp()) { + this.bitField0_ |= 0x1; + this.ip_ = other.ip_; + onChanged(); + } + if (other.hasPort()) + setPort(other.getPort()); + if (other.hasUid()) { + this.bitField0_ |= 0x4; + this.uid_ = other.uid_; + onChanged(); + } + if (other.hasPwd()) { + this.bitField0_ |= 0x8; + this.pwd_ = other.pwd_; + onChanged(); + } + if (other.hasDeviceName()) { + this.bitField0_ |= 0x10; + this.deviceName_ = other.deviceName_; + onChanged(); + } + if (this.cameraAnalystParamListBuilder_ == null) { + if (!other.cameraAnalystParamList_.isEmpty()) { + if (this.cameraAnalystParamList_.isEmpty()) { + this.cameraAnalystParamList_ = other.cameraAnalystParamList_; + this.bitField0_ &= 0xFFFFFFDF; + } else { + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.addAll(other.cameraAnalystParamList_); + } + onChanged(); + } + } else if (!other.cameraAnalystParamList_.isEmpty()) { + if (this.cameraAnalystParamListBuilder_.isEmpty()) { + this.cameraAnalystParamListBuilder_.dispose(); + this.cameraAnalystParamListBuilder_ = null; + this.cameraAnalystParamList_ = other.cameraAnalystParamList_; + this.bitField0_ &= 0xFFFFFFDF; + this.cameraAnalystParamListBuilder_ = XideweiServerInfo.alwaysUseFieldBuilders ? getCameraAnalystParamListFieldBuilder() : null; + } else { + this.cameraAnalystParamListBuilder_.addAllMessages(other.cameraAnalystParamList_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasIp()) + return false; + if (!hasPort()) + return false; + if (!hasUid()) + return false; + if (!hasPwd()) + return false; + if (!hasDeviceName()) + return false; + for (int i = 0; i < getCameraAnalystParamListCount(); i++) { + if (!getCameraAnalystParamList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + XideweiServerInfo parsedMessage = null; + try { + parsedMessage = (XideweiServerInfo) XideweiServerInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (XideweiServerInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasIp() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getIp() { + Object ref = this.ip_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.ip_ = s; + return s; + } + return (String)ref; + } + + public ByteString getIpBytes() { + Object ref = this.ip_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.ip_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.ip_ = value; + onChanged(); + return this; + } + + public Builder clearIp() { + this.bitField0_ &= 0xFFFFFFFE; + this.ip_ = XideweiServerInfo.getDefaultInstance().getIp(); + onChanged(); + return this; + } + + public Builder setIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.ip_ = value; + onChanged(); + return this; + } + + public boolean hasPort() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getPort() { + return this.port_; + } + + public Builder setPort(int value) { + this.bitField0_ |= 0x2; + this.port_ = value; + onChanged(); + return this; + } + + public Builder clearPort() { + this.bitField0_ &= 0xFFFFFFFD; + this.port_ = 0; + onChanged(); + return this; + } + + public boolean hasUid() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getUid() { + Object ref = this.uid_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.uid_ = s; + return s; + } + return (String)ref; + } + + public ByteString getUidBytes() { + Object ref = this.uid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.uid_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setUid(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.uid_ = value; + onChanged(); + return this; + } + + public Builder clearUid() { + this.bitField0_ &= 0xFFFFFFFB; + this.uid_ = XideweiServerInfo.getDefaultInstance().getUid(); + onChanged(); + return this; + } + + public Builder setUidBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.uid_ = value; + onChanged(); + return this; + } + + public boolean hasPwd() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getPwd() { + Object ref = this.pwd_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.pwd_ = s; + return s; + } + return (String)ref; + } + + public ByteString getPwdBytes() { + Object ref = this.pwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.pwd_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setPwd(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.pwd_ = value; + onChanged(); + return this; + } + + public Builder clearPwd() { + this.bitField0_ &= 0xFFFFFFF7; + this.pwd_ = XideweiServerInfo.getDefaultInstance().getPwd(); + onChanged(); + return this; + } + + public Builder setPwdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.pwd_ = value; + onChanged(); + return this; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDeviceName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.deviceName_ = value; + onChanged(); + return this; + } + + public Builder clearDeviceName() { + this.bitField0_ &= 0xFFFFFFEF; + this.deviceName_ = XideweiServerInfo.getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + + public Builder setDeviceNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.deviceName_ = value; + onChanged(); + return this; + } + + private void ensureCameraAnalystParamListIsMutable() { + if ((this.bitField0_ & 0x20) != 32) { + this.cameraAnalystParamList_ = new ArrayList(this.cameraAnalystParamList_); + this.bitField0_ |= 0x20; + } + } + + public List getCameraAnalystParamListList() { + if (this.cameraAnalystParamListBuilder_ == null) + return Collections.unmodifiableList(this.cameraAnalystParamList_); + return this.cameraAnalystParamListBuilder_.getMessageList(); + } + + public int getCameraAnalystParamListCount() { + if (this.cameraAnalystParamListBuilder_ == null) + return this.cameraAnalystParamList_.size(); + return this.cameraAnalystParamListBuilder_.getCount(); + } + + public Camera_analyst_parameter getCameraAnalystParamList(int index) { + if (this.cameraAnalystParamListBuilder_ == null) + return this.cameraAnalystParamList_.get(index); + return (Camera_analyst_parameter)this.cameraAnalystParamListBuilder_.getMessage(index); + } + + public Builder setCameraAnalystParamList(int index, Camera_analyst_parameter value) { + if (this.cameraAnalystParamListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.set(index, value); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setCameraAnalystParamList(int index, Camera_analyst_parameter.Builder builderForValue) { + if (this.cameraAnalystParamListBuilder_ == null) { + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addCameraAnalystParamList(Camera_analyst_parameter value) { + if (this.cameraAnalystParamListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.add(value); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.addMessage(value); + } + return this; + } + + public Builder addCameraAnalystParamList(int index, Camera_analyst_parameter value) { + if (this.cameraAnalystParamListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.add(index, value); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addCameraAnalystParamList(Camera_analyst_parameter.Builder builderForValue) { + if (this.cameraAnalystParamListBuilder_ == null) { + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.add(builderForValue.build()); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addCameraAnalystParamList(int index, Camera_analyst_parameter.Builder builderForValue) { + if (this.cameraAnalystParamListBuilder_ == null) { + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllCameraAnalystParamList(Iterable values) { + if (this.cameraAnalystParamListBuilder_ == null) { + ensureCameraAnalystParamListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.cameraAnalystParamList_); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearCameraAnalystParamList() { + if (this.cameraAnalystParamListBuilder_ == null) { + this.cameraAnalystParamList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFDF; + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.clear(); + } + return this; + } + + public Builder removeCameraAnalystParamList(int index) { + if (this.cameraAnalystParamListBuilder_ == null) { + ensureCameraAnalystParamListIsMutable(); + this.cameraAnalystParamList_.remove(index); + onChanged(); + } else { + this.cameraAnalystParamListBuilder_.remove(index); + } + return this; + } + + public Camera_analyst_parameter.Builder getCameraAnalystParamListBuilder(int index) { + return (Camera_analyst_parameter.Builder)getCameraAnalystParamListFieldBuilder().getBuilder(index); + } + + public Camera_analyst_parameterOrBuilder getCameraAnalystParamListOrBuilder(int index) { + if (this.cameraAnalystParamListBuilder_ == null) + return this.cameraAnalystParamList_.get(index); + return (Camera_analyst_parameterOrBuilder)this.cameraAnalystParamListBuilder_.getMessageOrBuilder(index); + } + + public List getCameraAnalystParamListOrBuilderList() { + if (this.cameraAnalystParamListBuilder_ != null) + return this.cameraAnalystParamListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.cameraAnalystParamList_); + } + + public Camera_analyst_parameter.Builder addCameraAnalystParamListBuilder() { + return (Camera_analyst_parameter.Builder)getCameraAnalystParamListFieldBuilder().addBuilder(Camera_analyst_parameter.getDefaultInstance()); + } + + public Camera_analyst_parameter.Builder addCameraAnalystParamListBuilder(int index) { + return (Camera_analyst_parameter.Builder)getCameraAnalystParamListFieldBuilder().addBuilder(index, Camera_analyst_parameter.getDefaultInstance()); + } + + public List getCameraAnalystParamListBuilderList() { + return getCameraAnalystParamListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getCameraAnalystParamListFieldBuilder() { + if (this.cameraAnalystParamListBuilder_ == null) { + this.cameraAnalystParamListBuilder_ = new RepeatedFieldBuilder(this.cameraAnalystParamList_, ((this.bitField0_ & 0x20) == 32), getParentForChildren(), isClean()); + this.cameraAnalystParamList_ = null; + } + return this.cameraAnalystParamListBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class MediaServerInfo extends GeneratedMessage implements MediaServerInfoOrBuilder { + private static final MediaServerInfo defaultInstance = new MediaServerInfo(true); + + private final UnknownFieldSet unknownFields; + + private MediaServerInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private MediaServerInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static MediaServerInfo getDefaultInstance() { + return defaultInstance; + } + + public MediaServerInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MediaServerInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.mediaIp_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.mediaPort_ = input.readInt32(); + break; + case 26: + if ((mutable_bitField0_ & 0x4) != 4) { + this.cameraList_ = new ArrayList(); + mutable_bitField0_ |= 0x4; + } + this.cameraList_.add((CameraInfo)input.readMessage(CameraInfo.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x4) == 4) + this.cameraList_ = Collections.unmodifiableList(this.cameraList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaServerInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaServerInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(MediaServerInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public MediaServerInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new MediaServerInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int MEDIAIP_FIELD_NUMBER = 1; + + private Object mediaIp_; + + public static final int MEDIAPORT_FIELD_NUMBER = 2; + + private int mediaPort_; + + public static final int CAMERALIST_FIELD_NUMBER = 3; + + private List cameraList_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasMediaIp() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getMediaIp() { + Object ref = this.mediaIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaIp_ = s; + return s; + } + + public ByteString getMediaIpBytes() { + Object ref = this.mediaIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaIp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMediaPort() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMediaPort() { + return this.mediaPort_; + } + + public List getCameraListList() { + return this.cameraList_; + } + + public List getCameraListOrBuilderList() { + return (List)this.cameraList_; + } + + public int getCameraListCount() { + return this.cameraList_.size(); + } + + public CameraInfo getCameraList(int index) { + return this.cameraList_.get(index); + } + + public CameraInfoOrBuilder getCameraListOrBuilder(int index) { + return this.cameraList_.get(index); + } + + private void initFields() { + this.mediaIp_ = ""; + this.mediaPort_ = 0; + this.cameraList_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasMediaIp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMediaPort()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getCameraListCount(); i++) { + if (!getCameraList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getMediaIpBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.mediaPort_); + for (int i = 0; i < this.cameraList_.size(); i++) + output.writeMessage(3, (MessageLite)this.cameraList_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getMediaIpBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.mediaPort_); + for (int i = 0; i < this.cameraList_.size(); i++) + size += CodedOutputStream.computeMessageSize(3, (MessageLite)this.cameraList_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static MediaServerInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (MediaServerInfo)PARSER.parseFrom(data); + } + + public static MediaServerInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (MediaServerInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static MediaServerInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (MediaServerInfo)PARSER.parseFrom(data); + } + + public static MediaServerInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (MediaServerInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static MediaServerInfo parseFrom(InputStream input) throws IOException { + return (MediaServerInfo)PARSER.parseFrom(input); + } + + public static MediaServerInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (MediaServerInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static MediaServerInfo parseDelimitedFrom(InputStream input) throws IOException { + return (MediaServerInfo)PARSER.parseDelimitedFrom(input); + } + + public static MediaServerInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (MediaServerInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static MediaServerInfo parseFrom(CodedInputStream input) throws IOException { + return (MediaServerInfo)PARSER.parseFrom(input); + } + + public static MediaServerInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (MediaServerInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(MediaServerInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements MediaServerInfoOrBuilder { + private int bitField0_; + + private Object mediaIp_; + + private int mediaPort_; + + private List cameraList_; + + private RepeatedFieldBuilder cameraListBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaServerInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaServerInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(MediaServerInfo.class, Builder.class); + } + + private Builder() { + this.mediaIp_ = ""; + this.cameraList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.mediaIp_ = ""; + this.cameraList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (MediaServerInfo.alwaysUseFieldBuilders) + getCameraListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.mediaIp_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.mediaPort_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + if (this.cameraListBuilder_ == null) { + this.cameraList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFB; + } else { + this.cameraListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaServerInfo_descriptor; + } + + public MediaServerInfo getDefaultInstanceForType() { + return MediaServerInfo.getDefaultInstance(); + } + + public MediaServerInfo build() { + MediaServerInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public MediaServerInfo buildPartial() { + MediaServerInfo result = new MediaServerInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.mediaIp_ = this.mediaIp_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.mediaPort_ = this.mediaPort_; + if (this.cameraListBuilder_ == null) { + if ((this.bitField0_ & 0x4) == 4) { + this.cameraList_ = Collections.unmodifiableList(this.cameraList_); + this.bitField0_ &= 0xFFFFFFFB; + } + result.cameraList_ = this.cameraList_; + } else { + result.cameraList_ = this.cameraListBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof MediaServerInfo) + return mergeFrom((MediaServerInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(MediaServerInfo other) { + if (other == MediaServerInfo.getDefaultInstance()) + return this; + if (other.hasMediaIp()) { + this.bitField0_ |= 0x1; + this.mediaIp_ = other.mediaIp_; + onChanged(); + } + if (other.hasMediaPort()) + setMediaPort(other.getMediaPort()); + if (this.cameraListBuilder_ == null) { + if (!other.cameraList_.isEmpty()) { + if (this.cameraList_.isEmpty()) { + this.cameraList_ = other.cameraList_; + this.bitField0_ &= 0xFFFFFFFB; + } else { + ensureCameraListIsMutable(); + this.cameraList_.addAll(other.cameraList_); + } + onChanged(); + } + } else if (!other.cameraList_.isEmpty()) { + if (this.cameraListBuilder_.isEmpty()) { + this.cameraListBuilder_.dispose(); + this.cameraListBuilder_ = null; + this.cameraList_ = other.cameraList_; + this.bitField0_ &= 0xFFFFFFFB; + this.cameraListBuilder_ = MediaServerInfo.alwaysUseFieldBuilders ? getCameraListFieldBuilder() : null; + } else { + this.cameraListBuilder_.addAllMessages(other.cameraList_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasMediaIp()) + return false; + if (!hasMediaPort()) + return false; + for (int i = 0; i < getCameraListCount(); i++) { + if (!getCameraList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + MediaServerInfo parsedMessage = null; + try { + parsedMessage = (MediaServerInfo) MediaServerInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (MediaServerInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasMediaIp() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getMediaIp() { + Object ref = this.mediaIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMediaIpBytes() { + Object ref = this.mediaIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMediaIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.mediaIp_ = value; + onChanged(); + return this; + } + + public Builder clearMediaIp() { + this.bitField0_ &= 0xFFFFFFFE; + this.mediaIp_ = MediaServerInfo.getDefaultInstance().getMediaIp(); + onChanged(); + return this; + } + + public Builder setMediaIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.mediaIp_ = value; + onChanged(); + return this; + } + + public boolean hasMediaPort() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getMediaPort() { + return this.mediaPort_; + } + + public Builder setMediaPort(int value) { + this.bitField0_ |= 0x2; + this.mediaPort_ = value; + onChanged(); + return this; + } + + public Builder clearMediaPort() { + this.bitField0_ &= 0xFFFFFFFD; + this.mediaPort_ = 0; + onChanged(); + return this; + } + + private void ensureCameraListIsMutable() { + if ((this.bitField0_ & 0x4) != 4) { + this.cameraList_ = new ArrayList(this.cameraList_); + this.bitField0_ |= 0x4; + } + } + + public List getCameraListList() { + if (this.cameraListBuilder_ == null) + return Collections.unmodifiableList(this.cameraList_); + return this.cameraListBuilder_.getMessageList(); + } + + public int getCameraListCount() { + if (this.cameraListBuilder_ == null) + return this.cameraList_.size(); + return this.cameraListBuilder_.getCount(); + } + + public CameraInfo getCameraList(int index) { + if (this.cameraListBuilder_ == null) + return this.cameraList_.get(index); + return (CameraInfo)this.cameraListBuilder_.getMessage(index); + } + + public Builder setCameraList(int index, CameraInfo value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.set(index, value); + onChanged(); + } else { + this.cameraListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setCameraList(int index, CameraInfo.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addCameraList(CameraInfo value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.add(value); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(value); + } + return this; + } + + public Builder addCameraList(int index, CameraInfo value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.add(index, value); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addCameraList(CameraInfo.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.add(builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addCameraList(int index, CameraInfo.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllCameraList(Iterable values) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.cameraList_); + onChanged(); + } else { + this.cameraListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearCameraList() { + if (this.cameraListBuilder_ == null) { + this.cameraList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFB; + onChanged(); + } else { + this.cameraListBuilder_.clear(); + } + return this; + } + + public Builder removeCameraList(int index) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.remove(index); + onChanged(); + } else { + this.cameraListBuilder_.remove(index); + } + return this; + } + + public CameraInfo.Builder getCameraListBuilder(int index) { + return (CameraInfo.Builder)getCameraListFieldBuilder().getBuilder(index); + } + + public CameraInfoOrBuilder getCameraListOrBuilder(int index) { + if (this.cameraListBuilder_ == null) + return this.cameraList_.get(index); + return (CameraInfoOrBuilder)this.cameraListBuilder_.getMessageOrBuilder(index); + } + + public List getCameraListOrBuilderList() { + if (this.cameraListBuilder_ != null) + return this.cameraListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.cameraList_); + } + + public CameraInfo.Builder addCameraListBuilder() { + return (CameraInfo.Builder)getCameraListFieldBuilder().addBuilder(CameraInfo.getDefaultInstance()); + } + + public CameraInfo.Builder addCameraListBuilder(int index) { + return (CameraInfo.Builder)getCameraListFieldBuilder().addBuilder(index, CameraInfo.getDefaultInstance()); + } + + public List getCameraListBuilderList() { + return getCameraListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getCameraListFieldBuilder() { + if (this.cameraListBuilder_ == null) { + this.cameraListBuilder_ = new RepeatedFieldBuilder(this.cameraList_, ((this.bitField0_ & 0x4) == 4), getParentForChildren(), isClean()); + this.cameraList_ = null; + } + return this.cameraListBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class MediaXideweiListInfo extends GeneratedMessage implements MediaXideweiListInfoOrBuilder { + private static final MediaXideweiListInfo defaultInstance = new MediaXideweiListInfo(true); + + private final UnknownFieldSet unknownFields; + + private MediaXideweiListInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private MediaXideweiListInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static MediaXideweiListInfo getDefaultInstance() { + return defaultInstance; + } + + public MediaXideweiListInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MediaXideweiListInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.xideweiinfoList_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.xideweiinfoList_.add((XideweiServerInfo)input.readMessage(XideweiServerInfo.PARSER, extensionRegistry)); + break; + case 18: + if ((mutable_bitField0_ & 0x2) != 2) { + this.mediainfoList_ = new ArrayList(); + mutable_bitField0_ |= 0x2; + } + this.mediainfoList_.add((MediaServerInfo)input.readMessage(MediaServerInfo.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.xideweiinfoList_ = Collections.unmodifiableList(this.xideweiinfoList_); + if ((mutable_bitField0_ & 0x2) == 2) + this.mediainfoList_ = Collections.unmodifiableList(this.mediainfoList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(MediaXideweiListInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public MediaXideweiListInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new MediaXideweiListInfo(input, extensionRegistry); + } + }; + + public static final int XIDEWEIINFOLIST_FIELD_NUMBER = 1; + + private List xideweiinfoList_; + + public static final int MEDIAINFOLIST_FIELD_NUMBER = 2; + + private List mediainfoList_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getXideweiinfoListList() { + return this.xideweiinfoList_; + } + + public List getXideweiinfoListOrBuilderList() { + return (List)this.xideweiinfoList_; + } + + public int getXideweiinfoListCount() { + return this.xideweiinfoList_.size(); + } + + public XideweiServerInfo getXideweiinfoList(int index) { + return this.xideweiinfoList_.get(index); + } + + public XideweiServerInfoOrBuilder getXideweiinfoListOrBuilder(int index) { + return this.xideweiinfoList_.get(index); + } + + public List getMediainfoListList() { + return this.mediainfoList_; + } + + public List getMediainfoListOrBuilderList() { + return (List)this.mediainfoList_; + } + + public int getMediainfoListCount() { + return this.mediainfoList_.size(); + } + + public MediaServerInfo getMediainfoList(int index) { + return this.mediainfoList_.get(index); + } + + public MediaServerInfoOrBuilder getMediainfoListOrBuilder(int index) { + return this.mediainfoList_.get(index); + } + + private void initFields() { + this.xideweiinfoList_ = Collections.emptyList(); + this.mediainfoList_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + int i; + for (i = 0; i < getXideweiinfoListCount(); i++) { + if (!getXideweiinfoList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + for (i = 0; i < getMediainfoListCount(); i++) { + if (!getMediainfoList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + int i; + for (i = 0; i < this.xideweiinfoList_.size(); i++) + output.writeMessage(1, (MessageLite)this.xideweiinfoList_.get(i)); + for (i = 0; i < this.mediainfoList_.size(); i++) + output.writeMessage(2, (MessageLite)this.mediainfoList_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + int i; + for (i = 0; i < this.xideweiinfoList_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.xideweiinfoList_.get(i)); + for (i = 0; i < this.mediainfoList_.size(); i++) + size += CodedOutputStream.computeMessageSize(2, (MessageLite)this.mediainfoList_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static MediaXideweiListInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (MediaXideweiListInfo)PARSER.parseFrom(data); + } + + public static MediaXideweiListInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (MediaXideweiListInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static MediaXideweiListInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (MediaXideweiListInfo)PARSER.parseFrom(data); + } + + public static MediaXideweiListInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (MediaXideweiListInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static MediaXideweiListInfo parseFrom(InputStream input) throws IOException { + return (MediaXideweiListInfo)PARSER.parseFrom(input); + } + + public static MediaXideweiListInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (MediaXideweiListInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static MediaXideweiListInfo parseDelimitedFrom(InputStream input) throws IOException { + return (MediaXideweiListInfo)PARSER.parseDelimitedFrom(input); + } + + public static MediaXideweiListInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (MediaXideweiListInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static MediaXideweiListInfo parseFrom(CodedInputStream input) throws IOException { + return (MediaXideweiListInfo)PARSER.parseFrom(input); + } + + public static MediaXideweiListInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (MediaXideweiListInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(MediaXideweiListInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements MediaXideweiListInfoOrBuilder { + private int bitField0_; + + private List xideweiinfoList_; + + private RepeatedFieldBuilder xideweiinfoListBuilder_; + + private List mediainfoList_; + + private RepeatedFieldBuilder mediainfoListBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(MediaXideweiListInfo.class, Builder.class); + } + + private Builder() { + this.xideweiinfoList_ = Collections.emptyList(); + this.mediainfoList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.xideweiinfoList_ = Collections.emptyList(); + this.mediainfoList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (MediaXideweiListInfo.alwaysUseFieldBuilders) { + getXideweiinfoListFieldBuilder(); + getMediainfoListFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.xideweiinfoListBuilder_ == null) { + this.xideweiinfoList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.xideweiinfoListBuilder_.clear(); + } + if (this.mediainfoListBuilder_ == null) { + this.mediainfoList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + } else { + this.mediainfoListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCamera.internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_descriptor; + } + + public MediaXideweiListInfo getDefaultInstanceForType() { + return MediaXideweiListInfo.getDefaultInstance(); + } + + public MediaXideweiListInfo build() { + MediaXideweiListInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public MediaXideweiListInfo buildPartial() { + MediaXideweiListInfo result = new MediaXideweiListInfo(this); + int from_bitField0_ = this.bitField0_; + if (this.xideweiinfoListBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.xideweiinfoList_ = Collections.unmodifiableList(this.xideweiinfoList_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.xideweiinfoList_ = this.xideweiinfoList_; + } else { + result.xideweiinfoList_ = this.xideweiinfoListBuilder_.build(); + } + if (this.mediainfoListBuilder_ == null) { + if ((this.bitField0_ & 0x2) == 2) { + this.mediainfoList_ = Collections.unmodifiableList(this.mediainfoList_); + this.bitField0_ &= 0xFFFFFFFD; + } + result.mediainfoList_ = this.mediainfoList_; + } else { + result.mediainfoList_ = this.mediainfoListBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof MediaXideweiListInfo) + return mergeFrom((MediaXideweiListInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(MediaXideweiListInfo other) { + if (other == MediaXideweiListInfo.getDefaultInstance()) + return this; + if (this.xideweiinfoListBuilder_ == null) { + if (!other.xideweiinfoList_.isEmpty()) { + if (this.xideweiinfoList_.isEmpty()) { + this.xideweiinfoList_ = other.xideweiinfoList_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.addAll(other.xideweiinfoList_); + } + onChanged(); + } + } else if (!other.xideweiinfoList_.isEmpty()) { + if (this.xideweiinfoListBuilder_.isEmpty()) { + this.xideweiinfoListBuilder_.dispose(); + this.xideweiinfoListBuilder_ = null; + this.xideweiinfoList_ = other.xideweiinfoList_; + this.bitField0_ &= 0xFFFFFFFE; + this.xideweiinfoListBuilder_ = MediaXideweiListInfo.alwaysUseFieldBuilders ? getXideweiinfoListFieldBuilder() : null; + } else { + this.xideweiinfoListBuilder_.addAllMessages(other.xideweiinfoList_); + } + } + if (this.mediainfoListBuilder_ == null) { + if (!other.mediainfoList_.isEmpty()) { + if (this.mediainfoList_.isEmpty()) { + this.mediainfoList_ = other.mediainfoList_; + this.bitField0_ &= 0xFFFFFFFD; + } else { + ensureMediainfoListIsMutable(); + this.mediainfoList_.addAll(other.mediainfoList_); + } + onChanged(); + } + } else if (!other.mediainfoList_.isEmpty()) { + if (this.mediainfoListBuilder_.isEmpty()) { + this.mediainfoListBuilder_.dispose(); + this.mediainfoListBuilder_ = null; + this.mediainfoList_ = other.mediainfoList_; + this.bitField0_ &= 0xFFFFFFFD; + this.mediainfoListBuilder_ = MediaXideweiListInfo.alwaysUseFieldBuilders ? getMediainfoListFieldBuilder() : null; + } else { + this.mediainfoListBuilder_.addAllMessages(other.mediainfoList_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + int i; + for (i = 0; i < getXideweiinfoListCount(); i++) { + if (!getXideweiinfoList(i).isInitialized()) + return false; + } + for (i = 0; i < getMediainfoListCount(); i++) { + if (!getMediainfoList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + MediaXideweiListInfo parsedMessage = null; + try { + parsedMessage = (MediaXideweiListInfo) MediaXideweiListInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (MediaXideweiListInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureXideweiinfoListIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.xideweiinfoList_ = new ArrayList(this.xideweiinfoList_); + this.bitField0_ |= 0x1; + } + } + + public List getXideweiinfoListList() { + if (this.xideweiinfoListBuilder_ == null) + return Collections.unmodifiableList(this.xideweiinfoList_); + return this.xideweiinfoListBuilder_.getMessageList(); + } + + public int getXideweiinfoListCount() { + if (this.xideweiinfoListBuilder_ == null) + return this.xideweiinfoList_.size(); + return this.xideweiinfoListBuilder_.getCount(); + } + + public XideweiServerInfo getXideweiinfoList(int index) { + if (this.xideweiinfoListBuilder_ == null) + return this.xideweiinfoList_.get(index); + return (XideweiServerInfo)this.xideweiinfoListBuilder_.getMessage(index); + } + + public Builder setXideweiinfoList(int index, XideweiServerInfo value) { + if (this.xideweiinfoListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.set(index, value); + onChanged(); + } else { + this.xideweiinfoListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setXideweiinfoList(int index, XideweiServerInfo.Builder builderForValue) { + if (this.xideweiinfoListBuilder_ == null) { + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.xideweiinfoListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addXideweiinfoList(XideweiServerInfo value) { + if (this.xideweiinfoListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.add(value); + onChanged(); + } else { + this.xideweiinfoListBuilder_.addMessage(value); + } + return this; + } + + public Builder addXideweiinfoList(int index, XideweiServerInfo value) { + if (this.xideweiinfoListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.add(index, value); + onChanged(); + } else { + this.xideweiinfoListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addXideweiinfoList(XideweiServerInfo.Builder builderForValue) { + if (this.xideweiinfoListBuilder_ == null) { + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.add(builderForValue.build()); + onChanged(); + } else { + this.xideweiinfoListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addXideweiinfoList(int index, XideweiServerInfo.Builder builderForValue) { + if (this.xideweiinfoListBuilder_ == null) { + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.xideweiinfoListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllXideweiinfoList(Iterable values) { + if (this.xideweiinfoListBuilder_ == null) { + ensureXideweiinfoListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.xideweiinfoList_); + onChanged(); + } else { + this.xideweiinfoListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearXideweiinfoList() { + if (this.xideweiinfoListBuilder_ == null) { + this.xideweiinfoList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.xideweiinfoListBuilder_.clear(); + } + return this; + } + + public Builder removeXideweiinfoList(int index) { + if (this.xideweiinfoListBuilder_ == null) { + ensureXideweiinfoListIsMutable(); + this.xideweiinfoList_.remove(index); + onChanged(); + } else { + this.xideweiinfoListBuilder_.remove(index); + } + return this; + } + + public XideweiServerInfo.Builder getXideweiinfoListBuilder(int index) { + return (XideweiServerInfo.Builder)getXideweiinfoListFieldBuilder().getBuilder(index); + } + + public XideweiServerInfoOrBuilder getXideweiinfoListOrBuilder(int index) { + if (this.xideweiinfoListBuilder_ == null) + return this.xideweiinfoList_.get(index); + return (XideweiServerInfoOrBuilder)this.xideweiinfoListBuilder_.getMessageOrBuilder(index); + } + + public List getXideweiinfoListOrBuilderList() { + if (this.xideweiinfoListBuilder_ != null) + return this.xideweiinfoListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.xideweiinfoList_); + } + + public XideweiServerInfo.Builder addXideweiinfoListBuilder() { + return (XideweiServerInfo.Builder)getXideweiinfoListFieldBuilder().addBuilder(XideweiServerInfo.getDefaultInstance()); + } + + public XideweiServerInfo.Builder addXideweiinfoListBuilder(int index) { + return (XideweiServerInfo.Builder)getXideweiinfoListFieldBuilder().addBuilder(index, XideweiServerInfo.getDefaultInstance()); + } + + public List getXideweiinfoListBuilderList() { + return getXideweiinfoListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getXideweiinfoListFieldBuilder() { + if (this.xideweiinfoListBuilder_ == null) { + this.xideweiinfoListBuilder_ = new RepeatedFieldBuilder(this.xideweiinfoList_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.xideweiinfoList_ = null; + } + return this.xideweiinfoListBuilder_; + } + + private void ensureMediainfoListIsMutable() { + if ((this.bitField0_ & 0x2) != 2) { + this.mediainfoList_ = new ArrayList(this.mediainfoList_); + this.bitField0_ |= 0x2; + } + } + + public List getMediainfoListList() { + if (this.mediainfoListBuilder_ == null) + return Collections.unmodifiableList(this.mediainfoList_); + return this.mediainfoListBuilder_.getMessageList(); + } + + public int getMediainfoListCount() { + if (this.mediainfoListBuilder_ == null) + return this.mediainfoList_.size(); + return this.mediainfoListBuilder_.getCount(); + } + + public MediaServerInfo getMediainfoList(int index) { + if (this.mediainfoListBuilder_ == null) + return this.mediainfoList_.get(index); + return (MediaServerInfo)this.mediainfoListBuilder_.getMessage(index); + } + + public Builder setMediainfoList(int index, MediaServerInfo value) { + if (this.mediainfoListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureMediainfoListIsMutable(); + this.mediainfoList_.set(index, value); + onChanged(); + } else { + this.mediainfoListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setMediainfoList(int index, MediaServerInfo.Builder builderForValue) { + if (this.mediainfoListBuilder_ == null) { + ensureMediainfoListIsMutable(); + this.mediainfoList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.mediainfoListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addMediainfoList(MediaServerInfo value) { + if (this.mediainfoListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureMediainfoListIsMutable(); + this.mediainfoList_.add(value); + onChanged(); + } else { + this.mediainfoListBuilder_.addMessage(value); + } + return this; + } + + public Builder addMediainfoList(int index, MediaServerInfo value) { + if (this.mediainfoListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureMediainfoListIsMutable(); + this.mediainfoList_.add(index, value); + onChanged(); + } else { + this.mediainfoListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addMediainfoList(MediaServerInfo.Builder builderForValue) { + if (this.mediainfoListBuilder_ == null) { + ensureMediainfoListIsMutable(); + this.mediainfoList_.add(builderForValue.build()); + onChanged(); + } else { + this.mediainfoListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addMediainfoList(int index, MediaServerInfo.Builder builderForValue) { + if (this.mediainfoListBuilder_ == null) { + ensureMediainfoListIsMutable(); + this.mediainfoList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.mediainfoListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllMediainfoList(Iterable values) { + if (this.mediainfoListBuilder_ == null) { + ensureMediainfoListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.mediainfoList_); + onChanged(); + } else { + this.mediainfoListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearMediainfoList() { + if (this.mediainfoListBuilder_ == null) { + this.mediainfoList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + onChanged(); + } else { + this.mediainfoListBuilder_.clear(); + } + return this; + } + + public Builder removeMediainfoList(int index) { + if (this.mediainfoListBuilder_ == null) { + ensureMediainfoListIsMutable(); + this.mediainfoList_.remove(index); + onChanged(); + } else { + this.mediainfoListBuilder_.remove(index); + } + return this; + } + + public MediaServerInfo.Builder getMediainfoListBuilder(int index) { + return (MediaServerInfo.Builder)getMediainfoListFieldBuilder().getBuilder(index); + } + + public MediaServerInfoOrBuilder getMediainfoListOrBuilder(int index) { + if (this.mediainfoListBuilder_ == null) + return this.mediainfoList_.get(index); + return (MediaServerInfoOrBuilder)this.mediainfoListBuilder_.getMessageOrBuilder(index); + } + + public List getMediainfoListOrBuilderList() { + if (this.mediainfoListBuilder_ != null) + return this.mediainfoListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.mediainfoList_); + } + + public MediaServerInfo.Builder addMediainfoListBuilder() { + return (MediaServerInfo.Builder)getMediainfoListFieldBuilder().addBuilder(MediaServerInfo.getDefaultInstance()); + } + + public MediaServerInfo.Builder addMediainfoListBuilder(int index) { + return (MediaServerInfo.Builder)getMediainfoListFieldBuilder().addBuilder(index, MediaServerInfo.getDefaultInstance()); + } + + public List getMediainfoListBuilderList() { + return getMediainfoListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getMediainfoListFieldBuilder() { + if (this.mediainfoListBuilder_ == null) { + this.mediainfoListBuilder_ = new RepeatedFieldBuilder(this.mediainfoList_, ((this.bitField0_ & 0x2) == 2), getParentForChildren(), isClean()); + this.mediainfoList_ = null; + } + return this.mediainfoListBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\020ZCHXCamera.proto\022\027com.com.zhichenhaixin.proto\"e\n\016Line_parameter\022\017\n\007start_x\030\001 \001(\001\022\017\n\007start_y\030\002 \001(\001\022\r\n\005end_x\030\003 \001(\001\022\r\n\005end_y\030\004 \001(\001\022\023\n\013LineRealLen\030\005 \001(\001\"ý\003\n\030Camera_analyst_parameter\022\021\n\tcamera_id\030\001 \002(\005\022\023\n\013camera_name\030\002 \002(\t\022\f\n\004dome\030\007 \002(\005\022\020\n\bbase_lon\030\b \002(\001\022\020\n\bbase_lat\030\t \002(\001\022\017\n\007channel\030\031 \001(\005\022\027\n\017force_ship_type\030\032 \001(\005\0229\n\btop_line\030\033 \001(\0132'.com.com.zhichenhaixin.proto.Line_parameter\022;\n\nright_line\030\034 \001(\0132'.com.zhichen", "haixin.proto.Line_parameter\022<\n\013bottom_line\030\035 \001(\0132'.com.com.zhichenhaixin.proto.Line_parameter\022:\n\tleft_line\030\036 \001(\0132'.com.com.zhichenhaixin.proto.Line_parameter\022;\n\nline2north\030\037 \001(\0132'.com.com.zhichenhaixin.proto.Line_parameter\022\023\n\013has_ver_pix\030 \001(\005\022\031\n\021ver_pix_per_meter\030! \001(\001\"Û\003\n\nCameraInfo\022\020\n\bcameraId\030\001 \002(\005\022\022\n\ncameraName\030\002 \002(\t\022\021\n\tcontrolIp\030\003 \002(\t\022\023\n\013controlPort\030\004 \002(\r\022\021\n\tcameraUid\030\005 \002(\t\022\021\n\tcameraPwd\030\006 \002(\t\022\f\n\004dome\030\007 ", "\002(\005\022\013\n\003lon\030\b \002(\001\022\013\n\003lat\030\t \002(\001\022\f\n\004rtsp\030\n \001(\t\022\017\n\007destLat\030\013 \001(\001\022\017\n\007destLon\030\f \001(\001\022\022\n\nnorthAngle\030\r \001(\002\022\021\n\tcamHeight\030\016 \001(\002\022\026\n\016maxCamCentDist\030\017 \001(\002\022\017\n\007targitW\030\020 \001(\002\022\023\n\013zoomNearFac\030\021 \001(\002\022\022\n\nzoomFarFac\030\022 \001(\002\022\023\n\013cameraColor\030\023 \001(\005\022\020\n\bmaxRange\030\024 \001(\001\022\022\n\ncameraType\030\025 \001(\005\022\017\n\007mediaIp\030\026 \001(\t\022\021\n\tmediaPort\030\027 \001(\005\022\025\n\rforceshipdect\030\030 \001(\005\022\022\n\nchannelnum\030\031 \001(\005\"²\001\n\021XideweiServerInfo\022\n\n\002ip\030\001 \002(\t\022\f\n\004port\030\002 \002(\005\022\013\n\003uid\030\003 \002(\t\022\013\n", "\003pwd\030\004 \002(\t\022\023\n\013device_name\030\005 \002(\t\022T\n\031camera_analyst_param_list\030\007 \003(\01321.com.com.zhichenhaixin.proto.Camera_analyst_parameter\"n\n\017MediaServerInfo\022\017\n\007mediaIp\030\001 \002(\t\022\021\n\tmediaPort\030\002 \002(\005\0227\n\ncameraList\030\003 \003(\0132#.com.com.zhichenhaixin.proto.CameraInfo\"œ\001\n\024MediaXideweiListInfo\022C\n\017xideweiinfoList\030\001 \003(\0132*.com.com.zhichenhaixin.proto.XideweiServerInfo\022?\n\rMediainfoList\030\002 \003(\0132(.com.com.zhichenhaixin.proto.MediaServerInfo" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXCamera.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_Line_parameter_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_Line_parameter_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_Line_parameter_descriptor, new String[] { "StartX", "StartY", "EndX", "EndY", "LineRealLen" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_Camera_analyst_parameter_descriptor, new String[] { + "CameraId", "CameraName", "Dome", "BaseLon", "BaseLat", "Channel", "ForceShipType", "TopLine", "RightLine", "BottomLine", + "LeftLine", "Line2North", "HasVerPix", "VerPixPerMeter" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor = getDescriptor().getMessageTypes().get(2); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor, new String[] { + "CameraId", "CameraName", "ControlIp", "ControlPort", "CameraUid", "CameraPwd", "Dome", "Lon", "Lat", "Rtsp", + "DestLat", "DestLon", "NorthAngle", "CamHeight", "MaxCamCentDist", "TargitW", "ZoomNearFac", "ZoomFarFac", "CameraColor", "MaxRange", + "CameraType", "MediaIp", "MediaPort", "Forceshipdect", "Channelnum" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_XideweiServerInfo_descriptor = getDescriptor().getMessageTypes().get(3); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_XideweiServerInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_XideweiServerInfo_descriptor, new String[] { "Ip", "Port", "Uid", "Pwd", "DeviceName", "CameraAnalystParamList" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_MediaServerInfo_descriptor = getDescriptor().getMessageTypes().get(4); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_MediaServerInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_MediaServerInfo_descriptor, new String[] { "MediaIp", "MediaPort", "CameraList" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_descriptor = getDescriptor().getMessageTypes().get(5); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_MediaXideweiListInfo_descriptor, new String[] { "XideweiinfoList", "MediainfoList" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface CameraInfoOrBuilder extends MessageOrBuilder { + boolean hasCameraId(); + + int getCameraId(); + + boolean hasCameraName(); + + String getCameraName(); + + ByteString getCameraNameBytes(); + + boolean hasControlIp(); + + String getControlIp(); + + ByteString getControlIpBytes(); + + boolean hasControlPort(); + + int getControlPort(); + + boolean hasCameraUid(); + + String getCameraUid(); + + ByteString getCameraUidBytes(); + + boolean hasCameraPwd(); + + String getCameraPwd(); + + ByteString getCameraPwdBytes(); + + boolean hasDome(); + + int getDome(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasDestLat(); + + double getDestLat(); + + boolean hasDestLon(); + + double getDestLon(); + + boolean hasNorthAngle(); + + float getNorthAngle(); + + boolean hasCamHeight(); + + float getCamHeight(); + + boolean hasMaxCamCentDist(); + + float getMaxCamCentDist(); + + boolean hasTargitW(); + + float getTargitW(); + + boolean hasZoomNearFac(); + + float getZoomNearFac(); + + boolean hasZoomFarFac(); + + float getZoomFarFac(); + + boolean hasCameraColor(); + + int getCameraColor(); + + boolean hasMaxRange(); + + double getMaxRange(); + + boolean hasCameraType(); + + int getCameraType(); + + boolean hasMediaIp(); + + String getMediaIp(); + + ByteString getMediaIpBytes(); + + boolean hasMediaPort(); + + int getMediaPort(); + + boolean hasForceshipdect(); + + int getForceshipdect(); + + boolean hasChannelnum(); + + int getChannelnum(); + } + + public static interface Camera_analyst_parameterOrBuilder extends MessageOrBuilder { + boolean hasCameraId(); + + int getCameraId(); + + boolean hasCameraName(); + + String getCameraName(); + + ByteString getCameraNameBytes(); + + boolean hasDome(); + + int getDome(); + + boolean hasBaseLon(); + + double getBaseLon(); + + boolean hasBaseLat(); + + double getBaseLat(); + + boolean hasChannel(); + + int getChannel(); + + boolean hasForceShipType(); + + int getForceShipType(); + + boolean hasTopLine(); + + Line_parameter getTopLine(); + + Line_parameterOrBuilder getTopLineOrBuilder(); + + boolean hasRightLine(); + + Line_parameter getRightLine(); + + Line_parameterOrBuilder getRightLineOrBuilder(); + + boolean hasBottomLine(); + + Line_parameter getBottomLine(); + + Line_parameterOrBuilder getBottomLineOrBuilder(); + + boolean hasLeftLine(); + + Line_parameter getLeftLine(); + + Line_parameterOrBuilder getLeftLineOrBuilder(); + + boolean hasLine2North(); + + Line_parameter getLine2North(); + + Line_parameterOrBuilder getLine2NorthOrBuilder(); + + boolean hasHasVerPix(); + + int getHasVerPix(); + + boolean hasVerPixPerMeter(); + + double getVerPixPerMeter(); + } + + public static interface Line_parameterOrBuilder extends MessageOrBuilder { + boolean hasStartX(); + + double getStartX(); + + boolean hasStartY(); + + double getStartY(); + + boolean hasEndX(); + + double getEndX(); + + boolean hasEndY(); + + double getEndY(); + + boolean hasLineRealLen(); + + double getLineRealLen(); + } + + public static interface MediaServerInfoOrBuilder extends MessageOrBuilder { + boolean hasMediaIp(); + + String getMediaIp(); + + ByteString getMediaIpBytes(); + + boolean hasMediaPort(); + + int getMediaPort(); + + List getCameraListList(); + + CameraInfo getCameraList(int param1Int); + + int getCameraListCount(); + + List getCameraListOrBuilderList(); + + CameraInfoOrBuilder getCameraListOrBuilder(int param1Int); + } + + public static interface MediaXideweiListInfoOrBuilder extends MessageOrBuilder { + List getXideweiinfoListList(); + + XideweiServerInfo getXideweiinfoList(int param1Int); + + int getXideweiinfoListCount(); + + List getXideweiinfoListOrBuilderList(); + + XideweiServerInfoOrBuilder getXideweiinfoListOrBuilder(int param1Int); + + List getMediainfoListList(); + + MediaServerInfo getMediainfoList(int param1Int); + + int getMediainfoListCount(); + + List getMediainfoListOrBuilderList(); + + MediaServerInfoOrBuilder getMediainfoListOrBuilder(int param1Int); + } + + public static interface XideweiServerInfoOrBuilder extends MessageOrBuilder { + boolean hasIp(); + + String getIp(); + + ByteString getIpBytes(); + + boolean hasPort(); + + int getPort(); + + boolean hasUid(); + + String getUid(); + + ByteString getUidBytes(); + + boolean hasPwd(); + + String getPwd(); + + ByteString getPwdBytes(); + + boolean hasDeviceName(); + + String getDeviceName(); + + ByteString getDeviceNameBytes(); + + List getCameraAnalystParamListList(); + + Camera_analyst_parameter getCameraAnalystParamList(int param1Int); + + int getCameraAnalystParamListCount(); + + List getCameraAnalystParamListOrBuilderList(); + + Camera_analyst_parameterOrBuilder getCameraAnalystParamListOrBuilder(int param1Int); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXCameraVideoWarn.java b/src/main/java/com/zhichenhaixin/proto/ZCHXCameraVideoWarn.java new file mode 100644 index 0000000..5acb91a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXCameraVideoWarn.java @@ -0,0 +1,2084 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXCameraVideoWarn { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public static final class CameraVideoWarn extends GeneratedMessage implements CameraVideoWarnOrBuilder { + private static final CameraVideoWarn defaultInstance = new CameraVideoWarn(true); + + private final UnknownFieldSet unknownFields; + + private CameraVideoWarn(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraVideoWarn(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraVideoWarn getDefaultInstance() { + return defaultInstance; + } + + public CameraVideoWarn getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraVideoWarn(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.cameraId_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.objectID_ = bs; + break; + case 24: + this.bitField0_ |= 0x4; + this.objectState_ = input.readInt32(); + break; + case 32: + this.bitField0_ |= 0x8; + this.objectType_ = input.readInt32(); + break; + case 40: + this.bitField0_ |= 0x10; + this.alarmType_ = input.readInt32(); + break; + case 50: + bs = input.readBytes(); + this.bitField0_ |= 0x20; + this.timeStamp_ = bs; + break; + case 57: + this.bitField0_ |= 0x40; + this.objectMapPosX_ = input.readDouble(); + break; + case 65: + this.bitField0_ |= 0x80; + this.objectMapPosY_ = input.readDouble(); + break; + case 73: + this.bitField0_ |= 0x100; + this.objectSpeed_ = input.readDouble(); + break; + case 82: + bs = input.readBytes(); + this.bitField0_ |= 0x200; + this.alertAreaName_ = bs; + break; + case 88: + this.bitField0_ |= 0x400; + this.isSmuggle_ = input.readInt32(); + break; + case 97: + this.bitField0_ |= 0x800; + this.nodeNum_ = input.readDouble(); + break; + case 106: + bs = input.readBytes(); + this.bitField0_ |= 0x1000; + this.warnColor_ = bs; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarn_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarn_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraVideoWarn.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraVideoWarn parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraVideoWarn(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERAID_FIELD_NUMBER = 1; + + private int cameraId_; + + public static final int OBJECTID_FIELD_NUMBER = 2; + + private Object objectID_; + + public static final int OBJECTSTATE_FIELD_NUMBER = 3; + + private int objectState_; + + public static final int OBJECTTYPE_FIELD_NUMBER = 4; + + private int objectType_; + + public static final int ALARMTYPE_FIELD_NUMBER = 5; + + private int alarmType_; + + public static final int TIMESTAMP_FIELD_NUMBER = 6; + + private Object timeStamp_; + + public static final int OBJECTMAPPOSX_FIELD_NUMBER = 7; + + private double objectMapPosX_; + + public static final int OBJECTMAPPOSY_FIELD_NUMBER = 8; + + private double objectMapPosY_; + + public static final int OBJECTSPEED_FIELD_NUMBER = 9; + + private double objectSpeed_; + + public static final int ALERTAREANAME_FIELD_NUMBER = 10; + + private Object alertAreaName_; + + public static final int ISSMUGGLE_FIELD_NUMBER = 11; + + private int isSmuggle_; + + public static final int NODE_NUM_FIELD_NUMBER = 12; + + private double nodeNum_; + + public static final int WARN_COLOR_FIELD_NUMBER = 13; + + private Object warnColor_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasObjectID() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getObjectID() { + Object ref = this.objectID_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.objectID_ = s; + return s; + } + + public ByteString getObjectIDBytes() { + Object ref = this.objectID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.objectID_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasObjectState() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getObjectState() { + return this.objectState_; + } + + public boolean hasObjectType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getObjectType() { + return this.objectType_; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public boolean hasTimeStamp() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getTimeStamp() { + Object ref = this.timeStamp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.timeStamp_ = s; + return s; + } + + public ByteString getTimeStampBytes() { + Object ref = this.timeStamp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.timeStamp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasObjectMapPosX() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getObjectMapPosX() { + return this.objectMapPosX_; + } + + public boolean hasObjectMapPosY() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getObjectMapPosY() { + return this.objectMapPosY_; + } + + public boolean hasObjectSpeed() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getObjectSpeed() { + return this.objectSpeed_; + } + + public boolean hasAlertAreaName() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getAlertAreaName() { + Object ref = this.alertAreaName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alertAreaName_ = s; + return s; + } + + public ByteString getAlertAreaNameBytes() { + Object ref = this.alertAreaName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alertAreaName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasIsSmuggle() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getIsSmuggle() { + return this.isSmuggle_; + } + + public boolean hasNodeNum() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getNodeNum() { + return this.nodeNum_; + } + + public boolean hasWarnColor() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getWarnColor() { + Object ref = this.warnColor_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnColor_ = s; + return s; + } + + public ByteString getWarnColorBytes() { + Object ref = this.warnColor_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnColor_ = b; + return b; + } + return (ByteString)ref; + } + + private void initFields() { + this.cameraId_ = 0; + this.objectID_ = ""; + this.objectState_ = 0; + this.objectType_ = 0; + this.alarmType_ = 0; + this.timeStamp_ = ""; + this.objectMapPosX_ = 0.0D; + this.objectMapPosY_ = 0.0D; + this.objectSpeed_ = 0.0D; + this.alertAreaName_ = ""; + this.isSmuggle_ = 0; + this.nodeNum_ = 0.0D; + this.warnColor_ = ""; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectID()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectState()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTimeStamp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectMapPosX()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectMapPosY()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectSpeed()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getObjectIDBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.objectState_); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.objectType_); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt32(5, this.alarmType_); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getTimeStampBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeDouble(7, this.objectMapPosX_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.objectMapPosY_); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.objectSpeed_); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getAlertAreaNameBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeInt32(11, this.isSmuggle_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeDouble(12, this.nodeNum_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeBytes(13, getWarnColorBytes()); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getObjectIDBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.objectState_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.objectType_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt32Size(5, this.alarmType_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getTimeStampBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeDoubleSize(7, this.objectMapPosX_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.objectMapPosY_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.objectSpeed_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getAlertAreaNameBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeInt32Size(11, this.isSmuggle_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeDoubleSize(12, this.nodeNum_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeBytesSize(13, getWarnColorBytes()); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraVideoWarn parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraVideoWarn)PARSER.parseFrom(data); + } + + public static CameraVideoWarn parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraVideoWarn)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraVideoWarn parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraVideoWarn)PARSER.parseFrom(data); + } + + public static CameraVideoWarn parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraVideoWarn)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraVideoWarn parseFrom(InputStream input) throws IOException { + return (CameraVideoWarn)PARSER.parseFrom(input); + } + + public static CameraVideoWarn parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraVideoWarn)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraVideoWarn parseDelimitedFrom(InputStream input) throws IOException { + return (CameraVideoWarn)PARSER.parseDelimitedFrom(input); + } + + public static CameraVideoWarn parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraVideoWarn)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraVideoWarn parseFrom(CodedInputStream input) throws IOException { + return (CameraVideoWarn)PARSER.parseFrom(input); + } + + public static CameraVideoWarn parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraVideoWarn)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraVideoWarn prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraVideoWarnOrBuilder { + private int bitField0_; + + private int cameraId_; + + private Object objectID_; + + private int objectState_; + + private int objectType_; + + private int alarmType_; + + private Object timeStamp_; + + private double objectMapPosX_; + + private double objectMapPosY_; + + private double objectSpeed_; + + private Object alertAreaName_; + + private int isSmuggle_; + + private double nodeNum_; + + private Object warnColor_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarn_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarn_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraVideoWarn.class, Builder.class); + } + + private Builder() { + this.objectID_ = ""; + this.timeStamp_ = ""; + this.alertAreaName_ = ""; + this.warnColor_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.objectID_ = ""; + this.timeStamp_ = ""; + this.alertAreaName_ = ""; + this.warnColor_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CameraVideoWarn.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.objectID_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.objectState_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.objectType_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.alarmType_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + this.timeStamp_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.objectMapPosX_ = 0.0D; + this.bitField0_ &= 0xFFFFFFBF; + this.objectMapPosY_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.objectSpeed_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.alertAreaName_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.isSmuggle_ = 0; + this.bitField0_ &= 0xFFFFFBFF; + this.nodeNum_ = 0.0D; + this.bitField0_ &= 0xFFFFF7FF; + this.warnColor_ = ""; + this.bitField0_ &= 0xFFFFEFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarn_descriptor; + } + + public CameraVideoWarn getDefaultInstanceForType() { + return CameraVideoWarn.getDefaultInstance(); + } + + public CameraVideoWarn build() { + CameraVideoWarn result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraVideoWarn buildPartial() { + CameraVideoWarn result = new CameraVideoWarn(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.objectID_ = this.objectID_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.objectState_ = this.objectState_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.objectType_ = this.objectType_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.alarmType_ = this.alarmType_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.timeStamp_ = this.timeStamp_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.objectMapPosX_ = this.objectMapPosX_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.objectMapPosY_ = this.objectMapPosY_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.objectSpeed_ = this.objectSpeed_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.alertAreaName_ = this.alertAreaName_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.isSmuggle_ = this.isSmuggle_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.nodeNum_ = this.nodeNum_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.warnColor_ = this.warnColor_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraVideoWarn) + return mergeFrom((CameraVideoWarn)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraVideoWarn other) { + if (other == CameraVideoWarn.getDefaultInstance()) + return this; + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasObjectID()) { + this.bitField0_ |= 0x2; + this.objectID_ = other.objectID_; + onChanged(); + } + if (other.hasObjectState()) + setObjectState(other.getObjectState()); + if (other.hasObjectType()) + setObjectType(other.getObjectType()); + if (other.hasAlarmType()) + setAlarmType(other.getAlarmType()); + if (other.hasTimeStamp()) { + this.bitField0_ |= 0x20; + this.timeStamp_ = other.timeStamp_; + onChanged(); + } + if (other.hasObjectMapPosX()) + setObjectMapPosX(other.getObjectMapPosX()); + if (other.hasObjectMapPosY()) + setObjectMapPosY(other.getObjectMapPosY()); + if (other.hasObjectSpeed()) + setObjectSpeed(other.getObjectSpeed()); + if (other.hasAlertAreaName()) { + this.bitField0_ |= 0x200; + this.alertAreaName_ = other.alertAreaName_; + onChanged(); + } + if (other.hasIsSmuggle()) + setIsSmuggle(other.getIsSmuggle()); + if (other.hasNodeNum()) + setNodeNum(other.getNodeNum()); + if (other.hasWarnColor()) { + this.bitField0_ |= 0x1000; + this.warnColor_ = other.warnColor_; + onChanged(); + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasCameraId()) + return false; + if (!hasObjectID()) + return false; + if (!hasObjectState()) + return false; + if (!hasObjectType()) + return false; + if (!hasAlarmType()) + return false; + if (!hasTimeStamp()) + return false; + if (!hasObjectMapPosX()) + return false; + if (!hasObjectMapPosY()) + return false; + if (!hasObjectSpeed()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraVideoWarn parsedMessage = null; + try { + parsedMessage = (CameraVideoWarn) CameraVideoWarn.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraVideoWarn)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x1; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasObjectID() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getObjectID() { + Object ref = this.objectID_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.objectID_ = s; + return s; + } + return (String)ref; + } + + public ByteString getObjectIDBytes() { + Object ref = this.objectID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.objectID_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setObjectID(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.objectID_ = value; + onChanged(); + return this; + } + + public Builder clearObjectID() { + this.bitField0_ &= 0xFFFFFFFD; + this.objectID_ = CameraVideoWarn.getDefaultInstance().getObjectID(); + onChanged(); + return this; + } + + public Builder setObjectIDBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.objectID_ = value; + onChanged(); + return this; + } + + public boolean hasObjectState() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getObjectState() { + return this.objectState_; + } + + public Builder setObjectState(int value) { + this.bitField0_ |= 0x4; + this.objectState_ = value; + onChanged(); + return this; + } + + public Builder clearObjectState() { + this.bitField0_ &= 0xFFFFFFFB; + this.objectState_ = 0; + onChanged(); + return this; + } + + public boolean hasObjectType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getObjectType() { + return this.objectType_; + } + + public Builder setObjectType(int value) { + this.bitField0_ |= 0x8; + this.objectType_ = value; + onChanged(); + return this; + } + + public Builder clearObjectType() { + this.bitField0_ &= 0xFFFFFFF7; + this.objectType_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public Builder setAlarmType(int value) { + this.bitField0_ |= 0x10; + this.alarmType_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmType() { + this.bitField0_ &= 0xFFFFFFEF; + this.alarmType_ = 0; + onChanged(); + return this; + } + + public boolean hasTimeStamp() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getTimeStamp() { + Object ref = this.timeStamp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.timeStamp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTimeStampBytes() { + Object ref = this.timeStamp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.timeStamp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTimeStamp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.timeStamp_ = value; + onChanged(); + return this; + } + + public Builder clearTimeStamp() { + this.bitField0_ &= 0xFFFFFFDF; + this.timeStamp_ = CameraVideoWarn.getDefaultInstance().getTimeStamp(); + onChanged(); + return this; + } + + public Builder setTimeStampBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.timeStamp_ = value; + onChanged(); + return this; + } + + public boolean hasObjectMapPosX() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getObjectMapPosX() { + return this.objectMapPosX_; + } + + public Builder setObjectMapPosX(double value) { + this.bitField0_ |= 0x40; + this.objectMapPosX_ = value; + onChanged(); + return this; + } + + public Builder clearObjectMapPosX() { + this.bitField0_ &= 0xFFFFFFBF; + this.objectMapPosX_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasObjectMapPosY() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getObjectMapPosY() { + return this.objectMapPosY_; + } + + public Builder setObjectMapPosY(double value) { + this.bitField0_ |= 0x80; + this.objectMapPosY_ = value; + onChanged(); + return this; + } + + public Builder clearObjectMapPosY() { + this.bitField0_ &= 0xFFFFFF7F; + this.objectMapPosY_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasObjectSpeed() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getObjectSpeed() { + return this.objectSpeed_; + } + + public Builder setObjectSpeed(double value) { + this.bitField0_ |= 0x100; + this.objectSpeed_ = value; + onChanged(); + return this; + } + + public Builder clearObjectSpeed() { + this.bitField0_ &= 0xFFFFFEFF; + this.objectSpeed_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasAlertAreaName() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getAlertAreaName() { + Object ref = this.alertAreaName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alertAreaName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlertAreaNameBytes() { + Object ref = this.alertAreaName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alertAreaName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlertAreaName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.alertAreaName_ = value; + onChanged(); + return this; + } + + public Builder clearAlertAreaName() { + this.bitField0_ &= 0xFFFFFDFF; + this.alertAreaName_ = CameraVideoWarn.getDefaultInstance().getAlertAreaName(); + onChanged(); + return this; + } + + public Builder setAlertAreaNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.alertAreaName_ = value; + onChanged(); + return this; + } + + public boolean hasIsSmuggle() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public int getIsSmuggle() { + return this.isSmuggle_; + } + + public Builder setIsSmuggle(int value) { + this.bitField0_ |= 0x400; + this.isSmuggle_ = value; + onChanged(); + return this; + } + + public Builder clearIsSmuggle() { + this.bitField0_ &= 0xFFFFFBFF; + this.isSmuggle_ = 0; + onChanged(); + return this; + } + + public boolean hasNodeNum() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getNodeNum() { + return this.nodeNum_; + } + + public Builder setNodeNum(double value) { + this.bitField0_ |= 0x800; + this.nodeNum_ = value; + onChanged(); + return this; + } + + public Builder clearNodeNum() { + this.bitField0_ &= 0xFFFFF7FF; + this.nodeNum_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWarnColor() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getWarnColor() { + Object ref = this.warnColor_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnColor_ = s; + return s; + } + return (String)ref; + } + + public ByteString getWarnColorBytes() { + Object ref = this.warnColor_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnColor_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setWarnColor(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.warnColor_ = value; + onChanged(); + return this; + } + + public Builder clearWarnColor() { + this.bitField0_ &= 0xFFFFEFFF; + this.warnColor_ = CameraVideoWarn.getDefaultInstance().getWarnColor(); + onChanged(); + return this; + } + + public Builder setWarnColorBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.warnColor_ = value; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CameraVideoWarnListVo extends GeneratedMessage implements CameraVideoWarnListVoOrBuilder { + private static final CameraVideoWarnListVo defaultInstance = new CameraVideoWarnListVo(true); + + private final UnknownFieldSet unknownFields; + + private CameraVideoWarnListVo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraVideoWarnListVo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraVideoWarnListVo getDefaultInstance() { + return defaultInstance; + } + + public CameraVideoWarnListVo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraVideoWarnListVo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.videoWarnList_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.videoWarnList_.add((CameraVideoWarn)input.readMessage(CameraVideoWarn.PARSER, extensionRegistry)); + break; + case 16: + this.bitField0_ |= 0x1; + this.personNumber_ = input.readInt32(); + break; + case 24: + this.bitField0_ |= 0x2; + this.carNumber_ = input.readInt32(); + break; + case 32: + this.bitField0_ |= 0x4; + this.shipNumber_ = input.readInt32(); + break; + case 40: + this.bitField0_ |= 0x8; + this.unNumber_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.videoWarnList_ = Collections.unmodifiableList(this.videoWarnList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraVideoWarnListVo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraVideoWarnListVo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraVideoWarnListVo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int VIDEOWARNLIST_FIELD_NUMBER = 1; + + private List videoWarnList_; + + public static final int PERSONNUMBER_FIELD_NUMBER = 2; + + private int personNumber_; + + public static final int CARNUMBER_FIELD_NUMBER = 3; + + private int carNumber_; + + public static final int SHIPNUMBER_FIELD_NUMBER = 4; + + private int shipNumber_; + + public static final int UNNUMBER_FIELD_NUMBER = 5; + + private int unNumber_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getVideoWarnListList() { + return this.videoWarnList_; + } + + public List getVideoWarnListOrBuilderList() { + return (List)this.videoWarnList_; + } + + public int getVideoWarnListCount() { + return this.videoWarnList_.size(); + } + + public CameraVideoWarn getVideoWarnList(int index) { + return this.videoWarnList_.get(index); + } + + public CameraVideoWarnOrBuilder getVideoWarnListOrBuilder(int index) { + return this.videoWarnList_.get(index); + } + + public boolean hasPersonNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getPersonNumber() { + return this.personNumber_; + } + + public boolean hasCarNumber() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCarNumber() { + return this.carNumber_; + } + + public boolean hasShipNumber() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getShipNumber() { + return this.shipNumber_; + } + + public boolean hasUnNumber() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getUnNumber() { + return this.unNumber_; + } + + private void initFields() { + this.videoWarnList_ = Collections.emptyList(); + this.personNumber_ = 0; + this.carNumber_ = 0; + this.shipNumber_ = 0; + this.unNumber_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getVideoWarnListCount(); i++) { + if (!getVideoWarnList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.videoWarnList_.size(); i++) + output.writeMessage(1, (MessageLite)this.videoWarnList_.get(i)); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(2, this.personNumber_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(3, this.carNumber_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(4, this.shipNumber_); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(5, this.unNumber_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.videoWarnList_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.videoWarnList_.get(i)); + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(2, this.personNumber_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(3, this.carNumber_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(4, this.shipNumber_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(5, this.unNumber_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraVideoWarnListVo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraVideoWarnListVo)PARSER.parseFrom(data); + } + + public static CameraVideoWarnListVo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraVideoWarnListVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraVideoWarnListVo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraVideoWarnListVo)PARSER.parseFrom(data); + } + + public static CameraVideoWarnListVo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraVideoWarnListVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraVideoWarnListVo parseFrom(InputStream input) throws IOException { + return (CameraVideoWarnListVo)PARSER.parseFrom(input); + } + + public static CameraVideoWarnListVo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraVideoWarnListVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraVideoWarnListVo parseDelimitedFrom(InputStream input) throws IOException { + return (CameraVideoWarnListVo)PARSER.parseDelimitedFrom(input); + } + + public static CameraVideoWarnListVo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraVideoWarnListVo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraVideoWarnListVo parseFrom(CodedInputStream input) throws IOException { + return (CameraVideoWarnListVo)PARSER.parseFrom(input); + } + + public static CameraVideoWarnListVo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraVideoWarnListVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraVideoWarnListVo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraVideoWarnListVoOrBuilder { + private int bitField0_; + + private List videoWarnList_; + + private RepeatedFieldBuilder videoWarnListBuilder_; + + private int personNumber_; + + private int carNumber_; + + private int shipNumber_; + + private int unNumber_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraVideoWarnListVo.class, Builder.class); + } + + private Builder() { + this.videoWarnList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.videoWarnList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (CameraVideoWarnListVo.alwaysUseFieldBuilders) + getVideoWarnListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.videoWarnListBuilder_ == null) { + this.videoWarnList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.videoWarnListBuilder_.clear(); + } + this.personNumber_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.carNumber_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.shipNumber_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.unNumber_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXCameraVideoWarn.internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_descriptor; + } + + public CameraVideoWarnListVo getDefaultInstanceForType() { + return CameraVideoWarnListVo.getDefaultInstance(); + } + + public CameraVideoWarnListVo build() { + CameraVideoWarnListVo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraVideoWarnListVo buildPartial() { + CameraVideoWarnListVo result = new CameraVideoWarnListVo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if (this.videoWarnListBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.videoWarnList_ = Collections.unmodifiableList(this.videoWarnList_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.videoWarnList_ = this.videoWarnList_; + } else { + result.videoWarnList_ = this.videoWarnListBuilder_.build(); + } + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x1; + result.personNumber_ = this.personNumber_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x2; + result.carNumber_ = this.carNumber_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x4; + result.shipNumber_ = this.shipNumber_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x8; + result.unNumber_ = this.unNumber_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraVideoWarnListVo) + return mergeFrom((CameraVideoWarnListVo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraVideoWarnListVo other) { + if (other == CameraVideoWarnListVo.getDefaultInstance()) + return this; + if (this.videoWarnListBuilder_ == null) { + if (!other.videoWarnList_.isEmpty()) { + if (this.videoWarnList_.isEmpty()) { + this.videoWarnList_ = other.videoWarnList_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureVideoWarnListIsMutable(); + this.videoWarnList_.addAll(other.videoWarnList_); + } + onChanged(); + } + } else if (!other.videoWarnList_.isEmpty()) { + if (this.videoWarnListBuilder_.isEmpty()) { + this.videoWarnListBuilder_.dispose(); + this.videoWarnListBuilder_ = null; + this.videoWarnList_ = other.videoWarnList_; + this.bitField0_ &= 0xFFFFFFFE; + this.videoWarnListBuilder_ = CameraVideoWarnListVo.alwaysUseFieldBuilders ? getVideoWarnListFieldBuilder() : null; + } else { + this.videoWarnListBuilder_.addAllMessages(other.videoWarnList_); + } + } + if (other.hasPersonNumber()) + setPersonNumber(other.getPersonNumber()); + if (other.hasCarNumber()) + setCarNumber(other.getCarNumber()); + if (other.hasShipNumber()) + setShipNumber(other.getShipNumber()); + if (other.hasUnNumber()) + setUnNumber(other.getUnNumber()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getVideoWarnListCount(); i++) { + if (!getVideoWarnList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraVideoWarnListVo parsedMessage = null; + try { + parsedMessage = (CameraVideoWarnListVo) CameraVideoWarnListVo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraVideoWarnListVo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureVideoWarnListIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.videoWarnList_ = new ArrayList(this.videoWarnList_); + this.bitField0_ |= 0x1; + } + } + + public List getVideoWarnListList() { + if (this.videoWarnListBuilder_ == null) + return Collections.unmodifiableList(this.videoWarnList_); + return this.videoWarnListBuilder_.getMessageList(); + } + + public int getVideoWarnListCount() { + if (this.videoWarnListBuilder_ == null) + return this.videoWarnList_.size(); + return this.videoWarnListBuilder_.getCount(); + } + + public CameraVideoWarn getVideoWarnList(int index) { + if (this.videoWarnListBuilder_ == null) + return this.videoWarnList_.get(index); + return (CameraVideoWarn)this.videoWarnListBuilder_.getMessage(index); + } + + public Builder setVideoWarnList(int index, CameraVideoWarn value) { + if (this.videoWarnListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureVideoWarnListIsMutable(); + this.videoWarnList_.set(index, value); + onChanged(); + } else { + this.videoWarnListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setVideoWarnList(int index, CameraVideoWarn.Builder builderForValue) { + if (this.videoWarnListBuilder_ == null) { + ensureVideoWarnListIsMutable(); + this.videoWarnList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.videoWarnListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addVideoWarnList(CameraVideoWarn value) { + if (this.videoWarnListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureVideoWarnListIsMutable(); + this.videoWarnList_.add(value); + onChanged(); + } else { + this.videoWarnListBuilder_.addMessage(value); + } + return this; + } + + public Builder addVideoWarnList(int index, CameraVideoWarn value) { + if (this.videoWarnListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureVideoWarnListIsMutable(); + this.videoWarnList_.add(index, value); + onChanged(); + } else { + this.videoWarnListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addVideoWarnList(CameraVideoWarn.Builder builderForValue) { + if (this.videoWarnListBuilder_ == null) { + ensureVideoWarnListIsMutable(); + this.videoWarnList_.add(builderForValue.build()); + onChanged(); + } else { + this.videoWarnListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addVideoWarnList(int index, CameraVideoWarn.Builder builderForValue) { + if (this.videoWarnListBuilder_ == null) { + ensureVideoWarnListIsMutable(); + this.videoWarnList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.videoWarnListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllVideoWarnList(Iterable values) { + if (this.videoWarnListBuilder_ == null) { + ensureVideoWarnListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.videoWarnList_); + onChanged(); + } else { + this.videoWarnListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearVideoWarnList() { + if (this.videoWarnListBuilder_ == null) { + this.videoWarnList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.videoWarnListBuilder_.clear(); + } + return this; + } + + public Builder removeVideoWarnList(int index) { + if (this.videoWarnListBuilder_ == null) { + ensureVideoWarnListIsMutable(); + this.videoWarnList_.remove(index); + onChanged(); + } else { + this.videoWarnListBuilder_.remove(index); + } + return this; + } + + public CameraVideoWarn.Builder getVideoWarnListBuilder(int index) { + return (CameraVideoWarn.Builder)getVideoWarnListFieldBuilder().getBuilder(index); + } + + public CameraVideoWarnOrBuilder getVideoWarnListOrBuilder(int index) { + if (this.videoWarnListBuilder_ == null) + return this.videoWarnList_.get(index); + return (CameraVideoWarnOrBuilder)this.videoWarnListBuilder_.getMessageOrBuilder(index); + } + + public List getVideoWarnListOrBuilderList() { + if (this.videoWarnListBuilder_ != null) + return this.videoWarnListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.videoWarnList_); + } + + public CameraVideoWarn.Builder addVideoWarnListBuilder() { + return (CameraVideoWarn.Builder)getVideoWarnListFieldBuilder().addBuilder(CameraVideoWarn.getDefaultInstance()); + } + + public CameraVideoWarn.Builder addVideoWarnListBuilder(int index) { + return (CameraVideoWarn.Builder)getVideoWarnListFieldBuilder().addBuilder(index, CameraVideoWarn.getDefaultInstance()); + } + + public List getVideoWarnListBuilderList() { + return getVideoWarnListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getVideoWarnListFieldBuilder() { + if (this.videoWarnListBuilder_ == null) { + this.videoWarnListBuilder_ = new RepeatedFieldBuilder(this.videoWarnList_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.videoWarnList_ = null; + } + return this.videoWarnListBuilder_; + } + + public boolean hasPersonNumber() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getPersonNumber() { + return this.personNumber_; + } + + public Builder setPersonNumber(int value) { + this.bitField0_ |= 0x2; + this.personNumber_ = value; + onChanged(); + return this; + } + + public Builder clearPersonNumber() { + this.bitField0_ &= 0xFFFFFFFD; + this.personNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasCarNumber() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getCarNumber() { + return this.carNumber_; + } + + public Builder setCarNumber(int value) { + this.bitField0_ |= 0x4; + this.carNumber_ = value; + onChanged(); + return this; + } + + public Builder clearCarNumber() { + this.bitField0_ &= 0xFFFFFFFB; + this.carNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasShipNumber() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getShipNumber() { + return this.shipNumber_; + } + + public Builder setShipNumber(int value) { + this.bitField0_ |= 0x8; + this.shipNumber_ = value; + onChanged(); + return this; + } + + public Builder clearShipNumber() { + this.bitField0_ &= 0xFFFFFFF7; + this.shipNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasUnNumber() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getUnNumber() { + return this.unNumber_; + } + + public Builder setUnNumber(int value) { + this.bitField0_ |= 0x10; + this.unNumber_ = value; + onChanged(); + return this; + } + + public Builder clearUnNumber() { + this.bitField0_ &= 0xFFFFFFEF; + this.unNumber_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\031ZCHXCameraVideoWarn.proto\022\027com.com.zhichenhaixin.proto\"—\002\n\017CameraVideoWarn\022\020\n\bcameraId\030\001 \002(\005\022\020\n\bobjectID\030\002 \002(\t\022\023\n\013objectState\030\003 \002(\005\022\022\n\nobjectType\030\004 \002(\005\022\021\n\talarmType\030\005 \002(\005\022\021\n\ttimeStamp\030\006 \002(\t\022\025\n\robjectMapPosX\030\007 \002(\001\022\025\n\robjectMapPosY\030\b \002(\001\022\023\n\013objectSpeed\030\t \002(\001\022\025\n\ralertAreaName\030\n \001(\t\022\021\n\tisSmuggle\030\013 \001(\005\022\020\n\bnode_num\030\f \001(\001\022\022\n\nwarn_color\030\r \001(\t\"§\001\n\025CameraVideoWarnListVo\022?\n\rVideoWarnList\030\001 \003(\0132(.com.zhichenhai", "xin.proto.CameraVideoWarn\022\024\n\fpersonNumber\030\002 \001(\005\022\021\n\tcarNumber\030\003 \001(\005\022\022\n\nshipNumber\030\004 \001(\005\022\020\n\bunNumber\030\005 \001(\005" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXCameraVideoWarn.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraVideoWarn_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraVideoWarn_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraVideoWarn_descriptor, new String[] { + "CameraId", "ObjectID", "ObjectState", "ObjectType", "AlarmType", "TimeStamp", "ObjectMapPosX", "ObjectMapPosY", "ObjectSpeed", "AlertAreaName", + "IsSmuggle", "NodeNum", "WarnColor" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraVideoWarnListVo_descriptor, new String[] { "VideoWarnList", "PersonNumber", "CarNumber", "ShipNumber", "UnNumber" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface CameraVideoWarnListVoOrBuilder extends MessageOrBuilder { + List getVideoWarnListList(); + + CameraVideoWarn getVideoWarnList(int param1Int); + + int getVideoWarnListCount(); + + List getVideoWarnListOrBuilderList(); + + CameraVideoWarnOrBuilder getVideoWarnListOrBuilder(int param1Int); + + boolean hasPersonNumber(); + + int getPersonNumber(); + + boolean hasCarNumber(); + + int getCarNumber(); + + boolean hasShipNumber(); + + int getShipNumber(); + + boolean hasUnNumber(); + + int getUnNumber(); + } + + public static interface CameraVideoWarnOrBuilder extends MessageOrBuilder { + boolean hasCameraId(); + + int getCameraId(); + + boolean hasObjectID(); + + String getObjectID(); + + ByteString getObjectIDBytes(); + + boolean hasObjectState(); + + int getObjectState(); + + boolean hasObjectType(); + + int getObjectType(); + + boolean hasAlarmType(); + + int getAlarmType(); + + boolean hasTimeStamp(); + + String getTimeStamp(); + + ByteString getTimeStampBytes(); + + boolean hasObjectMapPosX(); + + double getObjectMapPosX(); + + boolean hasObjectMapPosY(); + + double getObjectMapPosY(); + + boolean hasObjectSpeed(); + + double getObjectSpeed(); + + boolean hasAlertAreaName(); + + String getAlertAreaName(); + + ByteString getAlertAreaNameBytes(); + + boolean hasIsSmuggle(); + + int getIsSmuggle(); + + boolean hasNodeNum(); + + double getNodeNum(); + + boolean hasWarnColor(); + + String getWarnColor(); + + ByteString getWarnColorBytes(); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXFllow.java b/src/main/java/com/zhichenhaixin/proto/ZCHXFllow.java new file mode 100644 index 0000000..6d54f1e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXFllow.java @@ -0,0 +1,9366 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXFllow { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public static final class CameraInfo extends GeneratedMessage implements CameraInfoOrBuilder { + private static final CameraInfo defaultInstance = new CameraInfo(true); + + private final UnknownFieldSet unknownFields; + + private CameraInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraInfo getDefaultInstance() { + return defaultInstance; + } + + public CameraInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.cameraId_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.cameraName_ = bs; + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.controlIp_ = bs; + break; + case 32: + this.bitField0_ |= 0x8; + this.controlPort_ = input.readUInt32(); + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.cameraUid_ = bs; + break; + case 50: + bs = input.readBytes(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = bs; + break; + case 56: + this.bitField0_ |= 0x40; + this.dome_ = input.readInt32(); + break; + case 65: + this.bitField0_ |= 0x80; + this.lon_ = input.readDouble(); + break; + case 73: + this.bitField0_ |= 0x100; + this.lat_ = input.readDouble(); + break; + case 82: + bs = input.readBytes(); + this.bitField0_ |= 0x200; + this.rtsp_ = bs; + break; + case 89: + this.bitField0_ |= 0x400; + this.destLat_ = input.readDouble(); + break; + case 97: + this.bitField0_ |= 0x800; + this.destLon_ = input.readDouble(); + break; + case 109: + this.bitField0_ |= 0x1000; + this.northAngle_ = input.readFloat(); + break; + case 117: + this.bitField0_ |= 0x2000; + this.camHeight_ = input.readFloat(); + break; + case 125: + this.bitField0_ |= 0x4000; + this.maxCamCentDist_ = input.readFloat(); + break; + case 133: + this.bitField0_ |= 0x8000; + this.targitW_ = input.readFloat(); + break; + case 141: + this.bitField0_ |= 0x10000; + this.zoomNearFac_ = input.readFloat(); + break; + case 149: + this.bitField0_ |= 0x20000; + this.zoomFarFac_ = input.readFloat(); + break; + case 152: + this.bitField0_ |= 0x40000; + this.cameraColor_ = input.readInt32(); + break; + case 161: + this.bitField0_ |= 0x80000; + this.maxRange_ = input.readDouble(); + break; + case 168: + this.bitField0_ |= 0x100000; + this.cameraType_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERAID_FIELD_NUMBER = 1; + + private int cameraId_; + + public static final int CAMERANAME_FIELD_NUMBER = 2; + + private Object cameraName_; + + public static final int CONTROLIP_FIELD_NUMBER = 3; + + private Object controlIp_; + + public static final int CONTROLPORT_FIELD_NUMBER = 4; + + private int controlPort_; + + public static final int CAMERAUID_FIELD_NUMBER = 5; + + private Object cameraUid_; + + public static final int CAMERAPWD_FIELD_NUMBER = 6; + + private Object cameraPwd_; + + public static final int DOME_FIELD_NUMBER = 7; + + private int dome_; + + public static final int LON_FIELD_NUMBER = 8; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 9; + + private double lat_; + + public static final int RTSP_FIELD_NUMBER = 10; + + private Object rtsp_; + + public static final int DESTLAT_FIELD_NUMBER = 11; + + private double destLat_; + + public static final int DESTLON_FIELD_NUMBER = 12; + + private double destLon_; + + public static final int NORTHANGLE_FIELD_NUMBER = 13; + + private float northAngle_; + + public static final int CAMHEIGHT_FIELD_NUMBER = 14; + + private float camHeight_; + + public static final int MAXCAMCENTDIST_FIELD_NUMBER = 15; + + private float maxCamCentDist_; + + public static final int TARGITW_FIELD_NUMBER = 16; + + private float targitW_; + + public static final int ZOOMNEARFAC_FIELD_NUMBER = 17; + + private float zoomNearFac_; + + public static final int ZOOMFARFAC_FIELD_NUMBER = 18; + + private float zoomFarFac_; + + public static final int CAMERACOLOR_FIELD_NUMBER = 19; + + private int cameraColor_; + + public static final int MAXRANGE_FIELD_NUMBER = 20; + + private double maxRange_; + + public static final int CAMERATYPE_FIELD_NUMBER = 21; + + private int cameraType_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasControlIp() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getControlIp() { + Object ref = this.controlIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.controlIp_ = s; + return s; + } + + public ByteString getControlIpBytes() { + Object ref = this.controlIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.controlIp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasControlPort() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getControlPort() { + return this.controlPort_; + } + + public boolean hasCameraUid() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCameraUid() { + Object ref = this.cameraUid_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraUid_ = s; + return s; + } + + public ByteString getCameraUidBytes() { + Object ref = this.cameraUid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraUid_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraPwd() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getCameraPwd() { + Object ref = this.cameraPwd_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraPwd_ = s; + return s; + } + + public ByteString getCameraPwdBytes() { + Object ref = this.cameraPwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraPwd_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getDome() { + return this.dome_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDestLat() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getDestLat() { + return this.destLat_; + } + + public boolean hasDestLon() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getDestLon() { + return this.destLon_; + } + + public boolean hasNorthAngle() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public float getNorthAngle() { + return this.northAngle_; + } + + public boolean hasCamHeight() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getCamHeight() { + return this.camHeight_; + } + + public boolean hasMaxCamCentDist() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getMaxCamCentDist() { + return this.maxCamCentDist_; + } + + public boolean hasTargitW() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getTargitW() { + return this.targitW_; + } + + public boolean hasZoomNearFac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getZoomNearFac() { + return this.zoomNearFac_; + } + + public boolean hasZoomFarFac() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getZoomFarFac() { + return this.zoomFarFac_; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public boolean hasMaxRange() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getMaxRange() { + return this.maxRange_; + } + + public boolean hasCameraType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getCameraType() { + return this.cameraType_; + } + + private void initFields() { + this.cameraId_ = 0; + this.cameraName_ = ""; + this.controlIp_ = ""; + this.controlPort_ = 0; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.dome_ = 0; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.rtsp_ = ""; + this.destLat_ = 0.0D; + this.destLon_ = 0.0D; + this.northAngle_ = 0.0F; + this.camHeight_ = 0.0F; + this.maxCamCentDist_ = 0.0F; + this.targitW_ = 0.0F; + this.zoomNearFac_ = 0.0F; + this.zoomFarFac_ = 0.0F; + this.cameraColor_ = 0; + this.maxRange_ = 0.0D; + this.cameraType_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasControlIp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasControlPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraUid()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraPwd()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDome()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRtsp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraColor()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMaxRange()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraType()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getControlIpBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeUInt32(4, this.controlPort_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getCameraUidBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getCameraPwdBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.dome_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.lon_); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.lat_); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getRtspBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeDouble(11, this.destLat_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeDouble(12, this.destLon_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeFloat(13, this.northAngle_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeFloat(14, this.camHeight_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeFloat(15, this.maxCamCentDist_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeFloat(16, this.targitW_); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeFloat(17, this.zoomNearFac_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeFloat(18, this.zoomFarFac_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeInt32(19, this.cameraColor_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeDouble(20, this.maxRange_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeInt32(21, this.cameraType_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getControlIpBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeUInt32Size(4, this.controlPort_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getCameraUidBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getCameraPwdBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.dome_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.lon_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.lat_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getRtspBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeDoubleSize(11, this.destLat_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeDoubleSize(12, this.destLon_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeFloatSize(13, this.northAngle_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeFloatSize(14, this.camHeight_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeFloatSize(15, this.maxCamCentDist_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeFloatSize(16, this.targitW_); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeFloatSize(17, this.zoomNearFac_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeFloatSize(18, this.zoomFarFac_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeInt32Size(19, this.cameraColor_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeDoubleSize(20, this.maxRange_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeInt32Size(21, this.cameraType_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data); + } + + public static CameraInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data); + } + + public static CameraInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraInfo parseFrom(InputStream input) throws IOException { + return (CameraInfo)PARSER.parseFrom(input); + } + + public static CameraInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraInfo parseDelimitedFrom(InputStream input) throws IOException { + return (CameraInfo)PARSER.parseDelimitedFrom(input); + } + + public static CameraInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraInfo parseFrom(CodedInputStream input) throws IOException { + return (CameraInfo)PARSER.parseFrom(input); + } + + public static CameraInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraInfoOrBuilder { + private int bitField0_; + + private int cameraId_; + + private Object cameraName_; + + private Object controlIp_; + + private int controlPort_; + + private Object cameraUid_; + + private Object cameraPwd_; + + private int dome_; + + private double lon_; + + private double lat_; + + private Object rtsp_; + + private double destLat_; + + private double destLon_; + + private float northAngle_; + + private float camHeight_; + + private float maxCamCentDist_; + + private float targitW_; + + private float zoomNearFac_; + + private float zoomFarFac_; + + private int cameraColor_; + + private double maxRange_; + + private int cameraType_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraInfo.class, Builder.class); + } + + private Builder() { + this.cameraName_ = ""; + this.controlIp_ = ""; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.rtsp_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.cameraName_ = ""; + this.controlIp_ = ""; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.rtsp_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CameraInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraName_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.controlIp_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.controlPort_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.cameraUid_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.cameraPwd_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.dome_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.rtsp_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.destLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFBFF; + this.destLon_ = 0.0D; + this.bitField0_ &= 0xFFFFF7FF; + this.northAngle_ = 0.0F; + this.bitField0_ &= 0xFFFFEFFF; + this.camHeight_ = 0.0F; + this.bitField0_ &= 0xFFFFDFFF; + this.maxCamCentDist_ = 0.0F; + this.bitField0_ &= 0xFFFFBFFF; + this.targitW_ = 0.0F; + this.bitField0_ &= 0xFFFF7FFF; + this.zoomNearFac_ = 0.0F; + this.bitField0_ &= 0xFFFEFFFF; + this.zoomFarFac_ = 0.0F; + this.bitField0_ &= 0xFFFDFFFF; + this.cameraColor_ = 0; + this.bitField0_ &= 0xFFFBFFFF; + this.maxRange_ = 0.0D; + this.bitField0_ &= 0xFFF7FFFF; + this.cameraType_ = 0; + this.bitField0_ &= 0xFFEFFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor; + } + + public CameraInfo getDefaultInstanceForType() { + return CameraInfo.getDefaultInstance(); + } + + public CameraInfo build() { + CameraInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraInfo buildPartial() { + CameraInfo result = new CameraInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraName_ = this.cameraName_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.controlIp_ = this.controlIp_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.controlPort_ = this.controlPort_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.cameraUid_ = this.cameraUid_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.cameraPwd_ = this.cameraPwd_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.dome_ = this.dome_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.destLat_ = this.destLat_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.destLon_ = this.destLon_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.northAngle_ = this.northAngle_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.camHeight_ = this.camHeight_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.maxCamCentDist_ = this.maxCamCentDist_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.targitW_ = this.targitW_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.zoomNearFac_ = this.zoomNearFac_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.zoomFarFac_ = this.zoomFarFac_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.cameraColor_ = this.cameraColor_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.maxRange_ = this.maxRange_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.cameraType_ = this.cameraType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraInfo) + return mergeFrom((CameraInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraInfo other) { + if (other == CameraInfo.getDefaultInstance()) + return this; + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasCameraName()) { + this.bitField0_ |= 0x2; + this.cameraName_ = other.cameraName_; + onChanged(); + } + if (other.hasControlIp()) { + this.bitField0_ |= 0x4; + this.controlIp_ = other.controlIp_; + onChanged(); + } + if (other.hasControlPort()) + setControlPort(other.getControlPort()); + if (other.hasCameraUid()) { + this.bitField0_ |= 0x10; + this.cameraUid_ = other.cameraUid_; + onChanged(); + } + if (other.hasCameraPwd()) { + this.bitField0_ |= 0x20; + this.cameraPwd_ = other.cameraPwd_; + onChanged(); + } + if (other.hasDome()) + setDome(other.getDome()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasRtsp()) { + this.bitField0_ |= 0x200; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasDestLat()) + setDestLat(other.getDestLat()); + if (other.hasDestLon()) + setDestLon(other.getDestLon()); + if (other.hasNorthAngle()) + setNorthAngle(other.getNorthAngle()); + if (other.hasCamHeight()) + setCamHeight(other.getCamHeight()); + if (other.hasMaxCamCentDist()) + setMaxCamCentDist(other.getMaxCamCentDist()); + if (other.hasTargitW()) + setTargitW(other.getTargitW()); + if (other.hasZoomNearFac()) + setZoomNearFac(other.getZoomNearFac()); + if (other.hasZoomFarFac()) + setZoomFarFac(other.getZoomFarFac()); + if (other.hasCameraColor()) + setCameraColor(other.getCameraColor()); + if (other.hasMaxRange()) + setMaxRange(other.getMaxRange()); + if (other.hasCameraType()) + setCameraType(other.getCameraType()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasCameraId()) + return false; + if (!hasCameraName()) + return false; + if (!hasControlIp()) + return false; + if (!hasControlPort()) + return false; + if (!hasCameraUid()) + return false; + if (!hasCameraPwd()) + return false; + if (!hasDome()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasRtsp()) + return false; + if (!hasCameraColor()) + return false; + if (!hasMaxRange()) + return false; + if (!hasCameraType()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraInfo parsedMessage = null; + try { + parsedMessage = (CameraInfo) CameraInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x1; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public Builder clearCameraName() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraName_ = CameraInfo.getDefaultInstance().getCameraName(); + onChanged(); + return this; + } + + public Builder setCameraNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public boolean hasControlIp() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getControlIp() { + Object ref = this.controlIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.controlIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getControlIpBytes() { + Object ref = this.controlIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.controlIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setControlIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.controlIp_ = value; + onChanged(); + return this; + } + + public Builder clearControlIp() { + this.bitField0_ &= 0xFFFFFFFB; + this.controlIp_ = CameraInfo.getDefaultInstance().getControlIp(); + onChanged(); + return this; + } + + public Builder setControlIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.controlIp_ = value; + onChanged(); + return this; + } + + public boolean hasControlPort() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getControlPort() { + return this.controlPort_; + } + + public Builder setControlPort(int value) { + this.bitField0_ |= 0x8; + this.controlPort_ = value; + onChanged(); + return this; + } + + public Builder clearControlPort() { + this.bitField0_ &= 0xFFFFFFF7; + this.controlPort_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraUid() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCameraUid() { + Object ref = this.cameraUid_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraUid_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraUidBytes() { + Object ref = this.cameraUid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraUid_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraUid(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.cameraUid_ = value; + onChanged(); + return this; + } + + public Builder clearCameraUid() { + this.bitField0_ &= 0xFFFFFFEF; + this.cameraUid_ = CameraInfo.getDefaultInstance().getCameraUid(); + onChanged(); + return this; + } + + public Builder setCameraUidBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.cameraUid_ = value; + onChanged(); + return this; + } + + public boolean hasCameraPwd() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getCameraPwd() { + Object ref = this.cameraPwd_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraPwd_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraPwdBytes() { + Object ref = this.cameraPwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraPwd_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraPwd(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = value; + onChanged(); + return this; + } + + public Builder clearCameraPwd() { + this.bitField0_ &= 0xFFFFFFDF; + this.cameraPwd_ = CameraInfo.getDefaultInstance().getCameraPwd(); + onChanged(); + return this; + } + + public Builder setCameraPwdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = value; + onChanged(); + return this; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getDome() { + return this.dome_; + } + + public Builder setDome(int value) { + this.bitField0_ |= 0x40; + this.dome_ = value; + onChanged(); + return this; + } + + public Builder clearDome() { + this.bitField0_ &= 0xFFFFFFBF; + this.dome_ = 0; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x80; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFF7F; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x100; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFEFF; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xFFFFFDFF; + this.rtsp_ = CameraInfo.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasDestLat() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getDestLat() { + return this.destLat_; + } + + public Builder setDestLat(double value) { + this.bitField0_ |= 0x400; + this.destLat_ = value; + onChanged(); + return this; + } + + public Builder clearDestLat() { + this.bitField0_ &= 0xFFFFFBFF; + this.destLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasDestLon() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getDestLon() { + return this.destLon_; + } + + public Builder setDestLon(double value) { + this.bitField0_ |= 0x800; + this.destLon_ = value; + onChanged(); + return this; + } + + public Builder clearDestLon() { + this.bitField0_ &= 0xFFFFF7FF; + this.destLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasNorthAngle() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public float getNorthAngle() { + return this.northAngle_; + } + + public Builder setNorthAngle(float value) { + this.bitField0_ |= 0x1000; + this.northAngle_ = value; + onChanged(); + return this; + } + + public Builder clearNorthAngle() { + this.bitField0_ &= 0xFFFFEFFF; + this.northAngle_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCamHeight() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getCamHeight() { + return this.camHeight_; + } + + public Builder setCamHeight(float value) { + this.bitField0_ |= 0x2000; + this.camHeight_ = value; + onChanged(); + return this; + } + + public Builder clearCamHeight() { + this.bitField0_ &= 0xFFFFDFFF; + this.camHeight_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasMaxCamCentDist() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getMaxCamCentDist() { + return this.maxCamCentDist_; + } + + public Builder setMaxCamCentDist(float value) { + this.bitField0_ |= 0x4000; + this.maxCamCentDist_ = value; + onChanged(); + return this; + } + + public Builder clearMaxCamCentDist() { + this.bitField0_ &= 0xFFFFBFFF; + this.maxCamCentDist_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasTargitW() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getTargitW() { + return this.targitW_; + } + + public Builder setTargitW(float value) { + this.bitField0_ |= 0x8000; + this.targitW_ = value; + onChanged(); + return this; + } + + public Builder clearTargitW() { + this.bitField0_ &= 0xFFFF7FFF; + this.targitW_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasZoomNearFac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getZoomNearFac() { + return this.zoomNearFac_; + } + + public Builder setZoomNearFac(float value) { + this.bitField0_ |= 0x10000; + this.zoomNearFac_ = value; + onChanged(); + return this; + } + + public Builder clearZoomNearFac() { + this.bitField0_ &= 0xFFFEFFFF; + this.zoomNearFac_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasZoomFarFac() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getZoomFarFac() { + return this.zoomFarFac_; + } + + public Builder setZoomFarFac(float value) { + this.bitField0_ |= 0x20000; + this.zoomFarFac_ = value; + onChanged(); + return this; + } + + public Builder clearZoomFarFac() { + this.bitField0_ &= 0xFFFDFFFF; + this.zoomFarFac_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public Builder setCameraColor(int value) { + this.bitField0_ |= 0x40000; + this.cameraColor_ = value; + onChanged(); + return this; + } + + public Builder clearCameraColor() { + this.bitField0_ &= 0xFFFBFFFF; + this.cameraColor_ = 0; + onChanged(); + return this; + } + + public boolean hasMaxRange() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getMaxRange() { + return this.maxRange_; + } + + public Builder setMaxRange(double value) { + this.bitField0_ |= 0x80000; + this.maxRange_ = value; + onChanged(); + return this; + } + + public Builder clearMaxRange() { + this.bitField0_ &= 0xFFF7FFFF; + this.maxRange_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCameraType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getCameraType() { + return this.cameraType_; + } + + public Builder setCameraType(int value) { + this.bitField0_ |= 0x100000; + this.cameraType_ = value; + onChanged(); + return this; + } + + public Builder clearCameraType() { + this.bitField0_ &= 0xFFEFFFFF; + this.cameraType_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CameraInfoForCtrl extends GeneratedMessage implements CameraInfoForCtrlOrBuilder { + private static final CameraInfoForCtrl defaultInstance = new CameraInfoForCtrl(true); + + private final UnknownFieldSet unknownFields; + + private CameraInfoForCtrl(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraInfoForCtrl(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraInfoForCtrl getDefaultInstance() { + return defaultInstance; + } + + public CameraInfoForCtrl getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraInfoForCtrl(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.cameraId_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.cameraName_ = bs; + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.controlIp_ = bs; + break; + case 32: + this.bitField0_ |= 0x8; + this.controlPort_ = input.readUInt32(); + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.cameraUid_ = bs; + break; + case 50: + bs = input.readBytes(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = bs; + break; + case 56: + this.bitField0_ |= 0x40; + this.dome_ = input.readInt32(); + break; + case 65: + this.bitField0_ |= 0x80; + this.lon_ = input.readDouble(); + break; + case 73: + this.bitField0_ |= 0x100; + this.lat_ = input.readDouble(); + break; + case 82: + bs = input.readBytes(); + this.bitField0_ |= 0x200; + this.rtsp_ = bs; + break; + case 89: + this.bitField0_ |= 0x400; + this.destLat_ = input.readDouble(); + break; + case 97: + this.bitField0_ |= 0x800; + this.destLon_ = input.readDouble(); + break; + case 109: + this.bitField0_ |= 0x1000; + this.northAngle_ = input.readFloat(); + break; + case 117: + this.bitField0_ |= 0x2000; + this.camHeight_ = input.readFloat(); + break; + case 125: + this.bitField0_ |= 0x4000; + this.maxCamCentDist_ = input.readFloat(); + break; + case 133: + this.bitField0_ |= 0x8000; + this.targitW_ = input.readFloat(); + break; + case 141: + this.bitField0_ |= 0x10000; + this.zoomNearFac_ = input.readFloat(); + break; + case 149: + this.bitField0_ |= 0x20000; + this.zoomFarFac_ = input.readFloat(); + break; + case 152: + this.bitField0_ |= 0x40000; + this.cameraColor_ = input.readInt32(); + break; + case 161: + this.bitField0_ |= 0x80000; + this.maxRange_ = input.readDouble(); + break; + case 168: + this.bitField0_ |= 0x100000; + this.cameraType_ = input.readInt32(); + break; + case 176: + this.bitField0_ |= 0x200000; + this.cameraStatus_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraInfoForCtrl.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraInfoForCtrl parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraInfoForCtrl(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERAID_FIELD_NUMBER = 1; + + private int cameraId_; + + public static final int CAMERANAME_FIELD_NUMBER = 2; + + private Object cameraName_; + + public static final int CONTROLIP_FIELD_NUMBER = 3; + + private Object controlIp_; + + public static final int CONTROLPORT_FIELD_NUMBER = 4; + + private int controlPort_; + + public static final int CAMERAUID_FIELD_NUMBER = 5; + + private Object cameraUid_; + + public static final int CAMERAPWD_FIELD_NUMBER = 6; + + private Object cameraPwd_; + + public static final int DOME_FIELD_NUMBER = 7; + + private int dome_; + + public static final int LON_FIELD_NUMBER = 8; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 9; + + private double lat_; + + public static final int RTSP_FIELD_NUMBER = 10; + + private Object rtsp_; + + public static final int DESTLAT_FIELD_NUMBER = 11; + + private double destLat_; + + public static final int DESTLON_FIELD_NUMBER = 12; + + private double destLon_; + + public static final int NORTHANGLE_FIELD_NUMBER = 13; + + private float northAngle_; + + public static final int CAMHEIGHT_FIELD_NUMBER = 14; + + private float camHeight_; + + public static final int MAXCAMCENTDIST_FIELD_NUMBER = 15; + + private float maxCamCentDist_; + + public static final int TARGITW_FIELD_NUMBER = 16; + + private float targitW_; + + public static final int ZOOMNEARFAC_FIELD_NUMBER = 17; + + private float zoomNearFac_; + + public static final int ZOOMFARFAC_FIELD_NUMBER = 18; + + private float zoomFarFac_; + + public static final int CAMERACOLOR_FIELD_NUMBER = 19; + + private int cameraColor_; + + public static final int MAXRANGE_FIELD_NUMBER = 20; + + private double maxRange_; + + public static final int CAMERATYPE_FIELD_NUMBER = 21; + + private int cameraType_; + + public static final int CAMERASTATUS_FIELD_NUMBER = 22; + + private int cameraStatus_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasControlIp() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getControlIp() { + Object ref = this.controlIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.controlIp_ = s; + return s; + } + + public ByteString getControlIpBytes() { + Object ref = this.controlIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.controlIp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasControlPort() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getControlPort() { + return this.controlPort_; + } + + public boolean hasCameraUid() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCameraUid() { + Object ref = this.cameraUid_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraUid_ = s; + return s; + } + + public ByteString getCameraUidBytes() { + Object ref = this.cameraUid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraUid_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraPwd() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getCameraPwd() { + Object ref = this.cameraPwd_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraPwd_ = s; + return s; + } + + public ByteString getCameraPwdBytes() { + Object ref = this.cameraPwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraPwd_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getDome() { + return this.dome_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDestLat() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getDestLat() { + return this.destLat_; + } + + public boolean hasDestLon() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getDestLon() { + return this.destLon_; + } + + public boolean hasNorthAngle() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public float getNorthAngle() { + return this.northAngle_; + } + + public boolean hasCamHeight() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getCamHeight() { + return this.camHeight_; + } + + public boolean hasMaxCamCentDist() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getMaxCamCentDist() { + return this.maxCamCentDist_; + } + + public boolean hasTargitW() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getTargitW() { + return this.targitW_; + } + + public boolean hasZoomNearFac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getZoomNearFac() { + return this.zoomNearFac_; + } + + public boolean hasZoomFarFac() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getZoomFarFac() { + return this.zoomFarFac_; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public boolean hasMaxRange() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getMaxRange() { + return this.maxRange_; + } + + public boolean hasCameraType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getCameraType() { + return this.cameraType_; + } + + public boolean hasCameraStatus() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public int getCameraStatus() { + return this.cameraStatus_; + } + + private void initFields() { + this.cameraId_ = 0; + this.cameraName_ = ""; + this.controlIp_ = ""; + this.controlPort_ = 0; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.dome_ = 0; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.rtsp_ = ""; + this.destLat_ = 0.0D; + this.destLon_ = 0.0D; + this.northAngle_ = 0.0F; + this.camHeight_ = 0.0F; + this.maxCamCentDist_ = 0.0F; + this.targitW_ = 0.0F; + this.zoomNearFac_ = 0.0F; + this.zoomFarFac_ = 0.0F; + this.cameraColor_ = 0; + this.maxRange_ = 0.0D; + this.cameraType_ = 0; + this.cameraStatus_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasControlIp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasControlPort()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraUid()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraPwd()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDome()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRtsp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraColor()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMaxRange()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getControlIpBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeUInt32(4, this.controlPort_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getCameraUidBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getCameraPwdBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.dome_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.lon_); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.lat_); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getRtspBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeDouble(11, this.destLat_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeDouble(12, this.destLon_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeFloat(13, this.northAngle_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeFloat(14, this.camHeight_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeFloat(15, this.maxCamCentDist_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeFloat(16, this.targitW_); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeFloat(17, this.zoomNearFac_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeFloat(18, this.zoomFarFac_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeInt32(19, this.cameraColor_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeDouble(20, this.maxRange_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeInt32(21, this.cameraType_); + if ((this.bitField0_ & 0x200000) == 2097152) + output.writeInt32(22, this.cameraStatus_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getCameraNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getControlIpBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeUInt32Size(4, this.controlPort_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getCameraUidBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getCameraPwdBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.dome_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.lon_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.lat_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getRtspBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeDoubleSize(11, this.destLat_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeDoubleSize(12, this.destLon_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeFloatSize(13, this.northAngle_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeFloatSize(14, this.camHeight_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeFloatSize(15, this.maxCamCentDist_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeFloatSize(16, this.targitW_); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeFloatSize(17, this.zoomNearFac_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeFloatSize(18, this.zoomFarFac_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeInt32Size(19, this.cameraColor_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeDoubleSize(20, this.maxRange_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeInt32Size(21, this.cameraType_); + if ((this.bitField0_ & 0x200000) == 2097152) + size += CodedOutputStream.computeInt32Size(22, this.cameraStatus_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraInfoForCtrl parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraInfoForCtrl)PARSER.parseFrom(data); + } + + public static CameraInfoForCtrl parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraInfoForCtrl)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraInfoForCtrl parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraInfoForCtrl)PARSER.parseFrom(data); + } + + public static CameraInfoForCtrl parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraInfoForCtrl)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraInfoForCtrl parseFrom(InputStream input) throws IOException { + return (CameraInfoForCtrl)PARSER.parseFrom(input); + } + + public static CameraInfoForCtrl parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfoForCtrl)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraInfoForCtrl parseDelimitedFrom(InputStream input) throws IOException { + return (CameraInfoForCtrl)PARSER.parseDelimitedFrom(input); + } + + public static CameraInfoForCtrl parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfoForCtrl)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraInfoForCtrl parseFrom(CodedInputStream input) throws IOException { + return (CameraInfoForCtrl)PARSER.parseFrom(input); + } + + public static CameraInfoForCtrl parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraInfoForCtrl)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraInfoForCtrl prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraInfoForCtrlOrBuilder { + private int bitField0_; + + private int cameraId_; + + private Object cameraName_; + + private Object controlIp_; + + private int controlPort_; + + private Object cameraUid_; + + private Object cameraPwd_; + + private int dome_; + + private double lon_; + + private double lat_; + + private Object rtsp_; + + private double destLat_; + + private double destLon_; + + private float northAngle_; + + private float camHeight_; + + private float maxCamCentDist_; + + private float targitW_; + + private float zoomNearFac_; + + private float zoomFarFac_; + + private int cameraColor_; + + private double maxRange_; + + private int cameraType_; + + private int cameraStatus_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraInfoForCtrl.class, Builder.class); + } + + private Builder() { + this.cameraName_ = ""; + this.controlIp_ = ""; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.rtsp_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.cameraName_ = ""; + this.controlIp_ = ""; + this.cameraUid_ = ""; + this.cameraPwd_ = ""; + this.rtsp_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CameraInfoForCtrl.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraName_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.controlIp_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.controlPort_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.cameraUid_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.cameraPwd_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.dome_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.rtsp_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.destLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFBFF; + this.destLon_ = 0.0D; + this.bitField0_ &= 0xFFFFF7FF; + this.northAngle_ = 0.0F; + this.bitField0_ &= 0xFFFFEFFF; + this.camHeight_ = 0.0F; + this.bitField0_ &= 0xFFFFDFFF; + this.maxCamCentDist_ = 0.0F; + this.bitField0_ &= 0xFFFFBFFF; + this.targitW_ = 0.0F; + this.bitField0_ &= 0xFFFF7FFF; + this.zoomNearFac_ = 0.0F; + this.bitField0_ &= 0xFFFEFFFF; + this.zoomFarFac_ = 0.0F; + this.bitField0_ &= 0xFFFDFFFF; + this.cameraColor_ = 0; + this.bitField0_ &= 0xFFFBFFFF; + this.maxRange_ = 0.0D; + this.bitField0_ &= 0xFFF7FFFF; + this.cameraType_ = 0; + this.bitField0_ &= 0xFFEFFFFF; + this.cameraStatus_ = 0; + this.bitField0_ &= 0xFFDFFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_descriptor; + } + + public CameraInfoForCtrl getDefaultInstanceForType() { + return CameraInfoForCtrl.getDefaultInstance(); + } + + public CameraInfoForCtrl build() { + CameraInfoForCtrl result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraInfoForCtrl buildPartial() { + CameraInfoForCtrl result = new CameraInfoForCtrl(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraName_ = this.cameraName_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.controlIp_ = this.controlIp_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.controlPort_ = this.controlPort_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.cameraUid_ = this.cameraUid_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.cameraPwd_ = this.cameraPwd_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.dome_ = this.dome_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.destLat_ = this.destLat_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.destLon_ = this.destLon_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.northAngle_ = this.northAngle_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.camHeight_ = this.camHeight_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.maxCamCentDist_ = this.maxCamCentDist_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.targitW_ = this.targitW_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.zoomNearFac_ = this.zoomNearFac_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.zoomFarFac_ = this.zoomFarFac_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.cameraColor_ = this.cameraColor_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.maxRange_ = this.maxRange_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.cameraType_ = this.cameraType_; + if ((from_bitField0_ & 0x200000) == 2097152) + to_bitField0_ |= 0x200000; + result.cameraStatus_ = this.cameraStatus_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraInfoForCtrl) + return mergeFrom((CameraInfoForCtrl)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraInfoForCtrl other) { + if (other == CameraInfoForCtrl.getDefaultInstance()) + return this; + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasCameraName()) { + this.bitField0_ |= 0x2; + this.cameraName_ = other.cameraName_; + onChanged(); + } + if (other.hasControlIp()) { + this.bitField0_ |= 0x4; + this.controlIp_ = other.controlIp_; + onChanged(); + } + if (other.hasControlPort()) + setControlPort(other.getControlPort()); + if (other.hasCameraUid()) { + this.bitField0_ |= 0x10; + this.cameraUid_ = other.cameraUid_; + onChanged(); + } + if (other.hasCameraPwd()) { + this.bitField0_ |= 0x20; + this.cameraPwd_ = other.cameraPwd_; + onChanged(); + } + if (other.hasDome()) + setDome(other.getDome()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasRtsp()) { + this.bitField0_ |= 0x200; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasDestLat()) + setDestLat(other.getDestLat()); + if (other.hasDestLon()) + setDestLon(other.getDestLon()); + if (other.hasNorthAngle()) + setNorthAngle(other.getNorthAngle()); + if (other.hasCamHeight()) + setCamHeight(other.getCamHeight()); + if (other.hasMaxCamCentDist()) + setMaxCamCentDist(other.getMaxCamCentDist()); + if (other.hasTargitW()) + setTargitW(other.getTargitW()); + if (other.hasZoomNearFac()) + setZoomNearFac(other.getZoomNearFac()); + if (other.hasZoomFarFac()) + setZoomFarFac(other.getZoomFarFac()); + if (other.hasCameraColor()) + setCameraColor(other.getCameraColor()); + if (other.hasMaxRange()) + setMaxRange(other.getMaxRange()); + if (other.hasCameraType()) + setCameraType(other.getCameraType()); + if (other.hasCameraStatus()) + setCameraStatus(other.getCameraStatus()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasCameraId()) + return false; + if (!hasCameraName()) + return false; + if (!hasControlIp()) + return false; + if (!hasControlPort()) + return false; + if (!hasCameraUid()) + return false; + if (!hasCameraPwd()) + return false; + if (!hasDome()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasRtsp()) + return false; + if (!hasCameraColor()) + return false; + if (!hasMaxRange()) + return false; + if (!hasCameraType()) + return false; + if (!hasCameraStatus()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraInfoForCtrl parsedMessage = null; + try { + parsedMessage = (CameraInfoForCtrl) CameraInfoForCtrl.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraInfoForCtrl)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x1; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public Builder clearCameraName() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraName_ = CameraInfoForCtrl.getDefaultInstance().getCameraName(); + onChanged(); + return this; + } + + public Builder setCameraNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.cameraName_ = value; + onChanged(); + return this; + } + + public boolean hasControlIp() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getControlIp() { + Object ref = this.controlIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.controlIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getControlIpBytes() { + Object ref = this.controlIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.controlIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setControlIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.controlIp_ = value; + onChanged(); + return this; + } + + public Builder clearControlIp() { + this.bitField0_ &= 0xFFFFFFFB; + this.controlIp_ = CameraInfoForCtrl.getDefaultInstance().getControlIp(); + onChanged(); + return this; + } + + public Builder setControlIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.controlIp_ = value; + onChanged(); + return this; + } + + public boolean hasControlPort() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getControlPort() { + return this.controlPort_; + } + + public Builder setControlPort(int value) { + this.bitField0_ |= 0x8; + this.controlPort_ = value; + onChanged(); + return this; + } + + public Builder clearControlPort() { + this.bitField0_ &= 0xFFFFFFF7; + this.controlPort_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraUid() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getCameraUid() { + Object ref = this.cameraUid_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraUid_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraUidBytes() { + Object ref = this.cameraUid_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraUid_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraUid(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.cameraUid_ = value; + onChanged(); + return this; + } + + public Builder clearCameraUid() { + this.bitField0_ &= 0xFFFFFFEF; + this.cameraUid_ = CameraInfoForCtrl.getDefaultInstance().getCameraUid(); + onChanged(); + return this; + } + + public Builder setCameraUidBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.cameraUid_ = value; + onChanged(); + return this; + } + + public boolean hasCameraPwd() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getCameraPwd() { + Object ref = this.cameraPwd_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraPwd_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraPwdBytes() { + Object ref = this.cameraPwd_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraPwd_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraPwd(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = value; + onChanged(); + return this; + } + + public Builder clearCameraPwd() { + this.bitField0_ &= 0xFFFFFFDF; + this.cameraPwd_ = CameraInfoForCtrl.getDefaultInstance().getCameraPwd(); + onChanged(); + return this; + } + + public Builder setCameraPwdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.cameraPwd_ = value; + onChanged(); + return this; + } + + public boolean hasDome() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getDome() { + return this.dome_; + } + + public Builder setDome(int value) { + this.bitField0_ |= 0x40; + this.dome_ = value; + onChanged(); + return this; + } + + public Builder clearDome() { + this.bitField0_ &= 0xFFFFFFBF; + this.dome_ = 0; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x80; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFF7F; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x100; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFEFF; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xFFFFFDFF; + this.rtsp_ = CameraInfoForCtrl.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasDestLat() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getDestLat() { + return this.destLat_; + } + + public Builder setDestLat(double value) { + this.bitField0_ |= 0x400; + this.destLat_ = value; + onChanged(); + return this; + } + + public Builder clearDestLat() { + this.bitField0_ &= 0xFFFFFBFF; + this.destLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasDestLon() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getDestLon() { + return this.destLon_; + } + + public Builder setDestLon(double value) { + this.bitField0_ |= 0x800; + this.destLon_ = value; + onChanged(); + return this; + } + + public Builder clearDestLon() { + this.bitField0_ &= 0xFFFFF7FF; + this.destLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasNorthAngle() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public float getNorthAngle() { + return this.northAngle_; + } + + public Builder setNorthAngle(float value) { + this.bitField0_ |= 0x1000; + this.northAngle_ = value; + onChanged(); + return this; + } + + public Builder clearNorthAngle() { + this.bitField0_ &= 0xFFFFEFFF; + this.northAngle_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCamHeight() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getCamHeight() { + return this.camHeight_; + } + + public Builder setCamHeight(float value) { + this.bitField0_ |= 0x2000; + this.camHeight_ = value; + onChanged(); + return this; + } + + public Builder clearCamHeight() { + this.bitField0_ &= 0xFFFFDFFF; + this.camHeight_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasMaxCamCentDist() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getMaxCamCentDist() { + return this.maxCamCentDist_; + } + + public Builder setMaxCamCentDist(float value) { + this.bitField0_ |= 0x4000; + this.maxCamCentDist_ = value; + onChanged(); + return this; + } + + public Builder clearMaxCamCentDist() { + this.bitField0_ &= 0xFFFFBFFF; + this.maxCamCentDist_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasTargitW() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getTargitW() { + return this.targitW_; + } + + public Builder setTargitW(float value) { + this.bitField0_ |= 0x8000; + this.targitW_ = value; + onChanged(); + return this; + } + + public Builder clearTargitW() { + this.bitField0_ &= 0xFFFF7FFF; + this.targitW_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasZoomNearFac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getZoomNearFac() { + return this.zoomNearFac_; + } + + public Builder setZoomNearFac(float value) { + this.bitField0_ |= 0x10000; + this.zoomNearFac_ = value; + onChanged(); + return this; + } + + public Builder clearZoomNearFac() { + this.bitField0_ &= 0xFFFEFFFF; + this.zoomNearFac_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasZoomFarFac() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public float getZoomFarFac() { + return this.zoomFarFac_; + } + + public Builder setZoomFarFac(float value) { + this.bitField0_ |= 0x20000; + this.zoomFarFac_ = value; + onChanged(); + return this; + } + + public Builder clearZoomFarFac() { + this.bitField0_ &= 0xFFFDFFFF; + this.zoomFarFac_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public Builder setCameraColor(int value) { + this.bitField0_ |= 0x40000; + this.cameraColor_ = value; + onChanged(); + return this; + } + + public Builder clearCameraColor() { + this.bitField0_ &= 0xFFFBFFFF; + this.cameraColor_ = 0; + onChanged(); + return this; + } + + public boolean hasMaxRange() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getMaxRange() { + return this.maxRange_; + } + + public Builder setMaxRange(double value) { + this.bitField0_ |= 0x80000; + this.maxRange_ = value; + onChanged(); + return this; + } + + public Builder clearMaxRange() { + this.bitField0_ &= 0xFFF7FFFF; + this.maxRange_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCameraType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public int getCameraType() { + return this.cameraType_; + } + + public Builder setCameraType(int value) { + this.bitField0_ |= 0x100000; + this.cameraType_ = value; + onChanged(); + return this; + } + + public Builder clearCameraType() { + this.bitField0_ &= 0xFFEFFFFF; + this.cameraType_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraStatus() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public int getCameraStatus() { + return this.cameraStatus_; + } + + public Builder setCameraStatus(int value) { + this.bitField0_ |= 0x200000; + this.cameraStatus_ = value; + onChanged(); + return this; + } + + public Builder clearCameraStatus() { + this.bitField0_ &= 0xFFDFFFFF; + this.cameraStatus_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class FllowVo extends GeneratedMessage implements FllowVoOrBuilder { + private static final FllowVo defaultInstance = new FllowVo(true); + + private final UnknownFieldSet unknownFields; + + private FllowVo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private FllowVo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static FllowVo getDefaultInstance() { + return defaultInstance; + } + + public FllowVo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FllowVo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.trackNumber_ = input.readInt32(); + break; + case 16: + this.bitField0_ |= 0x2; + this.fllow_ = input.readInt32(); + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.warnSiteType_ = bs; + break; + case 32: + this.bitField0_ |= 0x8; + this.mode_ = input.readInt32(); + break; + case 41: + this.bitField0_ |= 0x10; + this.wgs84PosLat_ = input.readDouble(); + break; + case 49: + this.bitField0_ |= 0x20; + this.wgs84PosLong_ = input.readDouble(); + break; + case 56: + this.bitField0_ |= 0x40; + this.utc_ = input.readUInt64(); + break; + case 66: + bs = input.readBytes(); + this.bitField0_ |= 0x80; + this.rtsp_ = bs; + break; + case 72: + this.bitField0_ |= 0x100; + this.cameraId_ = input.readInt32(); + break; + case 80: + this.bitField0_ |= 0x200; + this.cameraColor_ = input.readInt32(); + break; + case 89: + this.bitField0_ |= 0x400; + this.cog_ = input.readDouble(); + break; + case 97: + this.bitField0_ |= 0x800; + this.sog_ = input.readDouble(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_FllowVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_FllowVo_fieldAccessorTable.ensureFieldAccessorsInitialized(FllowVo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public FllowVo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new FllowVo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRACKNUMBER_FIELD_NUMBER = 1; + + private int trackNumber_; + + public static final int FLLOW_FIELD_NUMBER = 2; + + private int fllow_; + + public static final int WARNSITETYPE_FIELD_NUMBER = 3; + + private Object warnSiteType_; + + public static final int MODE_FIELD_NUMBER = 4; + + private int mode_; + + public static final int WGS84POSLAT_FIELD_NUMBER = 5; + + private double wgs84PosLat_; + + public static final int WGS84POSLONG_FIELD_NUMBER = 6; + + private double wgs84PosLong_; + + public static final int UTC_FIELD_NUMBER = 7; + + private long utc_; + + public static final int RTSP_FIELD_NUMBER = 8; + + private Object rtsp_; + + public static final int CAMERAID_FIELD_NUMBER = 9; + + private int cameraId_; + + public static final int CAMERACOLOR_FIELD_NUMBER = 10; + + private int cameraColor_; + + public static final int COG_FIELD_NUMBER = 11; + + private double cog_; + + public static final int SOG_FIELD_NUMBER = 12; + + private double sog_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public boolean hasFllow() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getFllow() { + return this.fllow_; + } + + public boolean hasWarnSiteType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getWarnSiteType() { + Object ref = this.warnSiteType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnSiteType_ = s; + return s; + } + + public ByteString getWarnSiteTypeBytes() { + Object ref = this.warnSiteType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnSiteType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMode() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getMode() { + return this.mode_; + } + + public boolean hasWgs84PosLat() { + return ((this.bitField0_ & 0x10) == 16); + } + + public double getWgs84PosLat() { + return this.wgs84PosLat_; + } + + public boolean hasWgs84PosLong() { + return ((this.bitField0_ & 0x20) == 32); + } + + public double getWgs84PosLong() { + return this.wgs84PosLong_; + } + + public boolean hasUtc() { + return ((this.bitField0_ & 0x40) == 64); + } + + public long getUtc() { + return this.utc_; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x100) == 256); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getCog() { + return this.cog_; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getSog() { + return this.sog_; + } + + private void initFields() { + this.trackNumber_ = 0; + this.fllow_ = 0; + this.warnSiteType_ = ""; + this.mode_ = 0; + this.wgs84PosLat_ = 0.0D; + this.wgs84PosLong_ = 0.0D; + this.utc_ = 0L; + this.rtsp_ = ""; + this.cameraId_ = 0; + this.cameraColor_ = 0; + this.cog_ = 0.0D; + this.sog_ = 0.0D; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasFllow()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasWarnSiteType()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.trackNumber_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.fllow_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getWarnSiteTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.mode_); + if ((this.bitField0_ & 0x10) == 16) + output.writeDouble(5, this.wgs84PosLat_); + if ((this.bitField0_ & 0x20) == 32) + output.writeDouble(6, this.wgs84PosLong_); + if ((this.bitField0_ & 0x40) == 64) + output.writeUInt64(7, this.utc_); + if ((this.bitField0_ & 0x80) == 128) + output.writeBytes(8, getRtspBytes()); + if ((this.bitField0_ & 0x100) == 256) + output.writeInt32(9, this.cameraId_); + if ((this.bitField0_ & 0x200) == 512) + output.writeInt32(10, this.cameraColor_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeDouble(11, this.cog_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeDouble(12, this.sog_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.trackNumber_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.fllow_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getWarnSiteTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.mode_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeDoubleSize(5, this.wgs84PosLat_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeDoubleSize(6, this.wgs84PosLong_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeUInt64Size(7, this.utc_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeBytesSize(8, getRtspBytes()); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeInt32Size(9, this.cameraId_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeInt32Size(10, this.cameraColor_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeDoubleSize(11, this.cog_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeDoubleSize(12, this.sog_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static FllowVo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data); + } + + public static FllowVo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static FllowVo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data); + } + + public static FllowVo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static FllowVo parseFrom(InputStream input) throws IOException { + return (FllowVo)PARSER.parseFrom(input); + } + + public static FllowVo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (FllowVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static FllowVo parseDelimitedFrom(InputStream input) throws IOException { + return (FllowVo)PARSER.parseDelimitedFrom(input); + } + + public static FllowVo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (FllowVo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static FllowVo parseFrom(CodedInputStream input) throws IOException { + return (FllowVo)PARSER.parseFrom(input); + } + + public static FllowVo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (FllowVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(FllowVo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements FllowVoOrBuilder { + private int bitField0_; + + private int trackNumber_; + + private int fllow_; + + private Object warnSiteType_; + + private int mode_; + + private double wgs84PosLat_; + + private double wgs84PosLong_; + + private long utc_; + + private Object rtsp_; + + private int cameraId_; + + private int cameraColor_; + + private double cog_; + + private double sog_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_FllowVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_FllowVo_fieldAccessorTable.ensureFieldAccessorsInitialized(FllowVo.class, Builder.class); + } + + private Builder() { + this.warnSiteType_ = ""; + this.rtsp_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.warnSiteType_ = ""; + this.rtsp_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = FllowVo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.trackNumber_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.fllow_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.warnSiteType_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.mode_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.wgs84PosLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFEF; + this.wgs84PosLong_ = 0.0D; + this.bitField0_ &= 0xFFFFFFDF; + this.utc_ = 0L; + this.bitField0_ &= 0xFFFFFFBF; + this.rtsp_ = ""; + this.bitField0_ &= 0xFFFFFF7F; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFEFF; + this.cameraColor_ = 0; + this.bitField0_ &= 0xFFFFFDFF; + this.cog_ = 0.0D; + this.bitField0_ &= 0xFFFFFBFF; + this.sog_ = 0.0D; + this.bitField0_ &= 0xFFFFF7FF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_FllowVo_descriptor; + } + + public FllowVo getDefaultInstanceForType() { + return FllowVo.getDefaultInstance(); + } + + public FllowVo build() { + FllowVo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public FllowVo buildPartial() { + FllowVo result = new FllowVo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.trackNumber_ = this.trackNumber_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.fllow_ = this.fllow_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.warnSiteType_ = this.warnSiteType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.mode_ = this.mode_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.wgs84PosLat_ = this.wgs84PosLat_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.wgs84PosLong_ = this.wgs84PosLong_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.utc_ = this.utc_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.cameraColor_ = this.cameraColor_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.cog_ = this.cog_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.sog_ = this.sog_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof FllowVo) + return mergeFrom((FllowVo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(FllowVo other) { + if (other == FllowVo.getDefaultInstance()) + return this; + if (other.hasTrackNumber()) + setTrackNumber(other.getTrackNumber()); + if (other.hasFllow()) + setFllow(other.getFllow()); + if (other.hasWarnSiteType()) { + this.bitField0_ |= 0x4; + this.warnSiteType_ = other.warnSiteType_; + onChanged(); + } + if (other.hasMode()) + setMode(other.getMode()); + if (other.hasWgs84PosLat()) + setWgs84PosLat(other.getWgs84PosLat()); + if (other.hasWgs84PosLong()) + setWgs84PosLong(other.getWgs84PosLong()); + if (other.hasUtc()) + setUtc(other.getUtc()); + if (other.hasRtsp()) { + this.bitField0_ |= 0x80; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasCameraColor()) + setCameraColor(other.getCameraColor()); + if (other.hasCog()) + setCog(other.getCog()); + if (other.hasSog()) + setSog(other.getSog()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasFllow()) + return false; + if (!hasWarnSiteType()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + FllowVo parsedMessage = null; + try { + parsedMessage = (FllowVo) FllowVo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (FllowVo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public Builder setTrackNumber(int value) { + this.bitField0_ |= 0x1; + this.trackNumber_ = value; + onChanged(); + return this; + } + + public Builder clearTrackNumber() { + this.bitField0_ &= 0xFFFFFFFE; + this.trackNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasFllow() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getFllow() { + return this.fllow_; + } + + public Builder setFllow(int value) { + this.bitField0_ |= 0x2; + this.fllow_ = value; + onChanged(); + return this; + } + + public Builder clearFllow() { + this.bitField0_ &= 0xFFFFFFFD; + this.fllow_ = 0; + onChanged(); + return this; + } + + public boolean hasWarnSiteType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getWarnSiteType() { + Object ref = this.warnSiteType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnSiteType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getWarnSiteTypeBytes() { + Object ref = this.warnSiteType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnSiteType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setWarnSiteType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.warnSiteType_ = value; + onChanged(); + return this; + } + + public Builder clearWarnSiteType() { + this.bitField0_ &= 0xFFFFFFFB; + this.warnSiteType_ = FllowVo.getDefaultInstance().getWarnSiteType(); + onChanged(); + return this; + } + + public Builder setWarnSiteTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.warnSiteType_ = value; + onChanged(); + return this; + } + + public boolean hasMode() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getMode() { + return this.mode_; + } + + public Builder setMode(int value) { + this.bitField0_ |= 0x8; + this.mode_ = value; + onChanged(); + return this; + } + + public Builder clearMode() { + this.bitField0_ &= 0xFFFFFFF7; + this.mode_ = 0; + onChanged(); + return this; + } + + public boolean hasWgs84PosLat() { + return ((this.bitField0_ & 0x10) == 16); + } + + public double getWgs84PosLat() { + return this.wgs84PosLat_; + } + + public Builder setWgs84PosLat(double value) { + this.bitField0_ |= 0x10; + this.wgs84PosLat_ = value; + onChanged(); + return this; + } + + public Builder clearWgs84PosLat() { + this.bitField0_ &= 0xFFFFFFEF; + this.wgs84PosLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWgs84PosLong() { + return ((this.bitField0_ & 0x20) == 32); + } + + public double getWgs84PosLong() { + return this.wgs84PosLong_; + } + + public Builder setWgs84PosLong(double value) { + this.bitField0_ |= 0x20; + this.wgs84PosLong_ = value; + onChanged(); + return this; + } + + public Builder clearWgs84PosLong() { + this.bitField0_ &= 0xFFFFFFDF; + this.wgs84PosLong_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasUtc() { + return ((this.bitField0_ & 0x40) == 64); + } + + public long getUtc() { + return this.utc_; + } + + public Builder setUtc(long value) { + this.bitField0_ |= 0x40; + this.utc_ = value; + onChanged(); + return this; + } + + public Builder clearUtc() { + this.bitField0_ &= 0xFFFFFFBF; + this.utc_ = 0L; + onChanged(); + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xFFFFFF7F; + this.rtsp_ = FllowVo.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x100) == 256); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x100; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFEFF; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraColor() { + return ((this.bitField0_ & 0x200) == 512); + } + + public int getCameraColor() { + return this.cameraColor_; + } + + public Builder setCameraColor(int value) { + this.bitField0_ |= 0x200; + this.cameraColor_ = value; + onChanged(); + return this; + } + + public Builder clearCameraColor() { + this.bitField0_ &= 0xFFFFFDFF; + this.cameraColor_ = 0; + onChanged(); + return this; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getCog() { + return this.cog_; + } + + public Builder setCog(double value) { + this.bitField0_ |= 0x400; + this.cog_ = value; + onChanged(); + return this; + } + + public Builder clearCog() { + this.bitField0_ &= 0xFFFFFBFF; + this.cog_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public double getSog() { + return this.sog_; + } + + public Builder setSog(double value) { + this.bitField0_ |= 0x800; + this.sog_ = value; + onChanged(); + return this; + } + + public Builder clearSog() { + this.bitField0_ &= 0xFFFFF7FF; + this.sog_ = 0.0D; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class ReqFllowVo extends GeneratedMessage implements ReqFllowVoOrBuilder { + private static final ReqFllowVo defaultInstance = new ReqFllowVo(true); + + private final UnknownFieldSet unknownFields; + + private ReqFllowVo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private ReqFllowVo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static ReqFllowVo getDefaultInstance() { + return defaultInstance; + } + + public ReqFllowVo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReqFllowVo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.cameraList_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.cameraList_.add((CameraInfo)input.readMessage(CameraInfo.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.cameraList_ = Collections.unmodifiableList(this.cameraList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVo_fieldAccessorTable.ensureFieldAccessorsInitialized(ReqFllowVo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public ReqFllowVo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new ReqFllowVo(input, extensionRegistry); + } + }; + + public static final int CAMERALIST_FIELD_NUMBER = 1; + + private List cameraList_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getCameraListList() { + return this.cameraList_; + } + + public List getCameraListOrBuilderList() { + return (List)this.cameraList_; + } + + public int getCameraListCount() { + return this.cameraList_.size(); + } + + public CameraInfo getCameraList(int index) { + return this.cameraList_.get(index); + } + + public CameraInfoOrBuilder getCameraListOrBuilder(int index) { + return this.cameraList_.get(index); + } + + private void initFields() { + this.cameraList_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getCameraListCount(); i++) { + if (!getCameraList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.cameraList_.size(); i++) + output.writeMessage(1, (MessageLite)this.cameraList_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.cameraList_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.cameraList_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static ReqFllowVo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (ReqFllowVo)PARSER.parseFrom(data); + } + + public static ReqFllowVo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (ReqFllowVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static ReqFllowVo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (ReqFllowVo)PARSER.parseFrom(data); + } + + public static ReqFllowVo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (ReqFllowVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static ReqFllowVo parseFrom(InputStream input) throws IOException { + return (ReqFllowVo)PARSER.parseFrom(input); + } + + public static ReqFllowVo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ReqFllowVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static ReqFllowVo parseDelimitedFrom(InputStream input) throws IOException { + return (ReqFllowVo)PARSER.parseDelimitedFrom(input); + } + + public static ReqFllowVo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ReqFllowVo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static ReqFllowVo parseFrom(CodedInputStream input) throws IOException { + return (ReqFllowVo)PARSER.parseFrom(input); + } + + public static ReqFllowVo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ReqFllowVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(ReqFllowVo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements ReqFllowVoOrBuilder { + private int bitField0_; + + private List cameraList_; + + private RepeatedFieldBuilder cameraListBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVo_fieldAccessorTable.ensureFieldAccessorsInitialized(ReqFllowVo.class, Builder.class); + } + + private Builder() { + this.cameraList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.cameraList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (ReqFllowVo.alwaysUseFieldBuilders) + getCameraListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.cameraListBuilder_ == null) { + this.cameraList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.cameraListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVo_descriptor; + } + + public ReqFllowVo getDefaultInstanceForType() { + return ReqFllowVo.getDefaultInstance(); + } + + public ReqFllowVo build() { + ReqFllowVo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public ReqFllowVo buildPartial() { + ReqFllowVo result = new ReqFllowVo(this); + int from_bitField0_ = this.bitField0_; + if (this.cameraListBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.cameraList_ = Collections.unmodifiableList(this.cameraList_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.cameraList_ = this.cameraList_; + } else { + result.cameraList_ = this.cameraListBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof ReqFllowVo) + return mergeFrom((ReqFllowVo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(ReqFllowVo other) { + if (other == ReqFllowVo.getDefaultInstance()) + return this; + if (this.cameraListBuilder_ == null) { + if (!other.cameraList_.isEmpty()) { + if (this.cameraList_.isEmpty()) { + this.cameraList_ = other.cameraList_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureCameraListIsMutable(); + this.cameraList_.addAll(other.cameraList_); + } + onChanged(); + } + } else if (!other.cameraList_.isEmpty()) { + if (this.cameraListBuilder_.isEmpty()) { + this.cameraListBuilder_.dispose(); + this.cameraListBuilder_ = null; + this.cameraList_ = other.cameraList_; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraListBuilder_ = ReqFllowVo.alwaysUseFieldBuilders ? getCameraListFieldBuilder() : null; + } else { + this.cameraListBuilder_.addAllMessages(other.cameraList_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getCameraListCount(); i++) { + if (!getCameraList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + ReqFllowVo parsedMessage = null; + try { + parsedMessage = (ReqFllowVo) ReqFllowVo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (ReqFllowVo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureCameraListIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.cameraList_ = new ArrayList(this.cameraList_); + this.bitField0_ |= 0x1; + } + } + + public List getCameraListList() { + if (this.cameraListBuilder_ == null) + return Collections.unmodifiableList(this.cameraList_); + return this.cameraListBuilder_.getMessageList(); + } + + public int getCameraListCount() { + if (this.cameraListBuilder_ == null) + return this.cameraList_.size(); + return this.cameraListBuilder_.getCount(); + } + + public CameraInfo getCameraList(int index) { + if (this.cameraListBuilder_ == null) + return this.cameraList_.get(index); + return (CameraInfo)this.cameraListBuilder_.getMessage(index); + } + + public Builder setCameraList(int index, CameraInfo value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.set(index, value); + onChanged(); + } else { + this.cameraListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setCameraList(int index, CameraInfo.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addCameraList(CameraInfo value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.add(value); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(value); + } + return this; + } + + public Builder addCameraList(int index, CameraInfo value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.add(index, value); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addCameraList(CameraInfo.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.add(builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addCameraList(int index, CameraInfo.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllCameraList(Iterable values) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.cameraList_); + onChanged(); + } else { + this.cameraListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearCameraList() { + if (this.cameraListBuilder_ == null) { + this.cameraList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.cameraListBuilder_.clear(); + } + return this; + } + + public Builder removeCameraList(int index) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.remove(index); + onChanged(); + } else { + this.cameraListBuilder_.remove(index); + } + return this; + } + + public CameraInfo.Builder getCameraListBuilder(int index) { + return (CameraInfo.Builder)getCameraListFieldBuilder().getBuilder(index); + } + + public CameraInfoOrBuilder getCameraListOrBuilder(int index) { + if (this.cameraListBuilder_ == null) + return this.cameraList_.get(index); + return (CameraInfoOrBuilder)this.cameraListBuilder_.getMessageOrBuilder(index); + } + + public List getCameraListOrBuilderList() { + if (this.cameraListBuilder_ != null) + return this.cameraListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.cameraList_); + } + + public CameraInfo.Builder addCameraListBuilder() { + return (CameraInfo.Builder)getCameraListFieldBuilder().addBuilder(CameraInfo.getDefaultInstance()); + } + + public CameraInfo.Builder addCameraListBuilder(int index) { + return (CameraInfo.Builder)getCameraListFieldBuilder().addBuilder(index, CameraInfo.getDefaultInstance()); + } + + public List getCameraListBuilderList() { + return getCameraListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getCameraListFieldBuilder() { + if (this.cameraListBuilder_ == null) { + this.cameraListBuilder_ = new RepeatedFieldBuilder(this.cameraList_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.cameraList_ = null; + } + return this.cameraListBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class ReqFllowVoForCtrl extends GeneratedMessage implements ReqFllowVoForCtrlOrBuilder { + private static final ReqFllowVoForCtrl defaultInstance = new ReqFllowVoForCtrl(true); + + private final UnknownFieldSet unknownFields; + + private ReqFllowVoForCtrl(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private ReqFllowVoForCtrl(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static ReqFllowVoForCtrl getDefaultInstance() { + return defaultInstance; + } + + public ReqFllowVoForCtrl getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReqFllowVoForCtrl(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + FllowVo.Builder subBuilder; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.cameraList_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.cameraList_.add((CameraInfoForCtrl)input.readMessage(CameraInfoForCtrl.PARSER, extensionRegistry)); + break; + case 18: + subBuilder = null; + if ((this.bitField0_ & 0x1) == 1) + subBuilder = this.fllowVo_.toBuilder(); + this.fllowVo_ = (FllowVo)input.readMessage(FllowVo.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.fllowVo_); + this.fllowVo_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x1; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.cameraList_ = Collections.unmodifiableList(this.cameraList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_fieldAccessorTable.ensureFieldAccessorsInitialized(ReqFllowVoForCtrl.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public ReqFllowVoForCtrl parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new ReqFllowVoForCtrl(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERALIST_FIELD_NUMBER = 1; + + private List cameraList_; + + public static final int FLLOWVO_FIELD_NUMBER = 2; + + private FllowVo fllowVo_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getCameraListList() { + return this.cameraList_; + } + + public List getCameraListOrBuilderList() { + return (List)this.cameraList_; + } + + public int getCameraListCount() { + return this.cameraList_.size(); + } + + public CameraInfoForCtrl getCameraList(int index) { + return this.cameraList_.get(index); + } + + public CameraInfoForCtrlOrBuilder getCameraListOrBuilder(int index) { + return this.cameraList_.get(index); + } + + public boolean hasFllowVo() { + return ((this.bitField0_ & 0x1) == 1); + } + + public FllowVo getFllowVo() { + return this.fllowVo_; + } + + public FllowVoOrBuilder getFllowVoOrBuilder() { + return this.fllowVo_; + } + + private void initFields() { + this.cameraList_ = Collections.emptyList(); + this.fllowVo_ = FllowVo.getDefaultInstance(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getCameraListCount(); i++) { + if (!getCameraList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + if (hasFllowVo() && !getFllowVo().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.cameraList_.size(); i++) + output.writeMessage(1, (MessageLite)this.cameraList_.get(i)); + if ((this.bitField0_ & 0x1) == 1) + output.writeMessage(2, (MessageLite)this.fllowVo_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.cameraList_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.cameraList_.get(i)); + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeMessageSize(2, (MessageLite)this.fllowVo_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static ReqFllowVoForCtrl parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(data); + } + + public static ReqFllowVoForCtrl parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(data, extensionRegistry); + } + + public static ReqFllowVoForCtrl parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(data); + } + + public static ReqFllowVoForCtrl parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(data, extensionRegistry); + } + + public static ReqFllowVoForCtrl parseFrom(InputStream input) throws IOException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(input); + } + + public static ReqFllowVoForCtrl parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(input, extensionRegistry); + } + + public static ReqFllowVoForCtrl parseDelimitedFrom(InputStream input) throws IOException { + return (ReqFllowVoForCtrl)PARSER.parseDelimitedFrom(input); + } + + public static ReqFllowVoForCtrl parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ReqFllowVoForCtrl)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static ReqFllowVoForCtrl parseFrom(CodedInputStream input) throws IOException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(input); + } + + public static ReqFllowVoForCtrl parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ReqFllowVoForCtrl)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(ReqFllowVoForCtrl prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements ReqFllowVoForCtrlOrBuilder { + private int bitField0_; + + private List cameraList_; + + private RepeatedFieldBuilder cameraListBuilder_; + + private FllowVo fllowVo_; + + private SingleFieldBuilder fllowVoBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_fieldAccessorTable.ensureFieldAccessorsInitialized(ReqFllowVoForCtrl.class, Builder.class); + } + + private Builder() { + this.cameraList_ = Collections.emptyList(); + this.fllowVo_ = FllowVo.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.cameraList_ = Collections.emptyList(); + this.fllowVo_ = FllowVo.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (ReqFllowVoForCtrl.alwaysUseFieldBuilders) { + getCameraListFieldBuilder(); + getFllowVoFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.cameraListBuilder_ == null) { + this.cameraList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.cameraListBuilder_.clear(); + } + if (this.fllowVoBuilder_ == null) { + this.fllowVo_ = FllowVo.getDefaultInstance(); + } else { + this.fllowVoBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFFD; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_descriptor; + } + + public ReqFllowVoForCtrl getDefaultInstanceForType() { + return ReqFllowVoForCtrl.getDefaultInstance(); + } + + public ReqFllowVoForCtrl build() { + ReqFllowVoForCtrl result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public ReqFllowVoForCtrl buildPartial() { + ReqFllowVoForCtrl result = new ReqFllowVoForCtrl(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if (this.cameraListBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.cameraList_ = Collections.unmodifiableList(this.cameraList_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.cameraList_ = this.cameraList_; + } else { + result.cameraList_ = this.cameraListBuilder_.build(); + } + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x1; + if (this.fllowVoBuilder_ == null) { + result.fllowVo_ = this.fllowVo_; + } else { + result.fllowVo_ = (FllowVo)this.fllowVoBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof ReqFllowVoForCtrl) + return mergeFrom((ReqFllowVoForCtrl)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(ReqFllowVoForCtrl other) { + if (other == ReqFllowVoForCtrl.getDefaultInstance()) + return this; + if (this.cameraListBuilder_ == null) { + if (!other.cameraList_.isEmpty()) { + if (this.cameraList_.isEmpty()) { + this.cameraList_ = other.cameraList_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureCameraListIsMutable(); + this.cameraList_.addAll(other.cameraList_); + } + onChanged(); + } + } else if (!other.cameraList_.isEmpty()) { + if (this.cameraListBuilder_.isEmpty()) { + this.cameraListBuilder_.dispose(); + this.cameraListBuilder_ = null; + this.cameraList_ = other.cameraList_; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraListBuilder_ = ReqFllowVoForCtrl.alwaysUseFieldBuilders ? getCameraListFieldBuilder() : null; + } else { + this.cameraListBuilder_.addAllMessages(other.cameraList_); + } + } + if (other.hasFllowVo()) + mergeFllowVo(other.getFllowVo()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getCameraListCount(); i++) { + if (!getCameraList(i).isInitialized()) + return false; + } + if (hasFllowVo() && !getFllowVo().isInitialized()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + ReqFllowVoForCtrl parsedMessage = null; + try { + parsedMessage = (ReqFllowVoForCtrl) ReqFllowVoForCtrl.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (ReqFllowVoForCtrl)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureCameraListIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.cameraList_ = new ArrayList(this.cameraList_); + this.bitField0_ |= 0x1; + } + } + + public List getCameraListList() { + if (this.cameraListBuilder_ == null) + return Collections.unmodifiableList(this.cameraList_); + return this.cameraListBuilder_.getMessageList(); + } + + public int getCameraListCount() { + if (this.cameraListBuilder_ == null) + return this.cameraList_.size(); + return this.cameraListBuilder_.getCount(); + } + + public CameraInfoForCtrl getCameraList(int index) { + if (this.cameraListBuilder_ == null) + return this.cameraList_.get(index); + return (CameraInfoForCtrl)this.cameraListBuilder_.getMessage(index); + } + + public Builder setCameraList(int index, CameraInfoForCtrl value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.set(index, value); + onChanged(); + } else { + this.cameraListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setCameraList(int index, CameraInfoForCtrl.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addCameraList(CameraInfoForCtrl value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.add(value); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(value); + } + return this; + } + + public Builder addCameraList(int index, CameraInfoForCtrl value) { + if (this.cameraListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureCameraListIsMutable(); + this.cameraList_.add(index, value); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addCameraList(CameraInfoForCtrl.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.add(builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addCameraList(int index, CameraInfoForCtrl.Builder builderForValue) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.cameraListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllCameraList(Iterable values) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.cameraList_); + onChanged(); + } else { + this.cameraListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearCameraList() { + if (this.cameraListBuilder_ == null) { + this.cameraList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.cameraListBuilder_.clear(); + } + return this; + } + + public Builder removeCameraList(int index) { + if (this.cameraListBuilder_ == null) { + ensureCameraListIsMutable(); + this.cameraList_.remove(index); + onChanged(); + } else { + this.cameraListBuilder_.remove(index); + } + return this; + } + + public CameraInfoForCtrl.Builder getCameraListBuilder(int index) { + return (CameraInfoForCtrl.Builder)getCameraListFieldBuilder().getBuilder(index); + } + + public CameraInfoForCtrlOrBuilder getCameraListOrBuilder(int index) { + if (this.cameraListBuilder_ == null) + return this.cameraList_.get(index); + return (CameraInfoForCtrlOrBuilder)this.cameraListBuilder_.getMessageOrBuilder(index); + } + + public List getCameraListOrBuilderList() { + if (this.cameraListBuilder_ != null) + return this.cameraListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.cameraList_); + } + + public CameraInfoForCtrl.Builder addCameraListBuilder() { + return (CameraInfoForCtrl.Builder)getCameraListFieldBuilder().addBuilder(CameraInfoForCtrl.getDefaultInstance()); + } + + public CameraInfoForCtrl.Builder addCameraListBuilder(int index) { + return (CameraInfoForCtrl.Builder)getCameraListFieldBuilder().addBuilder(index, CameraInfoForCtrl.getDefaultInstance()); + } + + public List getCameraListBuilderList() { + return getCameraListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getCameraListFieldBuilder() { + if (this.cameraListBuilder_ == null) { + this.cameraListBuilder_ = new RepeatedFieldBuilder(this.cameraList_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.cameraList_ = null; + } + return this.cameraListBuilder_; + } + + public boolean hasFllowVo() { + return ((this.bitField0_ & 0x2) == 2); + } + + public FllowVo getFllowVo() { + if (this.fllowVoBuilder_ == null) + return this.fllowVo_; + return (FllowVo)this.fllowVoBuilder_.getMessage(); + } + + public Builder setFllowVo(FllowVo value) { + if (this.fllowVoBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.fllowVo_ = value; + onChanged(); + } else { + this.fllowVoBuilder_.setMessage(value); + } + this.bitField0_ |= 0x2; + return this; + } + + public Builder setFllowVo(FllowVo.Builder builderForValue) { + if (this.fllowVoBuilder_ == null) { + this.fllowVo_ = builderForValue.build(); + onChanged(); + } else { + this.fllowVoBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x2; + return this; + } + + public Builder mergeFllowVo(FllowVo value) { + if (this.fllowVoBuilder_ == null) { + if ((this.bitField0_ & 0x2) == 2 && this.fllowVo_ != FllowVo.getDefaultInstance()) { + this.fllowVo_ = FllowVo.newBuilder(this.fllowVo_).mergeFrom(value).buildPartial(); + } else { + this.fllowVo_ = value; + } + onChanged(); + } else { + this.fllowVoBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x2; + return this; + } + + public Builder clearFllowVo() { + if (this.fllowVoBuilder_ == null) { + this.fllowVo_ = FllowVo.getDefaultInstance(); + onChanged(); + } else { + this.fllowVoBuilder_.clear(); + } + this.bitField0_ &= 0xFFFFFFFD; + return this; + } + + public FllowVo.Builder getFllowVoBuilder() { + this.bitField0_ |= 0x2; + onChanged(); + return (FllowVo.Builder)getFllowVoFieldBuilder().getBuilder(); + } + + public FllowVoOrBuilder getFllowVoOrBuilder() { + if (this.fllowVoBuilder_ != null) + return (FllowVoOrBuilder)this.fllowVoBuilder_.getMessageOrBuilder(); + return this.fllowVo_; + } + + private SingleFieldBuilder getFllowVoFieldBuilder() { + if (this.fllowVoBuilder_ == null) { + this.fllowVoBuilder_ = new SingleFieldBuilder(getFllowVo(), getParentForChildren(), isClean()); + this.fllowVo_ = null; + } + return this.fllowVoBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class SpotVo extends GeneratedMessage implements SpotVoOrBuilder { + private static final SpotVo defaultInstance = new SpotVo(true); + + private final UnknownFieldSet unknownFields; + + private SpotVo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private SpotVo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static SpotVo getDefaultInstance() { + return defaultInstance; + } + + public SpotVo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SpotVo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.trackNumber_ = input.readInt32(); + break; + case 16: + this.bitField0_ |= 0x2; + this.fllowType_ = input.readInt32(); + break; + case 24: + this.bitField0_ |= 0x4; + this.objectType_ = input.readInt32(); + break; + case 34: + bs = input.readBytes(); + this.bitField0_ |= 0x8; + this.rtsp_ = bs; + break; + case 40: + this.bitField0_ |= 0x10; + this.mode_ = input.readInt32(); + break; + case 50: + bs = input.readBytes(); + this.bitField0_ |= 0x20; + this.warnSiteType_ = bs; + break; + case 58: + bs = input.readBytes(); + this.bitField0_ |= 0x40; + this.cameraName_ = bs; + break; + case 64: + this.bitField0_ |= 0x80; + this.cameraId_ = input.readInt32(); + break; + case 74: + bs = input.readBytes(); + this.bitField0_ |= 0x100; + this.composeRtsp_ = bs; + break; + case 82: + bs = input.readBytes(); + this.bitField0_ |= 0x200; + this.composeFtp_ = bs; + break; + case 90: + bs = input.readBytes(); + this.bitField0_ |= 0x400; + this.warnSite_ = bs; + break; + case 96: + this.bitField0_ |= 0x800; + this.warnTime_ = input.readInt32(); + break; + case 105: + this.bitField0_ |= 0x1000; + this.warnLon_ = input.readDouble(); + break; + case 113: + this.bitField0_ |= 0x2000; + this.warnLat_ = input.readDouble(); + break; + case 120: + this.bitField0_ |= 0x4000; + this.warnLevel_ = input.readInt32(); + break; + case 128: + this.bitField0_ |= 0x8000; + this.warnSource_ = input.readInt32(); + break; + case 136: + this.bitField0_ |= 0x10000; + this.warnType_ = input.readInt32(); + break; + case 144: + this.bitField0_ |= 0x20000; + this.lockStatus_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_SpotVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_SpotVo_fieldAccessorTable.ensureFieldAccessorsInitialized(SpotVo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public SpotVo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new SpotVo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRACKNUMBER_FIELD_NUMBER = 1; + + private int trackNumber_; + + public static final int FLLOWTYPE_FIELD_NUMBER = 2; + + private int fllowType_; + + public static final int OBJECTTYPE_FIELD_NUMBER = 3; + + private int objectType_; + + public static final int RTSP_FIELD_NUMBER = 4; + + private Object rtsp_; + + public static final int MODE_FIELD_NUMBER = 5; + + private int mode_; + + public static final int WARNSITETYPE_FIELD_NUMBER = 6; + + private Object warnSiteType_; + + public static final int CAMERANAME_FIELD_NUMBER = 7; + + private Object cameraName_; + + public static final int CAMERAID_FIELD_NUMBER = 8; + + private int cameraId_; + + public static final int COMPOSE_RTSP_FIELD_NUMBER = 9; + + private Object composeRtsp_; + + public static final int COMPOSE_FTP_FIELD_NUMBER = 10; + + private Object composeFtp_; + + public static final int WARNSITE_FIELD_NUMBER = 11; + + private Object warnSite_; + + public static final int WARNTIME_FIELD_NUMBER = 12; + + private int warnTime_; + + public static final int WARNLON_FIELD_NUMBER = 13; + + private double warnLon_; + + public static final int WARNLAT_FIELD_NUMBER = 14; + + private double warnLat_; + + public static final int WARNLEVEL_FIELD_NUMBER = 15; + + private int warnLevel_; + + public static final int WARNSOURCE_FIELD_NUMBER = 16; + + private int warnSource_; + + public static final int WARNTYPE_FIELD_NUMBER = 17; + + private int warnType_; + + public static final int LOCKSTATUS_FIELD_NUMBER = 18; + + private int lockStatus_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public boolean hasFllowType() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getFllowType() { + return this.fllowType_; + } + + public boolean hasObjectType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getObjectType() { + return this.objectType_; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMode() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getMode() { + return this.mode_; + } + + public boolean hasWarnSiteType() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getWarnSiteType() { + Object ref = this.warnSiteType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnSiteType_ = s; + return s; + } + + public ByteString getWarnSiteTypeBytes() { + Object ref = this.warnSiteType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnSiteType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x40) == 64); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasComposeRtsp() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getComposeRtsp() { + Object ref = this.composeRtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeRtsp_ = s; + return s; + } + + public ByteString getComposeRtspBytes() { + Object ref = this.composeRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasComposeFtp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getComposeFtp() { + Object ref = this.composeFtp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeFtp_ = s; + return s; + } + + public ByteString getComposeFtpBytes() { + Object ref = this.composeFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasWarnSite() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getWarnSite() { + Object ref = this.warnSite_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnSite_ = s; + return s; + } + + public ByteString getWarnSiteBytes() { + Object ref = this.warnSite_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnSite_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasWarnTime() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getWarnTime() { + return this.warnTime_; + } + + public boolean hasWarnLon() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public double getWarnLon() { + return this.warnLon_; + } + + public boolean hasWarnLat() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getWarnLat() { + return this.warnLat_; + } + + public boolean hasWarnLevel() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public int getWarnLevel() { + return this.warnLevel_; + } + + public boolean hasWarnSource() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public int getWarnSource() { + return this.warnSource_; + } + + public boolean hasWarnType() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public int getWarnType() { + return this.warnType_; + } + + public boolean hasLockStatus() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public int getLockStatus() { + return this.lockStatus_; + } + + private void initFields() { + this.trackNumber_ = 0; + this.fllowType_ = 0; + this.objectType_ = 0; + this.rtsp_ = ""; + this.mode_ = 0; + this.warnSiteType_ = ""; + this.cameraName_ = ""; + this.cameraId_ = 0; + this.composeRtsp_ = ""; + this.composeFtp_ = ""; + this.warnSite_ = ""; + this.warnTime_ = 0; + this.warnLon_ = 0.0D; + this.warnLat_ = 0.0D; + this.warnLevel_ = 0; + this.warnSource_ = 0; + this.warnType_ = 0; + this.lockStatus_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTrackNumber()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasFllowType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasObjectType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasRtsp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMode()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasWarnSiteType()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.trackNumber_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.fllowType_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.objectType_); + if ((this.bitField0_ & 0x8) == 8) + output.writeBytes(4, getRtspBytes()); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt32(5, this.mode_); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getWarnSiteTypeBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeBytes(7, getCameraNameBytes()); + if ((this.bitField0_ & 0x80) == 128) + output.writeInt32(8, this.cameraId_); + if ((this.bitField0_ & 0x100) == 256) + output.writeBytes(9, getComposeRtspBytes()); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getComposeFtpBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeBytes(11, getWarnSiteBytes()); + if ((this.bitField0_ & 0x800) == 2048) + output.writeInt32(12, this.warnTime_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeDouble(13, this.warnLon_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeDouble(14, this.warnLat_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeInt32(15, this.warnLevel_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeInt32(16, this.warnSource_); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeInt32(17, this.warnType_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeInt32(18, this.lockStatus_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.trackNumber_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.fllowType_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.objectType_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeBytesSize(4, getRtspBytes()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt32Size(5, this.mode_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getWarnSiteTypeBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeBytesSize(7, getCameraNameBytes()); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeInt32Size(8, this.cameraId_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeBytesSize(9, getComposeRtspBytes()); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getComposeFtpBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeBytesSize(11, getWarnSiteBytes()); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeInt32Size(12, this.warnTime_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeDoubleSize(13, this.warnLon_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeDoubleSize(14, this.warnLat_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeInt32Size(15, this.warnLevel_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeInt32Size(16, this.warnSource_); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeInt32Size(17, this.warnType_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeInt32Size(18, this.lockStatus_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static SpotVo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (SpotVo)PARSER.parseFrom(data); + } + + public static SpotVo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (SpotVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static SpotVo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (SpotVo)PARSER.parseFrom(data); + } + + public static SpotVo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (SpotVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static SpotVo parseFrom(InputStream input) throws IOException { + return (SpotVo)PARSER.parseFrom(input); + } + + public static SpotVo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (SpotVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static SpotVo parseDelimitedFrom(InputStream input) throws IOException { + return (SpotVo)PARSER.parseDelimitedFrom(input); + } + + public static SpotVo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (SpotVo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static SpotVo parseFrom(CodedInputStream input) throws IOException { + return (SpotVo)PARSER.parseFrom(input); + } + + public static SpotVo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (SpotVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(SpotVo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements SpotVoOrBuilder { + private int bitField0_; + + private int trackNumber_; + + private int fllowType_; + + private int objectType_; + + private Object rtsp_; + + private int mode_; + + private Object warnSiteType_; + + private Object cameraName_; + + private int cameraId_; + + private Object composeRtsp_; + + private Object composeFtp_; + + private Object warnSite_; + + private int warnTime_; + + private double warnLon_; + + private double warnLat_; + + private int warnLevel_; + + private int warnSource_; + + private int warnType_; + + private int lockStatus_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_SpotVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_SpotVo_fieldAccessorTable.ensureFieldAccessorsInitialized(SpotVo.class, Builder.class); + } + + private Builder() { + this.rtsp_ = ""; + this.warnSiteType_ = ""; + this.cameraName_ = ""; + this.composeRtsp_ = ""; + this.composeFtp_ = ""; + this.warnSite_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.rtsp_ = ""; + this.warnSiteType_ = ""; + this.cameraName_ = ""; + this.composeRtsp_ = ""; + this.composeFtp_ = ""; + this.warnSite_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = SpotVo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.trackNumber_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.fllowType_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.objectType_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.rtsp_ = ""; + this.bitField0_ &= 0xFFFFFFF7; + this.mode_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + this.warnSiteType_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.cameraName_ = ""; + this.bitField0_ &= 0xFFFFFFBF; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFF7F; + this.composeRtsp_ = ""; + this.bitField0_ &= 0xFFFFFEFF; + this.composeFtp_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.warnSite_ = ""; + this.bitField0_ &= 0xFFFFFBFF; + this.warnTime_ = 0; + this.bitField0_ &= 0xFFFFF7FF; + this.warnLon_ = 0.0D; + this.bitField0_ &= 0xFFFFEFFF; + this.warnLat_ = 0.0D; + this.bitField0_ &= 0xFFFFDFFF; + this.warnLevel_ = 0; + this.bitField0_ &= 0xFFFFBFFF; + this.warnSource_ = 0; + this.bitField0_ &= 0xFFFF7FFF; + this.warnType_ = 0; + this.bitField0_ &= 0xFFFEFFFF; + this.lockStatus_ = 0; + this.bitField0_ &= 0xFFFDFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_SpotVo_descriptor; + } + + public SpotVo getDefaultInstanceForType() { + return SpotVo.getDefaultInstance(); + } + + public SpotVo build() { + SpotVo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public SpotVo buildPartial() { + SpotVo result = new SpotVo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.trackNumber_ = this.trackNumber_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.fllowType_ = this.fllowType_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.objectType_ = this.objectType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.mode_ = this.mode_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.warnSiteType_ = this.warnSiteType_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.cameraName_ = this.cameraName_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.composeRtsp_ = this.composeRtsp_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.composeFtp_ = this.composeFtp_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.warnSite_ = this.warnSite_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.warnTime_ = this.warnTime_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.warnLon_ = this.warnLon_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.warnLat_ = this.warnLat_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.warnLevel_ = this.warnLevel_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.warnSource_ = this.warnSource_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.warnType_ = this.warnType_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.lockStatus_ = this.lockStatus_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof SpotVo) + return mergeFrom((SpotVo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(SpotVo other) { + if (other == SpotVo.getDefaultInstance()) + return this; + if (other.hasTrackNumber()) + setTrackNumber(other.getTrackNumber()); + if (other.hasFllowType()) + setFllowType(other.getFllowType()); + if (other.hasObjectType()) + setObjectType(other.getObjectType()); + if (other.hasRtsp()) { + this.bitField0_ |= 0x8; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasMode()) + setMode(other.getMode()); + if (other.hasWarnSiteType()) { + this.bitField0_ |= 0x20; + this.warnSiteType_ = other.warnSiteType_; + onChanged(); + } + if (other.hasCameraName()) { + this.bitField0_ |= 0x40; + this.cameraName_ = other.cameraName_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasComposeRtsp()) { + this.bitField0_ |= 0x100; + this.composeRtsp_ = other.composeRtsp_; + onChanged(); + } + if (other.hasComposeFtp()) { + this.bitField0_ |= 0x200; + this.composeFtp_ = other.composeFtp_; + onChanged(); + } + if (other.hasWarnSite()) { + this.bitField0_ |= 0x400; + this.warnSite_ = other.warnSite_; + onChanged(); + } + if (other.hasWarnTime()) + setWarnTime(other.getWarnTime()); + if (other.hasWarnLon()) + setWarnLon(other.getWarnLon()); + if (other.hasWarnLat()) + setWarnLat(other.getWarnLat()); + if (other.hasWarnLevel()) + setWarnLevel(other.getWarnLevel()); + if (other.hasWarnSource()) + setWarnSource(other.getWarnSource()); + if (other.hasWarnType()) + setWarnType(other.getWarnType()); + if (other.hasLockStatus()) + setLockStatus(other.getLockStatus()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTrackNumber()) + return false; + if (!hasFllowType()) + return false; + if (!hasObjectType()) + return false; + if (!hasRtsp()) + return false; + if (!hasMode()) + return false; + if (!hasWarnSiteType()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + SpotVo parsedMessage = null; + try { + parsedMessage = (SpotVo) SpotVo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (SpotVo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public Builder setTrackNumber(int value) { + this.bitField0_ |= 0x1; + this.trackNumber_ = value; + onChanged(); + return this; + } + + public Builder clearTrackNumber() { + this.bitField0_ &= 0xFFFFFFFE; + this.trackNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasFllowType() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getFllowType() { + return this.fllowType_; + } + + public Builder setFllowType(int value) { + this.bitField0_ |= 0x2; + this.fllowType_ = value; + onChanged(); + return this; + } + + public Builder clearFllowType() { + this.bitField0_ &= 0xFFFFFFFD; + this.fllowType_ = 0; + onChanged(); + return this; + } + + public boolean hasObjectType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getObjectType() { + return this.objectType_; + } + + public Builder setObjectType(int value) { + this.bitField0_ |= 0x4; + this.objectType_ = value; + onChanged(); + return this; + } + + public Builder clearObjectType() { + this.bitField0_ &= 0xFFFFFFFB; + this.objectType_ = 0; + onChanged(); + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xFFFFFFF7; + this.rtsp_ = SpotVo.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasMode() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getMode() { + return this.mode_; + } + + public Builder setMode(int value) { + this.bitField0_ |= 0x10; + this.mode_ = value; + onChanged(); + return this; + } + + public Builder clearMode() { + this.bitField0_ &= 0xFFFFFFEF; + this.mode_ = 0; + onChanged(); + return this; + } + + public boolean hasWarnSiteType() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getWarnSiteType() { + Object ref = this.warnSiteType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnSiteType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getWarnSiteTypeBytes() { + Object ref = this.warnSiteType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnSiteType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setWarnSiteType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.warnSiteType_ = value; + onChanged(); + return this; + } + + public Builder clearWarnSiteType() { + this.bitField0_ &= 0xFFFFFFDF; + this.warnSiteType_ = SpotVo.getDefaultInstance().getWarnSiteType(); + onChanged(); + return this; + } + + public Builder setWarnSiteTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.warnSiteType_ = value; + onChanged(); + return this; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x40) == 64); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40; + this.cameraName_ = value; + onChanged(); + return this; + } + + public Builder clearCameraName() { + this.bitField0_ &= 0xFFFFFFBF; + this.cameraName_ = SpotVo.getDefaultInstance().getCameraName(); + onChanged(); + return this; + } + + public Builder setCameraNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40; + this.cameraName_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x80; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFF7F; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasComposeRtsp() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getComposeRtsp() { + Object ref = this.composeRtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeRtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getComposeRtspBytes() { + Object ref = this.composeRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setComposeRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.composeRtsp_ = value; + onChanged(); + return this; + } + + public Builder clearComposeRtsp() { + this.bitField0_ &= 0xFFFFFEFF; + this.composeRtsp_ = SpotVo.getDefaultInstance().getComposeRtsp(); + onChanged(); + return this; + } + + public Builder setComposeRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.composeRtsp_ = value; + onChanged(); + return this; + } + + public boolean hasComposeFtp() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getComposeFtp() { + Object ref = this.composeFtp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeFtp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getComposeFtpBytes() { + Object ref = this.composeFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setComposeFtp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.composeFtp_ = value; + onChanged(); + return this; + } + + public Builder clearComposeFtp() { + this.bitField0_ &= 0xFFFFFDFF; + this.composeFtp_ = SpotVo.getDefaultInstance().getComposeFtp(); + onChanged(); + return this; + } + + public Builder setComposeFtpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.composeFtp_ = value; + onChanged(); + return this; + } + + public boolean hasWarnSite() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getWarnSite() { + Object ref = this.warnSite_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnSite_ = s; + return s; + } + return (String)ref; + } + + public ByteString getWarnSiteBytes() { + Object ref = this.warnSite_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnSite_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setWarnSite(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.warnSite_ = value; + onChanged(); + return this; + } + + public Builder clearWarnSite() { + this.bitField0_ &= 0xFFFFFBFF; + this.warnSite_ = SpotVo.getDefaultInstance().getWarnSite(); + onChanged(); + return this; + } + + public Builder setWarnSiteBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.warnSite_ = value; + onChanged(); + return this; + } + + public boolean hasWarnTime() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getWarnTime() { + return this.warnTime_; + } + + public Builder setWarnTime(int value) { + this.bitField0_ |= 0x800; + this.warnTime_ = value; + onChanged(); + return this; + } + + public Builder clearWarnTime() { + this.bitField0_ &= 0xFFFFF7FF; + this.warnTime_ = 0; + onChanged(); + return this; + } + + public boolean hasWarnLon() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public double getWarnLon() { + return this.warnLon_; + } + + public Builder setWarnLon(double value) { + this.bitField0_ |= 0x1000; + this.warnLon_ = value; + onChanged(); + return this; + } + + public Builder clearWarnLon() { + this.bitField0_ &= 0xFFFFEFFF; + this.warnLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWarnLat() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getWarnLat() { + return this.warnLat_; + } + + public Builder setWarnLat(double value) { + this.bitField0_ |= 0x2000; + this.warnLat_ = value; + onChanged(); + return this; + } + + public Builder clearWarnLat() { + this.bitField0_ &= 0xFFFFDFFF; + this.warnLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWarnLevel() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public int getWarnLevel() { + return this.warnLevel_; + } + + public Builder setWarnLevel(int value) { + this.bitField0_ |= 0x4000; + this.warnLevel_ = value; + onChanged(); + return this; + } + + public Builder clearWarnLevel() { + this.bitField0_ &= 0xFFFFBFFF; + this.warnLevel_ = 0; + onChanged(); + return this; + } + + public boolean hasWarnSource() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public int getWarnSource() { + return this.warnSource_; + } + + public Builder setWarnSource(int value) { + this.bitField0_ |= 0x8000; + this.warnSource_ = value; + onChanged(); + return this; + } + + public Builder clearWarnSource() { + this.bitField0_ &= 0xFFFF7FFF; + this.warnSource_ = 0; + onChanged(); + return this; + } + + public boolean hasWarnType() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public int getWarnType() { + return this.warnType_; + } + + public Builder setWarnType(int value) { + this.bitField0_ |= 0x10000; + this.warnType_ = value; + onChanged(); + return this; + } + + public Builder clearWarnType() { + this.bitField0_ &= 0xFFFEFFFF; + this.warnType_ = 0; + onChanged(); + return this; + } + + public boolean hasLockStatus() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public int getLockStatus() { + return this.lockStatus_; + } + + public Builder setLockStatus(int value) { + this.bitField0_ |= 0x20000; + this.lockStatus_ = value; + onChanged(); + return this; + } + + public Builder clearLockStatus() { + this.bitField0_ &= 0xFFFDFFFF; + this.lockStatus_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CtrlVo extends GeneratedMessage implements CtrlVoOrBuilder { + private static final CtrlVo defaultInstance = new CtrlVo(true); + + private final UnknownFieldSet unknownFields; + + private CtrlVo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CtrlVo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CtrlVo getDefaultInstance() { + return defaultInstance; + } + + public CtrlVo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CtrlVo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.rtsp_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.status_ = input.readUInt32(); + break; + case 24: + this.bitField0_ |= 0x4; + this.trackNumber_ = input.readInt32(); + break; + case 34: + bs = input.readBytes(); + this.bitField0_ |= 0x8; + this.cameraName_ = bs; + break; + case 40: + this.bitField0_ |= 0x10; + this.cameraId_ = input.readInt32(); + break; + case 48: + this.bitField0_ |= 0x20; + this.lockStatus_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CtrlVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CtrlVo_fieldAccessorTable.ensureFieldAccessorsInitialized(CtrlVo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CtrlVo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CtrlVo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int RTSP_FIELD_NUMBER = 1; + + private Object rtsp_; + + public static final int STATUS_FIELD_NUMBER = 2; + + private int status_; + + public static final int TRACKNUMBER_FIELD_NUMBER = 3; + + private int trackNumber_; + + public static final int CAMERANAME_FIELD_NUMBER = 4; + + private Object cameraName_; + + public static final int CAMERAID_FIELD_NUMBER = 5; + + private int cameraId_; + + public static final int LOCKSTATUS_FIELD_NUMBER = 6; + + private int lockStatus_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasStatus() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getStatus() { + return this.status_; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasLockStatus() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getLockStatus() { + return this.lockStatus_; + } + + private void initFields() { + this.rtsp_ = ""; + this.status_ = 0; + this.trackNumber_ = 0; + this.cameraName_ = ""; + this.cameraId_ = 0; + this.lockStatus_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasRtsp()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTrackNumber()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getRtspBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeUInt32(2, this.status_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.trackNumber_); + if ((this.bitField0_ & 0x8) == 8) + output.writeBytes(4, getCameraNameBytes()); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt32(5, this.cameraId_); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(6, this.lockStatus_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getRtspBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeUInt32Size(2, this.status_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.trackNumber_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeBytesSize(4, getCameraNameBytes()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt32Size(5, this.cameraId_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(6, this.lockStatus_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CtrlVo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CtrlVo)PARSER.parseFrom(data); + } + + public static CtrlVo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CtrlVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CtrlVo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CtrlVo)PARSER.parseFrom(data); + } + + public static CtrlVo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CtrlVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CtrlVo parseFrom(InputStream input) throws IOException { + return (CtrlVo)PARSER.parseFrom(input); + } + + public static CtrlVo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CtrlVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CtrlVo parseDelimitedFrom(InputStream input) throws IOException { + return (CtrlVo)PARSER.parseDelimitedFrom(input); + } + + public static CtrlVo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CtrlVo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CtrlVo parseFrom(CodedInputStream input) throws IOException { + return (CtrlVo)PARSER.parseFrom(input); + } + + public static CtrlVo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CtrlVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CtrlVo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CtrlVoOrBuilder { + private int bitField0_; + + private Object rtsp_; + + private int status_; + + private int trackNumber_; + + private Object cameraName_; + + private int cameraId_; + + private int lockStatus_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CtrlVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CtrlVo_fieldAccessorTable.ensureFieldAccessorsInitialized(CtrlVo.class, Builder.class); + } + + private Builder() { + this.rtsp_ = ""; + this.cameraName_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.rtsp_ = ""; + this.cameraName_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CtrlVo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.rtsp_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.status_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.trackNumber_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.cameraName_ = ""; + this.bitField0_ &= 0xFFFFFFF7; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + this.lockStatus_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CtrlVo_descriptor; + } + + public CtrlVo getDefaultInstanceForType() { + return CtrlVo.getDefaultInstance(); + } + + public CtrlVo build() { + CtrlVo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CtrlVo buildPartial() { + CtrlVo result = new CtrlVo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.status_ = this.status_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.trackNumber_ = this.trackNumber_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.cameraName_ = this.cameraName_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.lockStatus_ = this.lockStatus_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CtrlVo) + return mergeFrom((CtrlVo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CtrlVo other) { + if (other == CtrlVo.getDefaultInstance()) + return this; + if (other.hasRtsp()) { + this.bitField0_ |= 0x1; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasStatus()) + setStatus(other.getStatus()); + if (other.hasTrackNumber()) + setTrackNumber(other.getTrackNumber()); + if (other.hasCameraName()) { + this.bitField0_ |= 0x8; + this.cameraName_ = other.cameraName_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasLockStatus()) + setLockStatus(other.getLockStatus()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRtsp()) + return false; + if (!hasStatus()) + return false; + if (!hasTrackNumber()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CtrlVo parsedMessage = null; + try { + parsedMessage = (CtrlVo) CtrlVo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CtrlVo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xFFFFFFFE; + this.rtsp_ = CtrlVo.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasStatus() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getStatus() { + return this.status_; + } + + public Builder setStatus(int value) { + this.bitField0_ |= 0x2; + this.status_ = value; + onChanged(); + return this; + } + + public Builder clearStatus() { + this.bitField0_ &= 0xFFFFFFFD; + this.status_ = 0; + onChanged(); + return this; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public Builder setTrackNumber(int value) { + this.bitField0_ |= 0x4; + this.trackNumber_ = value; + onChanged(); + return this; + } + + public Builder clearTrackNumber() { + this.bitField0_ &= 0xFFFFFFFB; + this.trackNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraName() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getCameraName() { + Object ref = this.cameraName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cameraName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCameraNameBytes() { + Object ref = this.cameraName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cameraName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCameraName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.cameraName_ = value; + onChanged(); + return this; + } + + public Builder clearCameraName() { + this.bitField0_ &= 0xFFFFFFF7; + this.cameraName_ = CtrlVo.getDefaultInstance().getCameraName(); + onChanged(); + return this; + } + + public Builder setCameraNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.cameraName_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x10; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFEF; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasLockStatus() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getLockStatus() { + return this.lockStatus_; + } + + public Builder setLockStatus(int value) { + this.bitField0_ |= 0x20; + this.lockStatus_ = value; + onChanged(); + return this; + } + + public Builder clearLockStatus() { + this.bitField0_ &= 0xFFFFFFDF; + this.lockStatus_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CameraStatusInfo extends GeneratedMessage implements CameraStatusInfoOrBuilder { + private static final CameraStatusInfo defaultInstance = new CameraStatusInfo(true); + + private final UnknownFieldSet unknownFields; + + private CameraStatusInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraStatusInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraStatusInfo getDefaultInstance() { + return defaultInstance; + } + + public CameraStatusInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraStatusInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.cameraId_ = input.readInt32(); + break; + case 16: + this.bitField0_ |= 0x2; + this.status_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraStatusInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraStatusInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraStatusInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraStatusInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraStatusInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int CAMERAID_FIELD_NUMBER = 1; + + private int cameraId_; + + public static final int STATUS_FIELD_NUMBER = 2; + + private int status_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasStatus() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getStatus() { + return this.status_; + } + + private void initFields() { + this.cameraId_ = 0; + this.status_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.status_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.cameraId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.status_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraStatusInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraStatusInfo)PARSER.parseFrom(data); + } + + public static CameraStatusInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraStatusInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraStatusInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraStatusInfo)PARSER.parseFrom(data); + } + + public static CameraStatusInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraStatusInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraStatusInfo parseFrom(InputStream input) throws IOException { + return (CameraStatusInfo)PARSER.parseFrom(input); + } + + public static CameraStatusInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraStatusInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraStatusInfo parseDelimitedFrom(InputStream input) throws IOException { + return (CameraStatusInfo)PARSER.parseDelimitedFrom(input); + } + + public static CameraStatusInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraStatusInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraStatusInfo parseFrom(CodedInputStream input) throws IOException { + return (CameraStatusInfo)PARSER.parseFrom(input); + } + + public static CameraStatusInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraStatusInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraStatusInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraStatusInfoOrBuilder { + private int bitField0_; + + private int cameraId_; + + private int status_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraStatusInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraStatusInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraStatusInfo.class, Builder.class); + } + + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CameraStatusInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.status_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CameraStatusInfo_descriptor; + } + + public CameraStatusInfo getDefaultInstanceForType() { + return CameraStatusInfo.getDefaultInstance(); + } + + public CameraStatusInfo build() { + CameraStatusInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraStatusInfo buildPartial() { + CameraStatusInfo result = new CameraStatusInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.status_ = this.status_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraStatusInfo) + return mergeFrom((CameraStatusInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraStatusInfo other) { + if (other == CameraStatusInfo.getDefaultInstance()) + return this; + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasStatus()) + setStatus(other.getStatus()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasCameraId()) + return false; + if (!hasStatus()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraStatusInfo parsedMessage = null; + try { + parsedMessage = (CameraStatusInfo) CameraStatusInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraStatusInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x1; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasStatus() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getStatus() { + return this.status_; + } + + public Builder setStatus(int value) { + this.bitField0_ |= 0x2; + this.status_ = value; + onChanged(); + return this; + } + + public Builder clearStatus() { + this.bitField0_ &= 0xFFFFFFFD; + this.status_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CamerastatusListInfo extends GeneratedMessage implements CamerastatusListInfoOrBuilder { + private static final CamerastatusListInfo defaultInstance = new CamerastatusListInfo(true); + + private final UnknownFieldSet unknownFields; + + private CamerastatusListInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CamerastatusListInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CamerastatusListInfo getDefaultInstance() { + return defaultInstance; + } + + public CamerastatusListInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CamerastatusListInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.list_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.list_.add((CameraStatusInfo)input.readMessage(CameraStatusInfo.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.list_ = Collections.unmodifiableList(this.list_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CamerastatusListInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CamerastatusListInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CamerastatusListInfo(input, extensionRegistry); + } + }; + + public static final int LIST_FIELD_NUMBER = 1; + + private List list_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getListList() { + return this.list_; + } + + public List getListOrBuilderList() { + return (List)this.list_; + } + + public int getListCount() { + return this.list_.size(); + } + + public CameraStatusInfo getList(int index) { + return this.list_.get(index); + } + + public CameraStatusInfoOrBuilder getListOrBuilder(int index) { + return this.list_.get(index); + } + + private void initFields() { + this.list_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getListCount(); i++) { + if (!getList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.list_.size(); i++) + output.writeMessage(1, (MessageLite)this.list_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.list_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.list_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CamerastatusListInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CamerastatusListInfo)PARSER.parseFrom(data); + } + + public static CamerastatusListInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CamerastatusListInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CamerastatusListInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CamerastatusListInfo)PARSER.parseFrom(data); + } + + public static CamerastatusListInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CamerastatusListInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CamerastatusListInfo parseFrom(InputStream input) throws IOException { + return (CamerastatusListInfo)PARSER.parseFrom(input); + } + + public static CamerastatusListInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CamerastatusListInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CamerastatusListInfo parseDelimitedFrom(InputStream input) throws IOException { + return (CamerastatusListInfo)PARSER.parseDelimitedFrom(input); + } + + public static CamerastatusListInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CamerastatusListInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CamerastatusListInfo parseFrom(CodedInputStream input) throws IOException { + return (CamerastatusListInfo)PARSER.parseFrom(input); + } + + public static CamerastatusListInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CamerastatusListInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CamerastatusListInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CamerastatusListInfoOrBuilder { + private int bitField0_; + + private List list_; + + private RepeatedFieldBuilder listBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CamerastatusListInfo.class, Builder.class); + } + + private Builder() { + this.list_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.list_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (CamerastatusListInfo.alwaysUseFieldBuilders) + getListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.listBuilder_ == null) { + this.list_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.listBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXFllow.internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_descriptor; + } + + public CamerastatusListInfo getDefaultInstanceForType() { + return CamerastatusListInfo.getDefaultInstance(); + } + + public CamerastatusListInfo build() { + CamerastatusListInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CamerastatusListInfo buildPartial() { + CamerastatusListInfo result = new CamerastatusListInfo(this); + int from_bitField0_ = this.bitField0_; + if (this.listBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.list_ = Collections.unmodifiableList(this.list_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.list_ = this.list_; + } else { + result.list_ = this.listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CamerastatusListInfo) + return mergeFrom((CamerastatusListInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CamerastatusListInfo other) { + if (other == CamerastatusListInfo.getDefaultInstance()) + return this; + if (this.listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (this.list_.isEmpty()) { + this.list_ = other.list_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureListIsMutable(); + this.list_.addAll(other.list_); + } + onChanged(); + } + } else if (!other.list_.isEmpty()) { + if (this.listBuilder_.isEmpty()) { + this.listBuilder_.dispose(); + this.listBuilder_ = null; + this.list_ = other.list_; + this.bitField0_ &= 0xFFFFFFFE; + this.listBuilder_ = CamerastatusListInfo.alwaysUseFieldBuilders ? getListFieldBuilder() : null; + } else { + this.listBuilder_.addAllMessages(other.list_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getListCount(); i++) { + if (!getList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CamerastatusListInfo parsedMessage = null; + try { + parsedMessage = (CamerastatusListInfo) CamerastatusListInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CamerastatusListInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureListIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.list_ = new ArrayList(this.list_); + this.bitField0_ |= 0x1; + } + } + + public List getListList() { + if (this.listBuilder_ == null) + return Collections.unmodifiableList(this.list_); + return this.listBuilder_.getMessageList(); + } + + public int getListCount() { + if (this.listBuilder_ == null) + return this.list_.size(); + return this.listBuilder_.getCount(); + } + + public CameraStatusInfo getList(int index) { + if (this.listBuilder_ == null) + return this.list_.get(index); + return (CameraStatusInfo)this.listBuilder_.getMessage(index); + } + + public Builder setList(int index, CameraStatusInfo value) { + if (this.listBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureListIsMutable(); + this.list_.set(index, value); + onChanged(); + } else { + this.listBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setList(int index, CameraStatusInfo.Builder builderForValue) { + if (this.listBuilder_ == null) { + ensureListIsMutable(); + this.list_.set(index, builderForValue.build()); + onChanged(); + } else { + this.listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addList(CameraStatusInfo value) { + if (this.listBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureListIsMutable(); + this.list_.add(value); + onChanged(); + } else { + this.listBuilder_.addMessage(value); + } + return this; + } + + public Builder addList(int index, CameraStatusInfo value) { + if (this.listBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureListIsMutable(); + this.list_.add(index, value); + onChanged(); + } else { + this.listBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addList(CameraStatusInfo.Builder builderForValue) { + if (this.listBuilder_ == null) { + ensureListIsMutable(); + this.list_.add(builderForValue.build()); + onChanged(); + } else { + this.listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addList(int index, CameraStatusInfo.Builder builderForValue) { + if (this.listBuilder_ == null) { + ensureListIsMutable(); + this.list_.add(index, builderForValue.build()); + onChanged(); + } else { + this.listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllList(Iterable values) { + if (this.listBuilder_ == null) { + ensureListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.list_); + onChanged(); + } else { + this.listBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearList() { + if (this.listBuilder_ == null) { + this.list_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.listBuilder_.clear(); + } + return this; + } + + public Builder removeList(int index) { + if (this.listBuilder_ == null) { + ensureListIsMutable(); + this.list_.remove(index); + onChanged(); + } else { + this.listBuilder_.remove(index); + } + return this; + } + + public CameraStatusInfo.Builder getListBuilder(int index) { + return (CameraStatusInfo.Builder)getListFieldBuilder().getBuilder(index); + } + + public CameraStatusInfoOrBuilder getListOrBuilder(int index) { + if (this.listBuilder_ == null) + return this.list_.get(index); + return (CameraStatusInfoOrBuilder)this.listBuilder_.getMessageOrBuilder(index); + } + + public List getListOrBuilderList() { + if (this.listBuilder_ != null) + return this.listBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.list_); + } + + public CameraStatusInfo.Builder addListBuilder() { + return (CameraStatusInfo.Builder)getListFieldBuilder().addBuilder(CameraStatusInfo.getDefaultInstance()); + } + + public CameraStatusInfo.Builder addListBuilder(int index) { + return (CameraStatusInfo.Builder)getListFieldBuilder().addBuilder(index, CameraStatusInfo.getDefaultInstance()); + } + + public List getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getListFieldBuilder() { + if (this.listBuilder_ == null) { + this.listBuilder_ = new RepeatedFieldBuilder(this.list_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.list_ = null; + } + return this.listBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\017ZCHXFllow.proto\022\027com.com.zhichenhaixin.proto\"Œ\003\n\nCameraInfo\022\020\n\bcameraId\030\001 \002(\005\022\022\n\ncameraName\030\002 \002(\t\022\021\n\tcontrolIp\030\003 \002(\t\022\023\n\013controlPort\030\004 \002(\r\022\021\n\tcameraUid\030\005 \002(\t\022\021\n\tcameraPwd\030\006 \002(\t\022\f\n\004dome\030\007 \002(\005\022\013\n\003lon\030\b \002(\001\022\013\n\003lat\030\t \002(\001\022\f\n\004rtsp\030\n \002(\t\022\017\n\007destLat\030\013 \001(\001\022\017\n\007destLon\030\f \001(\001\022\022\n\nnorthAngle\030\r \001(\002\022\021\n\tcamHeight\030\016 \001(\002\022\026\n\016maxCamCentDist\030\017 \001(\002\022\017\n\007targitW\030\020 \001(\002\022\023\n\013zoomNearFac\030\021 \001(\002\022\022\n\nzoomFarFac\030\022 \001(\002\022\023\n\013cameraColor\030\023 ", "\002(\005\022\020\n\bmaxRange\030\024 \002(\001\022\022\n\ncameraType\030\025 \002(\005\"©\003\n\021CameraInfoForCtrl\022\020\n\bcameraId\030\001 \002(\005\022\022\n\ncameraName\030\002 \002(\t\022\021\n\tcontrolIp\030\003 \002(\t\022\023\n\013controlPort\030\004 \002(\r\022\021\n\tcameraUid\030\005 \002(\t\022\021\n\tcameraPwd\030\006 \002(\t\022\f\n\004dome\030\007 \002(\005\022\013\n\003lon\030\b \002(\001\022\013\n\003lat\030\t \002(\001\022\f\n\004rtsp\030\n \002(\t\022\017\n\007destLat\030\013 \001(\001\022\017\n\007destLon\030\f \001(\001\022\022\n\nnorthAngle\030\r \001(\002\022\021\n\tcamHeight\030\016 \001(\002\022\026\n\016maxCamCentDist\030\017 \001(\002\022\017\n\007targitW\030\020 \001(\002\022\023\n\013zoomNearFac\030\021 \001(\002\022\022\n\nzoomFarFac\030\022 \001(\002\022\023\n\013cameraCo", "lor\030\023 \002(\005\022\020\n\bmaxRange\030\024 \002(\001\022\022\n\ncameraType\030\025 \002(\005\022\024\n\fcameraStatus\030\026 \002(\005\"Ø\001\n\007FllowVo\022\023\n\013trackNumber\030\001 \001(\005\022\r\n\005fllow\030\002 \002(\005\022\024\n\fwarnSiteType\030\003 \002(\t\022\f\n\004mode\030\004 \001(\005\022\023\n\013wgs84PosLat\030\005 \001(\001\022\024\n\fwgs84PosLong\030\006 \001(\001\022\013\n\003utc\030\007 \001(\004\022\f\n\004rtsp\030\b \001(\t\022\020\n\bcameraId\030\t \001(\005\022\023\n\013cameraColor\030\n \001(\005\022\013\n\003cog\030\013 \001(\001\022\013\n\003sog\030\f \001(\001\"E\n\nReqFllowVo\0227\n\ncameraList\030\001 \003(\0132#.com.com.zhichenhaixin.proto.CameraInfo\"†\001\n\021ReqFllowVoForCtrl\022>\n\ncameraList\030\001 \003(", "\0132*.com.com.zhichenhaixin.proto.CameraInfoForCtrl\0221\n\007fllowVo\030\002 \001(\0132 .com.com.zhichenhaixin.proto.FllowVo\"Ú\002\n\006SpotVo\022\023\n\013trackNumber\030\001 \002(\005\022\021\n\tfllowType\030\002 \002(\005\022\022\n\nobjectType\030\003 \002(\005\022\f\n\004rtsp\030\004 \002(\t\022\f\n\004mode\030\005 \002(\005\022\024\n\fwarnSiteType\030\006 \002(\t\022\022\n\ncameraName\030\007 \001(\t\022\020\n\bcameraId\030\b \001(\005\022\024\n\fcompose_rtsp\030\t \001(\t\022\023\n\013compose_ftp\030\n \001(\t\022\020\n\bwarnSite\030\013 \001(\t\022\020\n\bwarnTime\030\f \001(\005\022\017\n\007warnLon\030\r \001(\001\022\017\n\007warnLat\030\016 \001(\001\022\021\n\twarnLevel\030\017 \001(\005\022\022\n\nwarnSourc", "e\030\020 \001(\005\022\020\n\bwarnType\030\021 \001(\005\022\022\n\nlockStatus\030\022 \001(\005\"u\n\006CtrlVo\022\f\n\004rtsp\030\001 \002(\t\022\016\n\006status\030\002 \002(\r\022\023\n\013trackNumber\030\003 \002(\005\022\022\n\ncameraName\030\004 \001(\t\022\020\n\bcameraId\030\005 \001(\005\022\022\n\nlockStatus\030\006 \001(\005\"4\n\020CameraStatusInfo\022\020\n\bcameraId\030\001 \002(\005\022\016\n\006status\030\002 \002(\005\"O\n\024CamerastatusListInfo\0227\n\004list\030\001 \003(\0132).com.com.zhichenhaixin.proto.CameraStatusInfo" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXFllow.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraInfo_descriptor, new String[] { + "CameraId", "CameraName", "ControlIp", "ControlPort", "CameraUid", "CameraPwd", "Dome", "Lon", "Lat", "Rtsp", + "DestLat", "DestLon", "NorthAngle", "CamHeight", "MaxCamCentDist", "TargitW", "ZoomNearFac", "ZoomFarFac", "CameraColor", "MaxRange", + "CameraType" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraInfoForCtrl_descriptor, new String[] { + "CameraId", "CameraName", "ControlIp", "ControlPort", "CameraUid", "CameraPwd", "Dome", "Lon", "Lat", "Rtsp", + "DestLat", "DestLon", "NorthAngle", "CamHeight", "MaxCamCentDist", "TargitW", "ZoomNearFac", "ZoomFarFac", "CameraColor", "MaxRange", + "CameraType", "CameraStatus" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_FllowVo_descriptor = getDescriptor().getMessageTypes().get(2); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_FllowVo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_FllowVo_descriptor, new String[] { + "TrackNumber", "Fllow", "WarnSiteType", "Mode", "Wgs84PosLat", "Wgs84PosLong", "Utc", "Rtsp", "CameraId", "CameraColor", + "Cog", "Sog" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_ReqFllowVo_descriptor = getDescriptor().getMessageTypes().get(3); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_ReqFllowVo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_ReqFllowVo_descriptor, new String[] { "CameraList" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_descriptor = getDescriptor().getMessageTypes().get(4); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_ReqFllowVoForCtrl_descriptor, new String[] { "CameraList", "FllowVo" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_SpotVo_descriptor = getDescriptor().getMessageTypes().get(5); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_SpotVo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_SpotVo_descriptor, new String[] { + "TrackNumber", "FllowType", "ObjectType", "Rtsp", "Mode", "WarnSiteType", "CameraName", "CameraId", "ComposeRtsp", "ComposeFtp", + "WarnSite", "WarnTime", "WarnLon", "WarnLat", "WarnLevel", "WarnSource", "WarnType", "LockStatus" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CtrlVo_descriptor = getDescriptor().getMessageTypes().get(6); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CtrlVo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CtrlVo_descriptor, new String[] { "Rtsp", "Status", "TrackNumber", "CameraName", "CameraId", "LockStatus" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraStatusInfo_descriptor = getDescriptor().getMessageTypes().get(7); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraStatusInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraStatusInfo_descriptor, new String[] { "CameraId", "Status" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_descriptor = getDescriptor().getMessageTypes().get(8); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CamerastatusListInfo_descriptor, new String[] { "List" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface CameraInfoForCtrlOrBuilder extends MessageOrBuilder { + boolean hasCameraId(); + + int getCameraId(); + + boolean hasCameraName(); + + String getCameraName(); + + ByteString getCameraNameBytes(); + + boolean hasControlIp(); + + String getControlIp(); + + ByteString getControlIpBytes(); + + boolean hasControlPort(); + + int getControlPort(); + + boolean hasCameraUid(); + + String getCameraUid(); + + ByteString getCameraUidBytes(); + + boolean hasCameraPwd(); + + String getCameraPwd(); + + ByteString getCameraPwdBytes(); + + boolean hasDome(); + + int getDome(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasDestLat(); + + double getDestLat(); + + boolean hasDestLon(); + + double getDestLon(); + + boolean hasNorthAngle(); + + float getNorthAngle(); + + boolean hasCamHeight(); + + float getCamHeight(); + + boolean hasMaxCamCentDist(); + + float getMaxCamCentDist(); + + boolean hasTargitW(); + + float getTargitW(); + + boolean hasZoomNearFac(); + + float getZoomNearFac(); + + boolean hasZoomFarFac(); + + float getZoomFarFac(); + + boolean hasCameraColor(); + + int getCameraColor(); + + boolean hasMaxRange(); + + double getMaxRange(); + + boolean hasCameraType(); + + int getCameraType(); + + boolean hasCameraStatus(); + + int getCameraStatus(); + } + + public static interface CameraInfoOrBuilder extends MessageOrBuilder { + boolean hasCameraId(); + + int getCameraId(); + + boolean hasCameraName(); + + String getCameraName(); + + ByteString getCameraNameBytes(); + + boolean hasControlIp(); + + String getControlIp(); + + ByteString getControlIpBytes(); + + boolean hasControlPort(); + + int getControlPort(); + + boolean hasCameraUid(); + + String getCameraUid(); + + ByteString getCameraUidBytes(); + + boolean hasCameraPwd(); + + String getCameraPwd(); + + ByteString getCameraPwdBytes(); + + boolean hasDome(); + + int getDome(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasDestLat(); + + double getDestLat(); + + boolean hasDestLon(); + + double getDestLon(); + + boolean hasNorthAngle(); + + float getNorthAngle(); + + boolean hasCamHeight(); + + float getCamHeight(); + + boolean hasMaxCamCentDist(); + + float getMaxCamCentDist(); + + boolean hasTargitW(); + + float getTargitW(); + + boolean hasZoomNearFac(); + + float getZoomNearFac(); + + boolean hasZoomFarFac(); + + float getZoomFarFac(); + + boolean hasCameraColor(); + + int getCameraColor(); + + boolean hasMaxRange(); + + double getMaxRange(); + + boolean hasCameraType(); + + int getCameraType(); + } + + public static interface CameraStatusInfoOrBuilder extends MessageOrBuilder { + boolean hasCameraId(); + + int getCameraId(); + + boolean hasStatus(); + + int getStatus(); + } + + public static interface CamerastatusListInfoOrBuilder extends MessageOrBuilder { + List getListList(); + + CameraStatusInfo getList(int param1Int); + + int getListCount(); + + List getListOrBuilderList(); + + CameraStatusInfoOrBuilder getListOrBuilder(int param1Int); + } + + public static interface CtrlVoOrBuilder extends MessageOrBuilder { + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasStatus(); + + int getStatus(); + + boolean hasTrackNumber(); + + int getTrackNumber(); + + boolean hasCameraName(); + + String getCameraName(); + + ByteString getCameraNameBytes(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasLockStatus(); + + int getLockStatus(); + } + + public static interface FllowVoOrBuilder extends MessageOrBuilder { + boolean hasTrackNumber(); + + int getTrackNumber(); + + boolean hasFllow(); + + int getFllow(); + + boolean hasWarnSiteType(); + + String getWarnSiteType(); + + ByteString getWarnSiteTypeBytes(); + + boolean hasMode(); + + int getMode(); + + boolean hasWgs84PosLat(); + + double getWgs84PosLat(); + + boolean hasWgs84PosLong(); + + double getWgs84PosLong(); + + boolean hasUtc(); + + long getUtc(); + + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasCameraColor(); + + int getCameraColor(); + + boolean hasCog(); + + double getCog(); + + boolean hasSog(); + + double getSog(); + } + + public static interface ReqFllowVoForCtrlOrBuilder extends MessageOrBuilder { + List getCameraListList(); + + CameraInfoForCtrl getCameraList(int param1Int); + + int getCameraListCount(); + + List getCameraListOrBuilderList(); + + CameraInfoForCtrlOrBuilder getCameraListOrBuilder(int param1Int); + + boolean hasFllowVo(); + + FllowVo getFllowVo(); + + FllowVoOrBuilder getFllowVoOrBuilder(); + } + + public static interface ReqFllowVoOrBuilder extends MessageOrBuilder { + List getCameraListList(); + + CameraInfo getCameraList(int param1Int); + + int getCameraListCount(); + + List getCameraListOrBuilderList(); + + CameraInfoOrBuilder getCameraListOrBuilder(int param1Int); + } + + public static interface SpotVoOrBuilder extends MessageOrBuilder { + boolean hasTrackNumber(); + + int getTrackNumber(); + + boolean hasFllowType(); + + int getFllowType(); + + boolean hasObjectType(); + + int getObjectType(); + + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasMode(); + + int getMode(); + + boolean hasWarnSiteType(); + + String getWarnSiteType(); + + ByteString getWarnSiteTypeBytes(); + + boolean hasCameraName(); + + String getCameraName(); + + ByteString getCameraNameBytes(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasComposeRtsp(); + + String getComposeRtsp(); + + ByteString getComposeRtspBytes(); + + boolean hasComposeFtp(); + + String getComposeFtp(); + + ByteString getComposeFtpBytes(); + + boolean hasWarnSite(); + + String getWarnSite(); + + ByteString getWarnSiteBytes(); + + boolean hasWarnTime(); + + int getWarnTime(); + + boolean hasWarnLon(); + + double getWarnLon(); + + boolean hasWarnLat(); + + double getWarnLat(); + + boolean hasWarnLevel(); + + int getWarnLevel(); + + boolean hasWarnSource(); + + int getWarnSource(); + + boolean hasWarnType(); + + int getWarnType(); + + boolean hasLockStatus(); + + int getLockStatus(); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXGPS.java b/src/main/java/com/zhichenhaixin/proto/ZCHXGPS.java new file mode 100644 index 0000000..1543a89 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXGPS.java @@ -0,0 +1,5805 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXGPS { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public static final class GPSHistoryTrack extends GeneratedMessage implements GPSHistoryTrackOrBuilder { + private static final GPSHistoryTrack defaultInstance = new GPSHistoryTrack(true); + + private final UnknownFieldSet unknownFields; + + private GPSHistoryTrack(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private GPSHistoryTrack(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static GPSHistoryTrack getDefaultInstance() { + return defaultInstance; + } + + public GPSHistoryTrack getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GPSHistoryTrack(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.imei_ = bs; + break; + case 17: + this.bitField0_ |= 0x2; + this.lon_ = input.readDouble(); + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.lonType_ = bs; + break; + case 33: + this.bitField0_ |= 0x8; + this.lat_ = input.readDouble(); + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.latType_ = bs; + break; + case 50: + bs = input.readBytes(); + this.bitField0_ |= 0x20; + this.sysDate_ = bs; + break; + case 57: + this.bitField0_ |= 0x40; + this.speed_ = input.readDouble(); + break; + case 65: + this.bitField0_ |= 0x80; + this.course_ = input.readDouble(); + break; + case 73: + this.bitField0_ |= 0x100; + this.aboveSeaLevel_ = input.readDouble(); + break; + case 81: + this.bitField0_ |= 0x200; + this.mileage_ = input.readDouble(); + break; + case 90: + bs = input.readBytes(); + this.bitField0_ |= 0x400; + this.mcc_ = bs; + break; + case 98: + bs = input.readBytes(); + this.bitField0_ |= 0x800; + this.mnc_ = bs; + break; + case 106: + bs = input.readBytes(); + this.bitField0_ |= 0x1000; + this.lac_ = bs; + break; + case 114: + bs = input.readBytes(); + this.bitField0_ |= 0x2000; + this.cellID_ = bs; + break; + case 120: + this.bitField0_ |= 0x4000; + this.gsm_ = input.readInt32(); + break; + case 130: + bs = input.readBytes(); + this.bitField0_ |= 0x8000; + this.deviceName_ = bs; + break; + case 138: + bs = input.readBytes(); + this.bitField0_ |= 0x10000; + this.dataType_ = bs; + break; + case 144: + this.bitField0_ |= 0x20000; + this.siteBeiDouPlateNum_ = input.readInt32(); + break; + case 152: + this.bitField0_ |= 0x40000; + this.siteGpsPlateNum_ = input.readInt32(); + break; + case 160: + this.bitField0_ |= 0x80000; + this.siteGlonassPlateNum_ = input.readInt32(); + break; + case 169: + this.bitField0_ |= 0x100000; + this.horizontalSiteprecision_ = input.readDouble(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSHistoryTrack.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public GPSHistoryTrack parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new GPSHistoryTrack(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int IMEI_FIELD_NUMBER = 1; + + private Object imei_; + + public static final int LON_FIELD_NUMBER = 2; + + private double lon_; + + public static final int LONTYPE_FIELD_NUMBER = 3; + + private Object lonType_; + + public static final int LAT_FIELD_NUMBER = 4; + + private double lat_; + + public static final int LATTYPE_FIELD_NUMBER = 5; + + private Object latType_; + + public static final int SYSDATE_FIELD_NUMBER = 6; + + private Object sysDate_; + + public static final int SPEED_FIELD_NUMBER = 7; + + private double speed_; + + public static final int COURSE_FIELD_NUMBER = 8; + + private double course_; + + public static final int ABOVESEALEVEL_FIELD_NUMBER = 9; + + private double aboveSeaLevel_; + + public static final int MILEAGE_FIELD_NUMBER = 10; + + private double mileage_; + + public static final int MCC_FIELD_NUMBER = 11; + + private Object mcc_; + + public static final int MNC_FIELD_NUMBER = 12; + + private Object mnc_; + + public static final int LAC_FIELD_NUMBER = 13; + + private Object lac_; + + public static final int CELLID_FIELD_NUMBER = 14; + + private Object cellID_; + + public static final int GSM_FIELD_NUMBER = 15; + + private int gsm_; + + public static final int DEVICENAME_FIELD_NUMBER = 16; + + private Object deviceName_; + + public static final int DATATYPE_FIELD_NUMBER = 17; + + private Object dataType_; + + public static final int SITEBEIDOUPLATENUM_FIELD_NUMBER = 18; + + private int siteBeiDouPlateNum_; + + public static final int SITEGPSPLATENUM_FIELD_NUMBER = 19; + + private int siteGpsPlateNum_; + + public static final int SITEGLONASSPLATENUM_FIELD_NUMBER = 20; + + private int siteGlonassPlateNum_; + + public static final int HORIZONTALSITEPRECISION_FIELD_NUMBER = 21; + + private double horizontalSiteprecision_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasImei() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getImei() { + Object ref = this.imei_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.imei_ = s; + return s; + } + + public ByteString getImeiBytes() { + Object ref = this.imei_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.imei_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLonType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getLonType() { + Object ref = this.lonType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lonType_ = s; + return s; + } + + public ByteString getLonTypeBytes() { + Object ref = this.lonType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lonType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasLatType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getLatType() { + Object ref = this.latType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.latType_ = s; + return s; + } + + public ByteString getLatTypeBytes() { + Object ref = this.latType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.latType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasSysDate() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getSysDate() { + Object ref = this.sysDate_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sysDate_ = s; + return s; + } + + public ByteString getSysDateBytes() { + Object ref = this.sysDate_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sysDate_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasSpeed() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getSpeed() { + return this.speed_; + } + + public boolean hasCourse() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getCourse() { + return this.course_; + } + + public boolean hasAboveSeaLevel() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getAboveSeaLevel() { + return this.aboveSeaLevel_; + } + + public boolean hasMileage() { + return ((this.bitField0_ & 0x200) == 512); + } + + public double getMileage() { + return this.mileage_; + } + + public boolean hasMcc() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getMcc() { + Object ref = this.mcc_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mcc_ = s; + return s; + } + + public ByteString getMccBytes() { + Object ref = this.mcc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mcc_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMnc() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getMnc() { + Object ref = this.mnc_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mnc_ = s; + return s; + } + + public ByteString getMncBytes() { + Object ref = this.mnc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mnc_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLac() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getLac() { + Object ref = this.lac_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lac_ = s; + return s; + } + + public ByteString getLacBytes() { + Object ref = this.lac_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lac_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCellID() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public String getCellID() { + Object ref = this.cellID_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cellID_ = s; + return s; + } + + public ByteString getCellIDBytes() { + Object ref = this.cellID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cellID_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasGsm() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public int getGsm() { + return this.gsm_; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDataType() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public String getDataType() { + Object ref = this.dataType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dataType_ = s; + return s; + } + + public ByteString getDataTypeBytes() { + Object ref = this.dataType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dataType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasSiteBeiDouPlateNum() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public int getSiteBeiDouPlateNum() { + return this.siteBeiDouPlateNum_; + } + + public boolean hasSiteGpsPlateNum() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getSiteGpsPlateNum() { + return this.siteGpsPlateNum_; + } + + public boolean hasSiteGlonassPlateNum() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public int getSiteGlonassPlateNum() { + return this.siteGlonassPlateNum_; + } + + public boolean hasHorizontalSiteprecision() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public double getHorizontalSiteprecision() { + return this.horizontalSiteprecision_; + } + + private void initFields() { + this.imei_ = ""; + this.lon_ = 0.0D; + this.lonType_ = ""; + this.lat_ = 0.0D; + this.latType_ = ""; + this.sysDate_ = ""; + this.speed_ = 0.0D; + this.course_ = 0.0D; + this.aboveSeaLevel_ = 0.0D; + this.mileage_ = 0.0D; + this.mcc_ = ""; + this.mnc_ = ""; + this.lac_ = ""; + this.cellID_ = ""; + this.gsm_ = 0; + this.deviceName_ = ""; + this.dataType_ = ""; + this.siteBeiDouPlateNum_ = 0; + this.siteGpsPlateNum_ = 0; + this.siteGlonassPlateNum_ = 0; + this.horizontalSiteprecision_ = 0.0D; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasImei()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLonType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLatType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSysDate()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSpeed()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCourse()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAboveSeaLevel()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getImeiBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getLonTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeDouble(4, this.lat_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getLatTypeBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeBytes(6, getSysDateBytes()); + if ((this.bitField0_ & 0x40) == 64) + output.writeDouble(7, this.speed_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.course_); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.aboveSeaLevel_); + if ((this.bitField0_ & 0x200) == 512) + output.writeDouble(10, this.mileage_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeBytes(11, getMccBytes()); + if ((this.bitField0_ & 0x800) == 2048) + output.writeBytes(12, getMncBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeBytes(13, getLacBytes()); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeBytes(14, getCellIDBytes()); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeInt32(15, this.gsm_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeBytes(16, getDeviceNameBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeBytes(17, getDataTypeBytes()); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeInt32(18, this.siteBeiDouPlateNum_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeInt32(19, this.siteGpsPlateNum_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeInt32(20, this.siteGlonassPlateNum_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeDouble(21, this.horizontalSiteprecision_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getImeiBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getLonTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeDoubleSize(4, this.lat_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getLatTypeBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBytesSize(6, getSysDateBytes()); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeDoubleSize(7, this.speed_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.course_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.aboveSeaLevel_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeDoubleSize(10, this.mileage_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeBytesSize(11, getMccBytes()); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeBytesSize(12, getMncBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeBytesSize(13, getLacBytes()); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeBytesSize(14, getCellIDBytes()); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeInt32Size(15, this.gsm_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeBytesSize(16, getDeviceNameBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeBytesSize(17, getDataTypeBytes()); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeInt32Size(18, this.siteBeiDouPlateNum_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeInt32Size(19, this.siteGpsPlateNum_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeInt32Size(20, this.siteGlonassPlateNum_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeDoubleSize(21, this.horizontalSiteprecision_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static GPSHistoryTrack parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (GPSHistoryTrack)PARSER.parseFrom(data); + } + + public static GPSHistoryTrack parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSHistoryTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSHistoryTrack parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (GPSHistoryTrack)PARSER.parseFrom(data); + } + + public static GPSHistoryTrack parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSHistoryTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSHistoryTrack parseFrom(InputStream input) throws IOException { + return (GPSHistoryTrack)PARSER.parseFrom(input); + } + + public static GPSHistoryTrack parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSHistoryTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static GPSHistoryTrack parseDelimitedFrom(InputStream input) throws IOException { + return (GPSHistoryTrack)PARSER.parseDelimitedFrom(input); + } + + public static GPSHistoryTrack parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSHistoryTrack)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static GPSHistoryTrack parseFrom(CodedInputStream input) throws IOException { + return (GPSHistoryTrack)PARSER.parseFrom(input); + } + + public static GPSHistoryTrack parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSHistoryTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(GPSHistoryTrack prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements GPSHistoryTrackOrBuilder { + private int bitField0_; + + private Object imei_; + + private double lon_; + + private Object lonType_; + + private double lat_; + + private Object latType_; + + private Object sysDate_; + + private double speed_; + + private double course_; + + private double aboveSeaLevel_; + + private double mileage_; + + private Object mcc_; + + private Object mnc_; + + private Object lac_; + + private Object cellID_; + + private int gsm_; + + private Object deviceName_; + + private Object dataType_; + + private int siteBeiDouPlateNum_; + + private int siteGpsPlateNum_; + + private int siteGlonassPlateNum_; + + private double horizontalSiteprecision_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSHistoryTrack.class, Builder.class); + } + + private Builder() { + this.imei_ = ""; + this.lonType_ = ""; + this.latType_ = ""; + this.sysDate_ = ""; + this.mcc_ = ""; + this.mnc_ = ""; + this.lac_ = ""; + this.cellID_ = ""; + this.deviceName_ = ""; + this.dataType_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.imei_ = ""; + this.lonType_ = ""; + this.latType_ = ""; + this.sysDate_ = ""; + this.mcc_ = ""; + this.mnc_ = ""; + this.lac_ = ""; + this.cellID_ = ""; + this.deviceName_ = ""; + this.dataType_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = GPSHistoryTrack.alwaysUseFieldBuilders; + } + + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.imei_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.lonType_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFF7; + this.latType_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.sysDate_ = ""; + this.bitField0_ &= 0xFFFFFFDF; + this.speed_ = 0.0D; + this.bitField0_ &= 0xFFFFFFBF; + this.course_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.aboveSeaLevel_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.mileage_ = 0.0D; + this.bitField0_ &= 0xFFFFFDFF; + this.mcc_ = ""; + this.bitField0_ &= 0xFFFFFBFF; + this.mnc_ = ""; + this.bitField0_ &= 0xFFFFF7FF; + this.lac_ = ""; + this.bitField0_ &= 0xFFFFEFFF; + this.cellID_ = ""; + this.bitField0_ &= 0xFFFFDFFF; + this.gsm_ = 0; + this.bitField0_ &= 0xFFFFBFFF; + this.deviceName_ = ""; + this.bitField0_ &= 0xFFFF7FFF; + this.dataType_ = ""; + this.bitField0_ &= 0xFFFEFFFF; + this.siteBeiDouPlateNum_ = 0; + this.bitField0_ &= 0xFFFDFFFF; + this.siteGpsPlateNum_ = 0; + this.bitField0_ &= 0xFFFBFFFF; + this.siteGlonassPlateNum_ = 0; + this.bitField0_ &= 0xFFF7FFFF; + this.horizontalSiteprecision_ = 0.0D; + this.bitField0_ &= 0xFFEFFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_descriptor; + } + + public GPSHistoryTrack getDefaultInstanceForType() { + return GPSHistoryTrack.getDefaultInstance(); + } + + public GPSHistoryTrack build() { + GPSHistoryTrack result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public GPSHistoryTrack buildPartial() { + GPSHistoryTrack result = new GPSHistoryTrack(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.imei_ = this.imei_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.lonType_ = this.lonType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.latType_ = this.latType_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.sysDate_ = this.sysDate_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.speed_ = this.speed_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.course_ = this.course_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.aboveSeaLevel_ = this.aboveSeaLevel_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.mileage_ = this.mileage_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.mcc_ = this.mcc_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.mnc_ = this.mnc_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.lac_ = this.lac_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.cellID_ = this.cellID_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.gsm_ = this.gsm_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.deviceName_ = this.deviceName_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.dataType_ = this.dataType_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.siteBeiDouPlateNum_ = this.siteBeiDouPlateNum_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.siteGpsPlateNum_ = this.siteGpsPlateNum_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.siteGlonassPlateNum_ = this.siteGlonassPlateNum_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.horizontalSiteprecision_ = this.horizontalSiteprecision_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof GPSHistoryTrack) + return mergeFrom((GPSHistoryTrack)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(GPSHistoryTrack other) { + if (other == GPSHistoryTrack.getDefaultInstance()) + return this; + if (other.hasImei()) { + this.bitField0_ |= 0x1; + this.imei_ = other.imei_; + onChanged(); + } + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLonType()) { + this.bitField0_ |= 0x4; + this.lonType_ = other.lonType_; + onChanged(); + } + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasLatType()) { + this.bitField0_ |= 0x10; + this.latType_ = other.latType_; + onChanged(); + } + if (other.hasSysDate()) { + this.bitField0_ |= 0x20; + this.sysDate_ = other.sysDate_; + onChanged(); + } + if (other.hasSpeed()) + setSpeed(other.getSpeed()); + if (other.hasCourse()) + setCourse(other.getCourse()); + if (other.hasAboveSeaLevel()) + setAboveSeaLevel(other.getAboveSeaLevel()); + if (other.hasMileage()) + setMileage(other.getMileage()); + if (other.hasMcc()) { + this.bitField0_ |= 0x400; + this.mcc_ = other.mcc_; + onChanged(); + } + if (other.hasMnc()) { + this.bitField0_ |= 0x800; + this.mnc_ = other.mnc_; + onChanged(); + } + if (other.hasLac()) { + this.bitField0_ |= 0x1000; + this.lac_ = other.lac_; + onChanged(); + } + if (other.hasCellID()) { + this.bitField0_ |= 0x2000; + this.cellID_ = other.cellID_; + onChanged(); + } + if (other.hasGsm()) + setGsm(other.getGsm()); + if (other.hasDeviceName()) { + this.bitField0_ |= 0x8000; + this.deviceName_ = other.deviceName_; + onChanged(); + } + if (other.hasDataType()) { + this.bitField0_ |= 0x10000; + this.dataType_ = other.dataType_; + onChanged(); + } + if (other.hasSiteBeiDouPlateNum()) + setSiteBeiDouPlateNum(other.getSiteBeiDouPlateNum()); + if (other.hasSiteGpsPlateNum()) + setSiteGpsPlateNum(other.getSiteGpsPlateNum()); + if (other.hasSiteGlonassPlateNum()) + setSiteGlonassPlateNum(other.getSiteGlonassPlateNum()); + if (other.hasHorizontalSiteprecision()) + setHorizontalSiteprecision(other.getHorizontalSiteprecision()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasImei()) + return false; + if (!hasLon()) + return false; + if (!hasLonType()) + return false; + if (!hasLat()) + return false; + if (!hasLatType()) + return false; + if (!hasSysDate()) + return false; + if (!hasSpeed()) + return false; + if (!hasCourse()) + return false; + if (!hasAboveSeaLevel()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + GPSHistoryTrack parsedMessage = null; + try { + parsedMessage = (GPSHistoryTrack) GPSHistoryTrack.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (GPSHistoryTrack)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasImei() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getImei() { + Object ref = this.imei_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.imei_ = s; + return s; + } + return (String)ref; + } + + public ByteString getImeiBytes() { + Object ref = this.imei_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.imei_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setImei(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.imei_ = value; + onChanged(); + return this; + } + + public Builder clearImei() { + this.bitField0_ &= 0xFFFFFFFE; + this.imei_ = GPSHistoryTrack.getDefaultInstance().getImei(); + onChanged(); + return this; + } + + public Builder setImeiBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.imei_ = value; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x2; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFFD; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLonType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getLonType() { + Object ref = this.lonType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lonType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getLonTypeBytes() { + Object ref = this.lonType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lonType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setLonType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.lonType_ = value; + onChanged(); + return this; + } + + public Builder clearLonType() { + this.bitField0_ &= 0xFFFFFFFB; + this.lonType_ = GPSHistoryTrack.getDefaultInstance().getLonType(); + onChanged(); + return this; + } + + public Builder setLonTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.lonType_ = value; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x8; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFFF7; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLatType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getLatType() { + Object ref = this.latType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.latType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getLatTypeBytes() { + Object ref = this.latType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.latType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setLatType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.latType_ = value; + onChanged(); + return this; + } + + public Builder clearLatType() { + this.bitField0_ &= 0xFFFFFFEF; + this.latType_ = GPSHistoryTrack.getDefaultInstance().getLatType(); + onChanged(); + return this; + } + + public Builder setLatTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.latType_ = value; + onChanged(); + return this; + } + + public boolean hasSysDate() { + return ((this.bitField0_ & 0x20) == 32); + } + + public String getSysDate() { + Object ref = this.sysDate_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sysDate_ = s; + return s; + } + return (String)ref; + } + + public ByteString getSysDateBytes() { + Object ref = this.sysDate_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sysDate_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setSysDate(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.sysDate_ = value; + onChanged(); + return this; + } + + public Builder clearSysDate() { + this.bitField0_ &= 0xFFFFFFDF; + this.sysDate_ = GPSHistoryTrack.getDefaultInstance().getSysDate(); + onChanged(); + return this; + } + + public Builder setSysDateBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20; + this.sysDate_ = value; + onChanged(); + return this; + } + + public boolean hasSpeed() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getSpeed() { + return this.speed_; + } + + public Builder setSpeed(double value) { + this.bitField0_ |= 0x40; + this.speed_ = value; + onChanged(); + return this; + } + + public Builder clearSpeed() { + this.bitField0_ &= 0xFFFFFFBF; + this.speed_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCourse() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getCourse() { + return this.course_; + } + + public Builder setCourse(double value) { + this.bitField0_ |= 0x80; + this.course_ = value; + onChanged(); + return this; + } + + public Builder clearCourse() { + this.bitField0_ &= 0xFFFFFF7F; + this.course_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasAboveSeaLevel() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getAboveSeaLevel() { + return this.aboveSeaLevel_; + } + + public Builder setAboveSeaLevel(double value) { + this.bitField0_ |= 0x100; + this.aboveSeaLevel_ = value; + onChanged(); + return this; + } + + public Builder clearAboveSeaLevel() { + this.bitField0_ &= 0xFFFFFEFF; + this.aboveSeaLevel_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasMileage() { + return ((this.bitField0_ & 0x200) == 512); + } + + public double getMileage() { + return this.mileage_; + } + + public Builder setMileage(double value) { + this.bitField0_ |= 0x200; + this.mileage_ = value; + onChanged(); + return this; + } + + public Builder clearMileage() { + this.bitField0_ &= 0xFFFFFDFF; + this.mileage_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasMcc() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getMcc() { + Object ref = this.mcc_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mcc_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMccBytes() { + Object ref = this.mcc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mcc_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMcc(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.mcc_ = value; + onChanged(); + return this; + } + + public Builder clearMcc() { + this.bitField0_ &= 0xFFFFFBFF; + this.mcc_ = GPSHistoryTrack.getDefaultInstance().getMcc(); + onChanged(); + return this; + } + + public Builder setMccBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.mcc_ = value; + onChanged(); + return this; + } + + public boolean hasMnc() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getMnc() { + Object ref = this.mnc_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mnc_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMncBytes() { + Object ref = this.mnc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mnc_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMnc(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.mnc_ = value; + onChanged(); + return this; + } + + public Builder clearMnc() { + this.bitField0_ &= 0xFFFFF7FF; + this.mnc_ = GPSHistoryTrack.getDefaultInstance().getMnc(); + onChanged(); + return this; + } + + public Builder setMncBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.mnc_ = value; + onChanged(); + return this; + } + + public boolean hasLac() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getLac() { + Object ref = this.lac_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lac_ = s; + return s; + } + return (String)ref; + } + + public ByteString getLacBytes() { + Object ref = this.lac_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lac_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setLac(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.lac_ = value; + onChanged(); + return this; + } + + public Builder clearLac() { + this.bitField0_ &= 0xFFFFEFFF; + this.lac_ = GPSHistoryTrack.getDefaultInstance().getLac(); + onChanged(); + return this; + } + + public Builder setLacBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.lac_ = value; + onChanged(); + return this; + } + + public boolean hasCellID() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public String getCellID() { + Object ref = this.cellID_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cellID_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCellIDBytes() { + Object ref = this.cellID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cellID_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCellID(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2000; + this.cellID_ = value; + onChanged(); + return this; + } + + public Builder clearCellID() { + this.bitField0_ &= 0xFFFFDFFF; + this.cellID_ = GPSHistoryTrack.getDefaultInstance().getCellID(); + onChanged(); + return this; + } + + public Builder setCellIDBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2000; + this.cellID_ = value; + onChanged(); + return this; + } + + public boolean hasGsm() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public int getGsm() { + return this.gsm_; + } + + public Builder setGsm(int value) { + this.bitField0_ |= 0x4000; + this.gsm_ = value; + onChanged(); + return this; + } + + public Builder clearGsm() { + this.bitField0_ &= 0xFFFFBFFF; + this.gsm_ = 0; + onChanged(); + return this; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDeviceName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.deviceName_ = value; + onChanged(); + return this; + } + + public Builder clearDeviceName() { + this.bitField0_ &= 0xFFFF7FFF; + this.deviceName_ = GPSHistoryTrack.getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + + public Builder setDeviceNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.deviceName_ = value; + onChanged(); + return this; + } + + public boolean hasDataType() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public String getDataType() { + Object ref = this.dataType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dataType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDataTypeBytes() { + Object ref = this.dataType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dataType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDataType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10000; + this.dataType_ = value; + onChanged(); + return this; + } + + public Builder clearDataType() { + this.bitField0_ &= 0xFFFEFFFF; + this.dataType_ = GPSHistoryTrack.getDefaultInstance().getDataType(); + onChanged(); + return this; + } + + public Builder setDataTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10000; + this.dataType_ = value; + onChanged(); + return this; + } + + public boolean hasSiteBeiDouPlateNum() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public int getSiteBeiDouPlateNum() { + return this.siteBeiDouPlateNum_; + } + + public Builder setSiteBeiDouPlateNum(int value) { + this.bitField0_ |= 0x20000; + this.siteBeiDouPlateNum_ = value; + onChanged(); + return this; + } + + public Builder clearSiteBeiDouPlateNum() { + this.bitField0_ &= 0xFFFDFFFF; + this.siteBeiDouPlateNum_ = 0; + onChanged(); + return this; + } + + public boolean hasSiteGpsPlateNum() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getSiteGpsPlateNum() { + return this.siteGpsPlateNum_; + } + + public Builder setSiteGpsPlateNum(int value) { + this.bitField0_ |= 0x40000; + this.siteGpsPlateNum_ = value; + onChanged(); + return this; + } + + public Builder clearSiteGpsPlateNum() { + this.bitField0_ &= 0xFFFBFFFF; + this.siteGpsPlateNum_ = 0; + onChanged(); + return this; + } + + public boolean hasSiteGlonassPlateNum() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public int getSiteGlonassPlateNum() { + return this.siteGlonassPlateNum_; + } + + public Builder setSiteGlonassPlateNum(int value) { + this.bitField0_ |= 0x80000; + this.siteGlonassPlateNum_ = value; + onChanged(); + return this; + } + + public Builder clearSiteGlonassPlateNum() { + this.bitField0_ &= 0xFFF7FFFF; + this.siteGlonassPlateNum_ = 0; + onChanged(); + return this; + } + + public boolean hasHorizontalSiteprecision() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public double getHorizontalSiteprecision() { + return this.horizontalSiteprecision_; + } + + public Builder setHorizontalSiteprecision(double value) { + this.bitField0_ |= 0x100000; + this.horizontalSiteprecision_ = value; + onChanged(); + return this; + } + + public Builder clearHorizontalSiteprecision() { + this.bitField0_ &= 0xFFEFFFFF; + this.horizontalSiteprecision_ = 0.0D; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class GPSHistoryTracks extends GeneratedMessage implements GPSHistoryTracksOrBuilder { + private static final GPSHistoryTracks defaultInstance = new GPSHistoryTracks(true); + + private final UnknownFieldSet unknownFields; + + private GPSHistoryTracks(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private GPSHistoryTracks(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static GPSHistoryTracks getDefaultInstance() { + return defaultInstance; + } + + public GPSHistoryTracks getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GPSHistoryTracks(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.tracks_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.tracks_.add((GPSHistoryTrack)input.readMessage(GPSHistoryTrack.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.tracks_ = Collections.unmodifiableList(this.tracks_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSHistoryTracks.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public GPSHistoryTracks parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new GPSHistoryTracks(input, extensionRegistry); + } + }; + + public static final int TRACKS_FIELD_NUMBER = 1; + + private List tracks_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getTracksList() { + return this.tracks_; + } + + public List getTracksOrBuilderList() { + return (List)this.tracks_; + } + + public int getTracksCount() { + return this.tracks_.size(); + } + + public GPSHistoryTrack getTracks(int index) { + return this.tracks_.get(index); + } + + public GPSHistoryTrackOrBuilder getTracksOrBuilder(int index) { + return this.tracks_.get(index); + } + + private void initFields() { + this.tracks_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getTracksCount(); i++) { + if (!getTracks(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.tracks_.size(); i++) + output.writeMessage(1, (MessageLite)this.tracks_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.tracks_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.tracks_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static GPSHistoryTracks parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (GPSHistoryTracks)PARSER.parseFrom(data); + } + + public static GPSHistoryTracks parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSHistoryTracks)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSHistoryTracks parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (GPSHistoryTracks)PARSER.parseFrom(data); + } + + public static GPSHistoryTracks parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSHistoryTracks)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSHistoryTracks parseFrom(InputStream input) throws IOException { + return (GPSHistoryTracks)PARSER.parseFrom(input); + } + + public static GPSHistoryTracks parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSHistoryTracks)PARSER.parseFrom(input, extensionRegistry); + } + + public static GPSHistoryTracks parseDelimitedFrom(InputStream input) throws IOException { + return (GPSHistoryTracks)PARSER.parseDelimitedFrom(input); + } + + public static GPSHistoryTracks parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSHistoryTracks)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static GPSHistoryTracks parseFrom(CodedInputStream input) throws IOException { + return (GPSHistoryTracks)PARSER.parseFrom(input); + } + + public static GPSHistoryTracks parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSHistoryTracks)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(GPSHistoryTracks prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements GPSHistoryTracksOrBuilder { + private int bitField0_; + + private List tracks_; + + private RepeatedFieldBuilder tracksBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSHistoryTracks.class, Builder.class); + } + + private Builder() { + this.tracks_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.tracks_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (GPSHistoryTracks.alwaysUseFieldBuilders) + getTracksFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.tracksBuilder_ == null) { + this.tracks_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.tracksBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_descriptor; + } + + public GPSHistoryTracks getDefaultInstanceForType() { + return GPSHistoryTracks.getDefaultInstance(); + } + + public GPSHistoryTracks build() { + GPSHistoryTracks result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public GPSHistoryTracks buildPartial() { + GPSHistoryTracks result = new GPSHistoryTracks(this); + int from_bitField0_ = this.bitField0_; + if (this.tracksBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.tracks_ = Collections.unmodifiableList(this.tracks_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.tracks_ = this.tracks_; + } else { + result.tracks_ = this.tracksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof GPSHistoryTracks) + return mergeFrom((GPSHistoryTracks)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(GPSHistoryTracks other) { + if (other == GPSHistoryTracks.getDefaultInstance()) + return this; + if (this.tracksBuilder_ == null) { + if (!other.tracks_.isEmpty()) { + if (this.tracks_.isEmpty()) { + this.tracks_ = other.tracks_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureTracksIsMutable(); + this.tracks_.addAll(other.tracks_); + } + onChanged(); + } + } else if (!other.tracks_.isEmpty()) { + if (this.tracksBuilder_.isEmpty()) { + this.tracksBuilder_.dispose(); + this.tracksBuilder_ = null; + this.tracks_ = other.tracks_; + this.bitField0_ &= 0xFFFFFFFE; + this.tracksBuilder_ = GPSHistoryTracks.alwaysUseFieldBuilders ? getTracksFieldBuilder() : null; + } else { + this.tracksBuilder_.addAllMessages(other.tracks_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTracksCount(); i++) { + if (!getTracks(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + GPSHistoryTracks parsedMessage = null; + try { + parsedMessage = (GPSHistoryTracks) GPSHistoryTracks.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (GPSHistoryTracks)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureTracksIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.tracks_ = new ArrayList(this.tracks_); + this.bitField0_ |= 0x1; + } + } + + public List getTracksList() { + if (this.tracksBuilder_ == null) + return Collections.unmodifiableList(this.tracks_); + return this.tracksBuilder_.getMessageList(); + } + + public int getTracksCount() { + if (this.tracksBuilder_ == null) + return this.tracks_.size(); + return this.tracksBuilder_.getCount(); + } + + public GPSHistoryTrack getTracks(int index) { + if (this.tracksBuilder_ == null) + return this.tracks_.get(index); + return (GPSHistoryTrack)this.tracksBuilder_.getMessage(index); + } + + public Builder setTracks(int index, GPSHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.set(index, value); + onChanged(); + } else { + this.tracksBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setTracks(int index, GPSHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.set(index, builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addTracks(GPSHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.add(value); + onChanged(); + } else { + this.tracksBuilder_.addMessage(value); + } + return this; + } + + public Builder addTracks(int index, GPSHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.add(index, value); + onChanged(); + } else { + this.tracksBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addTracks(GPSHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.add(builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addTracks(int index, GPSHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.add(index, builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllTracks(Iterable values) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.tracks_); + onChanged(); + } else { + this.tracksBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearTracks() { + if (this.tracksBuilder_ == null) { + this.tracks_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.tracksBuilder_.clear(); + } + return this; + } + + public Builder removeTracks(int index) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.remove(index); + onChanged(); + } else { + this.tracksBuilder_.remove(index); + } + return this; + } + + public GPSHistoryTrack.Builder getTracksBuilder(int index) { + return (GPSHistoryTrack.Builder)getTracksFieldBuilder().getBuilder(index); + } + + public GPSHistoryTrackOrBuilder getTracksOrBuilder(int index) { + if (this.tracksBuilder_ == null) + return this.tracks_.get(index); + return (GPSHistoryTrackOrBuilder)this.tracksBuilder_.getMessageOrBuilder(index); + } + + public List getTracksOrBuilderList() { + if (this.tracksBuilder_ != null) + return this.tracksBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.tracks_); + } + + public GPSHistoryTrack.Builder addTracksBuilder() { + return (GPSHistoryTrack.Builder)getTracksFieldBuilder().addBuilder(GPSHistoryTrack.getDefaultInstance()); + } + + public GPSHistoryTrack.Builder addTracksBuilder(int index) { + return (GPSHistoryTrack.Builder)getTracksFieldBuilder().addBuilder(index, GPSHistoryTrack.getDefaultInstance()); + } + + public List getTracksBuilderList() { + return getTracksFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getTracksFieldBuilder() { + if (this.tracksBuilder_ == null) { + this.tracksBuilder_ = new RepeatedFieldBuilder(this.tracks_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.tracks_ = null; + } + return this.tracksBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class GPSData extends GeneratedMessage implements GPSDataOrBuilder { + private static final GPSData defaultInstance = new GPSData(true); + + private final UnknownFieldSet unknownFields; + + private GPSData(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private GPSData(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static GPSData getDefaultInstance() { + return defaultInstance; + } + + public GPSData getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GPSData(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + GPSHistoryTracks.Builder subBuilder; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.imei_ = bs; + break; + case 17: + this.bitField0_ |= 0x2; + this.lon_ = input.readDouble(); + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.lonType_ = bs; + break; + case 33: + this.bitField0_ |= 0x8; + this.lat_ = input.readDouble(); + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.latType_ = bs; + break; + case 48: + this.bitField0_ |= 0x20; + this.electricQuantity_ = input.readInt32(); + break; + case 56: + this.bitField0_ |= 0x40; + this.outDeviceState_ = input.readInt32(); + break; + case 66: + bs = input.readBytes(); + this.bitField0_ |= 0x80; + this.sysDate_ = bs; + break; + case 73: + this.bitField0_ |= 0x100; + this.speed_ = input.readDouble(); + break; + case 81: + this.bitField0_ |= 0x200; + this.course_ = input.readDouble(); + break; + case 89: + this.bitField0_ |= 0x400; + this.aboveSeaLevel_ = input.readDouble(); + break; + case 96: + this.bitField0_ |= 0x800; + this.onlineStatus_ = input.readInt32(); + break; + case 106: + bs = input.readBytes(); + this.bitField0_ |= 0x1000; + this.siteState_ = bs; + break; + case 113: + this.bitField0_ |= 0x2000; + this.mileage_ = input.readDouble(); + break; + case 122: + bs = input.readBytes(); + this.bitField0_ |= 0x4000; + this.mcc_ = bs; + break; + case 130: + bs = input.readBytes(); + this.bitField0_ |= 0x8000; + this.mnc_ = bs; + break; + case 138: + bs = input.readBytes(); + this.bitField0_ |= 0x10000; + this.lac_ = bs; + break; + case 146: + bs = input.readBytes(); + this.bitField0_ |= 0x20000; + this.cellID_ = bs; + break; + case 152: + this.bitField0_ |= 0x40000; + this.gsm_ = input.readInt32(); + break; + case 162: + bs = input.readBytes(); + this.bitField0_ |= 0x80000; + this.deviceName_ = bs; + break; + case 170: + bs = input.readBytes(); + this.bitField0_ |= 0x100000; + this.dataType_ = bs; + break; + case 176: + this.bitField0_ |= 0x200000; + this.siteBeiDouPlateNum_ = input.readInt32(); + break; + case 184: + this.bitField0_ |= 0x400000; + this.siteGpsPlateNum_ = input.readInt32(); + break; + case 192: + this.bitField0_ |= 0x800000; + this.siteGlonassPlateNum_ = input.readInt32(); + break; + case 201: + this.bitField0_ |= 0x1000000; + this.horizontalSiteprecision_ = input.readDouble(); + break; + case 210: + subBuilder = null; + if ((this.bitField0_ & 0x2000000) == 33554432) + subBuilder = this.tracks_.toBuilder(); + this.tracks_ = (GPSHistoryTracks)input.readMessage(GPSHistoryTracks.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.tracks_); + this.tracks_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x2000000; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSData_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSData_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSData.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public GPSData parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new GPSData(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int IMEI_FIELD_NUMBER = 1; + + private Object imei_; + + public static final int LON_FIELD_NUMBER = 2; + + private double lon_; + + public static final int LONTYPE_FIELD_NUMBER = 3; + + private Object lonType_; + + public static final int LAT_FIELD_NUMBER = 4; + + private double lat_; + + public static final int LATTYPE_FIELD_NUMBER = 5; + + private Object latType_; + + public static final int ELECTRICQUANTITY_FIELD_NUMBER = 6; + + private int electricQuantity_; + + public static final int OUTDEVICESTATE_FIELD_NUMBER = 7; + + private int outDeviceState_; + + public static final int SYSDATE_FIELD_NUMBER = 8; + + private Object sysDate_; + + public static final int SPEED_FIELD_NUMBER = 9; + + private double speed_; + + public static final int COURSE_FIELD_NUMBER = 10; + + private double course_; + + public static final int ABOVESEALEVEL_FIELD_NUMBER = 11; + + private double aboveSeaLevel_; + + public static final int ONLINESTATUS_FIELD_NUMBER = 12; + + private int onlineStatus_; + + public static final int SITESTATE_FIELD_NUMBER = 13; + + private Object siteState_; + + public static final int MILEAGE_FIELD_NUMBER = 14; + + private double mileage_; + + public static final int MCC_FIELD_NUMBER = 15; + + private Object mcc_; + + public static final int MNC_FIELD_NUMBER = 16; + + private Object mnc_; + + public static final int LAC_FIELD_NUMBER = 17; + + private Object lac_; + + public static final int CELLID_FIELD_NUMBER = 18; + + private Object cellID_; + + public static final int GSM_FIELD_NUMBER = 19; + + private int gsm_; + + public static final int DEVICENAME_FIELD_NUMBER = 20; + + private Object deviceName_; + + public static final int DATATYPE_FIELD_NUMBER = 21; + + private Object dataType_; + + public static final int SITEBEIDOUPLATENUM_FIELD_NUMBER = 22; + + private int siteBeiDouPlateNum_; + + public static final int SITEGPSPLATENUM_FIELD_NUMBER = 23; + + private int siteGpsPlateNum_; + + public static final int SITEGLONASSPLATENUM_FIELD_NUMBER = 24; + + private int siteGlonassPlateNum_; + + public static final int HORIZONTALSITEPRECISION_FIELD_NUMBER = 25; + + private double horizontalSiteprecision_; + + public static final int TRACKS_FIELD_NUMBER = 26; + + private GPSHistoryTracks tracks_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasImei() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getImei() { + Object ref = this.imei_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.imei_ = s; + return s; + } + + public ByteString getImeiBytes() { + Object ref = this.imei_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.imei_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLonType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getLonType() { + Object ref = this.lonType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lonType_ = s; + return s; + } + + public ByteString getLonTypeBytes() { + Object ref = this.lonType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lonType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasLatType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getLatType() { + Object ref = this.latType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.latType_ = s; + return s; + } + + public ByteString getLatTypeBytes() { + Object ref = this.latType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.latType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasElectricQuantity() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getElectricQuantity() { + return this.electricQuantity_; + } + + public boolean hasOutDeviceState() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getOutDeviceState() { + return this.outDeviceState_; + } + + public boolean hasSysDate() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getSysDate() { + Object ref = this.sysDate_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sysDate_ = s; + return s; + } + + public ByteString getSysDateBytes() { + Object ref = this.sysDate_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sysDate_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasSpeed() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getSpeed() { + return this.speed_; + } + + public boolean hasCourse() { + return ((this.bitField0_ & 0x200) == 512); + } + + public double getCourse() { + return this.course_; + } + + public boolean hasAboveSeaLevel() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getAboveSeaLevel() { + return this.aboveSeaLevel_; + } + + public boolean hasOnlineStatus() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getOnlineStatus() { + return this.onlineStatus_; + } + + public boolean hasSiteState() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getSiteState() { + Object ref = this.siteState_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.siteState_ = s; + return s; + } + + public ByteString getSiteStateBytes() { + Object ref = this.siteState_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.siteState_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMileage() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getMileage() { + return this.mileage_; + } + + public boolean hasMcc() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public String getMcc() { + Object ref = this.mcc_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mcc_ = s; + return s; + } + + public ByteString getMccBytes() { + Object ref = this.mcc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mcc_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMnc() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getMnc() { + Object ref = this.mnc_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mnc_ = s; + return s; + } + + public ByteString getMncBytes() { + Object ref = this.mnc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mnc_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public String getLac() { + Object ref = this.lac_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lac_ = s; + return s; + } + + public ByteString getLacBytes() { + Object ref = this.lac_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lac_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCellID() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public String getCellID() { + Object ref = this.cellID_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cellID_ = s; + return s; + } + + public ByteString getCellIDBytes() { + Object ref = this.cellID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cellID_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasGsm() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getGsm() { + return this.gsm_; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasDataType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public String getDataType() { + Object ref = this.dataType_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dataType_ = s; + return s; + } + + public ByteString getDataTypeBytes() { + Object ref = this.dataType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dataType_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasSiteBeiDouPlateNum() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public int getSiteBeiDouPlateNum() { + return this.siteBeiDouPlateNum_; + } + + public boolean hasSiteGpsPlateNum() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public int getSiteGpsPlateNum() { + return this.siteGpsPlateNum_; + } + + public boolean hasSiteGlonassPlateNum() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public int getSiteGlonassPlateNum() { + return this.siteGlonassPlateNum_; + } + + public boolean hasHorizontalSiteprecision() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public double getHorizontalSiteprecision() { + return this.horizontalSiteprecision_; + } + + public boolean hasTracks() { + return ((this.bitField0_ & 0x2000000) == 33554432); + } + + public GPSHistoryTracks getTracks() { + return this.tracks_; + } + + public GPSHistoryTracksOrBuilder getTracksOrBuilder() { + return this.tracks_; + } + + private void initFields() { + this.imei_ = ""; + this.lon_ = 0.0D; + this.lonType_ = ""; + this.lat_ = 0.0D; + this.latType_ = ""; + this.electricQuantity_ = 0; + this.outDeviceState_ = 0; + this.sysDate_ = ""; + this.speed_ = 0.0D; + this.course_ = 0.0D; + this.aboveSeaLevel_ = 0.0D; + this.onlineStatus_ = 0; + this.siteState_ = ""; + this.mileage_ = 0.0D; + this.mcc_ = ""; + this.mnc_ = ""; + this.lac_ = ""; + this.cellID_ = ""; + this.gsm_ = 0; + this.deviceName_ = ""; + this.dataType_ = ""; + this.siteBeiDouPlateNum_ = 0; + this.siteGpsPlateNum_ = 0; + this.siteGlonassPlateNum_ = 0; + this.horizontalSiteprecision_ = 0.0D; + this.tracks_ = GPSHistoryTracks.getDefaultInstance(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasImei()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLonType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLatType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasElectricQuantity()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasOutDeviceState()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSysDate()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSpeed()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCourse()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAboveSeaLevel()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasOnlineStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSiteState()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasTracks() && !getTracks().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getImeiBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getLonTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeDouble(4, this.lat_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getLatTypeBytes()); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(6, this.electricQuantity_); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.outDeviceState_); + if ((this.bitField0_ & 0x80) == 128) + output.writeBytes(8, getSysDateBytes()); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.speed_); + if ((this.bitField0_ & 0x200) == 512) + output.writeDouble(10, this.course_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeDouble(11, this.aboveSeaLevel_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeInt32(12, this.onlineStatus_); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeBytes(13, getSiteStateBytes()); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeDouble(14, this.mileage_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeBytes(15, getMccBytes()); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeBytes(16, getMncBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeBytes(17, getLacBytes()); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeBytes(18, getCellIDBytes()); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeInt32(19, this.gsm_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeBytes(20, getDeviceNameBytes()); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeBytes(21, getDataTypeBytes()); + if ((this.bitField0_ & 0x200000) == 2097152) + output.writeInt32(22, this.siteBeiDouPlateNum_); + if ((this.bitField0_ & 0x400000) == 4194304) + output.writeInt32(23, this.siteGpsPlateNum_); + if ((this.bitField0_ & 0x800000) == 8388608) + output.writeInt32(24, this.siteGlonassPlateNum_); + if ((this.bitField0_ & 0x1000000) == 16777216) + output.writeDouble(25, this.horizontalSiteprecision_); + if ((this.bitField0_ & 0x2000000) == 33554432) + output.writeMessage(26, (MessageLite)this.tracks_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getImeiBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getLonTypeBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeDoubleSize(4, this.lat_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getLatTypeBytes()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(6, this.electricQuantity_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.outDeviceState_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeBytesSize(8, getSysDateBytes()); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.speed_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeDoubleSize(10, this.course_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeDoubleSize(11, this.aboveSeaLevel_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeInt32Size(12, this.onlineStatus_); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeBytesSize(13, getSiteStateBytes()); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeDoubleSize(14, this.mileage_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeBytesSize(15, getMccBytes()); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeBytesSize(16, getMncBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeBytesSize(17, getLacBytes()); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeBytesSize(18, getCellIDBytes()); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeInt32Size(19, this.gsm_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeBytesSize(20, getDeviceNameBytes()); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeBytesSize(21, getDataTypeBytes()); + if ((this.bitField0_ & 0x200000) == 2097152) + size += CodedOutputStream.computeInt32Size(22, this.siteBeiDouPlateNum_); + if ((this.bitField0_ & 0x400000) == 4194304) + size += CodedOutputStream.computeInt32Size(23, this.siteGpsPlateNum_); + if ((this.bitField0_ & 0x800000) == 8388608) + size += CodedOutputStream.computeInt32Size(24, this.siteGlonassPlateNum_); + if ((this.bitField0_ & 0x1000000) == 16777216) + size += CodedOutputStream.computeDoubleSize(25, this.horizontalSiteprecision_); + if ((this.bitField0_ & 0x2000000) == 33554432) + size += CodedOutputStream.computeMessageSize(26, (MessageLite)this.tracks_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static GPSData parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (GPSData)PARSER.parseFrom(data); + } + + public static GPSData parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSData)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSData parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (GPSData)PARSER.parseFrom(data); + } + + public static GPSData parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSData)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSData parseFrom(InputStream input) throws IOException { + return (GPSData)PARSER.parseFrom(input); + } + + public static GPSData parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSData)PARSER.parseFrom(input, extensionRegistry); + } + + public static GPSData parseDelimitedFrom(InputStream input) throws IOException { + return (GPSData)PARSER.parseDelimitedFrom(input); + } + + public static GPSData parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSData)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static GPSData parseFrom(CodedInputStream input) throws IOException { + return (GPSData)PARSER.parseFrom(input); + } + + public static GPSData parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSData)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(GPSData prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements GPSDataOrBuilder { + private int bitField0_; + + private Object imei_; + + private double lon_; + + private Object lonType_; + + private double lat_; + + private Object latType_; + + private int electricQuantity_; + + private int outDeviceState_; + + private Object sysDate_; + + private double speed_; + + private double course_; + + private double aboveSeaLevel_; + + private int onlineStatus_; + + private Object siteState_; + + private double mileage_; + + private Object mcc_; + + private Object mnc_; + + private Object lac_; + + private Object cellID_; + + private int gsm_; + + private Object deviceName_; + + private Object dataType_; + + private int siteBeiDouPlateNum_; + + private int siteGpsPlateNum_; + + private int siteGlonassPlateNum_; + + private double horizontalSiteprecision_; + + private GPSHistoryTracks tracks_; + + private SingleFieldBuilder tracksBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSData_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSData_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSData.class, Builder.class); + } + + private Builder() { + this.imei_ = ""; + this.lonType_ = ""; + this.latType_ = ""; + this.sysDate_ = ""; + this.siteState_ = ""; + this.mcc_ = ""; + this.mnc_ = ""; + this.lac_ = ""; + this.cellID_ = ""; + this.deviceName_ = ""; + this.dataType_ = ""; + this.tracks_ = GPSHistoryTracks.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.imei_ = ""; + this.lonType_ = ""; + this.latType_ = ""; + this.sysDate_ = ""; + this.siteState_ = ""; + this.mcc_ = ""; + this.mnc_ = ""; + this.lac_ = ""; + this.cellID_ = ""; + this.deviceName_ = ""; + this.dataType_ = ""; + this.tracks_ = GPSHistoryTracks.getDefaultInstance(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (GPSData.alwaysUseFieldBuilders) + getTracksFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.imei_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.lonType_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFF7; + this.latType_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + this.electricQuantity_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + this.outDeviceState_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.sysDate_ = ""; + this.bitField0_ &= 0xFFFFFF7F; + this.speed_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.course_ = 0.0D; + this.bitField0_ &= 0xFFFFFDFF; + this.aboveSeaLevel_ = 0.0D; + this.bitField0_ &= 0xFFFFFBFF; + this.onlineStatus_ = 0; + this.bitField0_ &= 0xFFFFF7FF; + this.siteState_ = ""; + this.bitField0_ &= 0xFFFFEFFF; + this.mileage_ = 0.0D; + this.bitField0_ &= 0xFFFFDFFF; + this.mcc_ = ""; + this.bitField0_ &= 0xFFFFBFFF; + this.mnc_ = ""; + this.bitField0_ &= 0xFFFF7FFF; + this.lac_ = ""; + this.bitField0_ &= 0xFFFEFFFF; + this.cellID_ = ""; + this.bitField0_ &= 0xFFFDFFFF; + this.gsm_ = 0; + this.bitField0_ &= 0xFFFBFFFF; + this.deviceName_ = ""; + this.bitField0_ &= 0xFFF7FFFF; + this.dataType_ = ""; + this.bitField0_ &= 0xFFEFFFFF; + this.siteBeiDouPlateNum_ = 0; + this.bitField0_ &= 0xFFDFFFFF; + this.siteGpsPlateNum_ = 0; + this.bitField0_ &= 0xFFBFFFFF; + this.siteGlonassPlateNum_ = 0; + this.bitField0_ &= 0xFF7FFFFF; + this.horizontalSiteprecision_ = 0.0D; + this.bitField0_ &= 0xFEFFFFFF; + if (this.tracksBuilder_ == null) { + this.tracks_ = GPSHistoryTracks.getDefaultInstance(); + } else { + this.tracksBuilder_.clear(); + } + this.bitField0_ &= 0xFDFFFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSData_descriptor; + } + + public GPSData getDefaultInstanceForType() { + return GPSData.getDefaultInstance(); + } + + public GPSData build() { + GPSData result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public GPSData buildPartial() { + GPSData result = new GPSData(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.imei_ = this.imei_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.lonType_ = this.lonType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.latType_ = this.latType_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.electricQuantity_ = this.electricQuantity_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.outDeviceState_ = this.outDeviceState_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.sysDate_ = this.sysDate_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.speed_ = this.speed_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.course_ = this.course_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.aboveSeaLevel_ = this.aboveSeaLevel_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.onlineStatus_ = this.onlineStatus_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.siteState_ = this.siteState_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.mileage_ = this.mileage_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.mcc_ = this.mcc_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.mnc_ = this.mnc_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.lac_ = this.lac_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.cellID_ = this.cellID_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.gsm_ = this.gsm_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.deviceName_ = this.deviceName_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.dataType_ = this.dataType_; + if ((from_bitField0_ & 0x200000) == 2097152) + to_bitField0_ |= 0x200000; + result.siteBeiDouPlateNum_ = this.siteBeiDouPlateNum_; + if ((from_bitField0_ & 0x400000) == 4194304) + to_bitField0_ |= 0x400000; + result.siteGpsPlateNum_ = this.siteGpsPlateNum_; + if ((from_bitField0_ & 0x800000) == 8388608) + to_bitField0_ |= 0x800000; + result.siteGlonassPlateNum_ = this.siteGlonassPlateNum_; + if ((from_bitField0_ & 0x1000000) == 16777216) + to_bitField0_ |= 0x1000000; + result.horizontalSiteprecision_ = this.horizontalSiteprecision_; + if ((from_bitField0_ & 0x2000000) == 33554432) + to_bitField0_ |= 0x2000000; + if (this.tracksBuilder_ == null) { + result.tracks_ = this.tracks_; + } else { + result.tracks_ = (GPSHistoryTracks)this.tracksBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof GPSData) + return mergeFrom((GPSData)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(GPSData other) { + if (other == GPSData.getDefaultInstance()) + return this; + if (other.hasImei()) { + this.bitField0_ |= 0x1; + this.imei_ = other.imei_; + onChanged(); + } + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLonType()) { + this.bitField0_ |= 0x4; + this.lonType_ = other.lonType_; + onChanged(); + } + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasLatType()) { + this.bitField0_ |= 0x10; + this.latType_ = other.latType_; + onChanged(); + } + if (other.hasElectricQuantity()) + setElectricQuantity(other.getElectricQuantity()); + if (other.hasOutDeviceState()) + setOutDeviceState(other.getOutDeviceState()); + if (other.hasSysDate()) { + this.bitField0_ |= 0x80; + this.sysDate_ = other.sysDate_; + onChanged(); + } + if (other.hasSpeed()) + setSpeed(other.getSpeed()); + if (other.hasCourse()) + setCourse(other.getCourse()); + if (other.hasAboveSeaLevel()) + setAboveSeaLevel(other.getAboveSeaLevel()); + if (other.hasOnlineStatus()) + setOnlineStatus(other.getOnlineStatus()); + if (other.hasSiteState()) { + this.bitField0_ |= 0x1000; + this.siteState_ = other.siteState_; + onChanged(); + } + if (other.hasMileage()) + setMileage(other.getMileage()); + if (other.hasMcc()) { + this.bitField0_ |= 0x4000; + this.mcc_ = other.mcc_; + onChanged(); + } + if (other.hasMnc()) { + this.bitField0_ |= 0x8000; + this.mnc_ = other.mnc_; + onChanged(); + } + if (other.hasLac()) { + this.bitField0_ |= 0x10000; + this.lac_ = other.lac_; + onChanged(); + } + if (other.hasCellID()) { + this.bitField0_ |= 0x20000; + this.cellID_ = other.cellID_; + onChanged(); + } + if (other.hasGsm()) + setGsm(other.getGsm()); + if (other.hasDeviceName()) { + this.bitField0_ |= 0x80000; + this.deviceName_ = other.deviceName_; + onChanged(); + } + if (other.hasDataType()) { + this.bitField0_ |= 0x100000; + this.dataType_ = other.dataType_; + onChanged(); + } + if (other.hasSiteBeiDouPlateNum()) + setSiteBeiDouPlateNum(other.getSiteBeiDouPlateNum()); + if (other.hasSiteGpsPlateNum()) + setSiteGpsPlateNum(other.getSiteGpsPlateNum()); + if (other.hasSiteGlonassPlateNum()) + setSiteGlonassPlateNum(other.getSiteGlonassPlateNum()); + if (other.hasHorizontalSiteprecision()) + setHorizontalSiteprecision(other.getHorizontalSiteprecision()); + if (other.hasTracks()) + mergeTracks(other.getTracks()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasImei()) + return false; + if (!hasLon()) + return false; + if (!hasLonType()) + return false; + if (!hasLat()) + return false; + if (!hasLatType()) + return false; + if (!hasElectricQuantity()) + return false; + if (!hasOutDeviceState()) + return false; + if (!hasSysDate()) + return false; + if (!hasSpeed()) + return false; + if (!hasCourse()) + return false; + if (!hasAboveSeaLevel()) + return false; + if (!hasOnlineStatus()) + return false; + if (!hasSiteState()) + return false; + if (hasTracks() && !getTracks().isInitialized()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + GPSData parsedMessage = null; + try { + parsedMessage = (GPSData) GPSData.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (GPSData)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasImei() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getImei() { + Object ref = this.imei_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.imei_ = s; + return s; + } + return (String)ref; + } + + public ByteString getImeiBytes() { + Object ref = this.imei_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.imei_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setImei(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.imei_ = value; + onChanged(); + return this; + } + + public Builder clearImei() { + this.bitField0_ &= 0xFFFFFFFE; + this.imei_ = GPSData.getDefaultInstance().getImei(); + onChanged(); + return this; + } + + public Builder setImeiBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.imei_ = value; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x2; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFFD; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLonType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getLonType() { + Object ref = this.lonType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lonType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getLonTypeBytes() { + Object ref = this.lonType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lonType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setLonType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.lonType_ = value; + onChanged(); + return this; + } + + public Builder clearLonType() { + this.bitField0_ &= 0xFFFFFFFB; + this.lonType_ = GPSData.getDefaultInstance().getLonType(); + onChanged(); + return this; + } + + public Builder setLonTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.lonType_ = value; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x8) == 8); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x8; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFFF7; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLatType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getLatType() { + Object ref = this.latType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.latType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getLatTypeBytes() { + Object ref = this.latType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.latType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setLatType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.latType_ = value; + onChanged(); + return this; + } + + public Builder clearLatType() { + this.bitField0_ &= 0xFFFFFFEF; + this.latType_ = GPSData.getDefaultInstance().getLatType(); + onChanged(); + return this; + } + + public Builder setLatTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.latType_ = value; + onChanged(); + return this; + } + + public boolean hasElectricQuantity() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getElectricQuantity() { + return this.electricQuantity_; + } + + public Builder setElectricQuantity(int value) { + this.bitField0_ |= 0x20; + this.electricQuantity_ = value; + onChanged(); + return this; + } + + public Builder clearElectricQuantity() { + this.bitField0_ &= 0xFFFFFFDF; + this.electricQuantity_ = 0; + onChanged(); + return this; + } + + public boolean hasOutDeviceState() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getOutDeviceState() { + return this.outDeviceState_; + } + + public Builder setOutDeviceState(int value) { + this.bitField0_ |= 0x40; + this.outDeviceState_ = value; + onChanged(); + return this; + } + + public Builder clearOutDeviceState() { + this.bitField0_ &= 0xFFFFFFBF; + this.outDeviceState_ = 0; + onChanged(); + return this; + } + + public boolean hasSysDate() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getSysDate() { + Object ref = this.sysDate_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sysDate_ = s; + return s; + } + return (String)ref; + } + + public ByteString getSysDateBytes() { + Object ref = this.sysDate_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sysDate_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setSysDate(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.sysDate_ = value; + onChanged(); + return this; + } + + public Builder clearSysDate() { + this.bitField0_ &= 0xFFFFFF7F; + this.sysDate_ = GPSData.getDefaultInstance().getSysDate(); + onChanged(); + return this; + } + + public Builder setSysDateBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.sysDate_ = value; + onChanged(); + return this; + } + + public boolean hasSpeed() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getSpeed() { + return this.speed_; + } + + public Builder setSpeed(double value) { + this.bitField0_ |= 0x100; + this.speed_ = value; + onChanged(); + return this; + } + + public Builder clearSpeed() { + this.bitField0_ &= 0xFFFFFEFF; + this.speed_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCourse() { + return ((this.bitField0_ & 0x200) == 512); + } + + public double getCourse() { + return this.course_; + } + + public Builder setCourse(double value) { + this.bitField0_ |= 0x200; + this.course_ = value; + onChanged(); + return this; + } + + public Builder clearCourse() { + this.bitField0_ &= 0xFFFFFDFF; + this.course_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasAboveSeaLevel() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public double getAboveSeaLevel() { + return this.aboveSeaLevel_; + } + + public Builder setAboveSeaLevel(double value) { + this.bitField0_ |= 0x400; + this.aboveSeaLevel_ = value; + onChanged(); + return this; + } + + public Builder clearAboveSeaLevel() { + this.bitField0_ &= 0xFFFFFBFF; + this.aboveSeaLevel_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasOnlineStatus() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public int getOnlineStatus() { + return this.onlineStatus_; + } + + public Builder setOnlineStatus(int value) { + this.bitField0_ |= 0x800; + this.onlineStatus_ = value; + onChanged(); + return this; + } + + public Builder clearOnlineStatus() { + this.bitField0_ &= 0xFFFFF7FF; + this.onlineStatus_ = 0; + onChanged(); + return this; + } + + public boolean hasSiteState() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public String getSiteState() { + Object ref = this.siteState_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.siteState_ = s; + return s; + } + return (String)ref; + } + + public ByteString getSiteStateBytes() { + Object ref = this.siteState_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.siteState_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setSiteState(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.siteState_ = value; + onChanged(); + return this; + } + + public Builder clearSiteState() { + this.bitField0_ &= 0xFFFFEFFF; + this.siteState_ = GPSData.getDefaultInstance().getSiteState(); + onChanged(); + return this; + } + + public Builder setSiteStateBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.siteState_ = value; + onChanged(); + return this; + } + + public boolean hasMileage() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getMileage() { + return this.mileage_; + } + + public Builder setMileage(double value) { + this.bitField0_ |= 0x2000; + this.mileage_ = value; + onChanged(); + return this; + } + + public Builder clearMileage() { + this.bitField0_ &= 0xFFFFDFFF; + this.mileage_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasMcc() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public String getMcc() { + Object ref = this.mcc_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mcc_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMccBytes() { + Object ref = this.mcc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mcc_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMcc(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4000; + this.mcc_ = value; + onChanged(); + return this; + } + + public Builder clearMcc() { + this.bitField0_ &= 0xFFFFBFFF; + this.mcc_ = GPSData.getDefaultInstance().getMcc(); + onChanged(); + return this; + } + + public Builder setMccBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4000; + this.mcc_ = value; + onChanged(); + return this; + } + + public boolean hasMnc() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getMnc() { + Object ref = this.mnc_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mnc_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMncBytes() { + Object ref = this.mnc_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mnc_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMnc(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.mnc_ = value; + onChanged(); + return this; + } + + public Builder clearMnc() { + this.bitField0_ &= 0xFFFF7FFF; + this.mnc_ = GPSData.getDefaultInstance().getMnc(); + onChanged(); + return this; + } + + public Builder setMncBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.mnc_ = value; + onChanged(); + return this; + } + + public boolean hasLac() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public String getLac() { + Object ref = this.lac_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.lac_ = s; + return s; + } + return (String)ref; + } + + public ByteString getLacBytes() { + Object ref = this.lac_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.lac_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setLac(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10000; + this.lac_ = value; + onChanged(); + return this; + } + + public Builder clearLac() { + this.bitField0_ &= 0xFFFEFFFF; + this.lac_ = GPSData.getDefaultInstance().getLac(); + onChanged(); + return this; + } + + public Builder setLacBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10000; + this.lac_ = value; + onChanged(); + return this; + } + + public boolean hasCellID() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public String getCellID() { + Object ref = this.cellID_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.cellID_ = s; + return s; + } + return (String)ref; + } + + public ByteString getCellIDBytes() { + Object ref = this.cellID_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.cellID_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setCellID(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20000; + this.cellID_ = value; + onChanged(); + return this; + } + + public Builder clearCellID() { + this.bitField0_ &= 0xFFFDFFFF; + this.cellID_ = GPSData.getDefaultInstance().getCellID(); + onChanged(); + return this; + } + + public Builder setCellIDBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20000; + this.cellID_ = value; + onChanged(); + return this; + } + + public boolean hasGsm() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public int getGsm() { + return this.gsm_; + } + + public Builder setGsm(int value) { + this.bitField0_ |= 0x40000; + this.gsm_ = value; + onChanged(); + return this; + } + + public Builder clearGsm() { + this.bitField0_ &= 0xFFFBFFFF; + this.gsm_ = 0; + onChanged(); + return this; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDeviceName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80000; + this.deviceName_ = value; + onChanged(); + return this; + } + + public Builder clearDeviceName() { + this.bitField0_ &= 0xFFF7FFFF; + this.deviceName_ = GPSData.getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + + public Builder setDeviceNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80000; + this.deviceName_ = value; + onChanged(); + return this; + } + + public boolean hasDataType() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public String getDataType() { + Object ref = this.dataType_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dataType_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDataTypeBytes() { + Object ref = this.dataType_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dataType_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDataType(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100000; + this.dataType_ = value; + onChanged(); + return this; + } + + public Builder clearDataType() { + this.bitField0_ &= 0xFFEFFFFF; + this.dataType_ = GPSData.getDefaultInstance().getDataType(); + onChanged(); + return this; + } + + public Builder setDataTypeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100000; + this.dataType_ = value; + onChanged(); + return this; + } + + public boolean hasSiteBeiDouPlateNum() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public int getSiteBeiDouPlateNum() { + return this.siteBeiDouPlateNum_; + } + + public Builder setSiteBeiDouPlateNum(int value) { + this.bitField0_ |= 0x200000; + this.siteBeiDouPlateNum_ = value; + onChanged(); + return this; + } + + public Builder clearSiteBeiDouPlateNum() { + this.bitField0_ &= 0xFFDFFFFF; + this.siteBeiDouPlateNum_ = 0; + onChanged(); + return this; + } + + public boolean hasSiteGpsPlateNum() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public int getSiteGpsPlateNum() { + return this.siteGpsPlateNum_; + } + + public Builder setSiteGpsPlateNum(int value) { + this.bitField0_ |= 0x400000; + this.siteGpsPlateNum_ = value; + onChanged(); + return this; + } + + public Builder clearSiteGpsPlateNum() { + this.bitField0_ &= 0xFFBFFFFF; + this.siteGpsPlateNum_ = 0; + onChanged(); + return this; + } + + public boolean hasSiteGlonassPlateNum() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public int getSiteGlonassPlateNum() { + return this.siteGlonassPlateNum_; + } + + public Builder setSiteGlonassPlateNum(int value) { + this.bitField0_ |= 0x800000; + this.siteGlonassPlateNum_ = value; + onChanged(); + return this; + } + + public Builder clearSiteGlonassPlateNum() { + this.bitField0_ &= 0xFF7FFFFF; + this.siteGlonassPlateNum_ = 0; + onChanged(); + return this; + } + + public boolean hasHorizontalSiteprecision() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public double getHorizontalSiteprecision() { + return this.horizontalSiteprecision_; + } + + public Builder setHorizontalSiteprecision(double value) { + this.bitField0_ |= 0x1000000; + this.horizontalSiteprecision_ = value; + onChanged(); + return this; + } + + public Builder clearHorizontalSiteprecision() { + this.bitField0_ &= 0xFEFFFFFF; + this.horizontalSiteprecision_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTracks() { + return ((this.bitField0_ & 0x2000000) == 33554432); + } + + public GPSHistoryTracks getTracks() { + if (this.tracksBuilder_ == null) + return this.tracks_; + return (GPSHistoryTracks)this.tracksBuilder_.getMessage(); + } + + public Builder setTracks(GPSHistoryTracks value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.tracks_ = value; + onChanged(); + } else { + this.tracksBuilder_.setMessage(value); + } + this.bitField0_ |= 0x2000000; + return this; + } + + public Builder setTracks(GPSHistoryTracks.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + this.tracks_ = builderForValue.build(); + onChanged(); + } else { + this.tracksBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x2000000; + return this; + } + + public Builder mergeTracks(GPSHistoryTracks value) { + if (this.tracksBuilder_ == null) { + if ((this.bitField0_ & 0x2000000) == 33554432 && this.tracks_ != GPSHistoryTracks.getDefaultInstance()) { + this.tracks_ = GPSHistoryTracks.newBuilder(this.tracks_).mergeFrom(value).buildPartial(); + } else { + this.tracks_ = value; + } + onChanged(); + } else { + this.tracksBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x2000000; + return this; + } + + public Builder clearTracks() { + if (this.tracksBuilder_ == null) { + this.tracks_ = GPSHistoryTracks.getDefaultInstance(); + onChanged(); + } else { + this.tracksBuilder_.clear(); + } + this.bitField0_ &= 0xFDFFFFFF; + return this; + } + + public GPSHistoryTracks.Builder getTracksBuilder() { + this.bitField0_ |= 0x2000000; + onChanged(); + return (GPSHistoryTracks.Builder)getTracksFieldBuilder().getBuilder(); + } + + public GPSHistoryTracksOrBuilder getTracksOrBuilder() { + if (this.tracksBuilder_ != null) + return (GPSHistoryTracksOrBuilder)this.tracksBuilder_.getMessageOrBuilder(); + return this.tracks_; + } + + private SingleFieldBuilder getTracksFieldBuilder() { + if (this.tracksBuilder_ == null) { + this.tracksBuilder_ = new SingleFieldBuilder(getTracks(), getParentForChildren(), isClean()); + this.tracks_ = null; + } + return this.tracksBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class GPSDataList extends GeneratedMessage implements GPSDataListOrBuilder { + private static final GPSDataList defaultInstance = new GPSDataList(true); + + private final UnknownFieldSet unknownFields; + + private GPSDataList(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private GPSDataList(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static GPSDataList getDefaultInstance() { + return defaultInstance; + } + + public GPSDataList getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GPSDataList(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.uTC_ = input.readUInt64(); + break; + case 16: + this.bitField0_ |= 0x2; + this.length_ = input.readInt32(); + break; + case 26: + if ((mutable_bitField0_ & 0x4) != 4) { + this.gpsDataList_ = new ArrayList(); + mutable_bitField0_ |= 0x4; + } + this.gpsDataList_.add((GPSData)input.readMessage(GPSData.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x4) == 4) + this.gpsDataList_ = Collections.unmodifiableList(this.gpsDataList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSDataList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSDataList_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSDataList.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public GPSDataList parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new GPSDataList(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int UTC_FIELD_NUMBER = 1; + + private long uTC_; + + public static final int LENGTH_FIELD_NUMBER = 2; + + private int length_; + + public static final int GPSDATALIST_FIELD_NUMBER = 3; + + private List gpsDataList_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x1) == 1); + } + + public long getUTC() { + return this.uTC_; + } + + public boolean hasLength() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getLength() { + return this.length_; + } + + public List getGpsDataListList() { + return this.gpsDataList_; + } + + public List getGpsDataListOrBuilderList() { + return (List)this.gpsDataList_; + } + + public int getGpsDataListCount() { + return this.gpsDataList_.size(); + } + + public GPSData getGpsDataList(int index) { + return this.gpsDataList_.get(index); + } + + public GPSDataOrBuilder getGpsDataListOrBuilder(int index) { + return this.gpsDataList_.get(index); + } + + private void initFields() { + this.uTC_ = 0L; + this.length_ = 0; + this.gpsDataList_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLength()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getGpsDataListCount(); i++) { + if (!getGpsDataList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeUInt64(1, this.uTC_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.length_); + for (int i = 0; i < this.gpsDataList_.size(); i++) + output.writeMessage(3, (MessageLite)this.gpsDataList_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeUInt64Size(1, this.uTC_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.length_); + for (int i = 0; i < this.gpsDataList_.size(); i++) + size += CodedOutputStream.computeMessageSize(3, (MessageLite)this.gpsDataList_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static GPSDataList parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (GPSDataList)PARSER.parseFrom(data); + } + + public static GPSDataList parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSDataList)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSDataList parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (GPSDataList)PARSER.parseFrom(data); + } + + public static GPSDataList parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (GPSDataList)PARSER.parseFrom(data, extensionRegistry); + } + + public static GPSDataList parseFrom(InputStream input) throws IOException { + return (GPSDataList)PARSER.parseFrom(input); + } + + public static GPSDataList parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSDataList)PARSER.parseFrom(input, extensionRegistry); + } + + public static GPSDataList parseDelimitedFrom(InputStream input) throws IOException { + return (GPSDataList)PARSER.parseDelimitedFrom(input); + } + + public static GPSDataList parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSDataList)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static GPSDataList parseFrom(CodedInputStream input) throws IOException { + return (GPSDataList)PARSER.parseFrom(input); + } + + public static GPSDataList parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (GPSDataList)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(GPSDataList prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements GPSDataListOrBuilder { + private int bitField0_; + + private long uTC_; + + private int length_; + + private List gpsDataList_; + + private RepeatedFieldBuilder gpsDataListBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSDataList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSDataList_fieldAccessorTable.ensureFieldAccessorsInitialized(GPSDataList.class, Builder.class); + } + + private Builder() { + this.gpsDataList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.gpsDataList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (GPSDataList.alwaysUseFieldBuilders) + getGpsDataListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFFFE; + this.length_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + if (this.gpsDataListBuilder_ == null) { + this.gpsDataList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFB; + } else { + this.gpsDataListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXGPS.internal_static_com_zhichenhaixin_proto_GPSDataList_descriptor; + } + + public GPSDataList getDefaultInstanceForType() { + return GPSDataList.getDefaultInstance(); + } + + public GPSDataList build() { + GPSDataList result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public GPSDataList buildPartial() { + GPSDataList result = new GPSDataList(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.uTC_ = this.uTC_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.length_ = this.length_; + if (this.gpsDataListBuilder_ == null) { + if ((this.bitField0_ & 0x4) == 4) { + this.gpsDataList_ = Collections.unmodifiableList(this.gpsDataList_); + this.bitField0_ &= 0xFFFFFFFB; + } + result.gpsDataList_ = this.gpsDataList_; + } else { + result.gpsDataList_ = this.gpsDataListBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof GPSDataList) + return mergeFrom((GPSDataList)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(GPSDataList other) { + if (other == GPSDataList.getDefaultInstance()) + return this; + if (other.hasUTC()) + setUTC(other.getUTC()); + if (other.hasLength()) + setLength(other.getLength()); + if (this.gpsDataListBuilder_ == null) { + if (!other.gpsDataList_.isEmpty()) { + if (this.gpsDataList_.isEmpty()) { + this.gpsDataList_ = other.gpsDataList_; + this.bitField0_ &= 0xFFFFFFFB; + } else { + ensureGpsDataListIsMutable(); + this.gpsDataList_.addAll(other.gpsDataList_); + } + onChanged(); + } + } else if (!other.gpsDataList_.isEmpty()) { + if (this.gpsDataListBuilder_.isEmpty()) { + this.gpsDataListBuilder_.dispose(); + this.gpsDataListBuilder_ = null; + this.gpsDataList_ = other.gpsDataList_; + this.bitField0_ &= 0xFFFFFFFB; + this.gpsDataListBuilder_ = GPSDataList.alwaysUseFieldBuilders ? getGpsDataListFieldBuilder() : null; + } else { + this.gpsDataListBuilder_.addAllMessages(other.gpsDataList_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasUTC()) + return false; + if (!hasLength()) + return false; + for (int i = 0; i < getGpsDataListCount(); i++) { + if (!getGpsDataList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + GPSDataList parsedMessage = null; + try { + parsedMessage = (GPSDataList) GPSDataList.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (GPSDataList)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x1) == 1); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x1; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFFFE; + this.uTC_ = 0L; + onChanged(); + return this; + } + + public boolean hasLength() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getLength() { + return this.length_; + } + + public Builder setLength(int value) { + this.bitField0_ |= 0x2; + this.length_ = value; + onChanged(); + return this; + } + + public Builder clearLength() { + this.bitField0_ &= 0xFFFFFFFD; + this.length_ = 0; + onChanged(); + return this; + } + + private void ensureGpsDataListIsMutable() { + if ((this.bitField0_ & 0x4) != 4) { + this.gpsDataList_ = new ArrayList(this.gpsDataList_); + this.bitField0_ |= 0x4; + } + } + + public List getGpsDataListList() { + if (this.gpsDataListBuilder_ == null) + return Collections.unmodifiableList(this.gpsDataList_); + return this.gpsDataListBuilder_.getMessageList(); + } + + public int getGpsDataListCount() { + if (this.gpsDataListBuilder_ == null) + return this.gpsDataList_.size(); + return this.gpsDataListBuilder_.getCount(); + } + + public GPSData getGpsDataList(int index) { + if (this.gpsDataListBuilder_ == null) + return this.gpsDataList_.get(index); + return (GPSData)this.gpsDataListBuilder_.getMessage(index); + } + + public Builder setGpsDataList(int index, GPSData value) { + if (this.gpsDataListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureGpsDataListIsMutable(); + this.gpsDataList_.set(index, value); + onChanged(); + } else { + this.gpsDataListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setGpsDataList(int index, GPSData.Builder builderForValue) { + if (this.gpsDataListBuilder_ == null) { + ensureGpsDataListIsMutable(); + this.gpsDataList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.gpsDataListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addGpsDataList(GPSData value) { + if (this.gpsDataListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureGpsDataListIsMutable(); + this.gpsDataList_.add(value); + onChanged(); + } else { + this.gpsDataListBuilder_.addMessage(value); + } + return this; + } + + public Builder addGpsDataList(int index, GPSData value) { + if (this.gpsDataListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureGpsDataListIsMutable(); + this.gpsDataList_.add(index, value); + onChanged(); + } else { + this.gpsDataListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addGpsDataList(GPSData.Builder builderForValue) { + if (this.gpsDataListBuilder_ == null) { + ensureGpsDataListIsMutable(); + this.gpsDataList_.add(builderForValue.build()); + onChanged(); + } else { + this.gpsDataListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addGpsDataList(int index, GPSData.Builder builderForValue) { + if (this.gpsDataListBuilder_ == null) { + ensureGpsDataListIsMutable(); + this.gpsDataList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.gpsDataListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllGpsDataList(Iterable values) { + if (this.gpsDataListBuilder_ == null) { + ensureGpsDataListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.gpsDataList_); + onChanged(); + } else { + this.gpsDataListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearGpsDataList() { + if (this.gpsDataListBuilder_ == null) { + this.gpsDataList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFB; + onChanged(); + } else { + this.gpsDataListBuilder_.clear(); + } + return this; + } + + public Builder removeGpsDataList(int index) { + if (this.gpsDataListBuilder_ == null) { + ensureGpsDataListIsMutable(); + this.gpsDataList_.remove(index); + onChanged(); + } else { + this.gpsDataListBuilder_.remove(index); + } + return this; + } + + public GPSData.Builder getGpsDataListBuilder(int index) { + return (GPSData.Builder)getGpsDataListFieldBuilder().getBuilder(index); + } + + public GPSDataOrBuilder getGpsDataListOrBuilder(int index) { + if (this.gpsDataListBuilder_ == null) + return this.gpsDataList_.get(index); + return (GPSDataOrBuilder)this.gpsDataListBuilder_.getMessageOrBuilder(index); + } + + public List getGpsDataListOrBuilderList() { + if (this.gpsDataListBuilder_ != null) + return this.gpsDataListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.gpsDataList_); + } + + public GPSData.Builder addGpsDataListBuilder() { + return (GPSData.Builder)getGpsDataListFieldBuilder().addBuilder(GPSData.getDefaultInstance()); + } + + public GPSData.Builder addGpsDataListBuilder(int index) { + return (GPSData.Builder)getGpsDataListFieldBuilder().addBuilder(index, GPSData.getDefaultInstance()); + } + + public List getGpsDataListBuilderList() { + return getGpsDataListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getGpsDataListFieldBuilder() { + if (this.gpsDataListBuilder_ == null) { + this.gpsDataListBuilder_ = new RepeatedFieldBuilder(this.gpsDataList_, ((this.bitField0_ & 0x4) == 4), getParentForChildren(), isClean()); + this.gpsDataList_ = null; + } + return this.gpsDataListBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\rZCHXGPS.proto\022\027com.com.zhichenhaixin.proto\"\003\n\017GPSHistoryTrack\022\f\n\004imei\030\001 \002(\t\022\013\n\003lon\030\002 \002(\001\022\017\n\007lonType\030\003 \002(\t\022\013\n\003lat\030\004 \002(\001\022\017\n\007latType\030\005 \002(\t\022\017\n\007sysDate\030\006 \002(\t\022\r\n\005speed\030\007 \002(\001\022\016\n\006course\030\b \002(\001\022\025\n\raboveSeaLevel\030\t \002(\001\022\017\n\007mileage\030\n \001(\001\022\013\n\003mcc\030\013 \001(\t\022\013\n\003mnc\030\f \001(\t\022\013\n\003lac\030\r \001(\t\022\016\n\006cellID\030\016 \001(\t\022\013\n\003gsm\030\017 \001(\005\022\022\n\ndeviceName\030\020 \001(\t\022\020\n\bdataType\030\021 \001(\t\022\032\n\022siteBeiDouPlateNum\030\022 \001(\005\022\027\n\017siteGpsPlateNum\030\023 \001(\005\022\033\n\023siteGlonassPlat", "eNum\030\024 \001(\005\022\037\n\027horizontalSiteprecision\030\025 \001(\001\"L\n\020GPSHistoryTracks\0228\n\006tracks\030\001 \003(\0132(.com.com.zhichenhaixin.proto.GPSHistoryTrack\"ž\004\n\007GPSData\022\f\n\004imei\030\001 \002(\t\022\013\n\003lon\030\002 \002(\001\022\017\n\007lonType\030\003 \002(\t\022\013\n\003lat\030\004 \002(\001\022\017\n\007latType\030\005 \002(\t\022\030\n\020electricQuantity\030\006 \002(\005\022\026\n\016outDeviceState\030\007 \002(\005\022\017\n\007sysDate\030\b \002(\t\022\r\n\005speed\030\t \002(\001\022\016\n\006course\030\n \002(\001\022\025\n\raboveSeaLevel\030\013 \002(\001\022\024\n\fonlineStatus\030\f \002(\005\022\021\n\tsiteState\030\r \002(\t\022\017\n\007mileage\030\016 \001(\001\022\013\n\003mcc\030\017 \001(\t\022", "\013\n\003mnc\030\020 \001(\t\022\013\n\003lac\030\021 \001(\t\022\016\n\006cellID\030\022 \001(\t\022\013\n\003gsm\030\023 \001(\005\022\022\n\ndeviceName\030\024 \001(\t\022\020\n\bdataType\030\025 \001(\t\022\032\n\022siteBeiDouPlateNum\030\026 \001(\005\022\027\n\017siteGpsPlateNum\030\027 \001(\005\022\033\n\023siteGlonassPlateNum\030\030 \001(\005\022\037\n\027horizontalSiteprecision\030\031 \001(\001\0229\n\006tracks\030\032 \001(\0132).com.com.zhichenhaixin.proto.GPSHistoryTracks\"a\n\013GPSDataList\022\013\n\003UTC\030\001 \002(\004\022\016\n\006length\030\002 \002(\005\0225\n\013gpsDataList\030\003 \003(\0132 .com.com.zhichenhaixin.proto.GPSData" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXGPS.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_GPSHistoryTrack_descriptor, new String[] { + "Imei", "Lon", "LonType", "Lat", "LatType", "SysDate", "Speed", "Course", "AboveSeaLevel", "Mileage", + "Mcc", "Mnc", "Lac", "CellID", "Gsm", "DeviceName", "DataType", "SiteBeiDouPlateNum", "SiteGpsPlateNum", "SiteGlonassPlateNum", + "HorizontalSiteprecision" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_GPSHistoryTracks_descriptor, new String[] { "Tracks" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_GPSData_descriptor = getDescriptor().getMessageTypes().get(2); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_GPSData_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_GPSData_descriptor, new String[] { + "Imei", "Lon", "LonType", "Lat", "LatType", "ElectricQuantity", "OutDeviceState", "SysDate", "Speed", "Course", + "AboveSeaLevel", "OnlineStatus", "SiteState", "Mileage", "Mcc", "Mnc", "Lac", "CellID", "Gsm", "DeviceName", + "DataType", "SiteBeiDouPlateNum", "SiteGpsPlateNum", "SiteGlonassPlateNum", "HorizontalSiteprecision", "Tracks" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_GPSDataList_descriptor = getDescriptor().getMessageTypes().get(3); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_GPSDataList_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_GPSDataList_descriptor, new String[] { "UTC", "Length", "GpsDataList" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface GPSDataListOrBuilder extends MessageOrBuilder { + boolean hasUTC(); + + long getUTC(); + + boolean hasLength(); + + int getLength(); + + List getGpsDataListList(); + + GPSData getGpsDataList(int param1Int); + + int getGpsDataListCount(); + + List getGpsDataListOrBuilderList(); + + GPSDataOrBuilder getGpsDataListOrBuilder(int param1Int); + } + + public static interface GPSDataOrBuilder extends MessageOrBuilder { + boolean hasImei(); + + String getImei(); + + ByteString getImeiBytes(); + + boolean hasLon(); + + double getLon(); + + boolean hasLonType(); + + String getLonType(); + + ByteString getLonTypeBytes(); + + boolean hasLat(); + + double getLat(); + + boolean hasLatType(); + + String getLatType(); + + ByteString getLatTypeBytes(); + + boolean hasElectricQuantity(); + + int getElectricQuantity(); + + boolean hasOutDeviceState(); + + int getOutDeviceState(); + + boolean hasSysDate(); + + String getSysDate(); + + ByteString getSysDateBytes(); + + boolean hasSpeed(); + + double getSpeed(); + + boolean hasCourse(); + + double getCourse(); + + boolean hasAboveSeaLevel(); + + double getAboveSeaLevel(); + + boolean hasOnlineStatus(); + + int getOnlineStatus(); + + boolean hasSiteState(); + + String getSiteState(); + + ByteString getSiteStateBytes(); + + boolean hasMileage(); + + double getMileage(); + + boolean hasMcc(); + + String getMcc(); + + ByteString getMccBytes(); + + boolean hasMnc(); + + String getMnc(); + + ByteString getMncBytes(); + + boolean hasLac(); + + String getLac(); + + ByteString getLacBytes(); + + boolean hasCellID(); + + String getCellID(); + + ByteString getCellIDBytes(); + + boolean hasGsm(); + + int getGsm(); + + boolean hasDeviceName(); + + String getDeviceName(); + + ByteString getDeviceNameBytes(); + + boolean hasDataType(); + + String getDataType(); + + ByteString getDataTypeBytes(); + + boolean hasSiteBeiDouPlateNum(); + + int getSiteBeiDouPlateNum(); + + boolean hasSiteGpsPlateNum(); + + int getSiteGpsPlateNum(); + + boolean hasSiteGlonassPlateNum(); + + int getSiteGlonassPlateNum(); + + boolean hasHorizontalSiteprecision(); + + double getHorizontalSiteprecision(); + + boolean hasTracks(); + + GPSHistoryTracks getTracks(); + + GPSHistoryTracksOrBuilder getTracksOrBuilder(); + } + + public static interface GPSHistoryTrackOrBuilder extends MessageOrBuilder { + boolean hasImei(); + + String getImei(); + + ByteString getImeiBytes(); + + boolean hasLon(); + + double getLon(); + + boolean hasLonType(); + + String getLonType(); + + ByteString getLonTypeBytes(); + + boolean hasLat(); + + double getLat(); + + boolean hasLatType(); + + String getLatType(); + + ByteString getLatTypeBytes(); + + boolean hasSysDate(); + + String getSysDate(); + + ByteString getSysDateBytes(); + + boolean hasSpeed(); + + double getSpeed(); + + boolean hasCourse(); + + double getCourse(); + + boolean hasAboveSeaLevel(); + + double getAboveSeaLevel(); + + boolean hasMileage(); + + double getMileage(); + + boolean hasMcc(); + + String getMcc(); + + ByteString getMccBytes(); + + boolean hasMnc(); + + String getMnc(); + + ByteString getMncBytes(); + + boolean hasLac(); + + String getLac(); + + ByteString getLacBytes(); + + boolean hasCellID(); + + String getCellID(); + + ByteString getCellIDBytes(); + + boolean hasGsm(); + + int getGsm(); + + boolean hasDeviceName(); + + String getDeviceName(); + + ByteString getDeviceNameBytes(); + + boolean hasDataType(); + + String getDataType(); + + ByteString getDataTypeBytes(); + + boolean hasSiteBeiDouPlateNum(); + + int getSiteBeiDouPlateNum(); + + boolean hasSiteGpsPlateNum(); + + int getSiteGpsPlateNum(); + + boolean hasSiteGlonassPlateNum(); + + int getSiteGlonassPlateNum(); + + boolean hasHorizontalSiteprecision(); + + double getHorizontalSiteprecision(); + } + + public static interface GPSHistoryTracksOrBuilder extends MessageOrBuilder { + List getTracksList(); + + GPSHistoryTrack getTracks(int param1Int); + + int getTracksCount(); + + List getTracksOrBuilderList(); + + GPSHistoryTrackOrBuilder getTracksOrBuilder(int param1Int); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXRadar.java b/src/main/java/com/zhichenhaixin/proto/ZCHXRadar.java new file mode 100644 index 0000000..82e30f9 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXRadar.java @@ -0,0 +1,8546 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXRadar { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public enum MSGTYP implements ProtocolMessageEnum { + MSGTYP_UNDEFINED( + + 0, 0), + TARGET_REPORT( + + 1, 1), + START_OF_UPDATE_CYCLE( + + 2, 2), + PERIODIC_STATUS( + + 3, 3), + EVENT_TRIGGERED_STATUS( + + 4, 4); + + public static final int MSGTYP_UNDEFINED_VALUE = 0; + + public static final int TARGET_REPORT_VALUE = 1; + + public static final int START_OF_UPDATE_CYCLE_VALUE = 2; + + public static final int PERIODIC_STATUS_VALUE = 3; + + public static final int EVENT_TRIGGERED_STATUS_VALUE = 4; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public MSGTYP findValueByNumber(int number) { + return MSGTYP.valueOf(String.valueOf(number)); + } + }; + + private static final MSGTYP[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXRadar.getDescriptor().getEnumTypes().get(0); + } + + MSGTYP(int index, int value) { + this.index = index; + this.value = value; + } + } + + public enum CNF implements ProtocolMessageEnum { + CONFIRMED_TRACK( + + 0, 0), + TENTATIVE_TRACK( + + 1, 1), + UNKNOWN_TRACK( + + 2, 2); + + public static final int CONFIRMED_TRACK_VALUE = 0; + + public static final int TENTATIVE_TRACK_VALUE = 1; + + public static final int UNKNOWN_TRACK_VALUE = 2; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public CNF findValueByNumber(int number) { + return CNF.valueOf(String.valueOf(number)); + } + }; + + private static final CNF[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXRadar.getDescriptor().getEnumTypes().get(1); + } + + CNF(int index, int value) { + this.index = index; + this.value = value; + } + } + + public enum CST implements ProtocolMessageEnum { + CST_UNDEFINED( + + 0, 0), + PREDICTABLE_EXTRAPOLATION_DUE_PERIOD( + + 1, 1), + PREDICTABLE_EXTRAPOLATION_IN_AREA( + + 2, 2), + EXTRAPOLATION_DUE_UNPREDICTABLE_DETECTION( + + 3, 3); + + public static final int CST_UNDEFINED_VALUE = 0; + + public static final int PREDICTABLE_EXTRAPOLATION_DUE_PERIOD_VALUE = 1; + + public static final int PREDICTABLE_EXTRAPOLATION_IN_AREA_VALUE = 2; + + public static final int EXTRAPOLATION_DUE_UNPREDICTABLE_DETECTION_VALUE = 3; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public CST findValueByNumber(int number) { + return CST.valueOf(String.valueOf(number)); + } + }; + + private static final CST[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXRadar.getDescriptor().getEnumTypes().get(2); + } + + CST(int index, int value) { + this.index = index; + this.value = value; + } + } + + public enum STH implements ProtocolMessageEnum { + MEASURED_POSITION( + + 0, 0), + SMOOTHED_POSITION( + + 1, 1); + + public static final int MEASURED_POSITION_VALUE = 0; + + public static final int SMOOTHED_POSITION_VALUE = 1; + + private static Internal.EnumLiteMap internalValueMap = new Internal.EnumLiteMap() { + public STH findValueByNumber(int number) { + return STH.valueOf(String.valueOf(number)); + } + }; + + private static final STH[] VALUES = values(); + + private final int index; + + private final int value; + + public final int getNumber() { + return this.value; + } + + public static Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + static { + + } + + public final Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(this.index); + } + + public final Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final Descriptors.EnumDescriptor getDescriptor() { + return ZCHXRadar.getDescriptor().getEnumTypes().get(3); + } + + STH(int index, int value) { + this.index = index; + this.value = value; + } + } + + public static final class RadarHistoryTrack extends GeneratedMessage implements RadarHistoryTrackOrBuilder { + private static final RadarHistoryTrack defaultInstance = new RadarHistoryTrack(true); + + private final UnknownFieldSet unknownFields; + + private RadarHistoryTrack(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private RadarHistoryTrack(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static RadarHistoryTrack getDefaultInstance() { + return defaultInstance; + } + + public RadarHistoryTrack getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RadarHistoryTrack(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int rawValue; + CNF cNF; + CST cST; + STH value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.trackNumber_ = input.readUInt32(); + break; + case 17: + this.bitField0_ |= 0x2; + this.wgs84PosLat_ = input.readDouble(); + break; + case 25: + this.bitField0_ |= 0x4; + this.wgs84PosLong_ = input.readDouble(); + break; + case 37: + this.bitField0_ |= 0x8; + this.timeOfDay_ = input.readFloat(); + break; + case 40: + rawValue = input.readEnum(); + cNF = CNF.valueOf(String.valueOf(rawValue)); + if (cNF == null) { + unknownFields.mergeVarintField(5, rawValue); + break; + } + this.bitField0_ |= 0x10; + this.trackType_ = cNF; + break; + case 48: + this.bitField0_ |= 0x20; + this.trackLastReport_ = input.readBool(); + break; + case 56: + rawValue = input.readEnum(); + cST = CST.valueOf(String.valueOf(rawValue)); + if (cST == null) { + unknownFields.mergeVarintField(7, rawValue); + break; + } + this.bitField0_ |= 0x40; + this.extrapolation_ = cST; + break; + case 64: + rawValue = input.readEnum(); + value = STH.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(8, rawValue); + break; + } + this.bitField0_ |= 0x80; + this.trackPositionCode_ = value; + break; + case 73: + this.bitField0_ |= 0x100; + this.cog_ = input.readDouble(); + break; + case 81: + this.bitField0_ |= 0x200; + this.sog_ = input.readDouble(); + break; + case 88: + this.bitField0_ |= 0x400; + this.uTC_ = input.readUInt64(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarHistoryTrack.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public RadarHistoryTrack parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new RadarHistoryTrack(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRACKNUMBER_FIELD_NUMBER = 1; + + private int trackNumber_; + + public static final int WGS84POSLAT_FIELD_NUMBER = 2; + + private double wgs84PosLat_; + + public static final int WGS84POSLONG_FIELD_NUMBER = 3; + + private double wgs84PosLong_; + + public static final int TIMEOFDAY_FIELD_NUMBER = 4; + + private float timeOfDay_; + + public static final int TRACKTYPE_FIELD_NUMBER = 5; + + private CNF trackType_; + + public static final int TRACKLASTREPORT_FIELD_NUMBER = 6; + + private boolean trackLastReport_; + + public static final int EXTRAPOLATION_FIELD_NUMBER = 7; + + private CST extrapolation_; + + public static final int TRACKPOSITIONCODE_FIELD_NUMBER = 8; + + private STH trackPositionCode_; + + public static final int COG_FIELD_NUMBER = 9; + + private double cog_; + + public static final int SOG_FIELD_NUMBER = 10; + + private double sog_; + + public static final int UTC_FIELD_NUMBER = 11; + + private long uTC_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public boolean hasWgs84PosLat() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getWgs84PosLat() { + return this.wgs84PosLat_; + } + + public boolean hasWgs84PosLong() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getWgs84PosLong() { + return this.wgs84PosLong_; + } + + public boolean hasTimeOfDay() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getTimeOfDay() { + return this.timeOfDay_; + } + + public boolean hasTrackType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public CNF getTrackType() { + return this.trackType_; + } + + public boolean hasTrackLastReport() { + return ((this.bitField0_ & 0x20) == 32); + } + + public boolean getTrackLastReport() { + return this.trackLastReport_; + } + + public boolean hasExtrapolation() { + return ((this.bitField0_ & 0x40) == 64); + } + + public CST getExtrapolation() { + return this.extrapolation_; + } + + public boolean hasTrackPositionCode() { + return ((this.bitField0_ & 0x80) == 128); + } + + public STH getTrackPositionCode() { + return this.trackPositionCode_; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getCog() { + return this.cog_; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x200) == 512); + } + + public double getSog() { + return this.sog_; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public long getUTC() { + return this.uTC_; + } + + private void initFields() { + this.trackNumber_ = 0; + this.wgs84PosLat_ = 0.0D; + this.wgs84PosLong_ = 0.0D; + this.timeOfDay_ = 0.0F; + this.trackType_ = CNF.CONFIRMED_TRACK; + this.trackLastReport_ = false; + this.extrapolation_ = CST.CST_UNDEFINED; + this.trackPositionCode_ = STH.MEASURED_POSITION; + this.cog_ = 0.0D; + this.sog_ = 0.0D; + this.uTC_ = 0L; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTrackNumber()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasWgs84PosLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasWgs84PosLong()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTimeOfDay()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeUInt32(1, this.trackNumber_); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.wgs84PosLat_); + if ((this.bitField0_ & 0x4) == 4) + output.writeDouble(3, this.wgs84PosLong_); + if ((this.bitField0_ & 0x8) == 8) + output.writeFloat(4, this.timeOfDay_); + if ((this.bitField0_ & 0x10) == 16) + output.writeEnum(5, this.trackType_.getNumber()); + if ((this.bitField0_ & 0x20) == 32) + output.writeBool(6, this.trackLastReport_); + if ((this.bitField0_ & 0x40) == 64) + output.writeEnum(7, this.extrapolation_.getNumber()); + if ((this.bitField0_ & 0x80) == 128) + output.writeEnum(8, this.trackPositionCode_.getNumber()); + if ((this.bitField0_ & 0x100) == 256) + output.writeDouble(9, this.cog_); + if ((this.bitField0_ & 0x200) == 512) + output.writeDouble(10, this.sog_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeUInt64(11, this.uTC_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeUInt32Size(1, this.trackNumber_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.wgs84PosLat_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeDoubleSize(3, this.wgs84PosLong_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeFloatSize(4, this.timeOfDay_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeEnumSize(5, this.trackType_.getNumber()); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeBoolSize(6, this.trackLastReport_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeEnumSize(7, this.extrapolation_.getNumber()); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeEnumSize(8, this.trackPositionCode_.getNumber()); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeDoubleSize(9, this.cog_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeDoubleSize(10, this.sog_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeUInt64Size(11, this.uTC_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static RadarHistoryTrack parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (RadarHistoryTrack)PARSER.parseFrom(data); + } + + public static RadarHistoryTrack parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarHistoryTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarHistoryTrack parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (RadarHistoryTrack)PARSER.parseFrom(data); + } + + public static RadarHistoryTrack parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarHistoryTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarHistoryTrack parseFrom(InputStream input) throws IOException { + return (RadarHistoryTrack)PARSER.parseFrom(input); + } + + public static RadarHistoryTrack parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarHistoryTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static RadarHistoryTrack parseDelimitedFrom(InputStream input) throws IOException { + return (RadarHistoryTrack)PARSER.parseDelimitedFrom(input); + } + + public static RadarHistoryTrack parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarHistoryTrack)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static RadarHistoryTrack parseFrom(CodedInputStream input) throws IOException { + return (RadarHistoryTrack)PARSER.parseFrom(input); + } + + public static RadarHistoryTrack parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarHistoryTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(RadarHistoryTrack prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements RadarHistoryTrackOrBuilder { + private int bitField0_; + + private int trackNumber_; + + private double wgs84PosLat_; + + private double wgs84PosLong_; + + private float timeOfDay_; + + private CNF trackType_; + + private boolean trackLastReport_; + + private CST extrapolation_; + + private STH trackPositionCode_; + + private double cog_; + + private double sog_; + + private long uTC_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarHistoryTrack.class, Builder.class); + } + + private Builder() { + this.trackType_ = CNF.CONFIRMED_TRACK; + this.extrapolation_ = CST.CST_UNDEFINED; + this.trackPositionCode_ = STH.MEASURED_POSITION; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.trackType_ = CNF.CONFIRMED_TRACK; + this.extrapolation_ = CST.CST_UNDEFINED; + this.trackPositionCode_ = STH.MEASURED_POSITION; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = RadarHistoryTrack.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.trackNumber_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.wgs84PosLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.wgs84PosLong_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFB; + this.timeOfDay_ = 0.0F; + this.bitField0_ &= 0xFFFFFFF7; + this.trackType_ = CNF.CONFIRMED_TRACK; + this.bitField0_ &= 0xFFFFFFEF; + this.trackLastReport_ = false; + this.bitField0_ &= 0xFFFFFFDF; + this.extrapolation_ = CST.CST_UNDEFINED; + this.bitField0_ &= 0xFFFFFFBF; + this.trackPositionCode_ = STH.MEASURED_POSITION; + this.bitField0_ &= 0xFFFFFF7F; + this.cog_ = 0.0D; + this.bitField0_ &= 0xFFFFFEFF; + this.sog_ = 0.0D; + this.bitField0_ &= 0xFFFFFDFF; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFBFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_descriptor; + } + + public RadarHistoryTrack getDefaultInstanceForType() { + return RadarHistoryTrack.getDefaultInstance(); + } + + public RadarHistoryTrack build() { + RadarHistoryTrack result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public RadarHistoryTrack buildPartial() { + RadarHistoryTrack result = new RadarHistoryTrack(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.trackNumber_ = this.trackNumber_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.wgs84PosLat_ = this.wgs84PosLat_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.wgs84PosLong_ = this.wgs84PosLong_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.timeOfDay_ = this.timeOfDay_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.trackType_ = this.trackType_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.trackLastReport_ = this.trackLastReport_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.extrapolation_ = this.extrapolation_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.trackPositionCode_ = this.trackPositionCode_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.cog_ = this.cog_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.sog_ = this.sog_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.uTC_ = this.uTC_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof RadarHistoryTrack) + return mergeFrom((RadarHistoryTrack)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(RadarHistoryTrack other) { + if (other == RadarHistoryTrack.getDefaultInstance()) + return this; + if (other.hasTrackNumber()) + setTrackNumber(other.getTrackNumber()); + if (other.hasWgs84PosLat()) + setWgs84PosLat(other.getWgs84PosLat()); + if (other.hasWgs84PosLong()) + setWgs84PosLong(other.getWgs84PosLong()); + if (other.hasTimeOfDay()) + setTimeOfDay(other.getTimeOfDay()); + if (other.hasTrackType()) + setTrackType(other.getTrackType()); + if (other.hasTrackLastReport()) + setTrackLastReport(other.getTrackLastReport()); + if (other.hasExtrapolation()) + setExtrapolation(other.getExtrapolation()); + if (other.hasTrackPositionCode()) + setTrackPositionCode(other.getTrackPositionCode()); + if (other.hasCog()) + setCog(other.getCog()); + if (other.hasSog()) + setSog(other.getSog()); + if (other.hasUTC()) + setUTC(other.getUTC()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTrackNumber()) + return false; + if (!hasWgs84PosLat()) + return false; + if (!hasWgs84PosLong()) + return false; + if (!hasTimeOfDay()) + return false; + if (!hasCog()) + return false; + if (!hasSog()) + return false; + if (!hasUTC()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + RadarHistoryTrack parsedMessage = null; + try { + parsedMessage = (RadarHistoryTrack) RadarHistoryTrack.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (RadarHistoryTrack)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public Builder setTrackNumber(int value) { + this.bitField0_ |= 0x1; + this.trackNumber_ = value; + onChanged(); + return this; + } + + public Builder clearTrackNumber() { + this.bitField0_ &= 0xFFFFFFFE; + this.trackNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasWgs84PosLat() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getWgs84PosLat() { + return this.wgs84PosLat_; + } + + public Builder setWgs84PosLat(double value) { + this.bitField0_ |= 0x2; + this.wgs84PosLat_ = value; + onChanged(); + return this; + } + + public Builder clearWgs84PosLat() { + this.bitField0_ &= 0xFFFFFFFD; + this.wgs84PosLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWgs84PosLong() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getWgs84PosLong() { + return this.wgs84PosLong_; + } + + public Builder setWgs84PosLong(double value) { + this.bitField0_ |= 0x4; + this.wgs84PosLong_ = value; + onChanged(); + return this; + } + + public Builder clearWgs84PosLong() { + this.bitField0_ &= 0xFFFFFFFB; + this.wgs84PosLong_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTimeOfDay() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getTimeOfDay() { + return this.timeOfDay_; + } + + public Builder setTimeOfDay(float value) { + this.bitField0_ |= 0x8; + this.timeOfDay_ = value; + onChanged(); + return this; + } + + public Builder clearTimeOfDay() { + this.bitField0_ &= 0xFFFFFFF7; + this.timeOfDay_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasTrackType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public CNF getTrackType() { + return this.trackType_; + } + + public Builder setTrackType(CNF value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.trackType_ = value; + onChanged(); + return this; + } + + public Builder clearTrackType() { + this.bitField0_ &= 0xFFFFFFEF; + this.trackType_ = CNF.CONFIRMED_TRACK; + onChanged(); + return this; + } + + public boolean hasTrackLastReport() { + return ((this.bitField0_ & 0x20) == 32); + } + + public boolean getTrackLastReport() { + return this.trackLastReport_; + } + + public Builder setTrackLastReport(boolean value) { + this.bitField0_ |= 0x20; + this.trackLastReport_ = value; + onChanged(); + return this; + } + + public Builder clearTrackLastReport() { + this.bitField0_ &= 0xFFFFFFDF; + this.trackLastReport_ = false; + onChanged(); + return this; + } + + public boolean hasExtrapolation() { + return ((this.bitField0_ & 0x40) == 64); + } + + public CST getExtrapolation() { + return this.extrapolation_; + } + + public Builder setExtrapolation(CST value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40; + this.extrapolation_ = value; + onChanged(); + return this; + } + + public Builder clearExtrapolation() { + this.bitField0_ &= 0xFFFFFFBF; + this.extrapolation_ = CST.CST_UNDEFINED; + onChanged(); + return this; + } + + public boolean hasTrackPositionCode() { + return ((this.bitField0_ & 0x80) == 128); + } + + public STH getTrackPositionCode() { + return this.trackPositionCode_; + } + + public Builder setTrackPositionCode(STH value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.trackPositionCode_ = value; + onChanged(); + return this; + } + + public Builder clearTrackPositionCode() { + this.bitField0_ &= 0xFFFFFF7F; + this.trackPositionCode_ = STH.MEASURED_POSITION; + onChanged(); + return this; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x100) == 256); + } + + public double getCog() { + return this.cog_; + } + + public Builder setCog(double value) { + this.bitField0_ |= 0x100; + this.cog_ = value; + onChanged(); + return this; + } + + public Builder clearCog() { + this.bitField0_ &= 0xFFFFFEFF; + this.cog_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x200) == 512); + } + + public double getSog() { + return this.sog_; + } + + public Builder setSog(double value) { + this.bitField0_ |= 0x200; + this.sog_ = value; + onChanged(); + return this; + } + + public Builder clearSog() { + this.bitField0_ &= 0xFFFFFDFF; + this.sog_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x400; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFBFF; + this.uTC_ = 0L; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class RadarHistoryTracks extends GeneratedMessage implements RadarHistoryTracksOrBuilder { + private static final RadarHistoryTracks defaultInstance = new RadarHistoryTracks(true); + + private final UnknownFieldSet unknownFields; + + private RadarHistoryTracks(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private RadarHistoryTracks(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static RadarHistoryTracks getDefaultInstance() { + return defaultInstance; + } + + public RadarHistoryTracks getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RadarHistoryTracks(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.tracks_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.tracks_.add((RadarHistoryTrack)input.readMessage(RadarHistoryTrack.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.tracks_ = Collections.unmodifiableList(this.tracks_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarHistoryTracks.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public RadarHistoryTracks parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new RadarHistoryTracks(input, extensionRegistry); + } + }; + + public static final int TRACKS_FIELD_NUMBER = 1; + + private List tracks_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getTracksList() { + return this.tracks_; + } + + public List getTracksOrBuilderList() { + return (List)this.tracks_; + } + + public int getTracksCount() { + return this.tracks_.size(); + } + + public RadarHistoryTrack getTracks(int index) { + return this.tracks_.get(index); + } + + public RadarHistoryTrackOrBuilder getTracksOrBuilder(int index) { + return this.tracks_.get(index); + } + + private void initFields() { + this.tracks_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getTracksCount(); i++) { + if (!getTracks(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.tracks_.size(); i++) + output.writeMessage(1, (MessageLite)this.tracks_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.tracks_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.tracks_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static RadarHistoryTracks parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (RadarHistoryTracks)PARSER.parseFrom(data); + } + + public static RadarHistoryTracks parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarHistoryTracks)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarHistoryTracks parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (RadarHistoryTracks)PARSER.parseFrom(data); + } + + public static RadarHistoryTracks parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarHistoryTracks)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarHistoryTracks parseFrom(InputStream input) throws IOException { + return (RadarHistoryTracks)PARSER.parseFrom(input); + } + + public static RadarHistoryTracks parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarHistoryTracks)PARSER.parseFrom(input, extensionRegistry); + } + + public static RadarHistoryTracks parseDelimitedFrom(InputStream input) throws IOException { + return (RadarHistoryTracks)PARSER.parseDelimitedFrom(input); + } + + public static RadarHistoryTracks parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarHistoryTracks)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static RadarHistoryTracks parseFrom(CodedInputStream input) throws IOException { + return (RadarHistoryTracks)PARSER.parseFrom(input); + } + + public static RadarHistoryTracks parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarHistoryTracks)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(RadarHistoryTracks prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements RadarHistoryTracksOrBuilder { + private int bitField0_; + + private List tracks_; + + private RepeatedFieldBuilder tracksBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarHistoryTracks.class, Builder.class); + } + + private Builder() { + this.tracks_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.tracks_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (RadarHistoryTracks.alwaysUseFieldBuilders) + getTracksFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.tracksBuilder_ == null) { + this.tracks_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.tracksBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_descriptor; + } + + public RadarHistoryTracks getDefaultInstanceForType() { + return RadarHistoryTracks.getDefaultInstance(); + } + + public RadarHistoryTracks build() { + RadarHistoryTracks result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public RadarHistoryTracks buildPartial() { + RadarHistoryTracks result = new RadarHistoryTracks(this); + int from_bitField0_ = this.bitField0_; + if (this.tracksBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.tracks_ = Collections.unmodifiableList(this.tracks_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.tracks_ = this.tracks_; + } else { + result.tracks_ = this.tracksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof RadarHistoryTracks) + return mergeFrom((RadarHistoryTracks)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(RadarHistoryTracks other) { + if (other == RadarHistoryTracks.getDefaultInstance()) + return this; + if (this.tracksBuilder_ == null) { + if (!other.tracks_.isEmpty()) { + if (this.tracks_.isEmpty()) { + this.tracks_ = other.tracks_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureTracksIsMutable(); + this.tracks_.addAll(other.tracks_); + } + onChanged(); + } + } else if (!other.tracks_.isEmpty()) { + if (this.tracksBuilder_.isEmpty()) { + this.tracksBuilder_.dispose(); + this.tracksBuilder_ = null; + this.tracks_ = other.tracks_; + this.bitField0_ &= 0xFFFFFFFE; + this.tracksBuilder_ = RadarHistoryTracks.alwaysUseFieldBuilders ? getTracksFieldBuilder() : null; + } else { + this.tracksBuilder_.addAllMessages(other.tracks_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTracksCount(); i++) { + if (!getTracks(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + RadarHistoryTracks parsedMessage = null; + try { + parsedMessage = (RadarHistoryTracks) RadarHistoryTracks.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (RadarHistoryTracks)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureTracksIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.tracks_ = new ArrayList(this.tracks_); + this.bitField0_ |= 0x1; + } + } + + public List getTracksList() { + if (this.tracksBuilder_ == null) + return Collections.unmodifiableList(this.tracks_); + return this.tracksBuilder_.getMessageList(); + } + + public int getTracksCount() { + if (this.tracksBuilder_ == null) + return this.tracks_.size(); + return this.tracksBuilder_.getCount(); + } + + public RadarHistoryTrack getTracks(int index) { + if (this.tracksBuilder_ == null) + return this.tracks_.get(index); + return (RadarHistoryTrack)this.tracksBuilder_.getMessage(index); + } + + public Builder setTracks(int index, RadarHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.set(index, value); + onChanged(); + } else { + this.tracksBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setTracks(int index, RadarHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.set(index, builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addTracks(RadarHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.add(value); + onChanged(); + } else { + this.tracksBuilder_.addMessage(value); + } + return this; + } + + public Builder addTracks(int index, RadarHistoryTrack value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTracksIsMutable(); + this.tracks_.add(index, value); + onChanged(); + } else { + this.tracksBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addTracks(RadarHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.add(builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addTracks(int index, RadarHistoryTrack.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.add(index, builderForValue.build()); + onChanged(); + } else { + this.tracksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllTracks(Iterable values) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.tracks_); + onChanged(); + } else { + this.tracksBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearTracks() { + if (this.tracksBuilder_ == null) { + this.tracks_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.tracksBuilder_.clear(); + } + return this; + } + + public Builder removeTracks(int index) { + if (this.tracksBuilder_ == null) { + ensureTracksIsMutable(); + this.tracks_.remove(index); + onChanged(); + } else { + this.tracksBuilder_.remove(index); + } + return this; + } + + public RadarHistoryTrack.Builder getTracksBuilder(int index) { + return (RadarHistoryTrack.Builder)getTracksFieldBuilder().getBuilder(index); + } + + public RadarHistoryTrackOrBuilder getTracksOrBuilder(int index) { + if (this.tracksBuilder_ == null) + return this.tracks_.get(index); + return (RadarHistoryTrackOrBuilder)this.tracksBuilder_.getMessageOrBuilder(index); + } + + public List getTracksOrBuilderList() { + if (this.tracksBuilder_ != null) + return this.tracksBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.tracks_); + } + + public RadarHistoryTrack.Builder addTracksBuilder() { + return (RadarHistoryTrack.Builder)getTracksFieldBuilder().addBuilder(RadarHistoryTrack.getDefaultInstance()); + } + + public RadarHistoryTrack.Builder addTracksBuilder(int index) { + return (RadarHistoryTrack.Builder)getTracksFieldBuilder().addBuilder(index, RadarHistoryTrack.getDefaultInstance()); + } + + public List getTracksBuilderList() { + return getTracksFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getTracksFieldBuilder() { + if (this.tracksBuilder_ == null) { + this.tracksBuilder_ = new RepeatedFieldBuilder(this.tracks_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.tracks_ = null; + } + return this.tracksBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class TrackPoint extends GeneratedMessage implements TrackPointOrBuilder { + private static final TrackPoint defaultInstance = new TrackPoint(true); + + private final UnknownFieldSet unknownFields; + + private TrackPoint(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private TrackPoint(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static TrackPoint getDefaultInstance() { + return defaultInstance; + } + + public TrackPoint getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TrackPoint(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + int mutable_bitField1_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int rawValue; + RadarHistoryTracks.Builder subBuilder; + ByteString bs; + MSGTYP mSGTYP; + CNF cNF; + CST cST; + STH value; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.systemAreaCode_ = input.readInt32(); + break; + case 16: + this.bitField0_ |= 0x2; + this.systemIdentificationCode_ = input.readInt32(); + break; + case 24: + rawValue = input.readEnum(); + mSGTYP = MSGTYP.valueOf(String.valueOf(rawValue)); + if (mSGTYP == null) { + unknownFields.mergeVarintField(3, rawValue); + break; + } + this.bitField0_ |= 0x4; + this.messageType_ = mSGTYP; + break; + case 32: + this.bitField0_ |= 0x8; + this.trackNumber_ = input.readUInt32(); + break; + case 45: + this.bitField0_ |= 0x10; + this.cartesianPosX_ = input.readFloat(); + break; + case 53: + this.bitField0_ |= 0x20; + this.cartesianPosY_ = input.readFloat(); + break; + case 57: + this.bitField0_ |= 0x40; + this.wgs84PosLat_ = input.readDouble(); + break; + case 65: + this.bitField0_ |= 0x80; + this.wgs84PosLong_ = input.readDouble(); + break; + case 77: + this.bitField0_ |= 0x100; + this.timeOfDay_ = input.readFloat(); + break; + case 80: + rawValue = input.readEnum(); + cNF = CNF.valueOf(String.valueOf(rawValue)); + if (cNF == null) { + unknownFields.mergeVarintField(10, rawValue); + break; + } + this.bitField0_ |= 0x200; + this.trackType_ = cNF; + break; + case 88: + this.bitField0_ |= 0x400; + this.trackLastReport_ = input.readBool(); + break; + case 96: + rawValue = input.readEnum(); + cST = CST.valueOf(String.valueOf(rawValue)); + if (cST == null) { + unknownFields.mergeVarintField(12, rawValue); + break; + } + this.bitField0_ |= 0x800; + this.extrapolation_ = cST; + break; + case 104: + rawValue = input.readEnum(); + value = STH.valueOf(String.valueOf(rawValue)); + if (value == null) { + unknownFields.mergeVarintField(13, rawValue); + break; + } + this.bitField0_ |= 0x1000; + this.trackPositionCode_ = value; + break; + case 117: + this.bitField0_ |= 0x2000; + this.sigmaX_ = input.readFloat(); + break; + case 125: + this.bitField0_ |= 0x4000; + this.sigmaY_ = input.readFloat(); + break; + case 133: + this.bitField0_ |= 0x8000; + this.sigmaXY_ = input.readFloat(); + break; + case 141: + this.bitField0_ |= 0x10000; + this.ampOfPriPlot_ = input.readFloat(); + break; + case 145: + this.bitField0_ |= 0x20000; + this.cartesianTrkVelVx_ = input.readDouble(); + break; + case 153: + this.bitField0_ |= 0x40000; + this.cartesianTrkVelVy_ = input.readDouble(); + break; + case 161: + this.bitField0_ |= 0x80000; + this.cog_ = input.readDouble(); + break; + case 169: + this.bitField0_ |= 0x100000; + this.sog_ = input.readDouble(); + break; + case 178: + subBuilder = null; + if ((this.bitField0_ & 0x200000) == 2097152) + subBuilder = this.tracks_.toBuilder(); + this.tracks_ = (RadarHistoryTracks)input.readMessage(RadarHistoryTracks.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.tracks_); + this.tracks_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x200000; + break; + case 184: + this.bitField0_ |= 0x400000; + this.status_ = input.readInt32(); + break; + case 192: + this.bitField0_ |= 0x800000; + this.isSmuggle_ = input.readInt32(); + break; + case 201: + this.bitField0_ |= 0x1000000; + this.distance_ = input.readDouble(); + break; + case 210: + bs = input.readBytes(); + this.bitField0_ |= 0x2000000; + this.warnColor_ = bs; + break; + case 216: + this.bitField0_ |= 0x4000000; + this.targetType_ = input.readInt32(); + break; + case 224: + this.bitField0_ |= 0x8000000; + this.signWindow_ = input.readInt32(); + break; + case 232: + this.bitField0_ |= 0x10000000; + this.isWarn_ = input.readInt32(); + break; + case 242: + bs = input.readBytes(); + this.bitField0_ |= 0x20000000; + this.rtsp_ = bs; + break; + case 248: + this.bitField0_ |= 0x40000000; + this.fllow_ = input.readInt32(); + break; + case 256: + this.bitField0_ |= Integer.MIN_VALUE; + this.mode_ = input.readInt32(); + break; + case 264: + this.bitField1_ |= 0x1; + this.timeStamp_ = input.readInt64(); + break; + case 274: + bs = input.readBytes(); + this.bitField1_ |= 0x2; + this.trackby_ = bs; + break; + case 280: + this.bitField1_ |= 0x4; + this.cameraId_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_TrackPoint_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_TrackPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(TrackPoint.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public TrackPoint parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new TrackPoint(input, extensionRegistry); + } + }; + + private int bitField0_; + + private int bitField1_; + + public static final int SYSTEMAREACODE_FIELD_NUMBER = 1; + + private int systemAreaCode_; + + public static final int SYSTEMIDENTIFICATIONCODE_FIELD_NUMBER = 2; + + private int systemIdentificationCode_; + + public static final int MESSAGETYPE_FIELD_NUMBER = 3; + + private MSGTYP messageType_; + + public static final int TRACKNUMBER_FIELD_NUMBER = 4; + + private int trackNumber_; + + public static final int CARTESIANPOSX_FIELD_NUMBER = 5; + + private float cartesianPosX_; + + public static final int CARTESIANPOSY_FIELD_NUMBER = 6; + + private float cartesianPosY_; + + public static final int WGS84POSLAT_FIELD_NUMBER = 7; + + private double wgs84PosLat_; + + public static final int WGS84POSLONG_FIELD_NUMBER = 8; + + private double wgs84PosLong_; + + public static final int TIMEOFDAY_FIELD_NUMBER = 9; + + private float timeOfDay_; + + public static final int TRACKTYPE_FIELD_NUMBER = 10; + + private CNF trackType_; + + public static final int TRACKLASTREPORT_FIELD_NUMBER = 11; + + private boolean trackLastReport_; + + public static final int EXTRAPOLATION_FIELD_NUMBER = 12; + + private CST extrapolation_; + + public static final int TRACKPOSITIONCODE_FIELD_NUMBER = 13; + + private STH trackPositionCode_; + + public static final int SIGMAX_FIELD_NUMBER = 14; + + private float sigmaX_; + + public static final int SIGMAY_FIELD_NUMBER = 15; + + private float sigmaY_; + + public static final int SIGMAXY_FIELD_NUMBER = 16; + + private float sigmaXY_; + + public static final int AMPOFPRIPLOT_FIELD_NUMBER = 17; + + private float ampOfPriPlot_; + + public static final int CARTESIANTRKVEL_VX_FIELD_NUMBER = 18; + + private double cartesianTrkVelVx_; + + public static final int CARTESIANTRKVEL_VY_FIELD_NUMBER = 19; + + private double cartesianTrkVelVy_; + + public static final int COG_FIELD_NUMBER = 20; + + private double cog_; + + public static final int SOG_FIELD_NUMBER = 21; + + private double sog_; + + public static final int TRACKS_FIELD_NUMBER = 22; + + private RadarHistoryTracks tracks_; + + public static final int STATUS_FIELD_NUMBER = 23; + + private int status_; + + public static final int ISSMUGGLE_FIELD_NUMBER = 24; + + private int isSmuggle_; + + public static final int DISTANCE_FIELD_NUMBER = 25; + + private double distance_; + + public static final int WARN_COLOR_FIELD_NUMBER = 26; + + private Object warnColor_; + + public static final int TARGETTYPE_FIELD_NUMBER = 27; + + private int targetType_; + + public static final int SIGN_WINDOW_FIELD_NUMBER = 28; + + private int signWindow_; + + public static final int IS_WARN_FIELD_NUMBER = 29; + + private int isWarn_; + + public static final int RTSP_FIELD_NUMBER = 30; + + private Object rtsp_; + + public static final int FLLOW_FIELD_NUMBER = 31; + + private int fllow_; + + public static final int MODE_FIELD_NUMBER = 32; + + private int mode_; + + public static final int TIMESTAMP_FIELD_NUMBER = 33; + + private long timeStamp_; + + public static final int TRACKBY_FIELD_NUMBER = 34; + + private Object trackby_; + + public static final int CAMERAID_FIELD_NUMBER = 35; + + private int cameraId_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasSystemAreaCode() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getSystemAreaCode() { + return this.systemAreaCode_; + } + + public boolean hasSystemIdentificationCode() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getSystemIdentificationCode() { + return this.systemIdentificationCode_; + } + + public boolean hasMessageType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public MSGTYP getMessageType() { + return this.messageType_; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public boolean hasCartesianPosX() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getCartesianPosX() { + return this.cartesianPosX_; + } + + public boolean hasCartesianPosY() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getCartesianPosY() { + return this.cartesianPosY_; + } + + public boolean hasWgs84PosLat() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getWgs84PosLat() { + return this.wgs84PosLat_; + } + + public boolean hasWgs84PosLong() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getWgs84PosLong() { + return this.wgs84PosLong_; + } + + public boolean hasTimeOfDay() { + return ((this.bitField0_ & 0x100) == 256); + } + + public float getTimeOfDay() { + return this.timeOfDay_; + } + + public boolean hasTrackType() { + return ((this.bitField0_ & 0x200) == 512); + } + + public CNF getTrackType() { + return this.trackType_; + } + + public boolean hasTrackLastReport() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public boolean getTrackLastReport() { + return this.trackLastReport_; + } + + public boolean hasExtrapolation() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public CST getExtrapolation() { + return this.extrapolation_; + } + + public boolean hasTrackPositionCode() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public STH getTrackPositionCode() { + return this.trackPositionCode_; + } + + public boolean hasSigmaX() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getSigmaX() { + return this.sigmaX_; + } + + public boolean hasSigmaY() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getSigmaY() { + return this.sigmaY_; + } + + public boolean hasSigmaXY() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getSigmaXY() { + return this.sigmaXY_; + } + + public boolean hasAmpOfPriPlot() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getAmpOfPriPlot() { + return this.ampOfPriPlot_; + } + + public boolean hasCartesianTrkVelVx() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public double getCartesianTrkVelVx() { + return this.cartesianTrkVelVx_; + } + + public boolean hasCartesianTrkVelVy() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public double getCartesianTrkVelVy() { + return this.cartesianTrkVelVy_; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getCog() { + return this.cog_; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public double getSog() { + return this.sog_; + } + + public boolean hasTracks() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public RadarHistoryTracks getTracks() { + return this.tracks_; + } + + public RadarHistoryTracksOrBuilder getTracksOrBuilder() { + return this.tracks_; + } + + public boolean hasStatus() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public int getStatus() { + return this.status_; + } + + public boolean hasIsSmuggle() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public int getIsSmuggle() { + return this.isSmuggle_; + } + + public boolean hasDistance() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public double getDistance() { + return this.distance_; + } + + public boolean hasWarnColor() { + return ((this.bitField0_ & 0x2000000) == 33554432); + } + + public String getWarnColor() { + Object ref = this.warnColor_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnColor_ = s; + return s; + } + + public ByteString getWarnColorBytes() { + Object ref = this.warnColor_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnColor_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasTargetType() { + return ((this.bitField0_ & 0x4000000) == 67108864); + } + + public int getTargetType() { + return this.targetType_; + } + + public boolean hasSignWindow() { + return ((this.bitField0_ & 0x8000000) == 134217728); + } + + public int getSignWindow() { + return this.signWindow_; + } + + public boolean hasIsWarn() { + return ((this.bitField0_ & 0x10000000) == 268435456); + } + + public int getIsWarn() { + return this.isWarn_; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x20000000) == 536870912); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasFllow() { + return ((this.bitField0_ & 0x40000000) == 1073741824); + } + + public int getFllow() { + return this.fllow_; + } + + public boolean hasMode() { + return ((this.bitField0_ & Integer.MIN_VALUE) == Integer.MIN_VALUE); + } + + public int getMode() { + return this.mode_; + } + + public boolean hasTimeStamp() { + return ((this.bitField1_ & 0x1) == 1); + } + + public long getTimeStamp() { + return this.timeStamp_; + } + + public boolean hasTrackby() { + return ((this.bitField1_ & 0x2) == 2); + } + + public String getTrackby() { + Object ref = this.trackby_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.trackby_ = s; + return s; + } + + public ByteString getTrackbyBytes() { + Object ref = this.trackby_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.trackby_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField1_ & 0x4) == 4); + } + + public int getCameraId() { + return this.cameraId_; + } + + private void initFields() { + this.systemAreaCode_ = 0; + this.systemIdentificationCode_ = 0; + this.messageType_ = MSGTYP.MSGTYP_UNDEFINED; + this.trackNumber_ = 0; + this.cartesianPosX_ = 0.0F; + this.cartesianPosY_ = 0.0F; + this.wgs84PosLat_ = 0.0D; + this.wgs84PosLong_ = 0.0D; + this.timeOfDay_ = 0.0F; + this.trackType_ = CNF.CONFIRMED_TRACK; + this.trackLastReport_ = false; + this.extrapolation_ = CST.CST_UNDEFINED; + this.trackPositionCode_ = STH.MEASURED_POSITION; + this.sigmaX_ = 0.0F; + this.sigmaY_ = 0.0F; + this.sigmaXY_ = 0.0F; + this.ampOfPriPlot_ = 0.0F; + this.cartesianTrkVelVx_ = 0.0D; + this.cartesianTrkVelVy_ = 0.0D; + this.cog_ = 0.0D; + this.sog_ = 0.0D; + this.tracks_ = RadarHistoryTracks.getDefaultInstance(); + this.status_ = 0; + this.isSmuggle_ = 0; + this.distance_ = 0.0D; + this.warnColor_ = ""; + this.targetType_ = 0; + this.signWindow_ = 0; + this.isWarn_ = 0; + this.rtsp_ = ""; + this.fllow_ = 0; + this.mode_ = 0; + this.timeStamp_ = 0L; + this.trackby_ = ""; + this.cameraId_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasSystemAreaCode()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSystemIdentificationCode()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMessageType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTrackNumber()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCartesianPosX()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCartesianPosY()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasWgs84PosLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasWgs84PosLong()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTimeOfDay()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCartesianTrkVelVx()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCartesianTrkVelVy()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSog()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasTracks() && !getTracks().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.systemAreaCode_); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.systemIdentificationCode_); + if ((this.bitField0_ & 0x4) == 4) + output.writeEnum(3, this.messageType_.getNumber()); + if ((this.bitField0_ & 0x8) == 8) + output.writeUInt32(4, this.trackNumber_); + if ((this.bitField0_ & 0x10) == 16) + output.writeFloat(5, this.cartesianPosX_); + if ((this.bitField0_ & 0x20) == 32) + output.writeFloat(6, this.cartesianPosY_); + if ((this.bitField0_ & 0x40) == 64) + output.writeDouble(7, this.wgs84PosLat_); + if ((this.bitField0_ & 0x80) == 128) + output.writeDouble(8, this.wgs84PosLong_); + if ((this.bitField0_ & 0x100) == 256) + output.writeFloat(9, this.timeOfDay_); + if ((this.bitField0_ & 0x200) == 512) + output.writeEnum(10, this.trackType_.getNumber()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeBool(11, this.trackLastReport_); + if ((this.bitField0_ & 0x800) == 2048) + output.writeEnum(12, this.extrapolation_.getNumber()); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeEnum(13, this.trackPositionCode_.getNumber()); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeFloat(14, this.sigmaX_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeFloat(15, this.sigmaY_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeFloat(16, this.sigmaXY_); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeFloat(17, this.ampOfPriPlot_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeDouble(18, this.cartesianTrkVelVx_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeDouble(19, this.cartesianTrkVelVy_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeDouble(20, this.cog_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeDouble(21, this.sog_); + if ((this.bitField0_ & 0x200000) == 2097152) + output.writeMessage(22, (MessageLite)this.tracks_); + if ((this.bitField0_ & 0x400000) == 4194304) + output.writeInt32(23, this.status_); + if ((this.bitField0_ & 0x800000) == 8388608) + output.writeInt32(24, this.isSmuggle_); + if ((this.bitField0_ & 0x1000000) == 16777216) + output.writeDouble(25, this.distance_); + if ((this.bitField0_ & 0x2000000) == 33554432) + output.writeBytes(26, getWarnColorBytes()); + if ((this.bitField0_ & 0x4000000) == 67108864) + output.writeInt32(27, this.targetType_); + if ((this.bitField0_ & 0x8000000) == 134217728) + output.writeInt32(28, this.signWindow_); + if ((this.bitField0_ & 0x10000000) == 268435456) + output.writeInt32(29, this.isWarn_); + if ((this.bitField0_ & 0x20000000) == 536870912) + output.writeBytes(30, getRtspBytes()); + if ((this.bitField0_ & 0x40000000) == 1073741824) + output.writeInt32(31, this.fllow_); + if ((this.bitField0_ & Integer.MIN_VALUE) == Integer.MIN_VALUE) + output.writeInt32(32, this.mode_); + if ((this.bitField1_ & 0x1) == 1) + output.writeInt64(33, this.timeStamp_); + if ((this.bitField1_ & 0x2) == 2) + output.writeBytes(34, getTrackbyBytes()); + if ((this.bitField1_ & 0x4) == 4) + output.writeInt32(35, this.cameraId_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.systemAreaCode_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.systemIdentificationCode_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeEnumSize(3, this.messageType_.getNumber()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeUInt32Size(4, this.trackNumber_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeFloatSize(5, this.cartesianPosX_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeFloatSize(6, this.cartesianPosY_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeDoubleSize(7, this.wgs84PosLat_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeDoubleSize(8, this.wgs84PosLong_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeFloatSize(9, this.timeOfDay_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeEnumSize(10, this.trackType_.getNumber()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeBoolSize(11, this.trackLastReport_); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeEnumSize(12, this.extrapolation_.getNumber()); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeEnumSize(13, this.trackPositionCode_.getNumber()); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeFloatSize(14, this.sigmaX_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeFloatSize(15, this.sigmaY_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeFloatSize(16, this.sigmaXY_); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeFloatSize(17, this.ampOfPriPlot_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeDoubleSize(18, this.cartesianTrkVelVx_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeDoubleSize(19, this.cartesianTrkVelVy_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeDoubleSize(20, this.cog_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeDoubleSize(21, this.sog_); + if ((this.bitField0_ & 0x200000) == 2097152) + size += CodedOutputStream.computeMessageSize(22, (MessageLite)this.tracks_); + if ((this.bitField0_ & 0x400000) == 4194304) + size += CodedOutputStream.computeInt32Size(23, this.status_); + if ((this.bitField0_ & 0x800000) == 8388608) + size += CodedOutputStream.computeInt32Size(24, this.isSmuggle_); + if ((this.bitField0_ & 0x1000000) == 16777216) + size += CodedOutputStream.computeDoubleSize(25, this.distance_); + if ((this.bitField0_ & 0x2000000) == 33554432) + size += CodedOutputStream.computeBytesSize(26, getWarnColorBytes()); + if ((this.bitField0_ & 0x4000000) == 67108864) + size += CodedOutputStream.computeInt32Size(27, this.targetType_); + if ((this.bitField0_ & 0x8000000) == 134217728) + size += CodedOutputStream.computeInt32Size(28, this.signWindow_); + if ((this.bitField0_ & 0x10000000) == 268435456) + size += CodedOutputStream.computeInt32Size(29, this.isWarn_); + if ((this.bitField0_ & 0x20000000) == 536870912) + size += CodedOutputStream.computeBytesSize(30, getRtspBytes()); + if ((this.bitField0_ & 0x40000000) == 1073741824) + size += CodedOutputStream.computeInt32Size(31, this.fllow_); + if ((this.bitField0_ & Integer.MIN_VALUE) == Integer.MIN_VALUE) + size += CodedOutputStream.computeInt32Size(32, this.mode_); + if ((this.bitField1_ & 0x1) == 1) + size += CodedOutputStream.computeInt64Size(33, this.timeStamp_); + if ((this.bitField1_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(34, getTrackbyBytes()); + if ((this.bitField1_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(35, this.cameraId_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static TrackPoint parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (TrackPoint)PARSER.parseFrom(data); + } + + public static TrackPoint parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (TrackPoint)PARSER.parseFrom(data, extensionRegistry); + } + + public static TrackPoint parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (TrackPoint)PARSER.parseFrom(data); + } + + public static TrackPoint parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (TrackPoint)PARSER.parseFrom(data, extensionRegistry); + } + + public static TrackPoint parseFrom(InputStream input) throws IOException { + return (TrackPoint)PARSER.parseFrom(input); + } + + public static TrackPoint parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (TrackPoint)PARSER.parseFrom(input, extensionRegistry); + } + + public static TrackPoint parseDelimitedFrom(InputStream input) throws IOException { + return (TrackPoint)PARSER.parseDelimitedFrom(input); + } + + public static TrackPoint parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (TrackPoint)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static TrackPoint parseFrom(CodedInputStream input) throws IOException { + return (TrackPoint)PARSER.parseFrom(input); + } + + public static TrackPoint parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (TrackPoint)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(TrackPoint prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements TrackPointOrBuilder { + private int bitField0_; + + private int bitField1_; + + private int systemAreaCode_; + + private int systemIdentificationCode_; + + private MSGTYP messageType_; + + private int trackNumber_; + + private float cartesianPosX_; + + private float cartesianPosY_; + + private double wgs84PosLat_; + + private double wgs84PosLong_; + + private float timeOfDay_; + + private CNF trackType_; + + private boolean trackLastReport_; + + private CST extrapolation_; + + private STH trackPositionCode_; + + private float sigmaX_; + + private float sigmaY_; + + private float sigmaXY_; + + private float ampOfPriPlot_; + + private double cartesianTrkVelVx_; + + private double cartesianTrkVelVy_; + + private double cog_; + + private double sog_; + + private RadarHistoryTracks tracks_; + + private SingleFieldBuilder tracksBuilder_; + + private int status_; + + private int isSmuggle_; + + private double distance_; + + private Object warnColor_; + + private int targetType_; + + private int signWindow_; + + private int isWarn_; + + private Object rtsp_; + + private int fllow_; + + private int mode_; + + private long timeStamp_; + + private Object trackby_; + + private int cameraId_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_TrackPoint_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_TrackPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(TrackPoint.class, Builder.class); + } + + private Builder() { + this.messageType_ = MSGTYP.MSGTYP_UNDEFINED; + this.trackType_ = CNF.CONFIRMED_TRACK; + this.extrapolation_ = CST.CST_UNDEFINED; + this.trackPositionCode_ = STH.MEASURED_POSITION; + this.tracks_ = RadarHistoryTracks.getDefaultInstance(); + this.warnColor_ = ""; + this.rtsp_ = ""; + this.trackby_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.messageType_ = MSGTYP.MSGTYP_UNDEFINED; + this.trackType_ = CNF.CONFIRMED_TRACK; + this.extrapolation_ = CST.CST_UNDEFINED; + this.trackPositionCode_ = STH.MEASURED_POSITION; + this.tracks_ = RadarHistoryTracks.getDefaultInstance(); + this.warnColor_ = ""; + this.rtsp_ = ""; + this.trackby_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (TrackPoint.alwaysUseFieldBuilders) + getTracksFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.systemAreaCode_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.systemIdentificationCode_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.messageType_ = MSGTYP.MSGTYP_UNDEFINED; + this.bitField0_ &= 0xFFFFFFFB; + this.trackNumber_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.cartesianPosX_ = 0.0F; + this.bitField0_ &= 0xFFFFFFEF; + this.cartesianPosY_ = 0.0F; + this.bitField0_ &= 0xFFFFFFDF; + this.wgs84PosLat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFBF; + this.wgs84PosLong_ = 0.0D; + this.bitField0_ &= 0xFFFFFF7F; + this.timeOfDay_ = 0.0F; + this.bitField0_ &= 0xFFFFFEFF; + this.trackType_ = CNF.CONFIRMED_TRACK; + this.bitField0_ &= 0xFFFFFDFF; + this.trackLastReport_ = false; + this.bitField0_ &= 0xFFFFFBFF; + this.extrapolation_ = CST.CST_UNDEFINED; + this.bitField0_ &= 0xFFFFF7FF; + this.trackPositionCode_ = STH.MEASURED_POSITION; + this.bitField0_ &= 0xFFFFEFFF; + this.sigmaX_ = 0.0F; + this.bitField0_ &= 0xFFFFDFFF; + this.sigmaY_ = 0.0F; + this.bitField0_ &= 0xFFFFBFFF; + this.sigmaXY_ = 0.0F; + this.bitField0_ &= 0xFFFF7FFF; + this.ampOfPriPlot_ = 0.0F; + this.bitField0_ &= 0xFFFEFFFF; + this.cartesianTrkVelVx_ = 0.0D; + this.bitField0_ &= 0xFFFDFFFF; + this.cartesianTrkVelVy_ = 0.0D; + this.bitField0_ &= 0xFFFBFFFF; + this.cog_ = 0.0D; + this.bitField0_ &= 0xFFF7FFFF; + this.sog_ = 0.0D; + this.bitField0_ &= 0xFFEFFFFF; + if (this.tracksBuilder_ == null) { + this.tracks_ = RadarHistoryTracks.getDefaultInstance(); + } else { + this.tracksBuilder_.clear(); + } + this.bitField0_ &= 0xFFDFFFFF; + this.status_ = 0; + this.bitField0_ &= 0xFFBFFFFF; + this.isSmuggle_ = 0; + this.bitField0_ &= 0xFF7FFFFF; + this.distance_ = 0.0D; + this.bitField0_ &= 0xFEFFFFFF; + this.warnColor_ = ""; + this.bitField0_ &= 0xFDFFFFFF; + this.targetType_ = 0; + this.bitField0_ &= 0xFBFFFFFF; + this.signWindow_ = 0; + this.bitField0_ &= 0xF7FFFFFF; + this.isWarn_ = 0; + this.bitField0_ &= 0xEFFFFFFF; + this.rtsp_ = ""; + this.bitField0_ &= 0xDFFFFFFF; + this.fllow_ = 0; + this.bitField0_ &= 0xBFFFFFFF; + this.mode_ = 0; + this.bitField0_ &= Integer.MAX_VALUE; + this.timeStamp_ = 0L; + this.bitField1_ &= 0xFFFFFFFE; + this.trackby_ = ""; + this.bitField1_ &= 0xFFFFFFFD; + this.cameraId_ = 0; + this.bitField1_ &= 0xFFFFFFFB; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_TrackPoint_descriptor; + } + + public TrackPoint getDefaultInstanceForType() { + return TrackPoint.getDefaultInstance(); + } + + public TrackPoint build() { + TrackPoint result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public TrackPoint buildPartial() { + TrackPoint result = new TrackPoint(this); + int from_bitField0_ = this.bitField0_; + int from_bitField1_ = this.bitField1_; + int to_bitField0_ = 0; + int to_bitField1_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.systemAreaCode_ = this.systemAreaCode_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.systemIdentificationCode_ = this.systemIdentificationCode_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.messageType_ = this.messageType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.trackNumber_ = this.trackNumber_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.cartesianPosX_ = this.cartesianPosX_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.cartesianPosY_ = this.cartesianPosY_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.wgs84PosLat_ = this.wgs84PosLat_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.wgs84PosLong_ = this.wgs84PosLong_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.timeOfDay_ = this.timeOfDay_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.trackType_ = this.trackType_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.trackLastReport_ = this.trackLastReport_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.extrapolation_ = this.extrapolation_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.trackPositionCode_ = this.trackPositionCode_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.sigmaX_ = this.sigmaX_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.sigmaY_ = this.sigmaY_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.sigmaXY_ = this.sigmaXY_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.ampOfPriPlot_ = this.ampOfPriPlot_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.cartesianTrkVelVx_ = this.cartesianTrkVelVx_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.cartesianTrkVelVy_ = this.cartesianTrkVelVy_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.cog_ = this.cog_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.sog_ = this.sog_; + if ((from_bitField0_ & 0x200000) == 2097152) + to_bitField0_ |= 0x200000; + if (this.tracksBuilder_ == null) { + result.tracks_ = this.tracks_; + } else { + result.tracks_ = (RadarHistoryTracks)this.tracksBuilder_.build(); + } + if ((from_bitField0_ & 0x400000) == 4194304) + to_bitField0_ |= 0x400000; + result.status_ = this.status_; + if ((from_bitField0_ & 0x800000) == 8388608) + to_bitField0_ |= 0x800000; + result.isSmuggle_ = this.isSmuggle_; + if ((from_bitField0_ & 0x1000000) == 16777216) + to_bitField0_ |= 0x1000000; + result.distance_ = this.distance_; + if ((from_bitField0_ & 0x2000000) == 33554432) + to_bitField0_ |= 0x2000000; + result.warnColor_ = this.warnColor_; + if ((from_bitField0_ & 0x4000000) == 67108864) + to_bitField0_ |= 0x4000000; + result.targetType_ = this.targetType_; + if ((from_bitField0_ & 0x8000000) == 134217728) + to_bitField0_ |= 0x8000000; + result.signWindow_ = this.signWindow_; + if ((from_bitField0_ & 0x10000000) == 268435456) + to_bitField0_ |= 0x10000000; + result.isWarn_ = this.isWarn_; + if ((from_bitField0_ & 0x20000000) == 536870912) + to_bitField0_ |= 0x20000000; + result.rtsp_ = this.rtsp_; + if ((from_bitField0_ & 0x40000000) == 1073741824) + to_bitField0_ |= 0x40000000; + result.fllow_ = this.fllow_; + if ((from_bitField0_ & Integer.MIN_VALUE) == Integer.MIN_VALUE) + to_bitField0_ |= Integer.MIN_VALUE; + result.mode_ = this.mode_; + if ((from_bitField1_ & 0x1) == 1) + to_bitField1_ |= 0x1; + result.timeStamp_ = this.timeStamp_; + if ((from_bitField1_ & 0x2) == 2) + to_bitField1_ |= 0x2; + result.trackby_ = this.trackby_; + if ((from_bitField1_ & 0x4) == 4) + to_bitField1_ |= 0x4; + result.cameraId_ = this.cameraId_; + result.bitField0_ = to_bitField0_; + result.bitField1_ = to_bitField1_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof TrackPoint) + return mergeFrom((TrackPoint)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(TrackPoint other) { + if (other == TrackPoint.getDefaultInstance()) + return this; + if (other.hasSystemAreaCode()) + setSystemAreaCode(other.getSystemAreaCode()); + if (other.hasSystemIdentificationCode()) + setSystemIdentificationCode(other.getSystemIdentificationCode()); + if (other.hasMessageType()) + setMessageType(other.getMessageType()); + if (other.hasTrackNumber()) + setTrackNumber(other.getTrackNumber()); + if (other.hasCartesianPosX()) + setCartesianPosX(other.getCartesianPosX()); + if (other.hasCartesianPosY()) + setCartesianPosY(other.getCartesianPosY()); + if (other.hasWgs84PosLat()) + setWgs84PosLat(other.getWgs84PosLat()); + if (other.hasWgs84PosLong()) + setWgs84PosLong(other.getWgs84PosLong()); + if (other.hasTimeOfDay()) + setTimeOfDay(other.getTimeOfDay()); + if (other.hasTrackType()) + setTrackType(other.getTrackType()); + if (other.hasTrackLastReport()) + setTrackLastReport(other.getTrackLastReport()); + if (other.hasExtrapolation()) + setExtrapolation(other.getExtrapolation()); + if (other.hasTrackPositionCode()) + setTrackPositionCode(other.getTrackPositionCode()); + if (other.hasSigmaX()) + setSigmaX(other.getSigmaX()); + if (other.hasSigmaY()) + setSigmaY(other.getSigmaY()); + if (other.hasSigmaXY()) + setSigmaXY(other.getSigmaXY()); + if (other.hasAmpOfPriPlot()) + setAmpOfPriPlot(other.getAmpOfPriPlot()); + if (other.hasCartesianTrkVelVx()) + setCartesianTrkVelVx(other.getCartesianTrkVelVx()); + if (other.hasCartesianTrkVelVy()) + setCartesianTrkVelVy(other.getCartesianTrkVelVy()); + if (other.hasCog()) + setCog(other.getCog()); + if (other.hasSog()) + setSog(other.getSog()); + if (other.hasTracks()) + mergeTracks(other.getTracks()); + if (other.hasStatus()) + setStatus(other.getStatus()); + if (other.hasIsSmuggle()) + setIsSmuggle(other.getIsSmuggle()); + if (other.hasDistance()) + setDistance(other.getDistance()); + if (other.hasWarnColor()) { + this.bitField0_ |= 0x2000000; + this.warnColor_ = other.warnColor_; + onChanged(); + } + if (other.hasTargetType()) + setTargetType(other.getTargetType()); + if (other.hasSignWindow()) + setSignWindow(other.getSignWindow()); + if (other.hasIsWarn()) + setIsWarn(other.getIsWarn()); + if (other.hasRtsp()) { + this.bitField0_ |= 0x20000000; + this.rtsp_ = other.rtsp_; + onChanged(); + } + if (other.hasFllow()) + setFllow(other.getFllow()); + if (other.hasMode()) + setMode(other.getMode()); + if (other.hasTimeStamp()) + setTimeStamp(other.getTimeStamp()); + if (other.hasTrackby()) { + this.bitField1_ |= 0x2; + this.trackby_ = other.trackby_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasSystemAreaCode()) + return false; + if (!hasSystemIdentificationCode()) + return false; + if (!hasMessageType()) + return false; + if (!hasTrackNumber()) + return false; + if (!hasCartesianPosX()) + return false; + if (!hasCartesianPosY()) + return false; + if (!hasWgs84PosLat()) + return false; + if (!hasWgs84PosLong()) + return false; + if (!hasTimeOfDay()) + return false; + if (!hasCartesianTrkVelVx()) + return false; + if (!hasCartesianTrkVelVy()) + return false; + if (!hasCog()) + return false; + if (!hasSog()) + return false; + if (hasTracks() && !getTracks().isInitialized()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + TrackPoint parsedMessage = null; + try { + parsedMessage = (TrackPoint) TrackPoint.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (TrackPoint)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasSystemAreaCode() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getSystemAreaCode() { + return this.systemAreaCode_; + } + + public Builder setSystemAreaCode(int value) { + this.bitField0_ |= 0x1; + this.systemAreaCode_ = value; + onChanged(); + return this; + } + + public Builder clearSystemAreaCode() { + this.bitField0_ &= 0xFFFFFFFE; + this.systemAreaCode_ = 0; + onChanged(); + return this; + } + + public boolean hasSystemIdentificationCode() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getSystemIdentificationCode() { + return this.systemIdentificationCode_; + } + + public Builder setSystemIdentificationCode(int value) { + this.bitField0_ |= 0x2; + this.systemIdentificationCode_ = value; + onChanged(); + return this; + } + + public Builder clearSystemIdentificationCode() { + this.bitField0_ &= 0xFFFFFFFD; + this.systemIdentificationCode_ = 0; + onChanged(); + return this; + } + + public boolean hasMessageType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public MSGTYP getMessageType() { + return this.messageType_; + } + + public Builder setMessageType(MSGTYP value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.messageType_ = value; + onChanged(); + return this; + } + + public Builder clearMessageType() { + this.bitField0_ &= 0xFFFFFFFB; + this.messageType_ = MSGTYP.MSGTYP_UNDEFINED; + onChanged(); + return this; + } + + public boolean hasTrackNumber() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getTrackNumber() { + return this.trackNumber_; + } + + public Builder setTrackNumber(int value) { + this.bitField0_ |= 0x8; + this.trackNumber_ = value; + onChanged(); + return this; + } + + public Builder clearTrackNumber() { + this.bitField0_ &= 0xFFFFFFF7; + this.trackNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasCartesianPosX() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getCartesianPosX() { + return this.cartesianPosX_; + } + + public Builder setCartesianPosX(float value) { + this.bitField0_ |= 0x10; + this.cartesianPosX_ = value; + onChanged(); + return this; + } + + public Builder clearCartesianPosX() { + this.bitField0_ &= 0xFFFFFFEF; + this.cartesianPosX_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCartesianPosY() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getCartesianPosY() { + return this.cartesianPosY_; + } + + public Builder setCartesianPosY(float value) { + this.bitField0_ |= 0x20; + this.cartesianPosY_ = value; + onChanged(); + return this; + } + + public Builder clearCartesianPosY() { + this.bitField0_ &= 0xFFFFFFDF; + this.cartesianPosY_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasWgs84PosLat() { + return ((this.bitField0_ & 0x40) == 64); + } + + public double getWgs84PosLat() { + return this.wgs84PosLat_; + } + + public Builder setWgs84PosLat(double value) { + this.bitField0_ |= 0x40; + this.wgs84PosLat_ = value; + onChanged(); + return this; + } + + public Builder clearWgs84PosLat() { + this.bitField0_ &= 0xFFFFFFBF; + this.wgs84PosLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWgs84PosLong() { + return ((this.bitField0_ & 0x80) == 128); + } + + public double getWgs84PosLong() { + return this.wgs84PosLong_; + } + + public Builder setWgs84PosLong(double value) { + this.bitField0_ |= 0x80; + this.wgs84PosLong_ = value; + onChanged(); + return this; + } + + public Builder clearWgs84PosLong() { + this.bitField0_ &= 0xFFFFFF7F; + this.wgs84PosLong_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTimeOfDay() { + return ((this.bitField0_ & 0x100) == 256); + } + + public float getTimeOfDay() { + return this.timeOfDay_; + } + + public Builder setTimeOfDay(float value) { + this.bitField0_ |= 0x100; + this.timeOfDay_ = value; + onChanged(); + return this; + } + + public Builder clearTimeOfDay() { + this.bitField0_ &= 0xFFFFFEFF; + this.timeOfDay_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasTrackType() { + return ((this.bitField0_ & 0x200) == 512); + } + + public CNF getTrackType() { + return this.trackType_; + } + + public Builder setTrackType(CNF value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.trackType_ = value; + onChanged(); + return this; + } + + public Builder clearTrackType() { + this.bitField0_ &= 0xFFFFFDFF; + this.trackType_ = CNF.CONFIRMED_TRACK; + onChanged(); + return this; + } + + public boolean hasTrackLastReport() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public boolean getTrackLastReport() { + return this.trackLastReport_; + } + + public Builder setTrackLastReport(boolean value) { + this.bitField0_ |= 0x400; + this.trackLastReport_ = value; + onChanged(); + return this; + } + + public Builder clearTrackLastReport() { + this.bitField0_ &= 0xFFFFFBFF; + this.trackLastReport_ = false; + onChanged(); + return this; + } + + public boolean hasExtrapolation() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public CST getExtrapolation() { + return this.extrapolation_; + } + + public Builder setExtrapolation(CST value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.extrapolation_ = value; + onChanged(); + return this; + } + + public Builder clearExtrapolation() { + this.bitField0_ &= 0xFFFFF7FF; + this.extrapolation_ = CST.CST_UNDEFINED; + onChanged(); + return this; + } + + public boolean hasTrackPositionCode() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public STH getTrackPositionCode() { + return this.trackPositionCode_; + } + + public Builder setTrackPositionCode(STH value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1000; + this.trackPositionCode_ = value; + onChanged(); + return this; + } + + public Builder clearTrackPositionCode() { + this.bitField0_ &= 0xFFFFEFFF; + this.trackPositionCode_ = STH.MEASURED_POSITION; + onChanged(); + return this; + } + + public boolean hasSigmaX() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public float getSigmaX() { + return this.sigmaX_; + } + + public Builder setSigmaX(float value) { + this.bitField0_ |= 0x2000; + this.sigmaX_ = value; + onChanged(); + return this; + } + + public Builder clearSigmaX() { + this.bitField0_ &= 0xFFFFDFFF; + this.sigmaX_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasSigmaY() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public float getSigmaY() { + return this.sigmaY_; + } + + public Builder setSigmaY(float value) { + this.bitField0_ |= 0x4000; + this.sigmaY_ = value; + onChanged(); + return this; + } + + public Builder clearSigmaY() { + this.bitField0_ &= 0xFFFFBFFF; + this.sigmaY_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasSigmaXY() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public float getSigmaXY() { + return this.sigmaXY_; + } + + public Builder setSigmaXY(float value) { + this.bitField0_ |= 0x8000; + this.sigmaXY_ = value; + onChanged(); + return this; + } + + public Builder clearSigmaXY() { + this.bitField0_ &= 0xFFFF7FFF; + this.sigmaXY_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasAmpOfPriPlot() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public float getAmpOfPriPlot() { + return this.ampOfPriPlot_; + } + + public Builder setAmpOfPriPlot(float value) { + this.bitField0_ |= 0x10000; + this.ampOfPriPlot_ = value; + onChanged(); + return this; + } + + public Builder clearAmpOfPriPlot() { + this.bitField0_ &= 0xFFFEFFFF; + this.ampOfPriPlot_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasCartesianTrkVelVx() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public double getCartesianTrkVelVx() { + return this.cartesianTrkVelVx_; + } + + public Builder setCartesianTrkVelVx(double value) { + this.bitField0_ |= 0x20000; + this.cartesianTrkVelVx_ = value; + onChanged(); + return this; + } + + public Builder clearCartesianTrkVelVx() { + this.bitField0_ &= 0xFFFDFFFF; + this.cartesianTrkVelVx_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCartesianTrkVelVy() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public double getCartesianTrkVelVy() { + return this.cartesianTrkVelVy_; + } + + public Builder setCartesianTrkVelVy(double value) { + this.bitField0_ |= 0x40000; + this.cartesianTrkVelVy_ = value; + onChanged(); + return this; + } + + public Builder clearCartesianTrkVelVy() { + this.bitField0_ &= 0xFFFBFFFF; + this.cartesianTrkVelVy_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasCog() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getCog() { + return this.cog_; + } + + public Builder setCog(double value) { + this.bitField0_ |= 0x80000; + this.cog_ = value; + onChanged(); + return this; + } + + public Builder clearCog() { + this.bitField0_ &= 0xFFF7FFFF; + this.cog_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasSog() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public double getSog() { + return this.sog_; + } + + public Builder setSog(double value) { + this.bitField0_ |= 0x100000; + this.sog_ = value; + onChanged(); + return this; + } + + public Builder clearSog() { + this.bitField0_ &= 0xFFEFFFFF; + this.sog_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTracks() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public RadarHistoryTracks getTracks() { + if (this.tracksBuilder_ == null) + return this.tracks_; + return (RadarHistoryTracks)this.tracksBuilder_.getMessage(); + } + + public Builder setTracks(RadarHistoryTracks value) { + if (this.tracksBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.tracks_ = value; + onChanged(); + } else { + this.tracksBuilder_.setMessage(value); + } + this.bitField0_ |= 0x200000; + return this; + } + + public Builder setTracks(RadarHistoryTracks.Builder builderForValue) { + if (this.tracksBuilder_ == null) { + this.tracks_ = builderForValue.build(); + onChanged(); + } else { + this.tracksBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x200000; + return this; + } + + public Builder mergeTracks(RadarHistoryTracks value) { + if (this.tracksBuilder_ == null) { + if ((this.bitField0_ & 0x200000) == 2097152 && this.tracks_ != RadarHistoryTracks.getDefaultInstance()) { + this.tracks_ = RadarHistoryTracks.newBuilder(this.tracks_).mergeFrom(value).buildPartial(); + } else { + this.tracks_ = value; + } + onChanged(); + } else { + this.tracksBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x200000; + return this; + } + + public Builder clearTracks() { + if (this.tracksBuilder_ == null) { + this.tracks_ = RadarHistoryTracks.getDefaultInstance(); + onChanged(); + } else { + this.tracksBuilder_.clear(); + } + this.bitField0_ &= 0xFFDFFFFF; + return this; + } + + public RadarHistoryTracks.Builder getTracksBuilder() { + this.bitField0_ |= 0x200000; + onChanged(); + return (RadarHistoryTracks.Builder)getTracksFieldBuilder().getBuilder(); + } + + public RadarHistoryTracksOrBuilder getTracksOrBuilder() { + if (this.tracksBuilder_ != null) + return (RadarHistoryTracksOrBuilder)this.tracksBuilder_.getMessageOrBuilder(); + return this.tracks_; + } + + private SingleFieldBuilder getTracksFieldBuilder() { + if (this.tracksBuilder_ == null) { + this.tracksBuilder_ = new SingleFieldBuilder(getTracks(), getParentForChildren(), isClean()); + this.tracks_ = null; + } + return this.tracksBuilder_; + } + + public boolean hasStatus() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public int getStatus() { + return this.status_; + } + + public Builder setStatus(int value) { + this.bitField0_ |= 0x400000; + this.status_ = value; + onChanged(); + return this; + } + + public Builder clearStatus() { + this.bitField0_ &= 0xFFBFFFFF; + this.status_ = 0; + onChanged(); + return this; + } + + public boolean hasIsSmuggle() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public int getIsSmuggle() { + return this.isSmuggle_; + } + + public Builder setIsSmuggle(int value) { + this.bitField0_ |= 0x800000; + this.isSmuggle_ = value; + onChanged(); + return this; + } + + public Builder clearIsSmuggle() { + this.bitField0_ &= 0xFF7FFFFF; + this.isSmuggle_ = 0; + onChanged(); + return this; + } + + public boolean hasDistance() { + return ((this.bitField0_ & 0x1000000) == 16777216); + } + + public double getDistance() { + return this.distance_; + } + + public Builder setDistance(double value) { + this.bitField0_ |= 0x1000000; + this.distance_ = value; + onChanged(); + return this; + } + + public Builder clearDistance() { + this.bitField0_ &= 0xFEFFFFFF; + this.distance_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasWarnColor() { + return ((this.bitField0_ & 0x2000000) == 33554432); + } + + public String getWarnColor() { + Object ref = this.warnColor_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.warnColor_ = s; + return s; + } + return (String)ref; + } + + public ByteString getWarnColorBytes() { + Object ref = this.warnColor_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.warnColor_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setWarnColor(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2000000; + this.warnColor_ = value; + onChanged(); + return this; + } + + public Builder clearWarnColor() { + this.bitField0_ &= 0xFDFFFFFF; + this.warnColor_ = TrackPoint.getDefaultInstance().getWarnColor(); + onChanged(); + return this; + } + + public Builder setWarnColorBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2000000; + this.warnColor_ = value; + onChanged(); + return this; + } + + public boolean hasTargetType() { + return ((this.bitField0_ & 0x4000000) == 67108864); + } + + public int getTargetType() { + return this.targetType_; + } + + public Builder setTargetType(int value) { + this.bitField0_ |= 0x4000000; + this.targetType_ = value; + onChanged(); + return this; + } + + public Builder clearTargetType() { + this.bitField0_ &= 0xFBFFFFFF; + this.targetType_ = 0; + onChanged(); + return this; + } + + public boolean hasSignWindow() { + return ((this.bitField0_ & 0x8000000) == 134217728); + } + + public int getSignWindow() { + return this.signWindow_; + } + + public Builder setSignWindow(int value) { + this.bitField0_ |= 0x8000000; + this.signWindow_ = value; + onChanged(); + return this; + } + + public Builder clearSignWindow() { + this.bitField0_ &= 0xF7FFFFFF; + this.signWindow_ = 0; + onChanged(); + return this; + } + + public boolean hasIsWarn() { + return ((this.bitField0_ & 0x10000000) == 268435456); + } + + public int getIsWarn() { + return this.isWarn_; + } + + public Builder setIsWarn(int value) { + this.bitField0_ |= 0x10000000; + this.isWarn_ = value; + onChanged(); + return this; + } + + public Builder clearIsWarn() { + this.bitField0_ &= 0xEFFFFFFF; + this.isWarn_ = 0; + onChanged(); + return this; + } + + public boolean hasRtsp() { + return ((this.bitField0_ & 0x20000000) == 536870912); + } + + public String getRtsp() { + Object ref = this.rtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.rtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getRtspBytes() { + Object ref = this.rtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.rtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20000000; + this.rtsp_ = value; + onChanged(); + return this; + } + + public Builder clearRtsp() { + this.bitField0_ &= 0xDFFFFFFF; + this.rtsp_ = TrackPoint.getDefaultInstance().getRtsp(); + onChanged(); + return this; + } + + public Builder setRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x20000000; + this.rtsp_ = value; + onChanged(); + return this; + } + + public boolean hasFllow() { + return ((this.bitField0_ & 0x40000000) == 1073741824); + } + + public int getFllow() { + return this.fllow_; + } + + public Builder setFllow(int value) { + this.bitField0_ |= 0x40000000; + this.fllow_ = value; + onChanged(); + return this; + } + + public Builder clearFllow() { + this.bitField0_ &= 0xBFFFFFFF; + this.fllow_ = 0; + onChanged(); + return this; + } + + public boolean hasMode() { + return ((this.bitField0_ & Integer.MIN_VALUE) == Integer.MIN_VALUE); + } + + public int getMode() { + return this.mode_; + } + + public Builder setMode(int value) { + this.bitField0_ |= Integer.MIN_VALUE; + this.mode_ = value; + onChanged(); + return this; + } + + public Builder clearMode() { + this.bitField0_ &= Integer.MAX_VALUE; + this.mode_ = 0; + onChanged(); + return this; + } + + public boolean hasTimeStamp() { + return ((this.bitField1_ & 0x1) == 1); + } + + public long getTimeStamp() { + return this.timeStamp_; + } + + public Builder setTimeStamp(long value) { + this.bitField1_ |= 0x1; + this.timeStamp_ = value; + onChanged(); + return this; + } + + public Builder clearTimeStamp() { + this.bitField1_ &= 0xFFFFFFFE; + this.timeStamp_ = 0L; + onChanged(); + return this; + } + + public boolean hasTrackby() { + return ((this.bitField1_ & 0x2) == 2); + } + + public String getTrackby() { + Object ref = this.trackby_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.trackby_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTrackbyBytes() { + Object ref = this.trackby_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.trackby_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTrackby(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField1_ |= 0x2; + this.trackby_ = value; + onChanged(); + return this; + } + + public Builder clearTrackby() { + this.bitField1_ &= 0xFFFFFFFD; + this.trackby_ = TrackPoint.getDefaultInstance().getTrackby(); + onChanged(); + return this; + } + + public Builder setTrackbyBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField1_ |= 0x2; + this.trackby_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField1_ & 0x4) == 4); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField1_ |= 0x4; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField1_ &= 0xFFFFFFFB; + this.cameraId_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class FllowVo extends GeneratedMessage implements FllowVoOrBuilder { + private static final FllowVo defaultInstance = new FllowVo(true); + + private final UnknownFieldSet unknownFields; + + private FllowVo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private FllowVo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static FllowVo getDefaultInstance() { + return defaultInstance; + } + + public FllowVo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FllowVo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.flag_ = input.readBool(); + break; + case 16: + this.bitField0_ |= 0x2; + this.fllow_ = input.readBool(); + break; + case 26: + if ((mutable_bitField0_ & 0x4) != 4) { + this.trackPoints_ = new ArrayList(); + mutable_bitField0_ |= 0x4; + } + this.trackPoints_.add((TrackPoint)input.readMessage(TrackPoint.PARSER, extensionRegistry)); + break; + case 32: + this.bitField0_ |= 0x4; + this.mode_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x4) == 4) + this.trackPoints_ = Collections.unmodifiableList(this.trackPoints_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_FllowVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_FllowVo_fieldAccessorTable.ensureFieldAccessorsInitialized(FllowVo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public FllowVo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new FllowVo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int FLAG_FIELD_NUMBER = 1; + + private boolean flag_; + + public static final int FLLOW_FIELD_NUMBER = 2; + + private boolean fllow_; + + public static final int TRACKPOINTS_FIELD_NUMBER = 3; + + private List trackPoints_; + + public static final int MODE_FIELD_NUMBER = 4; + + private int mode_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public boolean getFlag() { + return this.flag_; + } + + public boolean hasFllow() { + return ((this.bitField0_ & 0x2) == 2); + } + + public boolean getFllow() { + return this.fllow_; + } + + public List getTrackPointsList() { + return this.trackPoints_; + } + + public List getTrackPointsOrBuilderList() { + return (List)this.trackPoints_; + } + + public int getTrackPointsCount() { + return this.trackPoints_.size(); + } + + public TrackPoint getTrackPoints(int index) { + return this.trackPoints_.get(index); + } + + public TrackPointOrBuilder getTrackPointsOrBuilder(int index) { + return this.trackPoints_.get(index); + } + + public boolean hasMode() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getMode() { + return this.mode_; + } + + private void initFields() { + this.flag_ = false; + this.fllow_ = false; + this.trackPoints_ = Collections.emptyList(); + this.mode_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasFlag()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasFllow()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasMode()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getTrackPointsCount(); i++) { + if (!getTrackPoints(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBool(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBool(2, this.fllow_); + for (int i = 0; i < this.trackPoints_.size(); i++) + output.writeMessage(3, (MessageLite)this.trackPoints_.get(i)); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(4, this.mode_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBoolSize(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBoolSize(2, this.fllow_); + for (int i = 0; i < this.trackPoints_.size(); i++) + size += CodedOutputStream.computeMessageSize(3, (MessageLite)this.trackPoints_.get(i)); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(4, this.mode_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static FllowVo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data); + } + + public static FllowVo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static FllowVo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data); + } + + public static FllowVo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (FllowVo)PARSER.parseFrom(data, extensionRegistry); + } + + public static FllowVo parseFrom(InputStream input) throws IOException { + return (FllowVo)PARSER.parseFrom(input); + } + + public static FllowVo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (FllowVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static FllowVo parseDelimitedFrom(InputStream input) throws IOException { + return (FllowVo)PARSER.parseDelimitedFrom(input); + } + + public static FllowVo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (FllowVo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static FllowVo parseFrom(CodedInputStream input) throws IOException { + return (FllowVo)PARSER.parseFrom(input); + } + + public static FllowVo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (FllowVo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(FllowVo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements FllowVoOrBuilder { + private int bitField0_; + + private boolean flag_; + + private boolean fllow_; + + private List trackPoints_; + + private RepeatedFieldBuilder trackPointsBuilder_; + + private int mode_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_FllowVo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_FllowVo_fieldAccessorTable.ensureFieldAccessorsInitialized(FllowVo.class, Builder.class); + } + + private Builder() { + this.trackPoints_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.trackPoints_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (FllowVo.alwaysUseFieldBuilders) + getTrackPointsFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.flag_ = false; + this.bitField0_ &= 0xFFFFFFFE; + this.fllow_ = false; + this.bitField0_ &= 0xFFFFFFFD; + if (this.trackPointsBuilder_ == null) { + this.trackPoints_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFB; + } else { + this.trackPointsBuilder_.clear(); + } + this.mode_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_FllowVo_descriptor; + } + + public FllowVo getDefaultInstanceForType() { + return FllowVo.getDefaultInstance(); + } + + public FllowVo build() { + FllowVo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public FllowVo buildPartial() { + FllowVo result = new FllowVo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.flag_ = this.flag_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.fllow_ = this.fllow_; + if (this.trackPointsBuilder_ == null) { + if ((this.bitField0_ & 0x4) == 4) { + this.trackPoints_ = Collections.unmodifiableList(this.trackPoints_); + this.bitField0_ &= 0xFFFFFFFB; + } + result.trackPoints_ = this.trackPoints_; + } else { + result.trackPoints_ = this.trackPointsBuilder_.build(); + } + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x4; + result.mode_ = this.mode_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof FllowVo) + return mergeFrom((FllowVo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(FllowVo other) { + if (other == FllowVo.getDefaultInstance()) + return this; + if (other.hasFlag()) + setFlag(other.getFlag()); + if (other.hasFllow()) + setFllow(other.getFllow()); + if (this.trackPointsBuilder_ == null) { + if (!other.trackPoints_.isEmpty()) { + if (this.trackPoints_.isEmpty()) { + this.trackPoints_ = other.trackPoints_; + this.bitField0_ &= 0xFFFFFFFB; + } else { + ensureTrackPointsIsMutable(); + this.trackPoints_.addAll(other.trackPoints_); + } + onChanged(); + } + } else if (!other.trackPoints_.isEmpty()) { + if (this.trackPointsBuilder_.isEmpty()) { + this.trackPointsBuilder_.dispose(); + this.trackPointsBuilder_ = null; + this.trackPoints_ = other.trackPoints_; + this.bitField0_ &= 0xFFFFFFFB; + this.trackPointsBuilder_ = FllowVo.alwaysUseFieldBuilders ? getTrackPointsFieldBuilder() : null; + } else { + this.trackPointsBuilder_.addAllMessages(other.trackPoints_); + } + } + if (other.hasMode()) + setMode(other.getMode()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasFlag()) + return false; + if (!hasFllow()) + return false; + if (!hasMode()) + return false; + for (int i = 0; i < getTrackPointsCount(); i++) { + if (!getTrackPoints(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + FllowVo parsedMessage = null; + try { + parsedMessage = (FllowVo) FllowVo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (FllowVo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public boolean getFlag() { + return this.flag_; + } + + public Builder setFlag(boolean value) { + this.bitField0_ |= 0x1; + this.flag_ = value; + onChanged(); + return this; + } + + public Builder clearFlag() { + this.bitField0_ &= 0xFFFFFFFE; + this.flag_ = false; + onChanged(); + return this; + } + + public boolean hasFllow() { + return ((this.bitField0_ & 0x2) == 2); + } + + public boolean getFllow() { + return this.fllow_; + } + + public Builder setFllow(boolean value) { + this.bitField0_ |= 0x2; + this.fllow_ = value; + onChanged(); + return this; + } + + public Builder clearFllow() { + this.bitField0_ &= 0xFFFFFFFD; + this.fllow_ = false; + onChanged(); + return this; + } + + private void ensureTrackPointsIsMutable() { + if ((this.bitField0_ & 0x4) != 4) { + this.trackPoints_ = new ArrayList(this.trackPoints_); + this.bitField0_ |= 0x4; + } + } + + public List getTrackPointsList() { + if (this.trackPointsBuilder_ == null) + return Collections.unmodifiableList(this.trackPoints_); + return this.trackPointsBuilder_.getMessageList(); + } + + public int getTrackPointsCount() { + if (this.trackPointsBuilder_ == null) + return this.trackPoints_.size(); + return this.trackPointsBuilder_.getCount(); + } + + public TrackPoint getTrackPoints(int index) { + if (this.trackPointsBuilder_ == null) + return this.trackPoints_.get(index); + return (TrackPoint)this.trackPointsBuilder_.getMessage(index); + } + + public Builder setTrackPoints(int index, TrackPoint value) { + if (this.trackPointsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTrackPointsIsMutable(); + this.trackPoints_.set(index, value); + onChanged(); + } else { + this.trackPointsBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setTrackPoints(int index, TrackPoint.Builder builderForValue) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + this.trackPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addTrackPoints(TrackPoint value) { + if (this.trackPointsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTrackPointsIsMutable(); + this.trackPoints_.add(value); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(value); + } + return this; + } + + public Builder addTrackPoints(int index, TrackPoint value) { + if (this.trackPointsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTrackPointsIsMutable(); + this.trackPoints_.add(index, value); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addTrackPoints(TrackPoint.Builder builderForValue) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.add(builderForValue.build()); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addTrackPoints(int index, TrackPoint.Builder builderForValue) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllTrackPoints(Iterable values) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.trackPoints_); + onChanged(); + } else { + this.trackPointsBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearTrackPoints() { + if (this.trackPointsBuilder_ == null) { + this.trackPoints_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFB; + onChanged(); + } else { + this.trackPointsBuilder_.clear(); + } + return this; + } + + public Builder removeTrackPoints(int index) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.remove(index); + onChanged(); + } else { + this.trackPointsBuilder_.remove(index); + } + return this; + } + + public TrackPoint.Builder getTrackPointsBuilder(int index) { + return (TrackPoint.Builder)getTrackPointsFieldBuilder().getBuilder(index); + } + + public TrackPointOrBuilder getTrackPointsOrBuilder(int index) { + if (this.trackPointsBuilder_ == null) + return this.trackPoints_.get(index); + return (TrackPointOrBuilder)this.trackPointsBuilder_.getMessageOrBuilder(index); + } + + public List getTrackPointsOrBuilderList() { + if (this.trackPointsBuilder_ != null) + return this.trackPointsBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.trackPoints_); + } + + public TrackPoint.Builder addTrackPointsBuilder() { + return (TrackPoint.Builder)getTrackPointsFieldBuilder().addBuilder(TrackPoint.getDefaultInstance()); + } + + public TrackPoint.Builder addTrackPointsBuilder(int index) { + return (TrackPoint.Builder)getTrackPointsFieldBuilder().addBuilder(index, TrackPoint.getDefaultInstance()); + } + + public List getTrackPointsBuilderList() { + return getTrackPointsFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getTrackPointsFieldBuilder() { + if (this.trackPointsBuilder_ == null) { + this.trackPointsBuilder_ = new RepeatedFieldBuilder(this.trackPoints_, ((this.bitField0_ & 0x4) == 4), getParentForChildren(), isClean()); + this.trackPoints_ = null; + } + return this.trackPointsBuilder_; + } + + public boolean hasMode() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getMode() { + return this.mode_; + } + + public Builder setMode(int value) { + this.bitField0_ |= 0x8; + this.mode_ = value; + onChanged(); + return this; + } + + public Builder clearMode() { + this.bitField0_ &= 0xFFFFFFF7; + this.mode_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class RadarSurfaceTrack extends GeneratedMessage implements RadarSurfaceTrackOrBuilder { + private static final RadarSurfaceTrack defaultInstance = new RadarSurfaceTrack(true); + + private final UnknownFieldSet unknownFields; + + private RadarSurfaceTrack(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private RadarSurfaceTrack(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static RadarSurfaceTrack getDefaultInstance() { + return defaultInstance; + } + + public RadarSurfaceTrack getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RadarSurfaceTrack(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.flag_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.sourceId_ = bs; + break; + case 24: + this.bitField0_ |= 0x4; + this.uTC_ = input.readUInt64(); + break; + case 32: + this.bitField0_ |= 0x8; + this.length_ = input.readInt32(); + break; + case 42: + if ((mutable_bitField0_ & 0x10) != 16) { + this.trackPoints_ = new ArrayList(); + mutable_bitField0_ |= 0x10; + } + this.trackPoints_.add((TrackPoint)input.readMessage(TrackPoint.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x10) == 16) + this.trackPoints_ = Collections.unmodifiableList(this.trackPoints_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarSurfaceTrack.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public RadarSurfaceTrack parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new RadarSurfaceTrack(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int FLAG_FIELD_NUMBER = 1; + + private int flag_; + + public static final int SOURCEID_FIELD_NUMBER = 2; + + private Object sourceId_; + + public static final int UTC_FIELD_NUMBER = 3; + + private long uTC_; + + public static final int LENGTH_FIELD_NUMBER = 4; + + private int length_; + + public static final int TRACKPOINTS_FIELD_NUMBER = 5; + + private List trackPoints_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getFlag() { + return this.flag_; + } + + public boolean hasSourceId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getSourceId() { + Object ref = this.sourceId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sourceId_ = s; + return s; + } + + public ByteString getSourceIdBytes() { + Object ref = this.sourceId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sourceId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x4) == 4); + } + + public long getUTC() { + return this.uTC_; + } + + public boolean hasLength() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getLength() { + return this.length_; + } + + public List getTrackPointsList() { + return this.trackPoints_; + } + + public List getTrackPointsOrBuilderList() { + return (List)this.trackPoints_; + } + + public int getTrackPointsCount() { + return this.trackPoints_.size(); + } + + public TrackPoint getTrackPoints(int index) { + return this.trackPoints_.get(index); + } + + public TrackPointOrBuilder getTrackPointsOrBuilder(int index) { + return this.trackPoints_.get(index); + } + + private void initFields() { + this.flag_ = 0; + this.sourceId_ = ""; + this.uTC_ = 0L; + this.length_ = 0; + this.trackPoints_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasFlag()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSourceId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLength()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getTrackPointsCount(); i++) { + if (!getTrackPoints(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getSourceIdBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeUInt64(3, this.uTC_); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.length_); + for (int i = 0; i < this.trackPoints_.size(); i++) + output.writeMessage(5, (MessageLite)this.trackPoints_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getSourceIdBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeUInt64Size(3, this.uTC_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.length_); + for (int i = 0; i < this.trackPoints_.size(); i++) + size += CodedOutputStream.computeMessageSize(5, (MessageLite)this.trackPoints_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static RadarSurfaceTrack parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (RadarSurfaceTrack)PARSER.parseFrom(data); + } + + public static RadarSurfaceTrack parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarSurfaceTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarSurfaceTrack parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (RadarSurfaceTrack)PARSER.parseFrom(data); + } + + public static RadarSurfaceTrack parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarSurfaceTrack)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarSurfaceTrack parseFrom(InputStream input) throws IOException { + return (RadarSurfaceTrack)PARSER.parseFrom(input); + } + + public static RadarSurfaceTrack parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarSurfaceTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static RadarSurfaceTrack parseDelimitedFrom(InputStream input) throws IOException { + return (RadarSurfaceTrack)PARSER.parseDelimitedFrom(input); + } + + public static RadarSurfaceTrack parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarSurfaceTrack)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static RadarSurfaceTrack parseFrom(CodedInputStream input) throws IOException { + return (RadarSurfaceTrack)PARSER.parseFrom(input); + } + + public static RadarSurfaceTrack parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarSurfaceTrack)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(RadarSurfaceTrack prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements RadarSurfaceTrackOrBuilder { + private int bitField0_; + + private int flag_; + + private Object sourceId_; + + private long uTC_; + + private int length_; + + private List trackPoints_; + + private RepeatedFieldBuilder trackPointsBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarSurfaceTrack.class, Builder.class); + } + + private Builder() { + this.sourceId_ = ""; + this.trackPoints_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.sourceId_ = ""; + this.trackPoints_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (RadarSurfaceTrack.alwaysUseFieldBuilders) + getTrackPointsFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.flag_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.sourceId_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFFFB; + this.length_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + if (this.trackPointsBuilder_ == null) { + this.trackPoints_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFEF; + } else { + this.trackPointsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_descriptor; + } + + public RadarSurfaceTrack getDefaultInstanceForType() { + return RadarSurfaceTrack.getDefaultInstance(); + } + + public RadarSurfaceTrack build() { + RadarSurfaceTrack result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public RadarSurfaceTrack buildPartial() { + RadarSurfaceTrack result = new RadarSurfaceTrack(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.flag_ = this.flag_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.sourceId_ = this.sourceId_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.uTC_ = this.uTC_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.length_ = this.length_; + if (this.trackPointsBuilder_ == null) { + if ((this.bitField0_ & 0x10) == 16) { + this.trackPoints_ = Collections.unmodifiableList(this.trackPoints_); + this.bitField0_ &= 0xFFFFFFEF; + } + result.trackPoints_ = this.trackPoints_; + } else { + result.trackPoints_ = this.trackPointsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof RadarSurfaceTrack) + return mergeFrom((RadarSurfaceTrack)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(RadarSurfaceTrack other) { + if (other == RadarSurfaceTrack.getDefaultInstance()) + return this; + if (other.hasFlag()) + setFlag(other.getFlag()); + if (other.hasSourceId()) { + this.bitField0_ |= 0x2; + this.sourceId_ = other.sourceId_; + onChanged(); + } + if (other.hasUTC()) + setUTC(other.getUTC()); + if (other.hasLength()) + setLength(other.getLength()); + if (this.trackPointsBuilder_ == null) { + if (!other.trackPoints_.isEmpty()) { + if (this.trackPoints_.isEmpty()) { + this.trackPoints_ = other.trackPoints_; + this.bitField0_ &= 0xFFFFFFEF; + } else { + ensureTrackPointsIsMutable(); + this.trackPoints_.addAll(other.trackPoints_); + } + onChanged(); + } + } else if (!other.trackPoints_.isEmpty()) { + if (this.trackPointsBuilder_.isEmpty()) { + this.trackPointsBuilder_.dispose(); + this.trackPointsBuilder_ = null; + this.trackPoints_ = other.trackPoints_; + this.bitField0_ &= 0xFFFFFFEF; + this.trackPointsBuilder_ = RadarSurfaceTrack.alwaysUseFieldBuilders ? getTrackPointsFieldBuilder() : null; + } else { + this.trackPointsBuilder_.addAllMessages(other.trackPoints_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasFlag()) + return false; + if (!hasSourceId()) + return false; + if (!hasUTC()) + return false; + if (!hasLength()) + return false; + for (int i = 0; i < getTrackPointsCount(); i++) { + if (!getTrackPoints(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + RadarSurfaceTrack parsedMessage = null; + try { + parsedMessage = (RadarSurfaceTrack) RadarSurfaceTrack.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (RadarSurfaceTrack)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getFlag() { + return this.flag_; + } + + public Builder setFlag(int value) { + this.bitField0_ |= 0x1; + this.flag_ = value; + onChanged(); + return this; + } + + public Builder clearFlag() { + this.bitField0_ &= 0xFFFFFFFE; + this.flag_ = 0; + onChanged(); + return this; + } + + public boolean hasSourceId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getSourceId() { + Object ref = this.sourceId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sourceId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getSourceIdBytes() { + Object ref = this.sourceId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sourceId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setSourceId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.sourceId_ = value; + onChanged(); + return this; + } + + public Builder clearSourceId() { + this.bitField0_ &= 0xFFFFFFFD; + this.sourceId_ = RadarSurfaceTrack.getDefaultInstance().getSourceId(); + onChanged(); + return this; + } + + public Builder setSourceIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.sourceId_ = value; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x4) == 4); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x4; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFFFB; + this.uTC_ = 0L; + onChanged(); + return this; + } + + public boolean hasLength() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getLength() { + return this.length_; + } + + public Builder setLength(int value) { + this.bitField0_ |= 0x8; + this.length_ = value; + onChanged(); + return this; + } + + public Builder clearLength() { + this.bitField0_ &= 0xFFFFFFF7; + this.length_ = 0; + onChanged(); + return this; + } + + private void ensureTrackPointsIsMutable() { + if ((this.bitField0_ & 0x10) != 16) { + this.trackPoints_ = new ArrayList(this.trackPoints_); + this.bitField0_ |= 0x10; + } + } + + public List getTrackPointsList() { + if (this.trackPointsBuilder_ == null) + return Collections.unmodifiableList(this.trackPoints_); + return this.trackPointsBuilder_.getMessageList(); + } + + public int getTrackPointsCount() { + if (this.trackPointsBuilder_ == null) + return this.trackPoints_.size(); + return this.trackPointsBuilder_.getCount(); + } + + public TrackPoint getTrackPoints(int index) { + if (this.trackPointsBuilder_ == null) + return this.trackPoints_.get(index); + return (TrackPoint)this.trackPointsBuilder_.getMessage(index); + } + + public Builder setTrackPoints(int index, TrackPoint value) { + if (this.trackPointsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTrackPointsIsMutable(); + this.trackPoints_.set(index, value); + onChanged(); + } else { + this.trackPointsBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setTrackPoints(int index, TrackPoint.Builder builderForValue) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + this.trackPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addTrackPoints(TrackPoint value) { + if (this.trackPointsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTrackPointsIsMutable(); + this.trackPoints_.add(value); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(value); + } + return this; + } + + public Builder addTrackPoints(int index, TrackPoint value) { + if (this.trackPointsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureTrackPointsIsMutable(); + this.trackPoints_.add(index, value); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addTrackPoints(TrackPoint.Builder builderForValue) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.add(builderForValue.build()); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addTrackPoints(int index, TrackPoint.Builder builderForValue) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + this.trackPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllTrackPoints(Iterable values) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.trackPoints_); + onChanged(); + } else { + this.trackPointsBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearTrackPoints() { + if (this.trackPointsBuilder_ == null) { + this.trackPoints_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFEF; + onChanged(); + } else { + this.trackPointsBuilder_.clear(); + } + return this; + } + + public Builder removeTrackPoints(int index) { + if (this.trackPointsBuilder_ == null) { + ensureTrackPointsIsMutable(); + this.trackPoints_.remove(index); + onChanged(); + } else { + this.trackPointsBuilder_.remove(index); + } + return this; + } + + public TrackPoint.Builder getTrackPointsBuilder(int index) { + return (TrackPoint.Builder)getTrackPointsFieldBuilder().getBuilder(index); + } + + public TrackPointOrBuilder getTrackPointsOrBuilder(int index) { + if (this.trackPointsBuilder_ == null) + return this.trackPoints_.get(index); + return (TrackPointOrBuilder)this.trackPointsBuilder_.getMessageOrBuilder(index); + } + + public List getTrackPointsOrBuilderList() { + if (this.trackPointsBuilder_ != null) + return this.trackPointsBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.trackPoints_); + } + + public TrackPoint.Builder addTrackPointsBuilder() { + return (TrackPoint.Builder)getTrackPointsFieldBuilder().addBuilder(TrackPoint.getDefaultInstance()); + } + + public TrackPoint.Builder addTrackPointsBuilder(int index) { + return (TrackPoint.Builder)getTrackPointsFieldBuilder().addBuilder(index, TrackPoint.getDefaultInstance()); + } + + public List getTrackPointsBuilderList() { + return getTrackPointsFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getTrackPointsFieldBuilder() { + if (this.trackPointsBuilder_ == null) { + this.trackPointsBuilder_ = new RepeatedFieldBuilder(this.trackPoints_, ((this.bitField0_ & 0x10) == 16), getParentForChildren(), isClean()); + this.trackPoints_ = null; + } + return this.trackPointsBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class Spectrum extends GeneratedMessage implements SpectrumOrBuilder { + private static final Spectrum defaultInstance = new Spectrum(true); + + private final UnknownFieldSet unknownFields; + + private Spectrum(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private Spectrum(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static Spectrum getDefaultInstance() { + return defaultInstance; + } + + public Spectrum getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Spectrum(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + this.bitField0_ |= 0x1; + this.longitude_ = input.readDouble(); + break; + case 17: + this.bitField0_ |= 0x2; + this.latitude_ = input.readDouble(); + break; + case 24: + this.bitField0_ |= 0x4; + this.amplitude_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_Spectrum_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_Spectrum_fieldAccessorTable.ensureFieldAccessorsInitialized(Spectrum.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public Spectrum parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new Spectrum(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int LONGITUDE_FIELD_NUMBER = 1; + + private double longitude_; + + public static final int LATITUDE_FIELD_NUMBER = 2; + + private double latitude_; + + public static final int AMPLITUDE_FIELD_NUMBER = 3; + + private int amplitude_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasLongitude() { + return ((this.bitField0_ & 0x1) == 1); + } + + public double getLongitude() { + return this.longitude_; + } + + public boolean hasLatitude() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLatitude() { + return this.latitude_; + } + + public boolean hasAmplitude() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getAmplitude() { + return this.amplitude_; + } + + private void initFields() { + this.longitude_ = 0.0D; + this.latitude_ = 0.0D; + this.amplitude_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasLongitude()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLatitude()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAmplitude()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeDouble(1, this.longitude_); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.latitude_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.amplitude_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeDoubleSize(1, this.longitude_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.latitude_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.amplitude_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static Spectrum parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (Spectrum)PARSER.parseFrom(data); + } + + public static Spectrum parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (Spectrum)PARSER.parseFrom(data, extensionRegistry); + } + + public static Spectrum parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (Spectrum)PARSER.parseFrom(data); + } + + public static Spectrum parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (Spectrum)PARSER.parseFrom(data, extensionRegistry); + } + + public static Spectrum parseFrom(InputStream input) throws IOException { + return (Spectrum)PARSER.parseFrom(input); + } + + public static Spectrum parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Spectrum)PARSER.parseFrom(input, extensionRegistry); + } + + public static Spectrum parseDelimitedFrom(InputStream input) throws IOException { + return (Spectrum)PARSER.parseDelimitedFrom(input); + } + + public static Spectrum parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Spectrum)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static Spectrum parseFrom(CodedInputStream input) throws IOException { + return (Spectrum)PARSER.parseFrom(input); + } + + public static Spectrum parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (Spectrum)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(Spectrum prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements SpectrumOrBuilder { + private int bitField0_; + + private double longitude_; + + private double latitude_; + + private int amplitude_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_Spectrum_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_Spectrum_fieldAccessorTable.ensureFieldAccessorsInitialized(Spectrum.class, Builder.class); + } + + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = Spectrum.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.longitude_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFE; + this.latitude_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.amplitude_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_Spectrum_descriptor; + } + + public Spectrum getDefaultInstanceForType() { + return Spectrum.getDefaultInstance(); + } + + public Spectrum build() { + Spectrum result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public Spectrum buildPartial() { + Spectrum result = new Spectrum(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.longitude_ = this.longitude_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.latitude_ = this.latitude_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.amplitude_ = this.amplitude_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof Spectrum) + return mergeFrom((Spectrum)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(Spectrum other) { + if (other == Spectrum.getDefaultInstance()) + return this; + if (other.hasLongitude()) + setLongitude(other.getLongitude()); + if (other.hasLatitude()) + setLatitude(other.getLatitude()); + if (other.hasAmplitude()) + setAmplitude(other.getAmplitude()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasLongitude()) + return false; + if (!hasLatitude()) + return false; + if (!hasAmplitude()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + Spectrum parsedMessage = null; + try { + parsedMessage = (Spectrum) Spectrum.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (Spectrum)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasLongitude() { + return ((this.bitField0_ & 0x1) == 1); + } + + public double getLongitude() { + return this.longitude_; + } + + public Builder setLongitude(double value) { + this.bitField0_ |= 0x1; + this.longitude_ = value; + onChanged(); + return this; + } + + public Builder clearLongitude() { + this.bitField0_ &= 0xFFFFFFFE; + this.longitude_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLatitude() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLatitude() { + return this.latitude_; + } + + public Builder setLatitude(double value) { + this.bitField0_ |= 0x2; + this.latitude_ = value; + onChanged(); + return this; + } + + public Builder clearLatitude() { + this.bitField0_ &= 0xFFFFFFFD; + this.latitude_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasAmplitude() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getAmplitude() { + return this.amplitude_; + } + + public Builder setAmplitude(int value) { + this.bitField0_ |= 0x4; + this.amplitude_ = value; + onChanged(); + return this; + } + + public Builder clearAmplitude() { + this.bitField0_ &= 0xFFFFFFFB; + this.amplitude_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class LineSpectrum extends GeneratedMessage implements LineSpectrumOrBuilder { + private static final LineSpectrum defaultInstance = new LineSpectrum(true); + + private final UnknownFieldSet unknownFields; + + private LineSpectrum(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private LineSpectrum(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static LineSpectrum getDefaultInstance() { + return defaultInstance; + } + + public LineSpectrum getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LineSpectrum(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + this.bitField0_ |= 0x1; + this.azimuth_ = input.readDouble(); + break; + case 18: + if ((mutable_bitField0_ & 0x2) != 2) { + this.spectrums_ = new ArrayList(); + mutable_bitField0_ |= 0x2; + } + this.spectrums_.add((Spectrum)input.readMessage(Spectrum.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x2) == 2) + this.spectrums_ = Collections.unmodifiableList(this.spectrums_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_LineSpectrum_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_LineSpectrum_fieldAccessorTable.ensureFieldAccessorsInitialized(LineSpectrum.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public LineSpectrum parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new LineSpectrum(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int AZIMUTH_FIELD_NUMBER = 1; + + private double azimuth_; + + public static final int SPECTRUMS_FIELD_NUMBER = 2; + + private List spectrums_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasAzimuth() { + return ((this.bitField0_ & 0x1) == 1); + } + + public double getAzimuth() { + return this.azimuth_; + } + + public List getSpectrumsList() { + return this.spectrums_; + } + + public List getSpectrumsOrBuilderList() { + return (List)this.spectrums_; + } + + public int getSpectrumsCount() { + return this.spectrums_.size(); + } + + public Spectrum getSpectrums(int index) { + return this.spectrums_.get(index); + } + + public SpectrumOrBuilder getSpectrumsOrBuilder(int index) { + return this.spectrums_.get(index); + } + + private void initFields() { + this.azimuth_ = 0.0D; + this.spectrums_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasAzimuth()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getSpectrumsCount(); i++) { + if (!getSpectrums(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeDouble(1, this.azimuth_); + for (int i = 0; i < this.spectrums_.size(); i++) + output.writeMessage(2, (MessageLite)this.spectrums_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeDoubleSize(1, this.azimuth_); + for (int i = 0; i < this.spectrums_.size(); i++) + size += CodedOutputStream.computeMessageSize(2, (MessageLite)this.spectrums_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static LineSpectrum parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (LineSpectrum)PARSER.parseFrom(data); + } + + public static LineSpectrum parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (LineSpectrum)PARSER.parseFrom(data, extensionRegistry); + } + + public static LineSpectrum parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (LineSpectrum)PARSER.parseFrom(data); + } + + public static LineSpectrum parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (LineSpectrum)PARSER.parseFrom(data, extensionRegistry); + } + + public static LineSpectrum parseFrom(InputStream input) throws IOException { + return (LineSpectrum)PARSER.parseFrom(input); + } + + public static LineSpectrum parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (LineSpectrum)PARSER.parseFrom(input, extensionRegistry); + } + + public static LineSpectrum parseDelimitedFrom(InputStream input) throws IOException { + return (LineSpectrum)PARSER.parseDelimitedFrom(input); + } + + public static LineSpectrum parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (LineSpectrum)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static LineSpectrum parseFrom(CodedInputStream input) throws IOException { + return (LineSpectrum)PARSER.parseFrom(input); + } + + public static LineSpectrum parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (LineSpectrum)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(LineSpectrum prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements LineSpectrumOrBuilder { + private int bitField0_; + + private double azimuth_; + + private List spectrums_; + + private RepeatedFieldBuilder spectrumsBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_LineSpectrum_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_LineSpectrum_fieldAccessorTable.ensureFieldAccessorsInitialized(LineSpectrum.class, Builder.class); + } + + private Builder() { + this.spectrums_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.spectrums_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (LineSpectrum.alwaysUseFieldBuilders) + getSpectrumsFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.azimuth_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFE; + if (this.spectrumsBuilder_ == null) { + this.spectrums_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + } else { + this.spectrumsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_LineSpectrum_descriptor; + } + + public LineSpectrum getDefaultInstanceForType() { + return LineSpectrum.getDefaultInstance(); + } + + public LineSpectrum build() { + LineSpectrum result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public LineSpectrum buildPartial() { + LineSpectrum result = new LineSpectrum(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.azimuth_ = this.azimuth_; + if (this.spectrumsBuilder_ == null) { + if ((this.bitField0_ & 0x2) == 2) { + this.spectrums_ = Collections.unmodifiableList(this.spectrums_); + this.bitField0_ &= 0xFFFFFFFD; + } + result.spectrums_ = this.spectrums_; + } else { + result.spectrums_ = this.spectrumsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof LineSpectrum) + return mergeFrom((LineSpectrum)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(LineSpectrum other) { + if (other == LineSpectrum.getDefaultInstance()) + return this; + if (other.hasAzimuth()) + setAzimuth(other.getAzimuth()); + if (this.spectrumsBuilder_ == null) { + if (!other.spectrums_.isEmpty()) { + if (this.spectrums_.isEmpty()) { + this.spectrums_ = other.spectrums_; + this.bitField0_ &= 0xFFFFFFFD; + } else { + ensureSpectrumsIsMutable(); + this.spectrums_.addAll(other.spectrums_); + } + onChanged(); + } + } else if (!other.spectrums_.isEmpty()) { + if (this.spectrumsBuilder_.isEmpty()) { + this.spectrumsBuilder_.dispose(); + this.spectrumsBuilder_ = null; + this.spectrums_ = other.spectrums_; + this.bitField0_ &= 0xFFFFFFFD; + this.spectrumsBuilder_ = LineSpectrum.alwaysUseFieldBuilders ? getSpectrumsFieldBuilder() : null; + } else { + this.spectrumsBuilder_.addAllMessages(other.spectrums_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasAzimuth()) + return false; + for (int i = 0; i < getSpectrumsCount(); i++) { + if (!getSpectrums(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + LineSpectrum parsedMessage = null; + try { + parsedMessage = (LineSpectrum) LineSpectrum.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (LineSpectrum)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasAzimuth() { + return ((this.bitField0_ & 0x1) == 1); + } + + public double getAzimuth() { + return this.azimuth_; + } + + public Builder setAzimuth(double value) { + this.bitField0_ |= 0x1; + this.azimuth_ = value; + onChanged(); + return this; + } + + public Builder clearAzimuth() { + this.bitField0_ &= 0xFFFFFFFE; + this.azimuth_ = 0.0D; + onChanged(); + return this; + } + + private void ensureSpectrumsIsMutable() { + if ((this.bitField0_ & 0x2) != 2) { + this.spectrums_ = new ArrayList(this.spectrums_); + this.bitField0_ |= 0x2; + } + } + + public List getSpectrumsList() { + if (this.spectrumsBuilder_ == null) + return Collections.unmodifiableList(this.spectrums_); + return this.spectrumsBuilder_.getMessageList(); + } + + public int getSpectrumsCount() { + if (this.spectrumsBuilder_ == null) + return this.spectrums_.size(); + return this.spectrumsBuilder_.getCount(); + } + + public Spectrum getSpectrums(int index) { + if (this.spectrumsBuilder_ == null) + return this.spectrums_.get(index); + return (Spectrum)this.spectrumsBuilder_.getMessage(index); + } + + public Builder setSpectrums(int index, Spectrum value) { + if (this.spectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureSpectrumsIsMutable(); + this.spectrums_.set(index, value); + onChanged(); + } else { + this.spectrumsBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setSpectrums(int index, Spectrum.Builder builderForValue) { + if (this.spectrumsBuilder_ == null) { + ensureSpectrumsIsMutable(); + this.spectrums_.set(index, builderForValue.build()); + onChanged(); + } else { + this.spectrumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addSpectrums(Spectrum value) { + if (this.spectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureSpectrumsIsMutable(); + this.spectrums_.add(value); + onChanged(); + } else { + this.spectrumsBuilder_.addMessage(value); + } + return this; + } + + public Builder addSpectrums(int index, Spectrum value) { + if (this.spectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureSpectrumsIsMutable(); + this.spectrums_.add(index, value); + onChanged(); + } else { + this.spectrumsBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addSpectrums(Spectrum.Builder builderForValue) { + if (this.spectrumsBuilder_ == null) { + ensureSpectrumsIsMutable(); + this.spectrums_.add(builderForValue.build()); + onChanged(); + } else { + this.spectrumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addSpectrums(int index, Spectrum.Builder builderForValue) { + if (this.spectrumsBuilder_ == null) { + ensureSpectrumsIsMutable(); + this.spectrums_.add(index, builderForValue.build()); + onChanged(); + } else { + this.spectrumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllSpectrums(Iterable values) { + if (this.spectrumsBuilder_ == null) { + ensureSpectrumsIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.spectrums_); + onChanged(); + } else { + this.spectrumsBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearSpectrums() { + if (this.spectrumsBuilder_ == null) { + this.spectrums_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + onChanged(); + } else { + this.spectrumsBuilder_.clear(); + } + return this; + } + + public Builder removeSpectrums(int index) { + if (this.spectrumsBuilder_ == null) { + ensureSpectrumsIsMutable(); + this.spectrums_.remove(index); + onChanged(); + } else { + this.spectrumsBuilder_.remove(index); + } + return this; + } + + public Spectrum.Builder getSpectrumsBuilder(int index) { + return (Spectrum.Builder)getSpectrumsFieldBuilder().getBuilder(index); + } + + public SpectrumOrBuilder getSpectrumsOrBuilder(int index) { + if (this.spectrumsBuilder_ == null) + return this.spectrums_.get(index); + return (SpectrumOrBuilder)this.spectrumsBuilder_.getMessageOrBuilder(index); + } + + public List getSpectrumsOrBuilderList() { + if (this.spectrumsBuilder_ != null) + return this.spectrumsBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.spectrums_); + } + + public Spectrum.Builder addSpectrumsBuilder() { + return (Spectrum.Builder)getSpectrumsFieldBuilder().addBuilder(Spectrum.getDefaultInstance()); + } + + public Spectrum.Builder addSpectrumsBuilder(int index) { + return (Spectrum.Builder)getSpectrumsFieldBuilder().addBuilder(index, Spectrum.getDefaultInstance()); + } + + public List getSpectrumsBuilderList() { + return getSpectrumsFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getSpectrumsFieldBuilder() { + if (this.spectrumsBuilder_ == null) { + this.spectrumsBuilder_ = new RepeatedFieldBuilder(this.spectrums_, ((this.bitField0_ & 0x2) == 2), getParentForChildren(), isClean()); + this.spectrums_ = null; + } + return this.spectrumsBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class SectorSpectrum extends GeneratedMessage implements SectorSpectrumOrBuilder { + private static final SectorSpectrum defaultInstance = new SectorSpectrum(true); + + private final UnknownFieldSet unknownFields; + + private SectorSpectrum(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private SectorSpectrum(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static SectorSpectrum getDefaultInstance() { + return defaultInstance; + } + + public SectorSpectrum getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SectorSpectrum(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.sectorIndex_ = input.readInt32(); + break; + case 18: + if ((mutable_bitField0_ & 0x2) != 2) { + this.lineSpectrums_ = new ArrayList(); + mutable_bitField0_ |= 0x2; + } + this.lineSpectrums_.add((LineSpectrum)input.readMessage(LineSpectrum.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x2) == 2) + this.lineSpectrums_ = Collections.unmodifiableList(this.lineSpectrums_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_SectorSpectrum_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_SectorSpectrum_fieldAccessorTable.ensureFieldAccessorsInitialized(SectorSpectrum.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public SectorSpectrum parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new SectorSpectrum(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int SECTORINDEX_FIELD_NUMBER = 1; + + private int sectorIndex_; + + public static final int LINESPECTRUMS_FIELD_NUMBER = 2; + + private List lineSpectrums_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasSectorIndex() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getSectorIndex() { + return this.sectorIndex_; + } + + public List getLineSpectrumsList() { + return this.lineSpectrums_; + } + + public List getLineSpectrumsOrBuilderList() { + return (List)this.lineSpectrums_; + } + + public int getLineSpectrumsCount() { + return this.lineSpectrums_.size(); + } + + public LineSpectrum getLineSpectrums(int index) { + return this.lineSpectrums_.get(index); + } + + public LineSpectrumOrBuilder getLineSpectrumsOrBuilder(int index) { + return this.lineSpectrums_.get(index); + } + + private void initFields() { + this.sectorIndex_ = 0; + this.lineSpectrums_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasSectorIndex()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getLineSpectrumsCount(); i++) { + if (!getLineSpectrums(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.sectorIndex_); + for (int i = 0; i < this.lineSpectrums_.size(); i++) + output.writeMessage(2, (MessageLite)this.lineSpectrums_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.sectorIndex_); + for (int i = 0; i < this.lineSpectrums_.size(); i++) + size += CodedOutputStream.computeMessageSize(2, (MessageLite)this.lineSpectrums_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static SectorSpectrum parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (SectorSpectrum)PARSER.parseFrom(data); + } + + public static SectorSpectrum parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (SectorSpectrum)PARSER.parseFrom(data, extensionRegistry); + } + + public static SectorSpectrum parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (SectorSpectrum)PARSER.parseFrom(data); + } + + public static SectorSpectrum parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (SectorSpectrum)PARSER.parseFrom(data, extensionRegistry); + } + + public static SectorSpectrum parseFrom(InputStream input) throws IOException { + return (SectorSpectrum)PARSER.parseFrom(input); + } + + public static SectorSpectrum parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (SectorSpectrum)PARSER.parseFrom(input, extensionRegistry); + } + + public static SectorSpectrum parseDelimitedFrom(InputStream input) throws IOException { + return (SectorSpectrum)PARSER.parseDelimitedFrom(input); + } + + public static SectorSpectrum parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (SectorSpectrum)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static SectorSpectrum parseFrom(CodedInputStream input) throws IOException { + return (SectorSpectrum)PARSER.parseFrom(input); + } + + public static SectorSpectrum parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (SectorSpectrum)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(SectorSpectrum prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements SectorSpectrumOrBuilder { + private int bitField0_; + + private int sectorIndex_; + + private List lineSpectrums_; + + private RepeatedFieldBuilder lineSpectrumsBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_SectorSpectrum_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_SectorSpectrum_fieldAccessorTable.ensureFieldAccessorsInitialized(SectorSpectrum.class, Builder.class); + } + + private Builder() { + this.lineSpectrums_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.lineSpectrums_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (SectorSpectrum.alwaysUseFieldBuilders) + getLineSpectrumsFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.sectorIndex_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + if (this.lineSpectrumsBuilder_ == null) { + this.lineSpectrums_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + } else { + this.lineSpectrumsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_SectorSpectrum_descriptor; + } + + public SectorSpectrum getDefaultInstanceForType() { + return SectorSpectrum.getDefaultInstance(); + } + + public SectorSpectrum build() { + SectorSpectrum result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public SectorSpectrum buildPartial() { + SectorSpectrum result = new SectorSpectrum(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.sectorIndex_ = this.sectorIndex_; + if (this.lineSpectrumsBuilder_ == null) { + if ((this.bitField0_ & 0x2) == 2) { + this.lineSpectrums_ = Collections.unmodifiableList(this.lineSpectrums_); + this.bitField0_ &= 0xFFFFFFFD; + } + result.lineSpectrums_ = this.lineSpectrums_; + } else { + result.lineSpectrums_ = this.lineSpectrumsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof SectorSpectrum) + return mergeFrom((SectorSpectrum)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(SectorSpectrum other) { + if (other == SectorSpectrum.getDefaultInstance()) + return this; + if (other.hasSectorIndex()) + setSectorIndex(other.getSectorIndex()); + if (this.lineSpectrumsBuilder_ == null) { + if (!other.lineSpectrums_.isEmpty()) { + if (this.lineSpectrums_.isEmpty()) { + this.lineSpectrums_ = other.lineSpectrums_; + this.bitField0_ &= 0xFFFFFFFD; + } else { + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.addAll(other.lineSpectrums_); + } + onChanged(); + } + } else if (!other.lineSpectrums_.isEmpty()) { + if (this.lineSpectrumsBuilder_.isEmpty()) { + this.lineSpectrumsBuilder_.dispose(); + this.lineSpectrumsBuilder_ = null; + this.lineSpectrums_ = other.lineSpectrums_; + this.bitField0_ &= 0xFFFFFFFD; + this.lineSpectrumsBuilder_ = SectorSpectrum.alwaysUseFieldBuilders ? getLineSpectrumsFieldBuilder() : null; + } else { + this.lineSpectrumsBuilder_.addAllMessages(other.lineSpectrums_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasSectorIndex()) + return false; + for (int i = 0; i < getLineSpectrumsCount(); i++) { + if (!getLineSpectrums(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + SectorSpectrum parsedMessage = null; + try { + parsedMessage = (SectorSpectrum) SectorSpectrum.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (SectorSpectrum)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasSectorIndex() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getSectorIndex() { + return this.sectorIndex_; + } + + public Builder setSectorIndex(int value) { + this.bitField0_ |= 0x1; + this.sectorIndex_ = value; + onChanged(); + return this; + } + + public Builder clearSectorIndex() { + this.bitField0_ &= 0xFFFFFFFE; + this.sectorIndex_ = 0; + onChanged(); + return this; + } + + private void ensureLineSpectrumsIsMutable() { + if ((this.bitField0_ & 0x2) != 2) { + this.lineSpectrums_ = new ArrayList(this.lineSpectrums_); + this.bitField0_ |= 0x2; + } + } + + public List getLineSpectrumsList() { + if (this.lineSpectrumsBuilder_ == null) + return Collections.unmodifiableList(this.lineSpectrums_); + return this.lineSpectrumsBuilder_.getMessageList(); + } + + public int getLineSpectrumsCount() { + if (this.lineSpectrumsBuilder_ == null) + return this.lineSpectrums_.size(); + return this.lineSpectrumsBuilder_.getCount(); + } + + public LineSpectrum getLineSpectrums(int index) { + if (this.lineSpectrumsBuilder_ == null) + return this.lineSpectrums_.get(index); + return (LineSpectrum)this.lineSpectrumsBuilder_.getMessage(index); + } + + public Builder setLineSpectrums(int index, LineSpectrum value) { + if (this.lineSpectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.set(index, value); + onChanged(); + } else { + this.lineSpectrumsBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setLineSpectrums(int index, LineSpectrum.Builder builderForValue) { + if (this.lineSpectrumsBuilder_ == null) { + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.set(index, builderForValue.build()); + onChanged(); + } else { + this.lineSpectrumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addLineSpectrums(LineSpectrum value) { + if (this.lineSpectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.add(value); + onChanged(); + } else { + this.lineSpectrumsBuilder_.addMessage(value); + } + return this; + } + + public Builder addLineSpectrums(int index, LineSpectrum value) { + if (this.lineSpectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.add(index, value); + onChanged(); + } else { + this.lineSpectrumsBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addLineSpectrums(LineSpectrum.Builder builderForValue) { + if (this.lineSpectrumsBuilder_ == null) { + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.add(builderForValue.build()); + onChanged(); + } else { + this.lineSpectrumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addLineSpectrums(int index, LineSpectrum.Builder builderForValue) { + if (this.lineSpectrumsBuilder_ == null) { + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.add(index, builderForValue.build()); + onChanged(); + } else { + this.lineSpectrumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllLineSpectrums(Iterable values) { + if (this.lineSpectrumsBuilder_ == null) { + ensureLineSpectrumsIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.lineSpectrums_); + onChanged(); + } else { + this.lineSpectrumsBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearLineSpectrums() { + if (this.lineSpectrumsBuilder_ == null) { + this.lineSpectrums_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFD; + onChanged(); + } else { + this.lineSpectrumsBuilder_.clear(); + } + return this; + } + + public Builder removeLineSpectrums(int index) { + if (this.lineSpectrumsBuilder_ == null) { + ensureLineSpectrumsIsMutable(); + this.lineSpectrums_.remove(index); + onChanged(); + } else { + this.lineSpectrumsBuilder_.remove(index); + } + return this; + } + + public LineSpectrum.Builder getLineSpectrumsBuilder(int index) { + return (LineSpectrum.Builder)getLineSpectrumsFieldBuilder().getBuilder(index); + } + + public LineSpectrumOrBuilder getLineSpectrumsOrBuilder(int index) { + if (this.lineSpectrumsBuilder_ == null) + return this.lineSpectrums_.get(index); + return (LineSpectrumOrBuilder)this.lineSpectrumsBuilder_.getMessageOrBuilder(index); + } + + public List getLineSpectrumsOrBuilderList() { + if (this.lineSpectrumsBuilder_ != null) + return this.lineSpectrumsBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.lineSpectrums_); + } + + public LineSpectrum.Builder addLineSpectrumsBuilder() { + return (LineSpectrum.Builder)getLineSpectrumsFieldBuilder().addBuilder(LineSpectrum.getDefaultInstance()); + } + + public LineSpectrum.Builder addLineSpectrumsBuilder(int index) { + return (LineSpectrum.Builder)getLineSpectrumsFieldBuilder().addBuilder(index, LineSpectrum.getDefaultInstance()); + } + + public List getLineSpectrumsBuilderList() { + return getLineSpectrumsFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getLineSpectrumsFieldBuilder() { + if (this.lineSpectrumsBuilder_ == null) { + this.lineSpectrumsBuilder_ = new RepeatedFieldBuilder(this.lineSpectrums_, ((this.bitField0_ & 0x2) == 2), getParentForChildren(), isClean()); + this.lineSpectrums_ = null; + } + return this.lineSpectrumsBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class RadarVideo extends GeneratedMessage implements RadarVideoOrBuilder { + private static final RadarVideo defaultInstance = new RadarVideo(true); + + private final UnknownFieldSet unknownFields; + + private RadarVideo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private RadarVideo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static RadarVideo getDefaultInstance() { + return defaultInstance; + } + + public RadarVideo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RadarVideo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.flag_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.sourceId_ = bs; + break; + case 24: + this.bitField0_ |= 0x4; + this.uTC_ = input.readUInt64(); + break; + case 32: + this.bitField0_ |= 0x8; + this.length_ = input.readInt32(); + break; + case 42: + if ((mutable_bitField0_ & 0x10) != 16) { + this.sectorSpectrums_ = new ArrayList(); + mutable_bitField0_ |= 0x10; + } + this.sectorSpectrums_.add((SectorSpectrum)input.readMessage(SectorSpectrum.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x10) == 16) + this.sectorSpectrums_ = Collections.unmodifiableList(this.sectorSpectrums_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarVideo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarVideo_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarVideo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public RadarVideo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new RadarVideo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int FLAG_FIELD_NUMBER = 1; + + private int flag_; + + public static final int SOURCEID_FIELD_NUMBER = 2; + + private Object sourceId_; + + public static final int UTC_FIELD_NUMBER = 3; + + private long uTC_; + + public static final int LENGTH_FIELD_NUMBER = 4; + + private int length_; + + public static final int SECTORSPECTRUMS_FIELD_NUMBER = 5; + + private List sectorSpectrums_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getFlag() { + return this.flag_; + } + + public boolean hasSourceId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getSourceId() { + Object ref = this.sourceId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sourceId_ = s; + return s; + } + + public ByteString getSourceIdBytes() { + Object ref = this.sourceId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sourceId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x4) == 4); + } + + public long getUTC() { + return this.uTC_; + } + + public boolean hasLength() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getLength() { + return this.length_; + } + + public List getSectorSpectrumsList() { + return this.sectorSpectrums_; + } + + public List getSectorSpectrumsOrBuilderList() { + return (List)this.sectorSpectrums_; + } + + public int getSectorSpectrumsCount() { + return this.sectorSpectrums_.size(); + } + + public SectorSpectrum getSectorSpectrums(int index) { + return this.sectorSpectrums_.get(index); + } + + public SectorSpectrumOrBuilder getSectorSpectrumsOrBuilder(int index) { + return this.sectorSpectrums_.get(index); + } + + private void initFields() { + this.flag_ = 0; + this.sourceId_ = ""; + this.uTC_ = 0L; + this.length_ = 0; + this.sectorSpectrums_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasFlag()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSourceId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasUTC()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLength()) { + this.memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getSectorSpectrumsCount(); i++) { + if (!getSectorSpectrums(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getSourceIdBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeUInt64(3, this.uTC_); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.length_); + for (int i = 0; i < this.sectorSpectrums_.size(); i++) + output.writeMessage(5, (MessageLite)this.sectorSpectrums_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.flag_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getSourceIdBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeUInt64Size(3, this.uTC_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.length_); + for (int i = 0; i < this.sectorSpectrums_.size(); i++) + size += CodedOutputStream.computeMessageSize(5, (MessageLite)this.sectorSpectrums_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static RadarVideo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (RadarVideo)PARSER.parseFrom(data); + } + + public static RadarVideo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarVideo)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarVideo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (RadarVideo)PARSER.parseFrom(data); + } + + public static RadarVideo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RadarVideo)PARSER.parseFrom(data, extensionRegistry); + } + + public static RadarVideo parseFrom(InputStream input) throws IOException { + return (RadarVideo)PARSER.parseFrom(input); + } + + public static RadarVideo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarVideo)PARSER.parseFrom(input, extensionRegistry); + } + + public static RadarVideo parseDelimitedFrom(InputStream input) throws IOException { + return (RadarVideo)PARSER.parseDelimitedFrom(input); + } + + public static RadarVideo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarVideo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static RadarVideo parseFrom(CodedInputStream input) throws IOException { + return (RadarVideo)PARSER.parseFrom(input); + } + + public static RadarVideo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RadarVideo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(RadarVideo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements RadarVideoOrBuilder { + private int bitField0_; + + private int flag_; + + private Object sourceId_; + + private long uTC_; + + private int length_; + + private List sectorSpectrums_; + + private RepeatedFieldBuilder sectorSpectrumsBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarVideo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarVideo_fieldAccessorTable.ensureFieldAccessorsInitialized(RadarVideo.class, Builder.class); + } + + private Builder() { + this.sourceId_ = ""; + this.sectorSpectrums_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.sourceId_ = ""; + this.sectorSpectrums_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (RadarVideo.alwaysUseFieldBuilders) + getSectorSpectrumsFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.flag_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.sourceId_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.uTC_ = 0L; + this.bitField0_ &= 0xFFFFFFFB; + this.length_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + if (this.sectorSpectrumsBuilder_ == null) { + this.sectorSpectrums_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFEF; + } else { + this.sectorSpectrumsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXRadar.internal_static_com_zhichenhaixin_proto_RadarVideo_descriptor; + } + + public RadarVideo getDefaultInstanceForType() { + return RadarVideo.getDefaultInstance(); + } + + public RadarVideo build() { + RadarVideo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public RadarVideo buildPartial() { + RadarVideo result = new RadarVideo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.flag_ = this.flag_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.sourceId_ = this.sourceId_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.uTC_ = this.uTC_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.length_ = this.length_; + if (this.sectorSpectrumsBuilder_ == null) { + if ((this.bitField0_ & 0x10) == 16) { + this.sectorSpectrums_ = Collections.unmodifiableList(this.sectorSpectrums_); + this.bitField0_ &= 0xFFFFFFEF; + } + result.sectorSpectrums_ = this.sectorSpectrums_; + } else { + result.sectorSpectrums_ = this.sectorSpectrumsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof RadarVideo) + return mergeFrom((RadarVideo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(RadarVideo other) { + if (other == RadarVideo.getDefaultInstance()) + return this; + if (other.hasFlag()) + setFlag(other.getFlag()); + if (other.hasSourceId()) { + this.bitField0_ |= 0x2; + this.sourceId_ = other.sourceId_; + onChanged(); + } + if (other.hasUTC()) + setUTC(other.getUTC()); + if (other.hasLength()) + setLength(other.getLength()); + if (this.sectorSpectrumsBuilder_ == null) { + if (!other.sectorSpectrums_.isEmpty()) { + if (this.sectorSpectrums_.isEmpty()) { + this.sectorSpectrums_ = other.sectorSpectrums_; + this.bitField0_ &= 0xFFFFFFEF; + } else { + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.addAll(other.sectorSpectrums_); + } + onChanged(); + } + } else if (!other.sectorSpectrums_.isEmpty()) { + if (this.sectorSpectrumsBuilder_.isEmpty()) { + this.sectorSpectrumsBuilder_.dispose(); + this.sectorSpectrumsBuilder_ = null; + this.sectorSpectrums_ = other.sectorSpectrums_; + this.bitField0_ &= 0xFFFFFFEF; + this.sectorSpectrumsBuilder_ = RadarVideo.alwaysUseFieldBuilders ? getSectorSpectrumsFieldBuilder() : null; + } else { + this.sectorSpectrumsBuilder_.addAllMessages(other.sectorSpectrums_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasFlag()) + return false; + if (!hasSourceId()) + return false; + if (!hasUTC()) + return false; + if (!hasLength()) + return false; + for (int i = 0; i < getSectorSpectrumsCount(); i++) { + if (!getSectorSpectrums(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + RadarVideo parsedMessage = null; + try { + parsedMessage = (RadarVideo) RadarVideo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (RadarVideo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasFlag() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getFlag() { + return this.flag_; + } + + public Builder setFlag(int value) { + this.bitField0_ |= 0x1; + this.flag_ = value; + onChanged(); + return this; + } + + public Builder clearFlag() { + this.bitField0_ &= 0xFFFFFFFE; + this.flag_ = 0; + onChanged(); + return this; + } + + public boolean hasSourceId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getSourceId() { + Object ref = this.sourceId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.sourceId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getSourceIdBytes() { + Object ref = this.sourceId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.sourceId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setSourceId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.sourceId_ = value; + onChanged(); + return this; + } + + public Builder clearSourceId() { + this.bitField0_ &= 0xFFFFFFFD; + this.sourceId_ = RadarVideo.getDefaultInstance().getSourceId(); + onChanged(); + return this; + } + + public Builder setSourceIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.sourceId_ = value; + onChanged(); + return this; + } + + public boolean hasUTC() { + return ((this.bitField0_ & 0x4) == 4); + } + + public long getUTC() { + return this.uTC_; + } + + public Builder setUTC(long value) { + this.bitField0_ |= 0x4; + this.uTC_ = value; + onChanged(); + return this; + } + + public Builder clearUTC() { + this.bitField0_ &= 0xFFFFFFFB; + this.uTC_ = 0L; + onChanged(); + return this; + } + + public boolean hasLength() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getLength() { + return this.length_; + } + + public Builder setLength(int value) { + this.bitField0_ |= 0x8; + this.length_ = value; + onChanged(); + return this; + } + + public Builder clearLength() { + this.bitField0_ &= 0xFFFFFFF7; + this.length_ = 0; + onChanged(); + return this; + } + + private void ensureSectorSpectrumsIsMutable() { + if ((this.bitField0_ & 0x10) != 16) { + this.sectorSpectrums_ = new ArrayList(this.sectorSpectrums_); + this.bitField0_ |= 0x10; + } + } + + public List getSectorSpectrumsList() { + if (this.sectorSpectrumsBuilder_ == null) + return Collections.unmodifiableList(this.sectorSpectrums_); + return this.sectorSpectrumsBuilder_.getMessageList(); + } + + public int getSectorSpectrumsCount() { + if (this.sectorSpectrumsBuilder_ == null) + return this.sectorSpectrums_.size(); + return this.sectorSpectrumsBuilder_.getCount(); + } + + public SectorSpectrum getSectorSpectrums(int index) { + if (this.sectorSpectrumsBuilder_ == null) + return this.sectorSpectrums_.get(index); + return (SectorSpectrum)this.sectorSpectrumsBuilder_.getMessage(index); + } + + public Builder setSectorSpectrums(int index, SectorSpectrum value) { + if (this.sectorSpectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.set(index, value); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setSectorSpectrums(int index, SectorSpectrum.Builder builderForValue) { + if (this.sectorSpectrumsBuilder_ == null) { + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.set(index, builderForValue.build()); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addSectorSpectrums(SectorSpectrum value) { + if (this.sectorSpectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.add(value); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.addMessage(value); + } + return this; + } + + public Builder addSectorSpectrums(int index, SectorSpectrum value) { + if (this.sectorSpectrumsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.add(index, value); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addSectorSpectrums(SectorSpectrum.Builder builderForValue) { + if (this.sectorSpectrumsBuilder_ == null) { + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.add(builderForValue.build()); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addSectorSpectrums(int index, SectorSpectrum.Builder builderForValue) { + if (this.sectorSpectrumsBuilder_ == null) { + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.add(index, builderForValue.build()); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllSectorSpectrums(Iterable values) { + if (this.sectorSpectrumsBuilder_ == null) { + ensureSectorSpectrumsIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.sectorSpectrums_); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearSectorSpectrums() { + if (this.sectorSpectrumsBuilder_ == null) { + this.sectorSpectrums_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFEF; + onChanged(); + } else { + this.sectorSpectrumsBuilder_.clear(); + } + return this; + } + + public Builder removeSectorSpectrums(int index) { + if (this.sectorSpectrumsBuilder_ == null) { + ensureSectorSpectrumsIsMutable(); + this.sectorSpectrums_.remove(index); + onChanged(); + } else { + this.sectorSpectrumsBuilder_.remove(index); + } + return this; + } + + public SectorSpectrum.Builder getSectorSpectrumsBuilder(int index) { + return (SectorSpectrum.Builder)getSectorSpectrumsFieldBuilder().getBuilder(index); + } + + public SectorSpectrumOrBuilder getSectorSpectrumsOrBuilder(int index) { + if (this.sectorSpectrumsBuilder_ == null) + return this.sectorSpectrums_.get(index); + return (SectorSpectrumOrBuilder)this.sectorSpectrumsBuilder_.getMessageOrBuilder(index); + } + + public List getSectorSpectrumsOrBuilderList() { + if (this.sectorSpectrumsBuilder_ != null) + return this.sectorSpectrumsBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.sectorSpectrums_); + } + + public SectorSpectrum.Builder addSectorSpectrumsBuilder() { + return (SectorSpectrum.Builder)getSectorSpectrumsFieldBuilder().addBuilder(SectorSpectrum.getDefaultInstance()); + } + + public SectorSpectrum.Builder addSectorSpectrumsBuilder(int index) { + return (SectorSpectrum.Builder)getSectorSpectrumsFieldBuilder().addBuilder(index, SectorSpectrum.getDefaultInstance()); + } + + public List getSectorSpectrumsBuilderList() { + return getSectorSpectrumsFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getSectorSpectrumsFieldBuilder() { + if (this.sectorSpectrumsBuilder_ == null) { + this.sectorSpectrumsBuilder_ = new RepeatedFieldBuilder(this.sectorSpectrums_, ((this.bitField0_ & 0x10) == 16), getParentForChildren(), isClean()); + this.sectorSpectrums_ = null; + } + return this.sectorSpectrumsBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\017ZCHXRadar.proto\022\027com.com.zhichenhaixin.proto\"Å\002\n\021RadarHistoryTrack\022\023\n\013trackNumber\030\001 \002(\r\022\023\n\013wgs84PosLat\030\002 \002(\001\022\024\n\fwgs84PosLong\030\003 \002(\001\022\021\n\ttimeOfDay\030\004 \002(\002\022/\n\ttrackType\030\005 \001(\0162\034.com.com.zhichenhaixin.proto.CNF\022\027\n\017trackLastReport\030\006 \001(\b\0223\n\rextrapolation\030\007 \001(\0162\034.com.com.zhichenhaixin.proto.CST\0227\n\021trackPositionCode\030\b \001(\0162\034.com.com.zhichenhaixin.proto.STH\022\013\n\003cog\030\t \002(\001\022\013\n\003sog\030\n \002(\001\022\013\n\003UTC\030\013 \002(\004\"P\n\022RadarHistoryTracks\022:\n\006trac", "ks\030\001 \003(\0132*.com.com.zhichenhaixin.proto.RadarHistoryTrack\"ï\006\n\nTrackPoint\022\026\n\016systemAreaCode\030\001 \002(\005\022 \n\030systemIdentificationCode\030\002 \002(\005\0224\n\013messageType\030\003 \002(\0162\037.com.com.zhichenhaixin.proto.MSGTYP\022\023\n\013trackNumber\030\004 \002(\r\022\025\n\rcartesianPosX\030\005 \002(\002\022\025\n\rcartesianPosY\030\006 \002(\002\022\023\n\013wgs84PosLat\030\007 \002(\001\022\024\n\fwgs84PosLong\030\b \002(\001\022\021\n\ttimeOfDay\030\t \002(\002\022/\n\ttrackType\030\n \001(\0162\034.com.com.zhichenhaixin.proto.CNF\022\027\n\017trackLastReport\030\013 \001(\b\0223\n\rextrapolation\030", "\f \001(\0162\034.com.com.zhichenhaixin.proto.CST\0227\n\021trackPositionCode\030\r \001(\0162\034.com.com.zhichenhaixin.proto.STH\022\016\n\006sigmaX\030\016 \001(\002\022\016\n\006sigmaY\030\017 \001(\002\022\017\n\007sigmaXY\030\020 \001(\002\022\024\n\fampOfPriPlot\030\021 \001(\002\022\032\n\022cartesianTrkVel_vx\030\022 \002(\001\022\032\n\022cartesianTrkVel_vy\030\023 \002(\001\022\013\n\003cog\030\024 \002(\001\022\013\n\003sog\030\025 \002(\001\022;\n\006tracks\030\026 \001(\0132+.com.com.zhichenhaixin.proto.RadarHistoryTracks\022\016\n\006status\030\027 \001(\005\022\021\n\tisSmuggle\030\030 \001(\005\022\020\n\bdistance\030\031 \001(\001\022\022\n\nwarn_color\030\032 \001(\t\022\022\n\ntargetType\030\033 \001(\005\022", "\023\n\013sign_window\030\034 \001(\005\022\017\n\007is_warn\030\035 \001(\005\022\f\n\004rtsp\030\036 \001(\t\022\r\n\005fllow\030\037 \001(\005\022\f\n\004mode\030 \001(\005\022\021\n\ttimeStamp\030! \001(\003\022\017\n\007trackby\030\" \001(\t\022\020\n\bcameraId\030# \001(\005\"n\n\007FllowVo\022\f\n\004flag\030\001 \002(\b\022\r\n\005fllow\030\002 \002(\b\0228\n\013trackPoints\030\003 \003(\0132#.com.com.zhichenhaixin.proto.TrackPoint\022\f\n\004mode\030\004 \002(\005\"Š\001\n\021RadarSurfaceTrack\022\f\n\004flag\030\001 \002(\005\022\020\n\bsourceId\030\002 \002(\t\022\013\n\003UTC\030\003 \002(\004\022\016\n\006length\030\004 \002(\005\0228\n\013trackPoints\030\005 \003(\0132#.com.com.zhichenhaixin.proto.TrackPoint\"B\n\bSpectrum\022", "\021\n\tlongitude\030\001 \002(\001\022\020\n\blatitude\030\002 \002(\001\022\021\n\tamplitude\030\003 \002(\005\"U\n\fLineSpectrum\022\017\n\007azimuth\030\001 \002(\001\0224\n\tspectrums\030\002 \003(\0132!.com.com.zhichenhaixin.proto.Spectrum\"c\n\016SectorSpectrum\022\023\n\013sectorIndex\030\001 \002(\005\022<\n\rlineSpectrums\030\002 \003(\0132%.com.com.zhichenhaixin.proto.LineSpectrum\"‹\001\n\nRadarVideo\022\f\n\004flag\030\001 \002(\005\022\020\n\bsourceId\030\002 \002(\t\022\013\n\003UTC\030\003 \002(\004\022\016\n\006length\030\004 \002(\005\022@\n\017sectorSpectrums\030\005 \003(\0132'.com.com.zhichenhaixin.proto.SectorSpectrum*}\n\006MSGTYP\022\024\n\020M", "SGTYP_UNDEFINED\020\000\022\021\n\rTARGET_REPORT\020\001\022\031\n\025START_OF_UPDATE_CYCLE\020\002\022\023\n\017PERIODIC_STATUS\020\003\022\032\n\026EVENT_TRIGGERED_STATUS\020\004*B\n\003CNF\022\023\n\017CONFIRMED_TRACK\020\000\022\023\n\017TENTATIVE_TRACK\020\001\022\021\n\rUNKNOWN_TRACK\020\002*˜\001\n\003CST\022\021\n\rCST_UNDEFINED\020\000\022(\n$PREDICTABLE_EXTRAPOLATION_DUE_PERIOD\020\001\022%\n!PREDICTABLE_EXTRAPOLATION_IN_AREA\020\002\022-\n)EXTRAPOLATION_DUE_UNPREDICTABLE_DETECTION\020\003*3\n\003STH\022\025\n\021MEASURED_POSITION\020\000\022\025\n\021SMOOTHED_POSITION\020\001" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXRadar.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_RadarHistoryTrack_descriptor, new String[] { + "TrackNumber", "Wgs84PosLat", "Wgs84PosLong", "TimeOfDay", "TrackType", "TrackLastReport", "Extrapolation", "TrackPositionCode", "Cog", "Sog", + "UTC" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_RadarHistoryTracks_descriptor, new String[] { "Tracks" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_TrackPoint_descriptor = getDescriptor().getMessageTypes().get(2); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_TrackPoint_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_TrackPoint_descriptor, new String[] { + "SystemAreaCode", "SystemIdentificationCode", "MessageType", "TrackNumber", "CartesianPosX", "CartesianPosY", "Wgs84PosLat", "Wgs84PosLong", "TimeOfDay", "TrackType", + "TrackLastReport", "Extrapolation", "TrackPositionCode", "SigmaX", "SigmaY", "SigmaXY", "AmpOfPriPlot", "CartesianTrkVelVx", "CartesianTrkVelVy", "Cog", + "Sog", "Tracks", "Status", "IsSmuggle", "Distance", "WarnColor", "TargetType", "SignWindow", "IsWarn", "Rtsp", + "Fllow", "Mode", "TimeStamp", "Trackby", "CameraId" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_FllowVo_descriptor = getDescriptor().getMessageTypes().get(3); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_FllowVo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_FllowVo_descriptor, new String[] { "Flag", "Fllow", "TrackPoints", "Mode" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_descriptor = getDescriptor().getMessageTypes().get(4); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_RadarSurfaceTrack_descriptor, new String[] { "Flag", "SourceId", "UTC", "Length", "TrackPoints" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_Spectrum_descriptor = getDescriptor().getMessageTypes().get(5); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_Spectrum_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_Spectrum_descriptor, new String[] { "Longitude", "Latitude", "Amplitude" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_LineSpectrum_descriptor = getDescriptor().getMessageTypes().get(6); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_LineSpectrum_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_LineSpectrum_descriptor, new String[] { "Azimuth", "Spectrums" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_SectorSpectrum_descriptor = getDescriptor().getMessageTypes().get(7); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_SectorSpectrum_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_SectorSpectrum_descriptor, new String[] { "SectorIndex", "LineSpectrums" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_RadarVideo_descriptor = getDescriptor().getMessageTypes().get(8); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_RadarVideo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_RadarVideo_descriptor, new String[] { "Flag", "SourceId", "UTC", "Length", "SectorSpectrums" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface FllowVoOrBuilder extends MessageOrBuilder { + boolean hasFlag(); + + boolean getFlag(); + + boolean hasFllow(); + + boolean getFllow(); + + List getTrackPointsList(); + + TrackPoint getTrackPoints(int param1Int); + + int getTrackPointsCount(); + + List getTrackPointsOrBuilderList(); + + TrackPointOrBuilder getTrackPointsOrBuilder(int param1Int); + + boolean hasMode(); + + int getMode(); + } + + public static interface LineSpectrumOrBuilder extends MessageOrBuilder { + boolean hasAzimuth(); + + double getAzimuth(); + + List getSpectrumsList(); + + Spectrum getSpectrums(int param1Int); + + int getSpectrumsCount(); + + List getSpectrumsOrBuilderList(); + + SpectrumOrBuilder getSpectrumsOrBuilder(int param1Int); + } + + public static interface RadarHistoryTrackOrBuilder extends MessageOrBuilder { + boolean hasTrackNumber(); + + int getTrackNumber(); + + boolean hasWgs84PosLat(); + + double getWgs84PosLat(); + + boolean hasWgs84PosLong(); + + double getWgs84PosLong(); + + boolean hasTimeOfDay(); + + float getTimeOfDay(); + + boolean hasTrackType(); + + CNF getTrackType(); + + boolean hasTrackLastReport(); + + boolean getTrackLastReport(); + + boolean hasExtrapolation(); + + CST getExtrapolation(); + + boolean hasTrackPositionCode(); + + STH getTrackPositionCode(); + + boolean hasCog(); + + double getCog(); + + boolean hasSog(); + + double getSog(); + + boolean hasUTC(); + + long getUTC(); + } + + public static interface RadarHistoryTracksOrBuilder extends MessageOrBuilder { + List getTracksList(); + + RadarHistoryTrack getTracks(int param1Int); + + int getTracksCount(); + + List getTracksOrBuilderList(); + + RadarHistoryTrackOrBuilder getTracksOrBuilder(int param1Int); + } + + public static interface RadarSurfaceTrackOrBuilder extends MessageOrBuilder { + boolean hasFlag(); + + int getFlag(); + + boolean hasSourceId(); + + String getSourceId(); + + ByteString getSourceIdBytes(); + + boolean hasUTC(); + + long getUTC(); + + boolean hasLength(); + + int getLength(); + + List getTrackPointsList(); + + TrackPoint getTrackPoints(int param1Int); + + int getTrackPointsCount(); + + List getTrackPointsOrBuilderList(); + + TrackPointOrBuilder getTrackPointsOrBuilder(int param1Int); + } + + public static interface RadarVideoOrBuilder extends MessageOrBuilder { + boolean hasFlag(); + + int getFlag(); + + boolean hasSourceId(); + + String getSourceId(); + + ByteString getSourceIdBytes(); + + boolean hasUTC(); + + long getUTC(); + + boolean hasLength(); + + int getLength(); + + List getSectorSpectrumsList(); + + SectorSpectrum getSectorSpectrums(int param1Int); + + int getSectorSpectrumsCount(); + + List getSectorSpectrumsOrBuilderList(); + + SectorSpectrumOrBuilder getSectorSpectrumsOrBuilder(int param1Int); + } + + public static interface SectorSpectrumOrBuilder extends MessageOrBuilder { + boolean hasSectorIndex(); + + int getSectorIndex(); + + List getLineSpectrumsList(); + + LineSpectrum getLineSpectrums(int param1Int); + + int getLineSpectrumsCount(); + + List getLineSpectrumsOrBuilderList(); + + LineSpectrumOrBuilder getLineSpectrumsOrBuilder(int param1Int); + } + + public static interface SpectrumOrBuilder extends MessageOrBuilder { + boolean hasLongitude(); + + double getLongitude(); + + boolean hasLatitude(); + + double getLatitude(); + + boolean hasAmplitude(); + + int getAmplitude(); + } + + public static interface TrackPointOrBuilder extends MessageOrBuilder { + boolean hasSystemAreaCode(); + + int getSystemAreaCode(); + + boolean hasSystemIdentificationCode(); + + int getSystemIdentificationCode(); + + boolean hasMessageType(); + + MSGTYP getMessageType(); + + boolean hasTrackNumber(); + + int getTrackNumber(); + + boolean hasCartesianPosX(); + + float getCartesianPosX(); + + boolean hasCartesianPosY(); + + float getCartesianPosY(); + + boolean hasWgs84PosLat(); + + double getWgs84PosLat(); + + boolean hasWgs84PosLong(); + + double getWgs84PosLong(); + + boolean hasTimeOfDay(); + + float getTimeOfDay(); + + boolean hasTrackType(); + + CNF getTrackType(); + + boolean hasTrackLastReport(); + + boolean getTrackLastReport(); + + boolean hasExtrapolation(); + + CST getExtrapolation(); + + boolean hasTrackPositionCode(); + + STH getTrackPositionCode(); + + boolean hasSigmaX(); + + float getSigmaX(); + + boolean hasSigmaY(); + + float getSigmaY(); + + boolean hasSigmaXY(); + + float getSigmaXY(); + + boolean hasAmpOfPriPlot(); + + float getAmpOfPriPlot(); + + boolean hasCartesianTrkVelVx(); + + double getCartesianTrkVelVx(); + + boolean hasCartesianTrkVelVy(); + + double getCartesianTrkVelVy(); + + boolean hasCog(); + + double getCog(); + + boolean hasSog(); + + double getSog(); + + boolean hasTracks(); + + RadarHistoryTracks getTracks(); + + RadarHistoryTracksOrBuilder getTracksOrBuilder(); + + boolean hasStatus(); + + int getStatus(); + + boolean hasIsSmuggle(); + + int getIsSmuggle(); + + boolean hasDistance(); + + double getDistance(); + + boolean hasWarnColor(); + + String getWarnColor(); + + ByteString getWarnColorBytes(); + + boolean hasTargetType(); + + int getTargetType(); + + boolean hasSignWindow(); + + int getSignWindow(); + + boolean hasIsWarn(); + + int getIsWarn(); + + boolean hasRtsp(); + + String getRtsp(); + + ByteString getRtspBytes(); + + boolean hasFllow(); + + int getFllow(); + + boolean hasMode(); + + int getMode(); + + boolean hasTimeStamp(); + + long getTimeStamp(); + + boolean hasTrackby(); + + String getTrackby(); + + ByteString getTrackbyBytes(); + + boolean hasCameraId(); + + int getCameraId(); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXUAV.java b/src/main/java/com/zhichenhaixin/proto/ZCHXUAV.java new file mode 100644 index 0000000..18970ab --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXUAV.java @@ -0,0 +1,1648 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXUAV { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public static final class UAVData extends GeneratedMessage implements UAVDataOrBuilder { + private static final UAVData defaultInstance = new UAVData(true); + + private final UnknownFieldSet unknownFields; + + private UAVData(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private UAVData(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static UAVData getDefaultInstance() { + return defaultInstance; + } + + public UAVData getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UAVData(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.deviceId_ = input.readInt32(); + break; + case 18: + bs = input.readBytes(); + this.bitField0_ |= 0x2; + this.deviceName_ = bs; + break; + case 29: + this.bitField0_ |= 0x4; + this.lon_ = input.readFloat(); + break; + case 37: + this.bitField0_ |= 0x8; + this.lat_ = input.readFloat(); + break; + case 45: + this.bitField0_ |= 0x10; + this.gpsHeight_ = input.readFloat(); + break; + case 53: + this.bitField0_ |= 0x20; + this.speed_ = input.readFloat(); + break; + case 61: + this.bitField0_ |= 0x40; + this.heading_ = input.readFloat(); + break; + case 64: + this.bitField0_ |= 0x80; + this.starNumber_ = input.readInt32(); + break; + case 74: + bs = input.readBytes(); + this.bitField0_ |= 0x100; + this.dateTime_ = bs; + break; + case 85: + this.bitField0_ |= 0x200; + this.airPressHeight_ = input.readFloat(); + break; + case 93: + this.bitField0_ |= 0x400; + this.electricPressValue_ = input.readFloat(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVData_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVData_fieldAccessorTable.ensureFieldAccessorsInitialized(UAVData.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public UAVData parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new UAVData(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int DEVICEID_FIELD_NUMBER = 1; + + private int deviceId_; + + public static final int DEVICENAME_FIELD_NUMBER = 2; + + private Object deviceName_; + + public static final int LON_FIELD_NUMBER = 3; + + private float lon_; + + public static final int LAT_FIELD_NUMBER = 4; + + private float lat_; + + public static final int GPSHEIGHT_FIELD_NUMBER = 5; + + private float gpsHeight_; + + public static final int SPEED_FIELD_NUMBER = 6; + + private float speed_; + + public static final int HEADING_FIELD_NUMBER = 7; + + private float heading_; + + public static final int STARNUMBER_FIELD_NUMBER = 8; + + private int starNumber_; + + public static final int DATETIME_FIELD_NUMBER = 9; + + private Object dateTime_; + + public static final int AIRPRESSHEIGHT_FIELD_NUMBER = 10; + + private float airPressHeight_; + + public static final int ELECTRICPRESSVALUE_FIELD_NUMBER = 11; + + private float electricPressValue_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasDeviceId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getDeviceId() { + return this.deviceId_; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x4) == 4); + } + + public float getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getLat() { + return this.lat_; + } + + public boolean hasGpsHeight() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getGpsHeight() { + return this.gpsHeight_; + } + + public boolean hasSpeed() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getSpeed() { + return this.speed_; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x40) == 64); + } + + public float getHeading() { + return this.heading_; + } + + public boolean hasStarNumber() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getStarNumber() { + return this.starNumber_; + } + + public boolean hasDateTime() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getDateTime() { + Object ref = this.dateTime_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dateTime_ = s; + return s; + } + + public ByteString getDateTimeBytes() { + Object ref = this.dateTime_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dateTime_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAirPressHeight() { + return ((this.bitField0_ & 0x200) == 512); + } + + public float getAirPressHeight() { + return this.airPressHeight_; + } + + public boolean hasElectricPressValue() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public float getElectricPressValue() { + return this.electricPressValue_; + } + + private void initFields() { + this.deviceId_ = 0; + this.deviceName_ = ""; + this.lon_ = 0.0F; + this.lat_ = 0.0F; + this.gpsHeight_ = 0.0F; + this.speed_ = 0.0F; + this.heading_ = 0.0F; + this.starNumber_ = 0; + this.dateTime_ = ""; + this.airPressHeight_ = 0.0F; + this.electricPressValue_ = 0.0F; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasDeviceId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDeviceName()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasGpsHeight()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasSpeed()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasHeading()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasStarNumber()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasDateTime()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAirPressHeight()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasElectricPressValue()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt32(1, this.deviceId_); + if ((this.bitField0_ & 0x2) == 2) + output.writeBytes(2, getDeviceNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + output.writeFloat(3, this.lon_); + if ((this.bitField0_ & 0x8) == 8) + output.writeFloat(4, this.lat_); + if ((this.bitField0_ & 0x10) == 16) + output.writeFloat(5, this.gpsHeight_); + if ((this.bitField0_ & 0x20) == 32) + output.writeFloat(6, this.speed_); + if ((this.bitField0_ & 0x40) == 64) + output.writeFloat(7, this.heading_); + if ((this.bitField0_ & 0x80) == 128) + output.writeInt32(8, this.starNumber_); + if ((this.bitField0_ & 0x100) == 256) + output.writeBytes(9, getDateTimeBytes()); + if ((this.bitField0_ & 0x200) == 512) + output.writeFloat(10, this.airPressHeight_); + if ((this.bitField0_ & 0x400) == 1024) + output.writeFloat(11, this.electricPressValue_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt32Size(1, this.deviceId_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeBytesSize(2, getDeviceNameBytes()); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeFloatSize(3, this.lon_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeFloatSize(4, this.lat_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeFloatSize(5, this.gpsHeight_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeFloatSize(6, this.speed_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeFloatSize(7, this.heading_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeInt32Size(8, this.starNumber_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeBytesSize(9, getDateTimeBytes()); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeFloatSize(10, this.airPressHeight_); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeFloatSize(11, this.electricPressValue_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static UAVData parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (UAVData)PARSER.parseFrom(data); + } + + public static UAVData parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (UAVData)PARSER.parseFrom(data, extensionRegistry); + } + + public static UAVData parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (UAVData)PARSER.parseFrom(data); + } + + public static UAVData parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (UAVData)PARSER.parseFrom(data, extensionRegistry); + } + + public static UAVData parseFrom(InputStream input) throws IOException { + return (UAVData)PARSER.parseFrom(input); + } + + public static UAVData parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (UAVData)PARSER.parseFrom(input, extensionRegistry); + } + + public static UAVData parseDelimitedFrom(InputStream input) throws IOException { + return (UAVData)PARSER.parseDelimitedFrom(input); + } + + public static UAVData parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (UAVData)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static UAVData parseFrom(CodedInputStream input) throws IOException { + return (UAVData)PARSER.parseFrom(input); + } + + public static UAVData parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (UAVData)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(UAVData prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements UAVDataOrBuilder { + private int bitField0_; + + private int deviceId_; + + private Object deviceName_; + + private float lon_; + + private float lat_; + + private float gpsHeight_; + + private float speed_; + + private float heading_; + + private int starNumber_; + + private Object dateTime_; + + private float airPressHeight_; + + private float electricPressValue_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVData_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVData_fieldAccessorTable.ensureFieldAccessorsInitialized(UAVData.class, Builder.class); + } + + private Builder() { + this.deviceName_ = ""; + this.dateTime_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.deviceName_ = ""; + this.dateTime_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = UAVData.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.deviceId_ = 0; + this.bitField0_ &= 0xFFFFFFFE; + this.deviceName_ = ""; + this.bitField0_ &= 0xFFFFFFFD; + this.lon_ = 0.0F; + this.bitField0_ &= 0xFFFFFFFB; + this.lat_ = 0.0F; + this.bitField0_ &= 0xFFFFFFF7; + this.gpsHeight_ = 0.0F; + this.bitField0_ &= 0xFFFFFFEF; + this.speed_ = 0.0F; + this.bitField0_ &= 0xFFFFFFDF; + this.heading_ = 0.0F; + this.bitField0_ &= 0xFFFFFFBF; + this.starNumber_ = 0; + this.bitField0_ &= 0xFFFFFF7F; + this.dateTime_ = ""; + this.bitField0_ &= 0xFFFFFEFF; + this.airPressHeight_ = 0.0F; + this.bitField0_ &= 0xFFFFFDFF; + this.electricPressValue_ = 0.0F; + this.bitField0_ &= 0xFFFFFBFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVData_descriptor; + } + + public UAVData getDefaultInstanceForType() { + return UAVData.getDefaultInstance(); + } + + public UAVData build() { + UAVData result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public UAVData buildPartial() { + UAVData result = new UAVData(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.deviceId_ = this.deviceId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.deviceName_ = this.deviceName_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.gpsHeight_ = this.gpsHeight_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.speed_ = this.speed_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.heading_ = this.heading_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.starNumber_ = this.starNumber_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.dateTime_ = this.dateTime_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.airPressHeight_ = this.airPressHeight_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.electricPressValue_ = this.electricPressValue_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof UAVData) + return mergeFrom((UAVData)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(UAVData other) { + if (other == UAVData.getDefaultInstance()) + return this; + if (other.hasDeviceId()) + setDeviceId(other.getDeviceId()); + if (other.hasDeviceName()) { + this.bitField0_ |= 0x2; + this.deviceName_ = other.deviceName_; + onChanged(); + } + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasGpsHeight()) + setGpsHeight(other.getGpsHeight()); + if (other.hasSpeed()) + setSpeed(other.getSpeed()); + if (other.hasHeading()) + setHeading(other.getHeading()); + if (other.hasStarNumber()) + setStarNumber(other.getStarNumber()); + if (other.hasDateTime()) { + this.bitField0_ |= 0x100; + this.dateTime_ = other.dateTime_; + onChanged(); + } + if (other.hasAirPressHeight()) + setAirPressHeight(other.getAirPressHeight()); + if (other.hasElectricPressValue()) + setElectricPressValue(other.getElectricPressValue()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasDeviceId()) + return false; + if (!hasDeviceName()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasGpsHeight()) + return false; + if (!hasSpeed()) + return false; + if (!hasHeading()) + return false; + if (!hasStarNumber()) + return false; + if (!hasDateTime()) + return false; + if (!hasAirPressHeight()) + return false; + if (!hasElectricPressValue()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + UAVData parsedMessage = null; + try { + parsedMessage = (UAVData) UAVData.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (UAVData)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasDeviceId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public int getDeviceId() { + return this.deviceId_; + } + + public Builder setDeviceId(int value) { + this.bitField0_ |= 0x1; + this.deviceId_ = value; + onChanged(); + return this; + } + + public Builder clearDeviceId() { + this.bitField0_ &= 0xFFFFFFFE; + this.deviceId_ = 0; + onChanged(); + return this; + } + + public boolean hasDeviceName() { + return ((this.bitField0_ & 0x2) == 2); + } + + public String getDeviceName() { + Object ref = this.deviceName_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.deviceName_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDeviceNameBytes() { + Object ref = this.deviceName_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.deviceName_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDeviceName(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.deviceName_ = value; + onChanged(); + return this; + } + + public Builder clearDeviceName() { + this.bitField0_ &= 0xFFFFFFFD; + this.deviceName_ = UAVData.getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + + public Builder setDeviceNameBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x2; + this.deviceName_ = value; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x4) == 4); + } + + public float getLon() { + return this.lon_; + } + + public Builder setLon(float value) { + this.bitField0_ |= 0x4; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFFB; + this.lon_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getLat() { + return this.lat_; + } + + public Builder setLat(float value) { + this.bitField0_ |= 0x8; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFFF7; + this.lat_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasGpsHeight() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getGpsHeight() { + return this.gpsHeight_; + } + + public Builder setGpsHeight(float value) { + this.bitField0_ |= 0x10; + this.gpsHeight_ = value; + onChanged(); + return this; + } + + public Builder clearGpsHeight() { + this.bitField0_ &= 0xFFFFFFEF; + this.gpsHeight_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasSpeed() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getSpeed() { + return this.speed_; + } + + public Builder setSpeed(float value) { + this.bitField0_ |= 0x20; + this.speed_ = value; + onChanged(); + return this; + } + + public Builder clearSpeed() { + this.bitField0_ &= 0xFFFFFFDF; + this.speed_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasHeading() { + return ((this.bitField0_ & 0x40) == 64); + } + + public float getHeading() { + return this.heading_; + } + + public Builder setHeading(float value) { + this.bitField0_ |= 0x40; + this.heading_ = value; + onChanged(); + return this; + } + + public Builder clearHeading() { + this.bitField0_ &= 0xFFFFFFBF; + this.heading_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasStarNumber() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getStarNumber() { + return this.starNumber_; + } + + public Builder setStarNumber(int value) { + this.bitField0_ |= 0x80; + this.starNumber_ = value; + onChanged(); + return this; + } + + public Builder clearStarNumber() { + this.bitField0_ &= 0xFFFFFF7F; + this.starNumber_ = 0; + onChanged(); + return this; + } + + public boolean hasDateTime() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getDateTime() { + Object ref = this.dateTime_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.dateTime_ = s; + return s; + } + return (String)ref; + } + + public ByteString getDateTimeBytes() { + Object ref = this.dateTime_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.dateTime_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setDateTime(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.dateTime_ = value; + onChanged(); + return this; + } + + public Builder clearDateTime() { + this.bitField0_ &= 0xFFFFFEFF; + this.dateTime_ = UAVData.getDefaultInstance().getDateTime(); + onChanged(); + return this; + } + + public Builder setDateTimeBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.dateTime_ = value; + onChanged(); + return this; + } + + public boolean hasAirPressHeight() { + return ((this.bitField0_ & 0x200) == 512); + } + + public float getAirPressHeight() { + return this.airPressHeight_; + } + + public Builder setAirPressHeight(float value) { + this.bitField0_ |= 0x200; + this.airPressHeight_ = value; + onChanged(); + return this; + } + + public Builder clearAirPressHeight() { + this.bitField0_ &= 0xFFFFFDFF; + this.airPressHeight_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasElectricPressValue() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public float getElectricPressValue() { + return this.electricPressValue_; + } + + public Builder setElectricPressValue(float value) { + this.bitField0_ |= 0x400; + this.electricPressValue_ = value; + onChanged(); + return this; + } + + public Builder clearElectricPressValue() { + this.bitField0_ &= 0xFFFFFBFF; + this.electricPressValue_ = 0.0F; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class UAVDataList extends GeneratedMessage implements UAVDataListOrBuilder { + private static final UAVDataList defaultInstance = new UAVDataList(true); + + private final UnknownFieldSet unknownFields; + + private UAVDataList(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private UAVDataList(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static UAVDataList getDefaultInstance() { + return defaultInstance; + } + + public UAVDataList getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UAVDataList(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.uavDataList_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.uavDataList_.add((UAVData)input.readMessage(UAVData.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.uavDataList_ = Collections.unmodifiableList(this.uavDataList_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVDataList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVDataList_fieldAccessorTable.ensureFieldAccessorsInitialized(UAVDataList.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public UAVDataList parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new UAVDataList(input, extensionRegistry); + } + }; + + public static final int UAVDATALIST_FIELD_NUMBER = 1; + + private List uavDataList_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getUavDataListList() { + return this.uavDataList_; + } + + public List getUavDataListOrBuilderList() { + return (List)this.uavDataList_; + } + + public int getUavDataListCount() { + return this.uavDataList_.size(); + } + + public UAVData getUavDataList(int index) { + return this.uavDataList_.get(index); + } + + public UAVDataOrBuilder getUavDataListOrBuilder(int index) { + return this.uavDataList_.get(index); + } + + private void initFields() { + this.uavDataList_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getUavDataListCount(); i++) { + if (!getUavDataList(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.uavDataList_.size(); i++) + output.writeMessage(1, (MessageLite)this.uavDataList_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.uavDataList_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.uavDataList_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static UAVDataList parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (UAVDataList)PARSER.parseFrom(data); + } + + public static UAVDataList parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (UAVDataList)PARSER.parseFrom(data, extensionRegistry); + } + + public static UAVDataList parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (UAVDataList)PARSER.parseFrom(data); + } + + public static UAVDataList parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (UAVDataList)PARSER.parseFrom(data, extensionRegistry); + } + + public static UAVDataList parseFrom(InputStream input) throws IOException { + return (UAVDataList)PARSER.parseFrom(input); + } + + public static UAVDataList parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (UAVDataList)PARSER.parseFrom(input, extensionRegistry); + } + + public static UAVDataList parseDelimitedFrom(InputStream input) throws IOException { + return (UAVDataList)PARSER.parseDelimitedFrom(input); + } + + public static UAVDataList parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (UAVDataList)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static UAVDataList parseFrom(CodedInputStream input) throws IOException { + return (UAVDataList)PARSER.parseFrom(input); + } + + public static UAVDataList parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (UAVDataList)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(UAVDataList prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements UAVDataListOrBuilder { + private int bitField0_; + + private List uavDataList_; + + private RepeatedFieldBuilder uavDataListBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVDataList_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVDataList_fieldAccessorTable.ensureFieldAccessorsInitialized(UAVDataList.class, Builder.class); + } + + private Builder() { + this.uavDataList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.uavDataList_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (UAVDataList.alwaysUseFieldBuilders) + getUavDataListFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.uavDataListBuilder_ == null) { + this.uavDataList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.uavDataListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXUAV.internal_static_com_zhichenhaixin_proto_UAVDataList_descriptor; + } + + public UAVDataList getDefaultInstanceForType() { + return UAVDataList.getDefaultInstance(); + } + + public UAVDataList build() { + UAVDataList result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public UAVDataList buildPartial() { + UAVDataList result = new UAVDataList(this); + int from_bitField0_ = this.bitField0_; + if (this.uavDataListBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.uavDataList_ = Collections.unmodifiableList(this.uavDataList_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.uavDataList_ = this.uavDataList_; + } else { + result.uavDataList_ = this.uavDataListBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof UAVDataList) + return mergeFrom((UAVDataList)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(UAVDataList other) { + if (other == UAVDataList.getDefaultInstance()) + return this; + if (this.uavDataListBuilder_ == null) { + if (!other.uavDataList_.isEmpty()) { + if (this.uavDataList_.isEmpty()) { + this.uavDataList_ = other.uavDataList_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureUavDataListIsMutable(); + this.uavDataList_.addAll(other.uavDataList_); + } + onChanged(); + } + } else if (!other.uavDataList_.isEmpty()) { + if (this.uavDataListBuilder_.isEmpty()) { + this.uavDataListBuilder_.dispose(); + this.uavDataListBuilder_ = null; + this.uavDataList_ = other.uavDataList_; + this.bitField0_ &= 0xFFFFFFFE; + this.uavDataListBuilder_ = UAVDataList.alwaysUseFieldBuilders ? getUavDataListFieldBuilder() : null; + } else { + this.uavDataListBuilder_.addAllMessages(other.uavDataList_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getUavDataListCount(); i++) { + if (!getUavDataList(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + UAVDataList parsedMessage = null; + try { + parsedMessage = (UAVDataList) UAVDataList.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (UAVDataList)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureUavDataListIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.uavDataList_ = new ArrayList(this.uavDataList_); + this.bitField0_ |= 0x1; + } + } + + public List getUavDataListList() { + if (this.uavDataListBuilder_ == null) + return Collections.unmodifiableList(this.uavDataList_); + return this.uavDataListBuilder_.getMessageList(); + } + + public int getUavDataListCount() { + if (this.uavDataListBuilder_ == null) + return this.uavDataList_.size(); + return this.uavDataListBuilder_.getCount(); + } + + public UAVData getUavDataList(int index) { + if (this.uavDataListBuilder_ == null) + return this.uavDataList_.get(index); + return (UAVData)this.uavDataListBuilder_.getMessage(index); + } + + public Builder setUavDataList(int index, UAVData value) { + if (this.uavDataListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureUavDataListIsMutable(); + this.uavDataList_.set(index, value); + onChanged(); + } else { + this.uavDataListBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setUavDataList(int index, UAVData.Builder builderForValue) { + if (this.uavDataListBuilder_ == null) { + ensureUavDataListIsMutable(); + this.uavDataList_.set(index, builderForValue.build()); + onChanged(); + } else { + this.uavDataListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addUavDataList(UAVData value) { + if (this.uavDataListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureUavDataListIsMutable(); + this.uavDataList_.add(value); + onChanged(); + } else { + this.uavDataListBuilder_.addMessage(value); + } + return this; + } + + public Builder addUavDataList(int index, UAVData value) { + if (this.uavDataListBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureUavDataListIsMutable(); + this.uavDataList_.add(index, value); + onChanged(); + } else { + this.uavDataListBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addUavDataList(UAVData.Builder builderForValue) { + if (this.uavDataListBuilder_ == null) { + ensureUavDataListIsMutable(); + this.uavDataList_.add(builderForValue.build()); + onChanged(); + } else { + this.uavDataListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addUavDataList(int index, UAVData.Builder builderForValue) { + if (this.uavDataListBuilder_ == null) { + ensureUavDataListIsMutable(); + this.uavDataList_.add(index, builderForValue.build()); + onChanged(); + } else { + this.uavDataListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllUavDataList(Iterable values) { + if (this.uavDataListBuilder_ == null) { + ensureUavDataListIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.uavDataList_); + onChanged(); + } else { + this.uavDataListBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearUavDataList() { + if (this.uavDataListBuilder_ == null) { + this.uavDataList_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.uavDataListBuilder_.clear(); + } + return this; + } + + public Builder removeUavDataList(int index) { + if (this.uavDataListBuilder_ == null) { + ensureUavDataListIsMutable(); + this.uavDataList_.remove(index); + onChanged(); + } else { + this.uavDataListBuilder_.remove(index); + } + return this; + } + + public UAVData.Builder getUavDataListBuilder(int index) { + return (UAVData.Builder)getUavDataListFieldBuilder().getBuilder(index); + } + + public UAVDataOrBuilder getUavDataListOrBuilder(int index) { + if (this.uavDataListBuilder_ == null) + return this.uavDataList_.get(index); + return (UAVDataOrBuilder)this.uavDataListBuilder_.getMessageOrBuilder(index); + } + + public List getUavDataListOrBuilderList() { + if (this.uavDataListBuilder_ != null) + return this.uavDataListBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.uavDataList_); + } + + public UAVData.Builder addUavDataListBuilder() { + return (UAVData.Builder)getUavDataListFieldBuilder().addBuilder(UAVData.getDefaultInstance()); + } + + public UAVData.Builder addUavDataListBuilder(int index) { + return (UAVData.Builder)getUavDataListFieldBuilder().addBuilder(index, UAVData.getDefaultInstance()); + } + + public List getUavDataListBuilderList() { + return getUavDataListFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getUavDataListFieldBuilder() { + if (this.uavDataListBuilder_ == null) { + this.uavDataListBuilder_ = new RepeatedFieldBuilder(this.uavDataList_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.uavDataList_ = null; + } + return this.uavDataListBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\rZCHXUAV.proto\022\027com.com.zhichenhaixin.proto\"Ö\001\n\007UAVData\022\020\n\bdeviceId\030\001 \002(\005\022\022\n\ndeviceName\030\002 \002(\t\022\013\n\003lon\030\003 \002(\002\022\013\n\003lat\030\004 \002(\002\022\021\n\tgpsHeight\030\005 \002(\002\022\r\n\005speed\030\006 \002(\002\022\017\n\007heading\030\007 \002(\002\022\022\n\nstarNumber\030\b \002(\005\022\020\n\bdateTime\030\t \002(\t\022\026\n\016airPressHeight\030\n \002(\002\022\032\n\022electricPressValue\030\013 \002(\002\"D\n\013UAVDataList\0225\n\013uavDataList\030\001 \003(\0132 .com.com.zhichenhaixin.proto.UAVData" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXUAV.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_UAVData_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_UAVData_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_UAVData_descriptor, new String[] { + "DeviceId", "DeviceName", "Lon", "Lat", "GpsHeight", "Speed", "Heading", "StarNumber", "DateTime", "AirPressHeight", + "ElectricPressValue" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_UAVDataList_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_UAVDataList_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_UAVDataList_descriptor, new String[] { "UavDataList" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface UAVDataListOrBuilder extends MessageOrBuilder { + List getUavDataListList(); + + UAVData getUavDataList(int param1Int); + + int getUavDataListCount(); + + List getUavDataListOrBuilderList(); + + UAVDataOrBuilder getUavDataListOrBuilder(int param1Int); + } + + public static interface UAVDataOrBuilder extends MessageOrBuilder { + boolean hasDeviceId(); + + int getDeviceId(); + + boolean hasDeviceName(); + + String getDeviceName(); + + ByteString getDeviceNameBytes(); + + boolean hasLon(); + + float getLon(); + + boolean hasLat(); + + float getLat(); + + boolean hasGpsHeight(); + + float getGpsHeight(); + + boolean hasSpeed(); + + float getSpeed(); + + boolean hasHeading(); + + float getHeading(); + + boolean hasStarNumber(); + + int getStarNumber(); + + boolean hasDateTime(); + + String getDateTime(); + + ByteString getDateTimeBytes(); + + boolean hasAirPressHeight(); + + float getAirPressHeight(); + + boolean hasElectricPressValue(); + + float getElectricPressValue(); + } +} diff --git a/src/main/java/com/zhichenhaixin/proto/ZCHXVideoWarn.java b/src/main/java/com/zhichenhaixin/proto/ZCHXVideoWarn.java new file mode 100644 index 0000000..99970ef --- /dev/null +++ b/src/main/java/com/zhichenhaixin/proto/ZCHXVideoWarn.java @@ -0,0 +1,6796 @@ +package com.zhichenhaixin.proto; + +import com.google.protobuf.*; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class ZCHXVideoWarn { + public static void registerAllExtensions(ExtensionRegistry registry) {} + + public static final class RectInfo extends GeneratedMessage implements RectInfoOrBuilder { + private static final RectInfo defaultInstance = new RectInfo(true); + + private final UnknownFieldSet unknownFields; + + private RectInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private RectInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static RectInfo getDefaultInstance() { + return defaultInstance; + } + + public RectInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RectInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + this.bitField0_ |= 0x1; + this.time_ = input.readInt64(); + break; + case 17: + this.bitField0_ |= 0x2; + this.lon_ = input.readDouble(); + break; + case 25: + this.bitField0_ |= 0x4; + this.lat_ = input.readDouble(); + break; + case 37: + this.bitField0_ |= 0x8; + this.x_ = input.readFloat(); + break; + case 45: + this.bitField0_ |= 0x10; + this.y_ = input.readFloat(); + break; + case 53: + this.bitField0_ |= 0x20; + this.w_ = input.readFloat(); + break; + case 61: + this.bitField0_ |= 0x40; + this.h_ = input.readFloat(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(RectInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public RectInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new RectInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TIME_FIELD_NUMBER = 1; + + private long time_; + + public static final int LON_FIELD_NUMBER = 2; + + private double lon_; + + public static final int LAT_FIELD_NUMBER = 3; + + private double lat_; + + public static final int X_FIELD_NUMBER = 4; + + private float x_; + + public static final int Y_FIELD_NUMBER = 5; + + private float y_; + + public static final int W_FIELD_NUMBER = 6; + + private float w_; + + public static final int H_FIELD_NUMBER = 7; + + private float h_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTime() { + return ((this.bitField0_ & 0x1) == 1); + } + + public long getTime() { + return this.time_; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getLat() { + return this.lat_; + } + + public boolean hasX() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getX() { + return this.x_; + } + + public boolean hasY() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getY() { + return this.y_; + } + + public boolean hasW() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getW() { + return this.w_; + } + + public boolean hasH() { + return ((this.bitField0_ & 0x40) == 64); + } + + public float getH() { + return this.h_; + } + + private void initFields() { + this.time_ = 0L; + this.lon_ = 0.0D; + this.lat_ = 0.0D; + this.x_ = 0.0F; + this.y_ = 0.0F; + this.w_ = 0.0F; + this.h_ = 0.0F; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTime()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLon()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasLat()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasX()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasY()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasW()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasH()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeInt64(1, this.time_); + if ((this.bitField0_ & 0x2) == 2) + output.writeDouble(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + output.writeDouble(3, this.lat_); + if ((this.bitField0_ & 0x8) == 8) + output.writeFloat(4, this.x_); + if ((this.bitField0_ & 0x10) == 16) + output.writeFloat(5, this.y_); + if ((this.bitField0_ & 0x20) == 32) + output.writeFloat(6, this.w_); + if ((this.bitField0_ & 0x40) == 64) + output.writeFloat(7, this.h_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeInt64Size(1, this.time_); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeDoubleSize(2, this.lon_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeDoubleSize(3, this.lat_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeFloatSize(4, this.x_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeFloatSize(5, this.y_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeFloatSize(6, this.w_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeFloatSize(7, this.h_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static RectInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (RectInfo)PARSER.parseFrom(data); + } + + public static RectInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RectInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static RectInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (RectInfo)PARSER.parseFrom(data); + } + + public static RectInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RectInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static RectInfo parseFrom(InputStream input) throws IOException { + return (RectInfo)PARSER.parseFrom(input); + } + + public static RectInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RectInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static RectInfo parseDelimitedFrom(InputStream input) throws IOException { + return (RectInfo)PARSER.parseDelimitedFrom(input); + } + + public static RectInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RectInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static RectInfo parseFrom(CodedInputStream input) throws IOException { + return (RectInfo)PARSER.parseFrom(input); + } + + public static RectInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RectInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(RectInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements RectInfoOrBuilder { + private int bitField0_; + + private long time_; + + private double lon_; + + private double lat_; + + private float x_; + + private float y_; + + private float w_; + + private float h_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(RectInfo.class, Builder.class); + } + + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = RectInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.time_ = 0L; + this.bitField0_ &= 0xFFFFFFFE; + this.lon_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFD; + this.lat_ = 0.0D; + this.bitField0_ &= 0xFFFFFFFB; + this.x_ = 0.0F; + this.bitField0_ &= 0xFFFFFFF7; + this.y_ = 0.0F; + this.bitField0_ &= 0xFFFFFFEF; + this.w_ = 0.0F; + this.bitField0_ &= 0xFFFFFFDF; + this.h_ = 0.0F; + this.bitField0_ &= 0xFFFFFFBF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfo_descriptor; + } + + public RectInfo getDefaultInstanceForType() { + return RectInfo.getDefaultInstance(); + } + + public RectInfo build() { + RectInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public RectInfo buildPartial() { + RectInfo result = new RectInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.time_ = this.time_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.lon_ = this.lon_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.lat_ = this.lat_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.x_ = this.x_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.y_ = this.y_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.w_ = this.w_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.h_ = this.h_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof RectInfo) + return mergeFrom((RectInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(RectInfo other) { + if (other == RectInfo.getDefaultInstance()) + return this; + if (other.hasTime()) + setTime(other.getTime()); + if (other.hasLon()) + setLon(other.getLon()); + if (other.hasLat()) + setLat(other.getLat()); + if (other.hasX()) + setX(other.getX()); + if (other.hasY()) + setY(other.getY()); + if (other.hasW()) + setW(other.getW()); + if (other.hasH()) + setH(other.getH()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTime()) + return false; + if (!hasLon()) + return false; + if (!hasLat()) + return false; + if (!hasX()) + return false; + if (!hasY()) + return false; + if (!hasW()) + return false; + if (!hasH()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + RectInfo parsedMessage = null; + try { + parsedMessage = (RectInfo) RectInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (RectInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTime() { + return ((this.bitField0_ & 0x1) == 1); + } + + public long getTime() { + return this.time_; + } + + public Builder setTime(long value) { + this.bitField0_ |= 0x1; + this.time_ = value; + onChanged(); + return this; + } + + public Builder clearTime() { + this.bitField0_ &= 0xFFFFFFFE; + this.time_ = 0L; + onChanged(); + return this; + } + + public boolean hasLon() { + return ((this.bitField0_ & 0x2) == 2); + } + + public double getLon() { + return this.lon_; + } + + public Builder setLon(double value) { + this.bitField0_ |= 0x2; + this.lon_ = value; + onChanged(); + return this; + } + + public Builder clearLon() { + this.bitField0_ &= 0xFFFFFFFD; + this.lon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasLat() { + return ((this.bitField0_ & 0x4) == 4); + } + + public double getLat() { + return this.lat_; + } + + public Builder setLat(double value) { + this.bitField0_ |= 0x4; + this.lat_ = value; + onChanged(); + return this; + } + + public Builder clearLat() { + this.bitField0_ &= 0xFFFFFFFB; + this.lat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasX() { + return ((this.bitField0_ & 0x8) == 8); + } + + public float getX() { + return this.x_; + } + + public Builder setX(float value) { + this.bitField0_ |= 0x8; + this.x_ = value; + onChanged(); + return this; + } + + public Builder clearX() { + this.bitField0_ &= 0xFFFFFFF7; + this.x_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasY() { + return ((this.bitField0_ & 0x10) == 16); + } + + public float getY() { + return this.y_; + } + + public Builder setY(float value) { + this.bitField0_ |= 0x10; + this.y_ = value; + onChanged(); + return this; + } + + public Builder clearY() { + this.bitField0_ &= 0xFFFFFFEF; + this.y_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasW() { + return ((this.bitField0_ & 0x20) == 32); + } + + public float getW() { + return this.w_; + } + + public Builder setW(float value) { + this.bitField0_ |= 0x20; + this.w_ = value; + onChanged(); + return this; + } + + public Builder clearW() { + this.bitField0_ &= 0xFFFFFFDF; + this.w_ = 0.0F; + onChanged(); + return this; + } + + public boolean hasH() { + return ((this.bitField0_ & 0x40) == 64); + } + + public float getH() { + return this.h_; + } + + public Builder setH(float value) { + this.bitField0_ |= 0x40; + this.h_ = value; + onChanged(); + return this; + } + + public Builder clearH() { + this.bitField0_ &= 0xFFFFFFBF; + this.h_ = 0.0F; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class RectInfos extends GeneratedMessage implements RectInfosOrBuilder { + private static final RectInfos defaultInstance = new RectInfos(true); + + private final UnknownFieldSet unknownFields; + + private RectInfos(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private RectInfos(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static RectInfos getDefaultInstance() { + return defaultInstance; + } + + public RectInfos getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RectInfos(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + if ((mutable_bitField0_ & 0x1) != 1) { + this.rect_ = new ArrayList(); + mutable_bitField0_ |= 0x1; + } + this.rect_.add((RectInfo)input.readMessage(RectInfo.PARSER, extensionRegistry)); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + if ((mutable_bitField0_ & 0x1) == 1) + this.rect_ = Collections.unmodifiableList(this.rect_); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfos_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfos_fieldAccessorTable.ensureFieldAccessorsInitialized(RectInfos.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public RectInfos parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new RectInfos(input, extensionRegistry); + } + }; + + public static final int RECT_FIELD_NUMBER = 1; + + private List rect_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public List getRectList() { + return this.rect_; + } + + public List getRectOrBuilderList() { + return (List)this.rect_; + } + + public int getRectCount() { + return this.rect_.size(); + } + + public RectInfo getRect(int index) { + return this.rect_.get(index); + } + + public RectInfoOrBuilder getRectOrBuilder(int index) { + return this.rect_.get(index); + } + + private void initFields() { + this.rect_ = Collections.emptyList(); + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + for (int i = 0; i < getRectCount(); i++) { + if (!getRect(i).isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + for (int i = 0; i < this.rect_.size(); i++) + output.writeMessage(1, (MessageLite)this.rect_.get(i)); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < this.rect_.size(); i++) + size += CodedOutputStream.computeMessageSize(1, (MessageLite)this.rect_.get(i)); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static RectInfos parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (RectInfos)PARSER.parseFrom(data); + } + + public static RectInfos parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RectInfos)PARSER.parseFrom(data, extensionRegistry); + } + + public static RectInfos parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (RectInfos)PARSER.parseFrom(data); + } + + public static RectInfos parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (RectInfos)PARSER.parseFrom(data, extensionRegistry); + } + + public static RectInfos parseFrom(InputStream input) throws IOException { + return (RectInfos)PARSER.parseFrom(input); + } + + public static RectInfos parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RectInfos)PARSER.parseFrom(input, extensionRegistry); + } + + public static RectInfos parseDelimitedFrom(InputStream input) throws IOException { + return (RectInfos)PARSER.parseDelimitedFrom(input); + } + + public static RectInfos parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RectInfos)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static RectInfos parseFrom(CodedInputStream input) throws IOException { + return (RectInfos)PARSER.parseFrom(input); + } + + public static RectInfos parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (RectInfos)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(RectInfos prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements RectInfosOrBuilder { + private int bitField0_; + + private List rect_; + + private RepeatedFieldBuilder rectBuilder_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfos_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfos_fieldAccessorTable.ensureFieldAccessorsInitialized(RectInfos.class, Builder.class); + } + + private Builder() { + this.rect_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.rect_ = Collections.emptyList(); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (RectInfos.alwaysUseFieldBuilders) + getRectFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (this.rectBuilder_ == null) { + this.rect_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + } else { + this.rectBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_RectInfos_descriptor; + } + + public RectInfos getDefaultInstanceForType() { + return RectInfos.getDefaultInstance(); + } + + public RectInfos build() { + RectInfos result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public RectInfos buildPartial() { + RectInfos result = new RectInfos(this); + int from_bitField0_ = this.bitField0_; + if (this.rectBuilder_ == null) { + if ((this.bitField0_ & 0x1) == 1) { + this.rect_ = Collections.unmodifiableList(this.rect_); + this.bitField0_ &= 0xFFFFFFFE; + } + result.rect_ = this.rect_; + } else { + result.rect_ = this.rectBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof RectInfos) + return mergeFrom((RectInfos)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(RectInfos other) { + if (other == RectInfos.getDefaultInstance()) + return this; + if (this.rectBuilder_ == null) { + if (!other.rect_.isEmpty()) { + if (this.rect_.isEmpty()) { + this.rect_ = other.rect_; + this.bitField0_ &= 0xFFFFFFFE; + } else { + ensureRectIsMutable(); + this.rect_.addAll(other.rect_); + } + onChanged(); + } + } else if (!other.rect_.isEmpty()) { + if (this.rectBuilder_.isEmpty()) { + this.rectBuilder_.dispose(); + this.rectBuilder_ = null; + this.rect_ = other.rect_; + this.bitField0_ &= 0xFFFFFFFE; + this.rectBuilder_ = RectInfos.alwaysUseFieldBuilders ? getRectFieldBuilder() : null; + } else { + this.rectBuilder_.addAllMessages(other.rect_); + } + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getRectCount(); i++) { + if (!getRect(i).isInitialized()) + return false; + } + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + RectInfos parsedMessage = null; + try { + parsedMessage = (RectInfos) RectInfos.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (RectInfos)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + private void ensureRectIsMutable() { + if ((this.bitField0_ & 0x1) != 1) { + this.rect_ = new ArrayList(this.rect_); + this.bitField0_ |= 0x1; + } + } + + public List getRectList() { + if (this.rectBuilder_ == null) + return Collections.unmodifiableList(this.rect_); + return this.rectBuilder_.getMessageList(); + } + + public int getRectCount() { + if (this.rectBuilder_ == null) + return this.rect_.size(); + return this.rectBuilder_.getCount(); + } + + public RectInfo getRect(int index) { + if (this.rectBuilder_ == null) + return this.rect_.get(index); + return (RectInfo)this.rectBuilder_.getMessage(index); + } + + public Builder setRect(int index, RectInfo value) { + if (this.rectBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureRectIsMutable(); + this.rect_.set(index, value); + onChanged(); + } else { + this.rectBuilder_.setMessage(index, value); + } + return this; + } + + public Builder setRect(int index, RectInfo.Builder builderForValue) { + if (this.rectBuilder_ == null) { + ensureRectIsMutable(); + this.rect_.set(index, builderForValue.build()); + onChanged(); + } else { + this.rectBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addRect(RectInfo value) { + if (this.rectBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureRectIsMutable(); + this.rect_.add(value); + onChanged(); + } else { + this.rectBuilder_.addMessage(value); + } + return this; + } + + public Builder addRect(int index, RectInfo value) { + if (this.rectBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + ensureRectIsMutable(); + this.rect_.add(index, value); + onChanged(); + } else { + this.rectBuilder_.addMessage(index, value); + } + return this; + } + + public Builder addRect(RectInfo.Builder builderForValue) { + if (this.rectBuilder_ == null) { + ensureRectIsMutable(); + this.rect_.add(builderForValue.build()); + onChanged(); + } else { + this.rectBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + public Builder addRect(int index, RectInfo.Builder builderForValue) { + if (this.rectBuilder_ == null) { + ensureRectIsMutable(); + this.rect_.add(index, builderForValue.build()); + onChanged(); + } else { + this.rectBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + public Builder addAllRect(Iterable values) { + if (this.rectBuilder_ == null) { + ensureRectIsMutable(); + AbstractMessageLite.Builder.addAll(values, this.rect_); + onChanged(); + } else { + this.rectBuilder_.addAllMessages(values); + } + return this; + } + + public Builder clearRect() { + if (this.rectBuilder_ == null) { + this.rect_ = Collections.emptyList(); + this.bitField0_ &= 0xFFFFFFFE; + onChanged(); + } else { + this.rectBuilder_.clear(); + } + return this; + } + + public Builder removeRect(int index) { + if (this.rectBuilder_ == null) { + ensureRectIsMutable(); + this.rect_.remove(index); + onChanged(); + } else { + this.rectBuilder_.remove(index); + } + return this; + } + + public RectInfo.Builder getRectBuilder(int index) { + return (RectInfo.Builder)getRectFieldBuilder().getBuilder(index); + } + + public RectInfoOrBuilder getRectOrBuilder(int index) { + if (this.rectBuilder_ == null) + return this.rect_.get(index); + return (RectInfoOrBuilder)this.rectBuilder_.getMessageOrBuilder(index); + } + + public List getRectOrBuilderList() { + if (this.rectBuilder_ != null) + return this.rectBuilder_.getMessageOrBuilderList(); + return Collections.unmodifiableList((List)this.rect_); + } + + public RectInfo.Builder addRectBuilder() { + return (RectInfo.Builder)getRectFieldBuilder().addBuilder(RectInfo.getDefaultInstance()); + } + + public RectInfo.Builder addRectBuilder(int index) { + return (RectInfo.Builder)getRectFieldBuilder().addBuilder(index, RectInfo.getDefaultInstance()); + } + + public List getRectBuilderList() { + return getRectFieldBuilder().getBuilderList(); + } + + private RepeatedFieldBuilder getRectFieldBuilder() { + if (this.rectBuilder_ == null) { + this.rectBuilder_ = new RepeatedFieldBuilder(this.rect_, ((this.bitField0_ & 0x1) == 1), getParentForChildren(), isClean()); + this.rect_ = null; + } + return this.rectBuilder_; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class VideoWarnInfo extends GeneratedMessage implements VideoWarnInfoOrBuilder { + private static final VideoWarnInfo defaultInstance = new VideoWarnInfo(true); + + private final UnknownFieldSet unknownFields; + + private VideoWarnInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private VideoWarnInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static VideoWarnInfo getDefaultInstance() { + return defaultInstance; + } + + public VideoWarnInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoWarnInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.transactionId_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.cameraId_ = input.readInt32(); + break; + case 26: + bs = input.readBytes(); + this.bitField0_ |= 0x4; + this.targetId_ = bs; + break; + case 32: + this.bitField0_ |= 0x8; + this.alarmType_ = input.readInt32(); + break; + case 40: + this.bitField0_ |= 0x10; + this.targetType_ = input.readInt32(); + break; + case 48: + this.bitField0_ |= 0x20; + this.alarmSource_ = input.readInt32(); + break; + case 56: + this.bitField0_ |= 0x40; + this.alarmLevel_ = input.readInt32(); + break; + case 64: + this.bitField0_ |= 0x80; + this.alarmStatus_ = input.readInt32(); + break; + case 72: + this.bitField0_ |= 0x100; + this.alarmTime_ = input.readInt64(); + break; + case 82: + bs = input.readBytes(); + this.bitField0_ |= 0x200; + this.alarmPlace_ = bs; + break; + case 90: + bs = input.readBytes(); + this.bitField0_ |= 0x400; + this.alarmRtsp_ = bs; + break; + case 98: + bs = input.readBytes(); + this.bitField0_ |= 0x800; + this.alarmFtp_ = bs; + break; + case 105: + this.bitField0_ |= 0x1000; + this.alarmLat_ = input.readDouble(); + break; + case 113: + this.bitField0_ |= 0x2000; + this.alarmLon_ = input.readDouble(); + break; + case 122: + bs = input.readBytes(); + this.bitField0_ |= 0x4000; + this.mediaServerIp_ = bs; + break; + case 130: + bs = input.readBytes(); + this.bitField0_ |= 0x8000; + this.alarmId_ = bs; + break; + case 136: + this.bitField0_ |= 0x10000; + this.untreatedAlarmCount_ = input.readInt32(); + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(VideoWarnInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public VideoWarnInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new VideoWarnInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + + private Object transactionId_; + + public static final int CAMERA_ID_FIELD_NUMBER = 2; + + private int cameraId_; + + public static final int TARGET_ID_FIELD_NUMBER = 3; + + private Object targetId_; + + public static final int ALARM_TYPE_FIELD_NUMBER = 4; + + private int alarmType_; + + public static final int TARGET_TYPE_FIELD_NUMBER = 5; + + private int targetType_; + + public static final int ALARM_SOURCE_FIELD_NUMBER = 6; + + private int alarmSource_; + + public static final int ALARM_LEVEL_FIELD_NUMBER = 7; + + private int alarmLevel_; + + public static final int ALARM_STATUS_FIELD_NUMBER = 8; + + private int alarmStatus_; + + public static final int ALARM_TIME_FIELD_NUMBER = 9; + + private long alarmTime_; + + public static final int ALARM_PLACE_FIELD_NUMBER = 10; + + private Object alarmPlace_; + + public static final int ALARM_RTSP_FIELD_NUMBER = 11; + + private Object alarmRtsp_; + + public static final int ALARM_FTP_FIELD_NUMBER = 12; + + private Object alarmFtp_; + + public static final int ALARM_LAT_FIELD_NUMBER = 13; + + private double alarmLat_; + + public static final int ALARM_LON_FIELD_NUMBER = 14; + + private double alarmLon_; + + public static final int MEDIA_SERVER_IP_FIELD_NUMBER = 15; + + private Object mediaServerIp_; + + public static final int ALARM_ID_FIELD_NUMBER = 16; + + private Object alarmId_; + + public static final int UNTREATED_ALARM_COUNT_FIELD_NUMBER = 17; + + private int untreatedAlarmCount_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasTargetId() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getTargetId() { + Object ref = this.targetId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.targetId_ = s; + return s; + } + + public ByteString getTargetIdBytes() { + Object ref = this.targetId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.targetId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public boolean hasTargetType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getTargetType() { + return this.targetType_; + } + + public boolean hasAlarmSource() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getAlarmSource() { + return this.alarmSource_; + } + + public boolean hasAlarmLevel() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getAlarmLevel() { + return this.alarmLevel_; + } + + public boolean hasAlarmStatus() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getAlarmStatus() { + return this.alarmStatus_; + } + + public boolean hasAlarmTime() { + return ((this.bitField0_ & 0x100) == 256); + } + + public long getAlarmTime() { + return this.alarmTime_; + } + + public boolean hasAlarmPlace() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getAlarmPlace() { + Object ref = this.alarmPlace_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmPlace_ = s; + return s; + } + + public ByteString getAlarmPlaceBytes() { + Object ref = this.alarmPlace_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmPlace_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmRtsp() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getAlarmRtsp() { + Object ref = this.alarmRtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmRtsp_ = s; + return s; + } + + public ByteString getAlarmRtspBytes() { + Object ref = this.alarmRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmFtp() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getAlarmFtp() { + Object ref = this.alarmFtp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmFtp_ = s; + return s; + } + + public ByteString getAlarmFtpBytes() { + Object ref = this.alarmFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmLat() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public double getAlarmLat() { + return this.alarmLat_; + } + + public boolean hasAlarmLon() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getAlarmLon() { + return this.alarmLon_; + } + + public boolean hasMediaServerIp() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public String getMediaServerIp() { + Object ref = this.mediaServerIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaServerIp_ = s; + return s; + } + + public ByteString getMediaServerIpBytes() { + Object ref = this.mediaServerIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaServerIp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmId() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getAlarmId() { + Object ref = this.alarmId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmId_ = s; + return s; + } + + public ByteString getAlarmIdBytes() { + Object ref = this.alarmId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasUntreatedAlarmCount() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public int getUntreatedAlarmCount() { + return this.untreatedAlarmCount_; + } + + private void initFields() { + this.transactionId_ = ""; + this.cameraId_ = 0; + this.targetId_ = ""; + this.alarmType_ = 0; + this.targetType_ = 0; + this.alarmSource_ = 0; + this.alarmLevel_ = 0; + this.alarmStatus_ = 0; + this.alarmTime_ = 0L; + this.alarmPlace_ = ""; + this.alarmRtsp_ = ""; + this.alarmFtp_ = ""; + this.alarmLat_ = 0.0D; + this.alarmLon_ = 0.0D; + this.mediaServerIp_ = ""; + this.alarmId_ = ""; + this.untreatedAlarmCount_ = 0; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTransactionId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTargetId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTargetType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmSource()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmLevel()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.cameraId_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getTargetIdBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.alarmType_); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt32(5, this.targetType_); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(6, this.alarmSource_); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.alarmLevel_); + if ((this.bitField0_ & 0x80) == 128) + output.writeInt32(8, this.alarmStatus_); + if ((this.bitField0_ & 0x100) == 256) + output.writeInt64(9, this.alarmTime_); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getAlarmPlaceBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeBytes(11, getAlarmRtspBytes()); + if ((this.bitField0_ & 0x800) == 2048) + output.writeBytes(12, getAlarmFtpBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeDouble(13, this.alarmLat_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeDouble(14, this.alarmLon_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeBytes(15, getMediaServerIpBytes()); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeBytes(16, getAlarmIdBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeInt32(17, this.untreatedAlarmCount_); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.cameraId_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getTargetIdBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.alarmType_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt32Size(5, this.targetType_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(6, this.alarmSource_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.alarmLevel_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeInt32Size(8, this.alarmStatus_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeInt64Size(9, this.alarmTime_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getAlarmPlaceBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeBytesSize(11, getAlarmRtspBytes()); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeBytesSize(12, getAlarmFtpBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeDoubleSize(13, this.alarmLat_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeDoubleSize(14, this.alarmLon_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeBytesSize(15, getMediaServerIpBytes()); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeBytesSize(16, getAlarmIdBytes()); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeInt32Size(17, this.untreatedAlarmCount_); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static VideoWarnInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (VideoWarnInfo)PARSER.parseFrom(data); + } + + public static VideoWarnInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VideoWarnInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static VideoWarnInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (VideoWarnInfo)PARSER.parseFrom(data); + } + + public static VideoWarnInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VideoWarnInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static VideoWarnInfo parseFrom(InputStream input) throws IOException { + return (VideoWarnInfo)PARSER.parseFrom(input); + } + + public static VideoWarnInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VideoWarnInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static VideoWarnInfo parseDelimitedFrom(InputStream input) throws IOException { + return (VideoWarnInfo)PARSER.parseDelimitedFrom(input); + } + + public static VideoWarnInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VideoWarnInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static VideoWarnInfo parseFrom(CodedInputStream input) throws IOException { + return (VideoWarnInfo)PARSER.parseFrom(input); + } + + public static VideoWarnInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VideoWarnInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(VideoWarnInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements VideoWarnInfoOrBuilder { + private int bitField0_; + + private Object transactionId_; + + private int cameraId_; + + private Object targetId_; + + private int alarmType_; + + private int targetType_; + + private int alarmSource_; + + private int alarmLevel_; + + private int alarmStatus_; + + private long alarmTime_; + + private Object alarmPlace_; + + private Object alarmRtsp_; + + private Object alarmFtp_; + + private double alarmLat_; + + private double alarmLon_; + + private Object mediaServerIp_; + + private Object alarmId_; + + private int untreatedAlarmCount_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(VideoWarnInfo.class, Builder.class); + } + + private Builder() { + this.transactionId_ = ""; + this.targetId_ = ""; + this.alarmPlace_ = ""; + this.alarmRtsp_ = ""; + this.alarmFtp_ = ""; + this.mediaServerIp_ = ""; + this.alarmId_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.transactionId_ = ""; + this.targetId_ = ""; + this.alarmPlace_ = ""; + this.alarmRtsp_ = ""; + this.alarmFtp_ = ""; + this.mediaServerIp_ = ""; + this.alarmId_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = VideoWarnInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.transactionId_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.targetId_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.alarmType_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.targetType_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + this.alarmSource_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + this.alarmLevel_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.alarmStatus_ = 0; + this.bitField0_ &= 0xFFFFFF7F; + this.alarmTime_ = 0L; + this.bitField0_ &= 0xFFFFFEFF; + this.alarmPlace_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.alarmRtsp_ = ""; + this.bitField0_ &= 0xFFFFFBFF; + this.alarmFtp_ = ""; + this.bitField0_ &= 0xFFFFF7FF; + this.alarmLat_ = 0.0D; + this.bitField0_ &= 0xFFFFEFFF; + this.alarmLon_ = 0.0D; + this.bitField0_ &= 0xFFFFDFFF; + this.mediaServerIp_ = ""; + this.bitField0_ &= 0xFFFFBFFF; + this.alarmId_ = ""; + this.bitField0_ &= 0xFFFF7FFF; + this.untreatedAlarmCount_ = 0; + this.bitField0_ &= 0xFFFEFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnInfo_descriptor; + } + + public VideoWarnInfo getDefaultInstanceForType() { + return VideoWarnInfo.getDefaultInstance(); + } + + public VideoWarnInfo build() { + VideoWarnInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public VideoWarnInfo buildPartial() { + VideoWarnInfo result = new VideoWarnInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.transactionId_ = this.transactionId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.targetId_ = this.targetId_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.alarmType_ = this.alarmType_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.targetType_ = this.targetType_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.alarmSource_ = this.alarmSource_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.alarmLevel_ = this.alarmLevel_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.alarmStatus_ = this.alarmStatus_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.alarmTime_ = this.alarmTime_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.alarmPlace_ = this.alarmPlace_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.alarmRtsp_ = this.alarmRtsp_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.alarmFtp_ = this.alarmFtp_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.alarmLat_ = this.alarmLat_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.alarmLon_ = this.alarmLon_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.mediaServerIp_ = this.mediaServerIp_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.alarmId_ = this.alarmId_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.untreatedAlarmCount_ = this.untreatedAlarmCount_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof VideoWarnInfo) + return mergeFrom((VideoWarnInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(VideoWarnInfo other) { + if (other == VideoWarnInfo.getDefaultInstance()) + return this; + if (other.hasTransactionId()) { + this.bitField0_ |= 0x1; + this.transactionId_ = other.transactionId_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasTargetId()) { + this.bitField0_ |= 0x4; + this.targetId_ = other.targetId_; + onChanged(); + } + if (other.hasAlarmType()) + setAlarmType(other.getAlarmType()); + if (other.hasTargetType()) + setTargetType(other.getTargetType()); + if (other.hasAlarmSource()) + setAlarmSource(other.getAlarmSource()); + if (other.hasAlarmLevel()) + setAlarmLevel(other.getAlarmLevel()); + if (other.hasAlarmStatus()) + setAlarmStatus(other.getAlarmStatus()); + if (other.hasAlarmTime()) + setAlarmTime(other.getAlarmTime()); + if (other.hasAlarmPlace()) { + this.bitField0_ |= 0x200; + this.alarmPlace_ = other.alarmPlace_; + onChanged(); + } + if (other.hasAlarmRtsp()) { + this.bitField0_ |= 0x400; + this.alarmRtsp_ = other.alarmRtsp_; + onChanged(); + } + if (other.hasAlarmFtp()) { + this.bitField0_ |= 0x800; + this.alarmFtp_ = other.alarmFtp_; + onChanged(); + } + if (other.hasAlarmLat()) + setAlarmLat(other.getAlarmLat()); + if (other.hasAlarmLon()) + setAlarmLon(other.getAlarmLon()); + if (other.hasMediaServerIp()) { + this.bitField0_ |= 0x4000; + this.mediaServerIp_ = other.mediaServerIp_; + onChanged(); + } + if (other.hasAlarmId()) { + this.bitField0_ |= 0x8000; + this.alarmId_ = other.alarmId_; + onChanged(); + } + if (other.hasUntreatedAlarmCount()) + setUntreatedAlarmCount(other.getUntreatedAlarmCount()); + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransactionId()) + return false; + if (!hasCameraId()) + return false; + if (!hasTargetId()) + return false; + if (!hasAlarmType()) + return false; + if (!hasTargetType()) + return false; + if (!hasAlarmSource()) + return false; + if (!hasAlarmLevel()) + return false; + if (!hasAlarmStatus()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + VideoWarnInfo parsedMessage = null; + try { + parsedMessage = (VideoWarnInfo) VideoWarnInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (VideoWarnInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTransactionId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public Builder clearTransactionId() { + this.bitField0_ &= 0xFFFFFFFE; + this.transactionId_ = VideoWarnInfo.getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + + public Builder setTransactionIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x2; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasTargetId() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getTargetId() { + Object ref = this.targetId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.targetId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTargetIdBytes() { + Object ref = this.targetId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.targetId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTargetId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.targetId_ = value; + onChanged(); + return this; + } + + public Builder clearTargetId() { + this.bitField0_ &= 0xFFFFFFFB; + this.targetId_ = VideoWarnInfo.getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + + public Builder setTargetIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.targetId_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public Builder setAlarmType(int value) { + this.bitField0_ |= 0x8; + this.alarmType_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmType() { + this.bitField0_ &= 0xFFFFFFF7; + this.alarmType_ = 0; + onChanged(); + return this; + } + + public boolean hasTargetType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getTargetType() { + return this.targetType_; + } + + public Builder setTargetType(int value) { + this.bitField0_ |= 0x10; + this.targetType_ = value; + onChanged(); + return this; + } + + public Builder clearTargetType() { + this.bitField0_ &= 0xFFFFFFEF; + this.targetType_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmSource() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getAlarmSource() { + return this.alarmSource_; + } + + public Builder setAlarmSource(int value) { + this.bitField0_ |= 0x20; + this.alarmSource_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmSource() { + this.bitField0_ &= 0xFFFFFFDF; + this.alarmSource_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmLevel() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getAlarmLevel() { + return this.alarmLevel_; + } + + public Builder setAlarmLevel(int value) { + this.bitField0_ |= 0x40; + this.alarmLevel_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmLevel() { + this.bitField0_ &= 0xFFFFFFBF; + this.alarmLevel_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmStatus() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getAlarmStatus() { + return this.alarmStatus_; + } + + public Builder setAlarmStatus(int value) { + this.bitField0_ |= 0x80; + this.alarmStatus_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmStatus() { + this.bitField0_ &= 0xFFFFFF7F; + this.alarmStatus_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmTime() { + return ((this.bitField0_ & 0x100) == 256); + } + + public long getAlarmTime() { + return this.alarmTime_; + } + + public Builder setAlarmTime(long value) { + this.bitField0_ |= 0x100; + this.alarmTime_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmTime() { + this.bitField0_ &= 0xFFFFFEFF; + this.alarmTime_ = 0L; + onChanged(); + return this; + } + + public boolean hasAlarmPlace() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getAlarmPlace() { + Object ref = this.alarmPlace_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmPlace_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmPlaceBytes() { + Object ref = this.alarmPlace_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmPlace_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmPlace(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.alarmPlace_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmPlace() { + this.bitField0_ &= 0xFFFFFDFF; + this.alarmPlace_ = VideoWarnInfo.getDefaultInstance().getAlarmPlace(); + onChanged(); + return this; + } + + public Builder setAlarmPlaceBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.alarmPlace_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmRtsp() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getAlarmRtsp() { + Object ref = this.alarmRtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmRtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmRtspBytes() { + Object ref = this.alarmRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.alarmRtsp_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmRtsp() { + this.bitField0_ &= 0xFFFFFBFF; + this.alarmRtsp_ = VideoWarnInfo.getDefaultInstance().getAlarmRtsp(); + onChanged(); + return this; + } + + public Builder setAlarmRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.alarmRtsp_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmFtp() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getAlarmFtp() { + Object ref = this.alarmFtp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmFtp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmFtpBytes() { + Object ref = this.alarmFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmFtp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.alarmFtp_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmFtp() { + this.bitField0_ &= 0xFFFFF7FF; + this.alarmFtp_ = VideoWarnInfo.getDefaultInstance().getAlarmFtp(); + onChanged(); + return this; + } + + public Builder setAlarmFtpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.alarmFtp_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmLat() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public double getAlarmLat() { + return this.alarmLat_; + } + + public Builder setAlarmLat(double value) { + this.bitField0_ |= 0x1000; + this.alarmLat_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmLat() { + this.bitField0_ &= 0xFFFFEFFF; + this.alarmLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasAlarmLon() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getAlarmLon() { + return this.alarmLon_; + } + + public Builder setAlarmLon(double value) { + this.bitField0_ |= 0x2000; + this.alarmLon_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmLon() { + this.bitField0_ &= 0xFFFFDFFF; + this.alarmLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasMediaServerIp() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public String getMediaServerIp() { + Object ref = this.mediaServerIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaServerIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMediaServerIpBytes() { + Object ref = this.mediaServerIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaServerIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMediaServerIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4000; + this.mediaServerIp_ = value; + onChanged(); + return this; + } + + public Builder clearMediaServerIp() { + this.bitField0_ &= 0xFFFFBFFF; + this.mediaServerIp_ = VideoWarnInfo.getDefaultInstance().getMediaServerIp(); + onChanged(); + return this; + } + + public Builder setMediaServerIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4000; + this.mediaServerIp_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmId() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public String getAlarmId() { + Object ref = this.alarmId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmIdBytes() { + Object ref = this.alarmId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.alarmId_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmId() { + this.bitField0_ &= 0xFFFF7FFF; + this.alarmId_ = VideoWarnInfo.getDefaultInstance().getAlarmId(); + onChanged(); + return this; + } + + public Builder setAlarmIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8000; + this.alarmId_ = value; + onChanged(); + return this; + } + + public boolean hasUntreatedAlarmCount() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public int getUntreatedAlarmCount() { + return this.untreatedAlarmCount_; + } + + public Builder setUntreatedAlarmCount(int value) { + this.bitField0_ |= 0x10000; + this.untreatedAlarmCount_ = value; + onChanged(); + return this; + } + + public Builder clearUntreatedAlarmCount() { + this.bitField0_ &= 0xFFFEFFFF; + this.untreatedAlarmCount_ = 0; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class VideoWarnTargetInfo extends GeneratedMessage implements VideoWarnTargetInfoOrBuilder { + private static final VideoWarnTargetInfo defaultInstance = new VideoWarnTargetInfo(true); + + private final UnknownFieldSet unknownFields; + + private VideoWarnTargetInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private VideoWarnTargetInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static VideoWarnTargetInfo getDefaultInstance() { + return defaultInstance; + } + + public VideoWarnTargetInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoWarnTargetInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString byteString1; + RectInfos.Builder subBuilder; + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x1; + this.transactionId_ = byteString1; + break; + case 16: + this.bitField0_ |= 0x2; + this.cameraId_ = input.readInt32(); + break; + case 26: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x4; + this.targetId_ = byteString1; + break; + case 32: + this.bitField0_ |= 0x8; + this.alarmType_ = input.readInt32(); + break; + case 40: + this.bitField0_ |= 0x10; + this.targetType_ = input.readInt32(); + break; + case 48: + this.bitField0_ |= 0x20; + this.alarmSource_ = input.readInt32(); + break; + case 56: + this.bitField0_ |= 0x40; + this.alarmLevel_ = input.readInt32(); + break; + case 64: + this.bitField0_ |= 0x80; + this.alarmStatus_ = input.readInt32(); + break; + case 72: + this.bitField0_ |= 0x100; + this.alarmTime_ = input.readInt64(); + break; + case 82: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x200; + this.alarmPlace_ = byteString1; + break; + case 90: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x400; + this.alarmRtsp_ = byteString1; + break; + case 98: + byteString1 = input.readBytes(); + this.bitField0_ |= 0x800; + this.alarmFtp_ = byteString1; + break; + case 105: + this.bitField0_ |= 0x1000; + this.alarmLat_ = input.readDouble(); + break; + case 113: + this.bitField0_ |= 0x2000; + this.alarmLon_ = input.readDouble(); + break; + case 121: + this.bitField0_ |= 0x4000; + this.targetX_ = input.readDouble(); + break; + case 129: + this.bitField0_ |= 0x8000; + this.targetY_ = input.readDouble(); + break; + case 137: + this.bitField0_ |= 0x10000; + this.targetWidth_ = input.readDouble(); + break; + case 145: + this.bitField0_ |= 0x20000; + this.targetHeight_ = input.readDouble(); + break; + case 153: + this.bitField0_ |= 0x40000; + this.targetRealWidth_ = input.readDouble(); + break; + case 161: + this.bitField0_ |= 0x80000; + this.targetRealHeight_ = input.readDouble(); + break; + case 169: + this.bitField0_ |= 0x100000; + this.targetSpeed_ = input.readDouble(); + break; + case 177: + this.bitField0_ |= 0x200000; + this.targetDistance_ = input.readDouble(); + break; + case 186: + subBuilder = null; + if ((this.bitField0_ & 0x400000) == 4194304) + subBuilder = this.rects_.toBuilder(); + this.rects_ = (RectInfos)input.readMessage(RectInfos.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(this.rects_); + this.rects_ = subBuilder.buildPartial(); + } + this.bitField0_ |= 0x400000; + break; + case 194: + bs = input.readBytes(); + this.bitField0_ |= 0x800000; + this.alarmId_ = bs; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(VideoWarnTargetInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public VideoWarnTargetInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new VideoWarnTargetInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + + private Object transactionId_; + + public static final int CAMERA_ID_FIELD_NUMBER = 2; + + private int cameraId_; + + public static final int TARGET_ID_FIELD_NUMBER = 3; + + private Object targetId_; + + public static final int ALARM_TYPE_FIELD_NUMBER = 4; + + private int alarmType_; + + public static final int TARGET_TYPE_FIELD_NUMBER = 5; + + private int targetType_; + + public static final int ALARM_SOURCE_FIELD_NUMBER = 6; + + private int alarmSource_; + + public static final int ALARM_LEVEL_FIELD_NUMBER = 7; + + private int alarmLevel_; + + public static final int ALARM_STATUS_FIELD_NUMBER = 8; + + private int alarmStatus_; + + public static final int ALARM_TIME_FIELD_NUMBER = 9; + + private long alarmTime_; + + public static final int ALARM_PLACE_FIELD_NUMBER = 10; + + private Object alarmPlace_; + + public static final int ALARM_RTSP_FIELD_NUMBER = 11; + + private Object alarmRtsp_; + + public static final int ALARM_FTP_FIELD_NUMBER = 12; + + private Object alarmFtp_; + + public static final int ALARM_LAT_FIELD_NUMBER = 13; + + private double alarmLat_; + + public static final int ALARM_LON_FIELD_NUMBER = 14; + + private double alarmLon_; + + public static final int TARGET_X_FIELD_NUMBER = 15; + + private double targetX_; + + public static final int TARGET_Y_FIELD_NUMBER = 16; + + private double targetY_; + + public static final int TARGET_WIDTH_FIELD_NUMBER = 17; + + private double targetWidth_; + + public static final int TARGET_HEIGHT_FIELD_NUMBER = 18; + + private double targetHeight_; + + public static final int TARGET_REAL_WIDTH_FIELD_NUMBER = 19; + + private double targetRealWidth_; + + public static final int TARGET_REAL_HEIGHT_FIELD_NUMBER = 20; + + private double targetRealHeight_; + + public static final int TARGET_SPEED_FIELD_NUMBER = 21; + + private double targetSpeed_; + + public static final int TARGET_DISTANCE_FIELD_NUMBER = 22; + + private double targetDistance_; + + public static final int RECTS_FIELD_NUMBER = 23; + + private RectInfos rects_; + + public static final int ALARM_ID_FIELD_NUMBER = 24; + + private Object alarmId_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasTargetId() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getTargetId() { + Object ref = this.targetId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.targetId_ = s; + return s; + } + + public ByteString getTargetIdBytes() { + Object ref = this.targetId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.targetId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public boolean hasTargetType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getTargetType() { + return this.targetType_; + } + + public boolean hasAlarmSource() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getAlarmSource() { + return this.alarmSource_; + } + + public boolean hasAlarmLevel() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getAlarmLevel() { + return this.alarmLevel_; + } + + public boolean hasAlarmStatus() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getAlarmStatus() { + return this.alarmStatus_; + } + + public boolean hasAlarmTime() { + return ((this.bitField0_ & 0x100) == 256); + } + + public long getAlarmTime() { + return this.alarmTime_; + } + + public boolean hasAlarmPlace() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getAlarmPlace() { + Object ref = this.alarmPlace_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmPlace_ = s; + return s; + } + + public ByteString getAlarmPlaceBytes() { + Object ref = this.alarmPlace_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmPlace_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmRtsp() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getAlarmRtsp() { + Object ref = this.alarmRtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmRtsp_ = s; + return s; + } + + public ByteString getAlarmRtspBytes() { + Object ref = this.alarmRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmFtp() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getAlarmFtp() { + Object ref = this.alarmFtp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmFtp_ = s; + return s; + } + + public ByteString getAlarmFtpBytes() { + Object ref = this.alarmFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasAlarmLat() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public double getAlarmLat() { + return this.alarmLat_; + } + + public boolean hasAlarmLon() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getAlarmLon() { + return this.alarmLon_; + } + + public boolean hasTargetX() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public double getTargetX() { + return this.targetX_; + } + + public boolean hasTargetY() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public double getTargetY() { + return this.targetY_; + } + + public boolean hasTargetWidth() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public double getTargetWidth() { + return this.targetWidth_; + } + + public boolean hasTargetHeight() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public double getTargetHeight() { + return this.targetHeight_; + } + + public boolean hasTargetRealWidth() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public double getTargetRealWidth() { + return this.targetRealWidth_; + } + + public boolean hasTargetRealHeight() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getTargetRealHeight() { + return this.targetRealHeight_; + } + + public boolean hasTargetSpeed() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public double getTargetSpeed() { + return this.targetSpeed_; + } + + public boolean hasTargetDistance() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public double getTargetDistance() { + return this.targetDistance_; + } + + public boolean hasRects() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public RectInfos getRects() { + return this.rects_; + } + + public RectInfosOrBuilder getRectsOrBuilder() { + return this.rects_; + } + + public boolean hasAlarmId() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public String getAlarmId() { + Object ref = this.alarmId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmId_ = s; + return s; + } + + public ByteString getAlarmIdBytes() { + Object ref = this.alarmId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmId_ = b; + return b; + } + return (ByteString)ref; + } + + private void initFields() { + this.transactionId_ = ""; + this.cameraId_ = 0; + this.targetId_ = ""; + this.alarmType_ = 0; + this.targetType_ = 0; + this.alarmSource_ = 0; + this.alarmLevel_ = 0; + this.alarmStatus_ = 0; + this.alarmTime_ = 0L; + this.alarmPlace_ = ""; + this.alarmRtsp_ = ""; + this.alarmFtp_ = ""; + this.alarmLat_ = 0.0D; + this.alarmLon_ = 0.0D; + this.targetX_ = 0.0D; + this.targetY_ = 0.0D; + this.targetWidth_ = 0.0D; + this.targetHeight_ = 0.0D; + this.targetRealWidth_ = 0.0D; + this.targetRealHeight_ = 0.0D; + this.targetSpeed_ = 0.0D; + this.targetDistance_ = 0.0D; + this.rects_ = RectInfos.getDefaultInstance(); + this.alarmId_ = ""; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTransactionId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTargetId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasTargetType()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmSource()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmLevel()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + if (hasRects() && !getRects().isInitialized()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.cameraId_); + if ((this.bitField0_ & 0x4) == 4) + output.writeBytes(3, getTargetIdBytes()); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt32(4, this.alarmType_); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt32(5, this.targetType_); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt32(6, this.alarmSource_); + if ((this.bitField0_ & 0x40) == 64) + output.writeInt32(7, this.alarmLevel_); + if ((this.bitField0_ & 0x80) == 128) + output.writeInt32(8, this.alarmStatus_); + if ((this.bitField0_ & 0x100) == 256) + output.writeInt64(9, this.alarmTime_); + if ((this.bitField0_ & 0x200) == 512) + output.writeBytes(10, getAlarmPlaceBytes()); + if ((this.bitField0_ & 0x400) == 1024) + output.writeBytes(11, getAlarmRtspBytes()); + if ((this.bitField0_ & 0x800) == 2048) + output.writeBytes(12, getAlarmFtpBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + output.writeDouble(13, this.alarmLat_); + if ((this.bitField0_ & 0x2000) == 8192) + output.writeDouble(14, this.alarmLon_); + if ((this.bitField0_ & 0x4000) == 16384) + output.writeDouble(15, this.targetX_); + if ((this.bitField0_ & 0x8000) == 32768) + output.writeDouble(16, this.targetY_); + if ((this.bitField0_ & 0x10000) == 65536) + output.writeDouble(17, this.targetWidth_); + if ((this.bitField0_ & 0x20000) == 131072) + output.writeDouble(18, this.targetHeight_); + if ((this.bitField0_ & 0x40000) == 262144) + output.writeDouble(19, this.targetRealWidth_); + if ((this.bitField0_ & 0x80000) == 524288) + output.writeDouble(20, this.targetRealHeight_); + if ((this.bitField0_ & 0x100000) == 1048576) + output.writeDouble(21, this.targetSpeed_); + if ((this.bitField0_ & 0x200000) == 2097152) + output.writeDouble(22, this.targetDistance_); + if ((this.bitField0_ & 0x400000) == 4194304) + output.writeMessage(23, (MessageLite)this.rects_); + if ((this.bitField0_ & 0x800000) == 8388608) + output.writeBytes(24, getAlarmIdBytes()); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.cameraId_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeBytesSize(3, getTargetIdBytes()); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt32Size(4, this.alarmType_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt32Size(5, this.targetType_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt32Size(6, this.alarmSource_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeInt32Size(7, this.alarmLevel_); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeInt32Size(8, this.alarmStatus_); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeInt64Size(9, this.alarmTime_); + if ((this.bitField0_ & 0x200) == 512) + size += CodedOutputStream.computeBytesSize(10, getAlarmPlaceBytes()); + if ((this.bitField0_ & 0x400) == 1024) + size += CodedOutputStream.computeBytesSize(11, getAlarmRtspBytes()); + if ((this.bitField0_ & 0x800) == 2048) + size += CodedOutputStream.computeBytesSize(12, getAlarmFtpBytes()); + if ((this.bitField0_ & 0x1000) == 4096) + size += CodedOutputStream.computeDoubleSize(13, this.alarmLat_); + if ((this.bitField0_ & 0x2000) == 8192) + size += CodedOutputStream.computeDoubleSize(14, this.alarmLon_); + if ((this.bitField0_ & 0x4000) == 16384) + size += CodedOutputStream.computeDoubleSize(15, this.targetX_); + if ((this.bitField0_ & 0x8000) == 32768) + size += CodedOutputStream.computeDoubleSize(16, this.targetY_); + if ((this.bitField0_ & 0x10000) == 65536) + size += CodedOutputStream.computeDoubleSize(17, this.targetWidth_); + if ((this.bitField0_ & 0x20000) == 131072) + size += CodedOutputStream.computeDoubleSize(18, this.targetHeight_); + if ((this.bitField0_ & 0x40000) == 262144) + size += CodedOutputStream.computeDoubleSize(19, this.targetRealWidth_); + if ((this.bitField0_ & 0x80000) == 524288) + size += CodedOutputStream.computeDoubleSize(20, this.targetRealHeight_); + if ((this.bitField0_ & 0x100000) == 1048576) + size += CodedOutputStream.computeDoubleSize(21, this.targetSpeed_); + if ((this.bitField0_ & 0x200000) == 2097152) + size += CodedOutputStream.computeDoubleSize(22, this.targetDistance_); + if ((this.bitField0_ & 0x400000) == 4194304) + size += CodedOutputStream.computeMessageSize(23, (MessageLite)this.rects_); + if ((this.bitField0_ & 0x800000) == 8388608) + size += CodedOutputStream.computeBytesSize(24, getAlarmIdBytes()); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static VideoWarnTargetInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (VideoWarnTargetInfo)PARSER.parseFrom(data); + } + + public static VideoWarnTargetInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VideoWarnTargetInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static VideoWarnTargetInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (VideoWarnTargetInfo)PARSER.parseFrom(data); + } + + public static VideoWarnTargetInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (VideoWarnTargetInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static VideoWarnTargetInfo parseFrom(InputStream input) throws IOException { + return (VideoWarnTargetInfo)PARSER.parseFrom(input); + } + + public static VideoWarnTargetInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VideoWarnTargetInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static VideoWarnTargetInfo parseDelimitedFrom(InputStream input) throws IOException { + return (VideoWarnTargetInfo)PARSER.parseDelimitedFrom(input); + } + + public static VideoWarnTargetInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VideoWarnTargetInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static VideoWarnTargetInfo parseFrom(CodedInputStream input) throws IOException { + return (VideoWarnTargetInfo)PARSER.parseFrom(input); + } + + public static VideoWarnTargetInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (VideoWarnTargetInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(VideoWarnTargetInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements VideoWarnTargetInfoOrBuilder { + private int bitField0_; + + private Object transactionId_; + + private int cameraId_; + + private Object targetId_; + + private int alarmType_; + + private int targetType_; + + private int alarmSource_; + + private int alarmLevel_; + + private int alarmStatus_; + + private long alarmTime_; + + private Object alarmPlace_; + + private Object alarmRtsp_; + + private Object alarmFtp_; + + private double alarmLat_; + + private double alarmLon_; + + private double targetX_; + + private double targetY_; + + private double targetWidth_; + + private double targetHeight_; + + private double targetRealWidth_; + + private double targetRealHeight_; + + private double targetSpeed_; + + private double targetDistance_; + + private RectInfos rects_; + + private SingleFieldBuilder rectsBuilder_; + + private Object alarmId_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(VideoWarnTargetInfo.class, Builder.class); + } + + private Builder() { + this.transactionId_ = ""; + this.targetId_ = ""; + this.alarmPlace_ = ""; + this.alarmRtsp_ = ""; + this.alarmFtp_ = ""; + this.rects_ = RectInfos.getDefaultInstance(); + this.alarmId_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.transactionId_ = ""; + this.targetId_ = ""; + this.alarmPlace_ = ""; + this.alarmRtsp_ = ""; + this.alarmFtp_ = ""; + this.rects_ = RectInfos.getDefaultInstance(); + this.alarmId_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (VideoWarnTargetInfo.alwaysUseFieldBuilders) + getRectsFieldBuilder(); + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.transactionId_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.targetId_ = ""; + this.bitField0_ &= 0xFFFFFFFB; + this.alarmType_ = 0; + this.bitField0_ &= 0xFFFFFFF7; + this.targetType_ = 0; + this.bitField0_ &= 0xFFFFFFEF; + this.alarmSource_ = 0; + this.bitField0_ &= 0xFFFFFFDF; + this.alarmLevel_ = 0; + this.bitField0_ &= 0xFFFFFFBF; + this.alarmStatus_ = 0; + this.bitField0_ &= 0xFFFFFF7F; + this.alarmTime_ = 0L; + this.bitField0_ &= 0xFFFFFEFF; + this.alarmPlace_ = ""; + this.bitField0_ &= 0xFFFFFDFF; + this.alarmRtsp_ = ""; + this.bitField0_ &= 0xFFFFFBFF; + this.alarmFtp_ = ""; + this.bitField0_ &= 0xFFFFF7FF; + this.alarmLat_ = 0.0D; + this.bitField0_ &= 0xFFFFEFFF; + this.alarmLon_ = 0.0D; + this.bitField0_ &= 0xFFFFDFFF; + this.targetX_ = 0.0D; + this.bitField0_ &= 0xFFFFBFFF; + this.targetY_ = 0.0D; + this.bitField0_ &= 0xFFFF7FFF; + this.targetWidth_ = 0.0D; + this.bitField0_ &= 0xFFFEFFFF; + this.targetHeight_ = 0.0D; + this.bitField0_ &= 0xFFFDFFFF; + this.targetRealWidth_ = 0.0D; + this.bitField0_ &= 0xFFFBFFFF; + this.targetRealHeight_ = 0.0D; + this.bitField0_ &= 0xFFF7FFFF; + this.targetSpeed_ = 0.0D; + this.bitField0_ &= 0xFFEFFFFF; + this.targetDistance_ = 0.0D; + this.bitField0_ &= 0xFFDFFFFF; + if (this.rectsBuilder_ == null) { + this.rects_ = RectInfos.getDefaultInstance(); + } else { + this.rectsBuilder_.clear(); + } + this.bitField0_ &= 0xFFBFFFFF; + this.alarmId_ = ""; + this.bitField0_ &= 0xFF7FFFFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_descriptor; + } + + public VideoWarnTargetInfo getDefaultInstanceForType() { + return VideoWarnTargetInfo.getDefaultInstance(); + } + + public VideoWarnTargetInfo build() { + VideoWarnTargetInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public VideoWarnTargetInfo buildPartial() { + VideoWarnTargetInfo result = new VideoWarnTargetInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.transactionId_ = this.transactionId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.targetId_ = this.targetId_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.alarmType_ = this.alarmType_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.targetType_ = this.targetType_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.alarmSource_ = this.alarmSource_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.alarmLevel_ = this.alarmLevel_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.alarmStatus_ = this.alarmStatus_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.alarmTime_ = this.alarmTime_; + if ((from_bitField0_ & 0x200) == 512) + to_bitField0_ |= 0x200; + result.alarmPlace_ = this.alarmPlace_; + if ((from_bitField0_ & 0x400) == 1024) + to_bitField0_ |= 0x400; + result.alarmRtsp_ = this.alarmRtsp_; + if ((from_bitField0_ & 0x800) == 2048) + to_bitField0_ |= 0x800; + result.alarmFtp_ = this.alarmFtp_; + if ((from_bitField0_ & 0x1000) == 4096) + to_bitField0_ |= 0x1000; + result.alarmLat_ = this.alarmLat_; + if ((from_bitField0_ & 0x2000) == 8192) + to_bitField0_ |= 0x2000; + result.alarmLon_ = this.alarmLon_; + if ((from_bitField0_ & 0x4000) == 16384) + to_bitField0_ |= 0x4000; + result.targetX_ = this.targetX_; + if ((from_bitField0_ & 0x8000) == 32768) + to_bitField0_ |= 0x8000; + result.targetY_ = this.targetY_; + if ((from_bitField0_ & 0x10000) == 65536) + to_bitField0_ |= 0x10000; + result.targetWidth_ = this.targetWidth_; + if ((from_bitField0_ & 0x20000) == 131072) + to_bitField0_ |= 0x20000; + result.targetHeight_ = this.targetHeight_; + if ((from_bitField0_ & 0x40000) == 262144) + to_bitField0_ |= 0x40000; + result.targetRealWidth_ = this.targetRealWidth_; + if ((from_bitField0_ & 0x80000) == 524288) + to_bitField0_ |= 0x80000; + result.targetRealHeight_ = this.targetRealHeight_; + if ((from_bitField0_ & 0x100000) == 1048576) + to_bitField0_ |= 0x100000; + result.targetSpeed_ = this.targetSpeed_; + if ((from_bitField0_ & 0x200000) == 2097152) + to_bitField0_ |= 0x200000; + result.targetDistance_ = this.targetDistance_; + if ((from_bitField0_ & 0x400000) == 4194304) + to_bitField0_ |= 0x400000; + if (this.rectsBuilder_ == null) { + result.rects_ = this.rects_; + } else { + result.rects_ = (RectInfos)this.rectsBuilder_.build(); + } + if ((from_bitField0_ & 0x800000) == 8388608) + to_bitField0_ |= 0x800000; + result.alarmId_ = this.alarmId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof VideoWarnTargetInfo) + return mergeFrom((VideoWarnTargetInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(VideoWarnTargetInfo other) { + if (other == VideoWarnTargetInfo.getDefaultInstance()) + return this; + if (other.hasTransactionId()) { + this.bitField0_ |= 0x1; + this.transactionId_ = other.transactionId_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasTargetId()) { + this.bitField0_ |= 0x4; + this.targetId_ = other.targetId_; + onChanged(); + } + if (other.hasAlarmType()) + setAlarmType(other.getAlarmType()); + if (other.hasTargetType()) + setTargetType(other.getTargetType()); + if (other.hasAlarmSource()) + setAlarmSource(other.getAlarmSource()); + if (other.hasAlarmLevel()) + setAlarmLevel(other.getAlarmLevel()); + if (other.hasAlarmStatus()) + setAlarmStatus(other.getAlarmStatus()); + if (other.hasAlarmTime()) + setAlarmTime(other.getAlarmTime()); + if (other.hasAlarmPlace()) { + this.bitField0_ |= 0x200; + this.alarmPlace_ = other.alarmPlace_; + onChanged(); + } + if (other.hasAlarmRtsp()) { + this.bitField0_ |= 0x400; + this.alarmRtsp_ = other.alarmRtsp_; + onChanged(); + } + if (other.hasAlarmFtp()) { + this.bitField0_ |= 0x800; + this.alarmFtp_ = other.alarmFtp_; + onChanged(); + } + if (other.hasAlarmLat()) + setAlarmLat(other.getAlarmLat()); + if (other.hasAlarmLon()) + setAlarmLon(other.getAlarmLon()); + if (other.hasTargetX()) + setTargetX(other.getTargetX()); + if (other.hasTargetY()) + setTargetY(other.getTargetY()); + if (other.hasTargetWidth()) + setTargetWidth(other.getTargetWidth()); + if (other.hasTargetHeight()) + setTargetHeight(other.getTargetHeight()); + if (other.hasTargetRealWidth()) + setTargetRealWidth(other.getTargetRealWidth()); + if (other.hasTargetRealHeight()) + setTargetRealHeight(other.getTargetRealHeight()); + if (other.hasTargetSpeed()) + setTargetSpeed(other.getTargetSpeed()); + if (other.hasTargetDistance()) + setTargetDistance(other.getTargetDistance()); + if (other.hasRects()) + mergeRects(other.getRects()); + if (other.hasAlarmId()) { + this.bitField0_ |= 0x800000; + this.alarmId_ = other.alarmId_; + onChanged(); + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransactionId()) + return false; + if (!hasCameraId()) + return false; + if (!hasTargetId()) + return false; + if (!hasAlarmType()) + return false; + if (!hasTargetType()) + return false; + if (!hasAlarmSource()) + return false; + if (!hasAlarmLevel()) + return false; + if (!hasAlarmStatus()) + return false; + if (hasRects() && !getRects().isInitialized()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + VideoWarnTargetInfo parsedMessage = null; + try { + parsedMessage = (VideoWarnTargetInfo) VideoWarnTargetInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (VideoWarnTargetInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTransactionId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public Builder clearTransactionId() { + this.bitField0_ &= 0xFFFFFFFE; + this.transactionId_ = VideoWarnTargetInfo.getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + + public Builder setTransactionIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x2; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasTargetId() { + return ((this.bitField0_ & 0x4) == 4); + } + + public String getTargetId() { + Object ref = this.targetId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.targetId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTargetIdBytes() { + Object ref = this.targetId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.targetId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTargetId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.targetId_ = value; + onChanged(); + return this; + } + + public Builder clearTargetId() { + this.bitField0_ &= 0xFFFFFFFB; + this.targetId_ = VideoWarnTargetInfo.getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + + public Builder setTargetIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x4; + this.targetId_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x8) == 8); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public Builder setAlarmType(int value) { + this.bitField0_ |= 0x8; + this.alarmType_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmType() { + this.bitField0_ &= 0xFFFFFFF7; + this.alarmType_ = 0; + onChanged(); + return this; + } + + public boolean hasTargetType() { + return ((this.bitField0_ & 0x10) == 16); + } + + public int getTargetType() { + return this.targetType_; + } + + public Builder setTargetType(int value) { + this.bitField0_ |= 0x10; + this.targetType_ = value; + onChanged(); + return this; + } + + public Builder clearTargetType() { + this.bitField0_ &= 0xFFFFFFEF; + this.targetType_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmSource() { + return ((this.bitField0_ & 0x20) == 32); + } + + public int getAlarmSource() { + return this.alarmSource_; + } + + public Builder setAlarmSource(int value) { + this.bitField0_ |= 0x20; + this.alarmSource_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmSource() { + this.bitField0_ &= 0xFFFFFFDF; + this.alarmSource_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmLevel() { + return ((this.bitField0_ & 0x40) == 64); + } + + public int getAlarmLevel() { + return this.alarmLevel_; + } + + public Builder setAlarmLevel(int value) { + this.bitField0_ |= 0x40; + this.alarmLevel_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmLevel() { + this.bitField0_ &= 0xFFFFFFBF; + this.alarmLevel_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmStatus() { + return ((this.bitField0_ & 0x80) == 128); + } + + public int getAlarmStatus() { + return this.alarmStatus_; + } + + public Builder setAlarmStatus(int value) { + this.bitField0_ |= 0x80; + this.alarmStatus_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmStatus() { + this.bitField0_ &= 0xFFFFFF7F; + this.alarmStatus_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmTime() { + return ((this.bitField0_ & 0x100) == 256); + } + + public long getAlarmTime() { + return this.alarmTime_; + } + + public Builder setAlarmTime(long value) { + this.bitField0_ |= 0x100; + this.alarmTime_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmTime() { + this.bitField0_ &= 0xFFFFFEFF; + this.alarmTime_ = 0L; + onChanged(); + return this; + } + + public boolean hasAlarmPlace() { + return ((this.bitField0_ & 0x200) == 512); + } + + public String getAlarmPlace() { + Object ref = this.alarmPlace_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmPlace_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmPlaceBytes() { + Object ref = this.alarmPlace_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmPlace_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmPlace(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.alarmPlace_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmPlace() { + this.bitField0_ &= 0xFFFFFDFF; + this.alarmPlace_ = VideoWarnTargetInfo.getDefaultInstance().getAlarmPlace(); + onChanged(); + return this; + } + + public Builder setAlarmPlaceBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x200; + this.alarmPlace_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmRtsp() { + return ((this.bitField0_ & 0x400) == 1024); + } + + public String getAlarmRtsp() { + Object ref = this.alarmRtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmRtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmRtspBytes() { + Object ref = this.alarmRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.alarmRtsp_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmRtsp() { + this.bitField0_ &= 0xFFFFFBFF; + this.alarmRtsp_ = VideoWarnTargetInfo.getDefaultInstance().getAlarmRtsp(); + onChanged(); + return this; + } + + public Builder setAlarmRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x400; + this.alarmRtsp_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmFtp() { + return ((this.bitField0_ & 0x800) == 2048); + } + + public String getAlarmFtp() { + Object ref = this.alarmFtp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmFtp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmFtpBytes() { + Object ref = this.alarmFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmFtp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.alarmFtp_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmFtp() { + this.bitField0_ &= 0xFFFFF7FF; + this.alarmFtp_ = VideoWarnTargetInfo.getDefaultInstance().getAlarmFtp(); + onChanged(); + return this; + } + + public Builder setAlarmFtpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800; + this.alarmFtp_ = value; + onChanged(); + return this; + } + + public boolean hasAlarmLat() { + return ((this.bitField0_ & 0x1000) == 4096); + } + + public double getAlarmLat() { + return this.alarmLat_; + } + + public Builder setAlarmLat(double value) { + this.bitField0_ |= 0x1000; + this.alarmLat_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmLat() { + this.bitField0_ &= 0xFFFFEFFF; + this.alarmLat_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasAlarmLon() { + return ((this.bitField0_ & 0x2000) == 8192); + } + + public double getAlarmLon() { + return this.alarmLon_; + } + + public Builder setAlarmLon(double value) { + this.bitField0_ |= 0x2000; + this.alarmLon_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmLon() { + this.bitField0_ &= 0xFFFFDFFF; + this.alarmLon_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetX() { + return ((this.bitField0_ & 0x4000) == 16384); + } + + public double getTargetX() { + return this.targetX_; + } + + public Builder setTargetX(double value) { + this.bitField0_ |= 0x4000; + this.targetX_ = value; + onChanged(); + return this; + } + + public Builder clearTargetX() { + this.bitField0_ &= 0xFFFFBFFF; + this.targetX_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetY() { + return ((this.bitField0_ & 0x8000) == 32768); + } + + public double getTargetY() { + return this.targetY_; + } + + public Builder setTargetY(double value) { + this.bitField0_ |= 0x8000; + this.targetY_ = value; + onChanged(); + return this; + } + + public Builder clearTargetY() { + this.bitField0_ &= 0xFFFF7FFF; + this.targetY_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetWidth() { + return ((this.bitField0_ & 0x10000) == 65536); + } + + public double getTargetWidth() { + return this.targetWidth_; + } + + public Builder setTargetWidth(double value) { + this.bitField0_ |= 0x10000; + this.targetWidth_ = value; + onChanged(); + return this; + } + + public Builder clearTargetWidth() { + this.bitField0_ &= 0xFFFEFFFF; + this.targetWidth_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetHeight() { + return ((this.bitField0_ & 0x20000) == 131072); + } + + public double getTargetHeight() { + return this.targetHeight_; + } + + public Builder setTargetHeight(double value) { + this.bitField0_ |= 0x20000; + this.targetHeight_ = value; + onChanged(); + return this; + } + + public Builder clearTargetHeight() { + this.bitField0_ &= 0xFFFDFFFF; + this.targetHeight_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetRealWidth() { + return ((this.bitField0_ & 0x40000) == 262144); + } + + public double getTargetRealWidth() { + return this.targetRealWidth_; + } + + public Builder setTargetRealWidth(double value) { + this.bitField0_ |= 0x40000; + this.targetRealWidth_ = value; + onChanged(); + return this; + } + + public Builder clearTargetRealWidth() { + this.bitField0_ &= 0xFFFBFFFF; + this.targetRealWidth_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetRealHeight() { + return ((this.bitField0_ & 0x80000) == 524288); + } + + public double getTargetRealHeight() { + return this.targetRealHeight_; + } + + public Builder setTargetRealHeight(double value) { + this.bitField0_ |= 0x80000; + this.targetRealHeight_ = value; + onChanged(); + return this; + } + + public Builder clearTargetRealHeight() { + this.bitField0_ &= 0xFFF7FFFF; + this.targetRealHeight_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetSpeed() { + return ((this.bitField0_ & 0x100000) == 1048576); + } + + public double getTargetSpeed() { + return this.targetSpeed_; + } + + public Builder setTargetSpeed(double value) { + this.bitField0_ |= 0x100000; + this.targetSpeed_ = value; + onChanged(); + return this; + } + + public Builder clearTargetSpeed() { + this.bitField0_ &= 0xFFEFFFFF; + this.targetSpeed_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasTargetDistance() { + return ((this.bitField0_ & 0x200000) == 2097152); + } + + public double getTargetDistance() { + return this.targetDistance_; + } + + public Builder setTargetDistance(double value) { + this.bitField0_ |= 0x200000; + this.targetDistance_ = value; + onChanged(); + return this; + } + + public Builder clearTargetDistance() { + this.bitField0_ &= 0xFFDFFFFF; + this.targetDistance_ = 0.0D; + onChanged(); + return this; + } + + public boolean hasRects() { + return ((this.bitField0_ & 0x400000) == 4194304); + } + + public RectInfos getRects() { + if (this.rectsBuilder_ == null) + return this.rects_; + return (RectInfos)this.rectsBuilder_.getMessage(); + } + + public Builder setRects(RectInfos value) { + if (this.rectsBuilder_ == null) { + if (value == null) + throw new NullPointerException(); + this.rects_ = value; + onChanged(); + } else { + this.rectsBuilder_.setMessage(value); + } + this.bitField0_ |= 0x400000; + return this; + } + + public Builder setRects(RectInfos.Builder builderForValue) { + if (this.rectsBuilder_ == null) { + this.rects_ = builderForValue.build(); + onChanged(); + } else { + this.rectsBuilder_.setMessage(builderForValue.build()); + } + this.bitField0_ |= 0x400000; + return this; + } + + public Builder mergeRects(RectInfos value) { + if (this.rectsBuilder_ == null) { + if ((this.bitField0_ & 0x400000) == 4194304 && this.rects_ != RectInfos.getDefaultInstance()) { + this.rects_ = RectInfos.newBuilder(this.rects_).mergeFrom(value).buildPartial(); + } else { + this.rects_ = value; + } + onChanged(); + } else { + this.rectsBuilder_.mergeFrom(value); + } + this.bitField0_ |= 0x400000; + return this; + } + + public Builder clearRects() { + if (this.rectsBuilder_ == null) { + this.rects_ = RectInfos.getDefaultInstance(); + onChanged(); + } else { + this.rectsBuilder_.clear(); + } + this.bitField0_ &= 0xFFBFFFFF; + return this; + } + + public RectInfos.Builder getRectsBuilder() { + this.bitField0_ |= 0x400000; + onChanged(); + return (RectInfos.Builder)getRectsFieldBuilder().getBuilder(); + } + + public RectInfosOrBuilder getRectsOrBuilder() { + if (this.rectsBuilder_ != null) + return (RectInfosOrBuilder)this.rectsBuilder_.getMessageOrBuilder(); + return this.rects_; + } + + private SingleFieldBuilder getRectsFieldBuilder() { + if (this.rectsBuilder_ == null) { + this.rectsBuilder_ = new SingleFieldBuilder(getRects(), getParentForChildren(), isClean()); + this.rects_ = null; + } + return this.rectsBuilder_; + } + + public boolean hasAlarmId() { + return ((this.bitField0_ & 0x800000) == 8388608); + } + + public String getAlarmId() { + Object ref = this.alarmId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmIdBytes() { + Object ref = this.alarmId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800000; + this.alarmId_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmId() { + this.bitField0_ &= 0xFF7FFFFF; + this.alarmId_ = VideoWarnTargetInfo.getDefaultInstance().getAlarmId(); + onChanged(); + return this; + } + + public Builder setAlarmIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x800000; + this.alarmId_ = value; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class ComposeVideoWarnInfo extends GeneratedMessage implements ComposeVideoWarnInfoOrBuilder { + private static final ComposeVideoWarnInfo defaultInstance = new ComposeVideoWarnInfo(true); + + private final UnknownFieldSet unknownFields; + + private ComposeVideoWarnInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private ComposeVideoWarnInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static ComposeVideoWarnInfo getDefaultInstance() { + return defaultInstance; + } + + public ComposeVideoWarnInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ComposeVideoWarnInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.transactionId_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.composeStatus_ = input.readInt32(); + break; + case 24: + this.bitField0_ |= 0x4; + this.cameraId_ = input.readInt32(); + break; + case 34: + bs = input.readBytes(); + this.bitField0_ |= 0x8; + this.targetId_ = bs; + break; + case 40: + this.bitField0_ |= 0x10; + this.startTime_ = input.readInt64(); + break; + case 48: + this.bitField0_ |= 0x20; + this.endTime_ = input.readInt64(); + break; + case 58: + bs = input.readBytes(); + this.bitField0_ |= 0x40; + this.composeRtsp_ = bs; + break; + case 66: + bs = input.readBytes(); + this.bitField0_ |= 0x80; + this.composeFtp_ = bs; + break; + case 74: + bs = input.readBytes(); + this.bitField0_ |= 0x100; + this.mediaServerIp_ = bs; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(ComposeVideoWarnInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public ComposeVideoWarnInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new ComposeVideoWarnInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + + private Object transactionId_; + + public static final int COMPOSE_STATUS_FIELD_NUMBER = 2; + + private int composeStatus_; + + public static final int CAMERA_ID_FIELD_NUMBER = 3; + + private int cameraId_; + + public static final int TARGET_ID_FIELD_NUMBER = 4; + + private Object targetId_; + + public static final int START_TIME_FIELD_NUMBER = 5; + + private long startTime_; + + public static final int END_TIME_FIELD_NUMBER = 6; + + private long endTime_; + + public static final int COMPOSE_RTSP_FIELD_NUMBER = 7; + + private Object composeRtsp_; + + public static final int COMPOSE_FTP_FIELD_NUMBER = 8; + + private Object composeFtp_; + + public static final int MEDIA_SERVER_IP_FIELD_NUMBER = 9; + + private Object mediaServerIp_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasComposeStatus() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getComposeStatus() { + return this.composeStatus_; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasTargetId() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getTargetId() { + Object ref = this.targetId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.targetId_ = s; + return s; + } + + public ByteString getTargetIdBytes() { + Object ref = this.targetId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.targetId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasStartTime() { + return ((this.bitField0_ & 0x10) == 16); + } + + public long getStartTime() { + return this.startTime_; + } + + public boolean hasEndTime() { + return ((this.bitField0_ & 0x20) == 32); + } + + public long getEndTime() { + return this.endTime_; + } + + public boolean hasComposeRtsp() { + return ((this.bitField0_ & 0x40) == 64); + } + + public String getComposeRtsp() { + Object ref = this.composeRtsp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeRtsp_ = s; + return s; + } + + public ByteString getComposeRtspBytes() { + Object ref = this.composeRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasComposeFtp() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getComposeFtp() { + Object ref = this.composeFtp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeFtp_ = s; + return s; + } + + public ByteString getComposeFtpBytes() { + Object ref = this.composeFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasMediaServerIp() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getMediaServerIp() { + Object ref = this.mediaServerIp_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaServerIp_ = s; + return s; + } + + public ByteString getMediaServerIpBytes() { + Object ref = this.mediaServerIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaServerIp_ = b; + return b; + } + return (ByteString)ref; + } + + private void initFields() { + this.transactionId_ = ""; + this.composeStatus_ = 0; + this.cameraId_ = 0; + this.targetId_ = ""; + this.startTime_ = 0L; + this.endTime_ = 0L; + this.composeRtsp_ = ""; + this.composeFtp_ = ""; + this.mediaServerIp_ = ""; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTransactionId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasComposeStatus()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.composeStatus_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.cameraId_); + if ((this.bitField0_ & 0x8) == 8) + output.writeBytes(4, getTargetIdBytes()); + if ((this.bitField0_ & 0x10) == 16) + output.writeInt64(5, this.startTime_); + if ((this.bitField0_ & 0x20) == 32) + output.writeInt64(6, this.endTime_); + if ((this.bitField0_ & 0x40) == 64) + output.writeBytes(7, getComposeRtspBytes()); + if ((this.bitField0_ & 0x80) == 128) + output.writeBytes(8, getComposeFtpBytes()); + if ((this.bitField0_ & 0x100) == 256) + output.writeBytes(9, getMediaServerIpBytes()); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.composeStatus_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.cameraId_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeBytesSize(4, getTargetIdBytes()); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeInt64Size(5, this.startTime_); + if ((this.bitField0_ & 0x20) == 32) + size += CodedOutputStream.computeInt64Size(6, this.endTime_); + if ((this.bitField0_ & 0x40) == 64) + size += CodedOutputStream.computeBytesSize(7, getComposeRtspBytes()); + if ((this.bitField0_ & 0x80) == 128) + size += CodedOutputStream.computeBytesSize(8, getComposeFtpBytes()); + if ((this.bitField0_ & 0x100) == 256) + size += CodedOutputStream.computeBytesSize(9, getMediaServerIpBytes()); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static ComposeVideoWarnInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(data); + } + + public static ComposeVideoWarnInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static ComposeVideoWarnInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(data); + } + + public static ComposeVideoWarnInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static ComposeVideoWarnInfo parseFrom(InputStream input) throws IOException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(input); + } + + public static ComposeVideoWarnInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static ComposeVideoWarnInfo parseDelimitedFrom(InputStream input) throws IOException { + return (ComposeVideoWarnInfo)PARSER.parseDelimitedFrom(input); + } + + public static ComposeVideoWarnInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ComposeVideoWarnInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static ComposeVideoWarnInfo parseFrom(CodedInputStream input) throws IOException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(input); + } + + public static ComposeVideoWarnInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (ComposeVideoWarnInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(ComposeVideoWarnInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements ComposeVideoWarnInfoOrBuilder { + private int bitField0_; + + private Object transactionId_; + + private int composeStatus_; + + private int cameraId_; + + private Object targetId_; + + private long startTime_; + + private long endTime_; + + private Object composeRtsp_; + + private Object composeFtp_; + + private Object mediaServerIp_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(ComposeVideoWarnInfo.class, Builder.class); + } + + private Builder() { + this.transactionId_ = ""; + this.targetId_ = ""; + this.composeRtsp_ = ""; + this.composeFtp_ = ""; + this.mediaServerIp_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.transactionId_ = ""; + this.targetId_ = ""; + this.composeRtsp_ = ""; + this.composeFtp_ = ""; + this.mediaServerIp_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = ComposeVideoWarnInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.transactionId_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.composeStatus_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.targetId_ = ""; + this.bitField0_ &= 0xFFFFFFF7; + this.startTime_ = 0L; + this.bitField0_ &= 0xFFFFFFEF; + this.endTime_ = 0L; + this.bitField0_ &= 0xFFFFFFDF; + this.composeRtsp_ = ""; + this.bitField0_ &= 0xFFFFFFBF; + this.composeFtp_ = ""; + this.bitField0_ &= 0xFFFFFF7F; + this.mediaServerIp_ = ""; + this.bitField0_ &= 0xFFFFFEFF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_descriptor; + } + + public ComposeVideoWarnInfo getDefaultInstanceForType() { + return ComposeVideoWarnInfo.getDefaultInstance(); + } + + public ComposeVideoWarnInfo build() { + ComposeVideoWarnInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public ComposeVideoWarnInfo buildPartial() { + ComposeVideoWarnInfo result = new ComposeVideoWarnInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.transactionId_ = this.transactionId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.composeStatus_ = this.composeStatus_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.targetId_ = this.targetId_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.startTime_ = this.startTime_; + if ((from_bitField0_ & 0x20) == 32) + to_bitField0_ |= 0x20; + result.endTime_ = this.endTime_; + if ((from_bitField0_ & 0x40) == 64) + to_bitField0_ |= 0x40; + result.composeRtsp_ = this.composeRtsp_; + if ((from_bitField0_ & 0x80) == 128) + to_bitField0_ |= 0x80; + result.composeFtp_ = this.composeFtp_; + if ((from_bitField0_ & 0x100) == 256) + to_bitField0_ |= 0x100; + result.mediaServerIp_ = this.mediaServerIp_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof ComposeVideoWarnInfo) + return mergeFrom((ComposeVideoWarnInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(ComposeVideoWarnInfo other) { + if (other == ComposeVideoWarnInfo.getDefaultInstance()) + return this; + if (other.hasTransactionId()) { + this.bitField0_ |= 0x1; + this.transactionId_ = other.transactionId_; + onChanged(); + } + if (other.hasComposeStatus()) + setComposeStatus(other.getComposeStatus()); + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasTargetId()) { + this.bitField0_ |= 0x8; + this.targetId_ = other.targetId_; + onChanged(); + } + if (other.hasStartTime()) + setStartTime(other.getStartTime()); + if (other.hasEndTime()) + setEndTime(other.getEndTime()); + if (other.hasComposeRtsp()) { + this.bitField0_ |= 0x40; + this.composeRtsp_ = other.composeRtsp_; + onChanged(); + } + if (other.hasComposeFtp()) { + this.bitField0_ |= 0x80; + this.composeFtp_ = other.composeFtp_; + onChanged(); + } + if (other.hasMediaServerIp()) { + this.bitField0_ |= 0x100; + this.mediaServerIp_ = other.mediaServerIp_; + onChanged(); + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransactionId()) + return false; + if (!hasComposeStatus()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + ComposeVideoWarnInfo parsedMessage = null; + try { + parsedMessage = (ComposeVideoWarnInfo) ComposeVideoWarnInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (ComposeVideoWarnInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTransactionId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public Builder clearTransactionId() { + this.bitField0_ &= 0xFFFFFFFE; + this.transactionId_ = ComposeVideoWarnInfo.getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + + public Builder setTransactionIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public boolean hasComposeStatus() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getComposeStatus() { + return this.composeStatus_; + } + + public Builder setComposeStatus(int value) { + this.bitField0_ |= 0x2; + this.composeStatus_ = value; + onChanged(); + return this; + } + + public Builder clearComposeStatus() { + this.bitField0_ &= 0xFFFFFFFD; + this.composeStatus_ = 0; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x4; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFB; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasTargetId() { + return ((this.bitField0_ & 0x8) == 8); + } + + public String getTargetId() { + Object ref = this.targetId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.targetId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTargetIdBytes() { + Object ref = this.targetId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.targetId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTargetId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.targetId_ = value; + onChanged(); + return this; + } + + public Builder clearTargetId() { + this.bitField0_ &= 0xFFFFFFF7; + this.targetId_ = ComposeVideoWarnInfo.getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + + public Builder setTargetIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x8; + this.targetId_ = value; + onChanged(); + return this; + } + + public boolean hasStartTime() { + return ((this.bitField0_ & 0x10) == 16); + } + + public long getStartTime() { + return this.startTime_; + } + + public Builder setStartTime(long value) { + this.bitField0_ |= 0x10; + this.startTime_ = value; + onChanged(); + return this; + } + + public Builder clearStartTime() { + this.bitField0_ &= 0xFFFFFFEF; + this.startTime_ = 0L; + onChanged(); + return this; + } + + public boolean hasEndTime() { + return ((this.bitField0_ & 0x20) == 32); + } + + public long getEndTime() { + return this.endTime_; + } + + public Builder setEndTime(long value) { + this.bitField0_ |= 0x20; + this.endTime_ = value; + onChanged(); + return this; + } + + public Builder clearEndTime() { + this.bitField0_ &= 0xFFFFFFDF; + this.endTime_ = 0L; + onChanged(); + return this; + } + + public boolean hasComposeRtsp() { + return ((this.bitField0_ & 0x40) == 64); + } + + public String getComposeRtsp() { + Object ref = this.composeRtsp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeRtsp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getComposeRtspBytes() { + Object ref = this.composeRtsp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeRtsp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setComposeRtsp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40; + this.composeRtsp_ = value; + onChanged(); + return this; + } + + public Builder clearComposeRtsp() { + this.bitField0_ &= 0xFFFFFFBF; + this.composeRtsp_ = ComposeVideoWarnInfo.getDefaultInstance().getComposeRtsp(); + onChanged(); + return this; + } + + public Builder setComposeRtspBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x40; + this.composeRtsp_ = value; + onChanged(); + return this; + } + + public boolean hasComposeFtp() { + return ((this.bitField0_ & 0x80) == 128); + } + + public String getComposeFtp() { + Object ref = this.composeFtp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.composeFtp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getComposeFtpBytes() { + Object ref = this.composeFtp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.composeFtp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setComposeFtp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.composeFtp_ = value; + onChanged(); + return this; + } + + public Builder clearComposeFtp() { + this.bitField0_ &= 0xFFFFFF7F; + this.composeFtp_ = ComposeVideoWarnInfo.getDefaultInstance().getComposeFtp(); + onChanged(); + return this; + } + + public Builder setComposeFtpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x80; + this.composeFtp_ = value; + onChanged(); + return this; + } + + public boolean hasMediaServerIp() { + return ((this.bitField0_ & 0x100) == 256); + } + + public String getMediaServerIp() { + Object ref = this.mediaServerIp_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.mediaServerIp_ = s; + return s; + } + return (String)ref; + } + + public ByteString getMediaServerIpBytes() { + Object ref = this.mediaServerIp_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.mediaServerIp_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setMediaServerIp(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.mediaServerIp_ = value; + onChanged(); + return this; + } + + public Builder clearMediaServerIp() { + this.bitField0_ &= 0xFFFFFEFF; + this.mediaServerIp_ = ComposeVideoWarnInfo.getDefaultInstance().getMediaServerIp(); + onChanged(); + return this; + } + + public Builder setMediaServerIpBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x100; + this.mediaServerIp_ = value; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static final class CameraWarnInfo extends GeneratedMessage implements CameraWarnInfoOrBuilder { + private static final CameraWarnInfo defaultInstance = new CameraWarnInfo(true); + + private final UnknownFieldSet unknownFields; + + private CameraWarnInfo(GeneratedMessage.Builder builder) { + super(builder); + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = builder.getUnknownFields(); + } + + private CameraWarnInfo(boolean noInit) { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + this.unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + public static CameraWarnInfo getDefaultInstance() { + return defaultInstance; + } + + public CameraWarnInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public final UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CameraWarnInfo(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + this.memoizedIsInitialized = -1; + this.memoizedSerializedSize = -1; + initFields(); + int mutable_bitField0_ = 0; + UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + ByteString bs; + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + bs = input.readBytes(); + this.bitField0_ |= 0x1; + this.transactionId_ = bs; + break; + case 16: + this.bitField0_ |= 0x2; + this.cameraId_ = input.readInt32(); + break; + case 24: + this.bitField0_ |= 0x4; + this.alarmType_ = input.readInt32(); + break; + case 32: + this.bitField0_ |= 0x8; + this.alarmTime_ = input.readInt64(); + break; + case 42: + bs = input.readBytes(); + this.bitField0_ |= 0x10; + this.alarmPlace_ = bs; + break; + } + } + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw (new InvalidProtocolBufferException(e.getMessage())).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_CameraWarnInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_CameraWarnInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraWarnInfo.class, Builder.class); + } + + public static Parser PARSER = (Parser)new AbstractParser() { + public CameraWarnInfo parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return new CameraWarnInfo(input, extensionRegistry); + } + }; + + private int bitField0_; + + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + + private Object transactionId_; + + public static final int CAMERA_ID_FIELD_NUMBER = 2; + + private int cameraId_; + + public static final int ALARM_TYPE_FIELD_NUMBER = 3; + + private int alarmType_; + + public static final int ALARM_TIME_FIELD_NUMBER = 4; + + private long alarmTime_; + + public static final int ALARM_PLACE_FIELD_NUMBER = 5; + + private Object alarmPlace_; + + private byte memoizedIsInitialized; + + private int memoizedSerializedSize; + + private static final long serialVersionUID = 0L; + + public Parser getParserForType() { + return PARSER; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCameraId() { + return this.cameraId_; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public boolean hasAlarmTime() { + return ((this.bitField0_ & 0x8) == 8); + } + + public long getAlarmTime() { + return this.alarmTime_; + } + + public boolean hasAlarmPlace() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getAlarmPlace() { + Object ref = this.alarmPlace_; + if (ref instanceof String) + return (String)ref; + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmPlace_ = s; + return s; + } + + public ByteString getAlarmPlaceBytes() { + Object ref = this.alarmPlace_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmPlace_ = b; + return b; + } + return (ByteString)ref; + } + + private void initFields() { + this.transactionId_ = ""; + this.cameraId_ = 0; + this.alarmType_ = 0; + this.alarmTime_ = 0L; + this.alarmPlace_ = ""; + } + + public final boolean isInitialized() { + byte isInitialized = this.memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + if (!hasTransactionId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasCameraId()) { + this.memoizedIsInitialized = 0; + return false; + } + if (!hasAlarmType()) { + this.memoizedIsInitialized = 0; + return false; + } + this.memoizedIsInitialized = 1; + return true; + } + + public void writeTo(CodedOutputStream output) throws IOException { + getSerializedSize(); + if ((this.bitField0_ & 0x1) == 1) + output.writeBytes(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + output.writeInt32(2, this.cameraId_); + if ((this.bitField0_ & 0x4) == 4) + output.writeInt32(3, this.alarmType_); + if ((this.bitField0_ & 0x8) == 8) + output.writeInt64(4, this.alarmTime_); + if ((this.bitField0_ & 0x10) == 16) + output.writeBytes(5, getAlarmPlaceBytes()); + getUnknownFields().writeTo(output); + } + + public int getSerializedSize() { + int size = this.memoizedSerializedSize; + if (size != -1) + return size; + size = 0; + if ((this.bitField0_ & 0x1) == 1) + size += CodedOutputStream.computeBytesSize(1, getTransactionIdBytes()); + if ((this.bitField0_ & 0x2) == 2) + size += CodedOutputStream.computeInt32Size(2, this.cameraId_); + if ((this.bitField0_ & 0x4) == 4) + size += CodedOutputStream.computeInt32Size(3, this.alarmType_); + if ((this.bitField0_ & 0x8) == 8) + size += CodedOutputStream.computeInt64Size(4, this.alarmTime_); + if ((this.bitField0_ & 0x10) == 16) + size += CodedOutputStream.computeBytesSize(5, getAlarmPlaceBytes()); + size += getUnknownFields().getSerializedSize(); + this.memoizedSerializedSize = size; + return size; + } + + protected Object writeReplace() throws ObjectStreamException { + return super.writeReplace(); + } + + public static CameraWarnInfo parseFrom(ByteString data) throws InvalidProtocolBufferException { + return (CameraWarnInfo)PARSER.parseFrom(data); + } + + public static CameraWarnInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraWarnInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraWarnInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (CameraWarnInfo)PARSER.parseFrom(data); + } + + public static CameraWarnInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { + return (CameraWarnInfo)PARSER.parseFrom(data, extensionRegistry); + } + + public static CameraWarnInfo parseFrom(InputStream input) throws IOException { + return (CameraWarnInfo)PARSER.parseFrom(input); + } + + public static CameraWarnInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraWarnInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static CameraWarnInfo parseDelimitedFrom(InputStream input) throws IOException { + return (CameraWarnInfo)PARSER.parseDelimitedFrom(input); + } + + public static CameraWarnInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraWarnInfo)PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static CameraWarnInfo parseFrom(CodedInputStream input) throws IOException { + return (CameraWarnInfo)PARSER.parseFrom(input); + } + + public static CameraWarnInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + return (CameraWarnInfo)PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(CameraWarnInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + public static final class Builder extends GeneratedMessage.Builder implements CameraWarnInfoOrBuilder { + private int bitField0_; + + private Object transactionId_; + + private int cameraId_; + + private int alarmType_; + + private long alarmTime_; + + private Object alarmPlace_; + + public static final Descriptors.Descriptor getDescriptor() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_CameraWarnInfo_descriptor; + } + + protected FieldAccessorTable internalGetFieldAccessorTable() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_CameraWarnInfo_fieldAccessorTable.ensureFieldAccessorsInitialized(CameraWarnInfo.class, Builder.class); + } + + private Builder() { + this.transactionId_ = ""; + this.alarmPlace_ = ""; + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + this.transactionId_ = ""; + this.alarmPlace_ = ""; + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + boolean b = CameraWarnInfo.alwaysUseFieldBuilders; + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + this.transactionId_ = ""; + this.bitField0_ &= 0xFFFFFFFE; + this.cameraId_ = 0; + this.bitField0_ &= 0xFFFFFFFD; + this.alarmType_ = 0; + this.bitField0_ &= 0xFFFFFFFB; + this.alarmTime_ = 0L; + this.bitField0_ &= 0xFFFFFFF7; + this.alarmPlace_ = ""; + this.bitField0_ &= 0xFFFFFFEF; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public Descriptors.Descriptor getDescriptorForType() { + return ZCHXVideoWarn.internal_static_com_zhichenhaixin_proto_CameraWarnInfo_descriptor; + } + + public CameraWarnInfo getDefaultInstanceForType() { + return CameraWarnInfo.getDefaultInstance(); + } + + public CameraWarnInfo build() { + CameraWarnInfo result = buildPartial(); + if (!result.isInitialized()) + throw newUninitializedMessageException(result); + return result; + } + + public CameraWarnInfo buildPartial() { + CameraWarnInfo result = new CameraWarnInfo(this); + int from_bitField0_ = this.bitField0_; + int to_bitField0_ = 0; + if ((from_bitField0_ & 0x1) == 1) + to_bitField0_ |= 0x1; + result.transactionId_ = this.transactionId_; + if ((from_bitField0_ & 0x2) == 2) + to_bitField0_ |= 0x2; + result.cameraId_ = this.cameraId_; + if ((from_bitField0_ & 0x4) == 4) + to_bitField0_ |= 0x4; + result.alarmType_ = this.alarmType_; + if ((from_bitField0_ & 0x8) == 8) + to_bitField0_ |= 0x8; + result.alarmTime_ = this.alarmTime_; + if ((from_bitField0_ & 0x10) == 16) + to_bitField0_ |= 0x10; + result.alarmPlace_ = this.alarmPlace_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(Message other) { + if (other instanceof CameraWarnInfo) + return mergeFrom((CameraWarnInfo)other); + super.mergeFrom(other); + return this; + } + + public Builder mergeFrom(CameraWarnInfo other) { + if (other == CameraWarnInfo.getDefaultInstance()) + return this; + if (other.hasTransactionId()) { + this.bitField0_ |= 0x1; + this.transactionId_ = other.transactionId_; + onChanged(); + } + if (other.hasCameraId()) + setCameraId(other.getCameraId()); + if (other.hasAlarmType()) + setAlarmType(other.getAlarmType()); + if (other.hasAlarmTime()) + setAlarmTime(other.getAlarmTime()); + if (other.hasAlarmPlace()) { + this.bitField0_ |= 0x10; + this.alarmPlace_ = other.alarmPlace_; + onChanged(); + } + mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransactionId()) + return false; + if (!hasCameraId()) + return false; + if (!hasAlarmType()) + return false; + return true; + } + + public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { + CameraWarnInfo parsedMessage = null; + try { + parsedMessage = (CameraWarnInfo) CameraWarnInfo.PARSER.parsePartialFrom(input, extensionRegistry); + } catch (InvalidProtocolBufferException e) { + parsedMessage = (CameraWarnInfo)e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) + mergeFrom(parsedMessage); + } + return this; + } + + public boolean hasTransactionId() { + return ((this.bitField0_ & 0x1) == 1); + } + + public String getTransactionId() { + Object ref = this.transactionId_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.transactionId_ = s; + return s; + } + return (String)ref; + } + + public ByteString getTransactionIdBytes() { + Object ref = this.transactionId_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.transactionId_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setTransactionId(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public Builder clearTransactionId() { + this.bitField0_ &= 0xFFFFFFFE; + this.transactionId_ = CameraWarnInfo.getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + + public Builder setTransactionIdBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x1; + this.transactionId_ = value; + onChanged(); + return this; + } + + public boolean hasCameraId() { + return ((this.bitField0_ & 0x2) == 2); + } + + public int getCameraId() { + return this.cameraId_; + } + + public Builder setCameraId(int value) { + this.bitField0_ |= 0x2; + this.cameraId_ = value; + onChanged(); + return this; + } + + public Builder clearCameraId() { + this.bitField0_ &= 0xFFFFFFFD; + this.cameraId_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmType() { + return ((this.bitField0_ & 0x4) == 4); + } + + public int getAlarmType() { + return this.alarmType_; + } + + public Builder setAlarmType(int value) { + this.bitField0_ |= 0x4; + this.alarmType_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmType() { + this.bitField0_ &= 0xFFFFFFFB; + this.alarmType_ = 0; + onChanged(); + return this; + } + + public boolean hasAlarmTime() { + return ((this.bitField0_ & 0x8) == 8); + } + + public long getAlarmTime() { + return this.alarmTime_; + } + + public Builder setAlarmTime(long value) { + this.bitField0_ |= 0x8; + this.alarmTime_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmTime() { + this.bitField0_ &= 0xFFFFFFF7; + this.alarmTime_ = 0L; + onChanged(); + return this; + } + + public boolean hasAlarmPlace() { + return ((this.bitField0_ & 0x10) == 16); + } + + public String getAlarmPlace() { + Object ref = this.alarmPlace_; + if (!(ref instanceof String)) { + ByteString bs = (ByteString)ref; + String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) + this.alarmPlace_ = s; + return s; + } + return (String)ref; + } + + public ByteString getAlarmPlaceBytes() { + Object ref = this.alarmPlace_; + if (ref instanceof String) { + ByteString b = ByteString.copyFromUtf8((String)ref); + this.alarmPlace_ = b; + return b; + } + return (ByteString)ref; + } + + public Builder setAlarmPlace(String value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.alarmPlace_ = value; + onChanged(); + return this; + } + + public Builder clearAlarmPlace() { + this.bitField0_ &= 0xFFFFFFEF; + this.alarmPlace_ = CameraWarnInfo.getDefaultInstance().getAlarmPlace(); + onChanged(); + return this; + } + + public Builder setAlarmPlaceBytes(ByteString value) { + if (value == null) + throw new NullPointerException(); + this.bitField0_ |= 0x10; + this.alarmPlace_ = value; + onChanged(); + return this; + } + } + + static { + defaultInstance.initFields(); + } + } + + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + static { + String[] descriptorData = { "\n\023ZCHXVideoWarn.proto\022\027com.com.zhichenhaixin.proto\"^\n\bRectInfo\022\f\n\004time\030\001 \002(\003\022\013\n\003lon\030\002 \002(\001\022\013\n\003lat\030\003 \002(\001\022\t\n\001x\030\004 \002(\002\022\t\n\001y\030\005 \002(\002\022\t\n\001w\030\006 \002(\002\022\t\n\001h\030\007 \002(\002\"<\n\tRectInfos\022/\n\004rect\030\001 \003(\0132!.com.com.zhichenhaixin.proto.RectInfo\"÷\002\n\rVideoWarnInfo\022\026\n\016transaction_id\030\001 \002(\t\022\021\n\tcamera_id\030\002 \002(\005\022\021\n\ttarget_id\030\003 \002(\t\022\022\n\nalarm_type\030\004 \002(\005\022\023\n\013target_type\030\005 \002(\005\022\024\n\falarm_source\030\006 \002(\005\022\023\n\013alarm_level\030\007 \002(\005\022\024\n\falarm_status\030\b \002(\005\022\022\n\nalarm_", "time\030\t \001(\003\022\023\n\013alarm_place\030\n \001(\t\022\022\n\nalarm_rtsp\030\013 \001(\t\022\021\n\talarm_ftp\030\f \001(\t\022\021\n\talarm_lat\030\r \001(\001\022\021\n\talarm_lon\030\016 \001(\001\022\027\n\017media_server_ip\030\017 \001(\t\022\020\n\balarm_id\030\020 \001(\t\022\035\n\025untreated_alarm_count\030\021 \001(\005\"¯\004\n\023VideoWarnTargetInfo\022\026\n\016transaction_id\030\001 \002(\t\022\021\n\tcamera_id\030\002 \002(\005\022\021\n\ttarget_id\030\003 \002(\t\022\022\n\nalarm_type\030\004 \002(\005\022\023\n\013target_type\030\005 \002(\005\022\024\n\falarm_source\030\006 \002(\005\022\023\n\013alarm_level\030\007 \002(\005\022\024\n\falarm_status\030\b \002(\005\022\022\n\nalarm_time\030\t \001(\003\022\023\n\013al", "arm_place\030\n \001(\t\022\022\n\nalarm_rtsp\030\013 \001(\t\022\021\n\talarm_ftp\030\f \001(\t\022\021\n\talarm_lat\030\r \001(\001\022\021\n\talarm_lon\030\016 \001(\001\022\020\n\btarget_x\030\017 \001(\001\022\020\n\btarget_y\030\020 \001(\001\022\024\n\ftarget_width\030\021 \001(\001\022\025\n\rtarget_height\030\022 \001(\001\022\031\n\021target_real_width\030\023 \001(\001\022\032\n\022target_real_height\030\024 \001(\001\022\024\n\ftarget_speed\030\025 \001(\001\022\027\n\017target_distance\030\026 \001(\001\0221\n\005rects\030\027 \001(\0132\".com.com.zhichenhaixin.proto.RectInfos\022\020\n\balarm_id\030\030 \001(\t\"Ö\001\n\024ComposeVideoWarnInfo\022\026\n\016transaction_id\030\001 \002(\t\022\026\n\016com", "pose_status\030\002 \002(\005\022\021\n\tcamera_id\030\003 \001(\005\022\021\n\ttarget_id\030\004 \001(\t\022\022\n\nstart_time\030\005 \001(\003\022\020\n\bend_time\030\006 \001(\003\022\024\n\fcompose_rtsp\030\007 \001(\t\022\023\n\013compose_ftp\030\b \001(\t\022\027\n\017media_server_ip\030\t \001(\t\"x\n\016CameraWarnInfo\022\026\n\016transaction_id\030\001 \002(\t\022\021\n\tcamera_id\030\002 \002(\005\022\022\n\nalarm_type\030\003 \002(\005\022\022\n\nalarm_time\030\004 \001(\003\022\023\n\013alarm_place\030\005 \001(\t" }; + Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public ExtensionRegistry assignDescriptors(Descriptors.FileDescriptor root) { + ZCHXVideoWarn.descriptor = root; + return null; + } + }; + Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new Descriptors.FileDescriptor[0], assigner); + } + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_RectInfo_descriptor = getDescriptor().getMessageTypes().get(0); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_RectInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_RectInfo_descriptor, new String[] { "Time", "Lon", "Lat", "X", "Y", "W", "H" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_RectInfos_descriptor = getDescriptor().getMessageTypes().get(1); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_RectInfos_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_RectInfos_descriptor, new String[] { "Rect" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_VideoWarnInfo_descriptor = getDescriptor().getMessageTypes().get(2); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_VideoWarnInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_VideoWarnInfo_descriptor, new String[] { + "TransactionId", "CameraId", "TargetId", "AlarmType", "TargetType", "AlarmSource", "AlarmLevel", "AlarmStatus", "AlarmTime", "AlarmPlace", + "AlarmRtsp", "AlarmFtp", "AlarmLat", "AlarmLon", "MediaServerIp", "AlarmId", "UntreatedAlarmCount" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_descriptor = getDescriptor().getMessageTypes().get(3); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_VideoWarnTargetInfo_descriptor, new String[] { + "TransactionId", "CameraId", "TargetId", "AlarmType", "TargetType", "AlarmSource", "AlarmLevel", "AlarmStatus", "AlarmTime", "AlarmPlace", + "AlarmRtsp", "AlarmFtp", "AlarmLat", "AlarmLon", "TargetX", "TargetY", "TargetWidth", "TargetHeight", "TargetRealWidth", "TargetRealHeight", + "TargetSpeed", "TargetDistance", "Rects", "AlarmId" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_descriptor = getDescriptor().getMessageTypes().get(4); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_ComposeVideoWarnInfo_descriptor, new String[] { "TransactionId", "ComposeStatus", "CameraId", "TargetId", "StartTime", "EndTime", "ComposeRtsp", "ComposeFtp", "MediaServerIp" }); + + private static final Descriptors.Descriptor internal_static_com_zhichenhaixin_proto_CameraWarnInfo_descriptor = getDescriptor().getMessageTypes().get(5); + + private static GeneratedMessage.FieldAccessorTable internal_static_com_zhichenhaixin_proto_CameraWarnInfo_fieldAccessorTable = new GeneratedMessage.FieldAccessorTable(internal_static_com_zhichenhaixin_proto_CameraWarnInfo_descriptor, new String[] { "TransactionId", "CameraId", "AlarmType", "AlarmTime", "AlarmPlace" }); + + private static Descriptors.FileDescriptor descriptor; + + public static interface CameraWarnInfoOrBuilder extends MessageOrBuilder { + boolean hasTransactionId(); + + String getTransactionId(); + + ByteString getTransactionIdBytes(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasAlarmType(); + + int getAlarmType(); + + boolean hasAlarmTime(); + + long getAlarmTime(); + + boolean hasAlarmPlace(); + + String getAlarmPlace(); + + ByteString getAlarmPlaceBytes(); + } + + public static interface ComposeVideoWarnInfoOrBuilder extends MessageOrBuilder { + boolean hasTransactionId(); + + String getTransactionId(); + + ByteString getTransactionIdBytes(); + + boolean hasComposeStatus(); + + int getComposeStatus(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasTargetId(); + + String getTargetId(); + + ByteString getTargetIdBytes(); + + boolean hasStartTime(); + + long getStartTime(); + + boolean hasEndTime(); + + long getEndTime(); + + boolean hasComposeRtsp(); + + String getComposeRtsp(); + + ByteString getComposeRtspBytes(); + + boolean hasComposeFtp(); + + String getComposeFtp(); + + ByteString getComposeFtpBytes(); + + boolean hasMediaServerIp(); + + String getMediaServerIp(); + + ByteString getMediaServerIpBytes(); + } + + public static interface RectInfoOrBuilder extends MessageOrBuilder { + boolean hasTime(); + + long getTime(); + + boolean hasLon(); + + double getLon(); + + boolean hasLat(); + + double getLat(); + + boolean hasX(); + + float getX(); + + boolean hasY(); + + float getY(); + + boolean hasW(); + + float getW(); + + boolean hasH(); + + float getH(); + } + + public static interface RectInfosOrBuilder extends MessageOrBuilder { + List getRectList(); + + RectInfo getRect(int param1Int); + + int getRectCount(); + + List getRectOrBuilderList(); + + RectInfoOrBuilder getRectOrBuilder(int param1Int); + } + + public static interface VideoWarnInfoOrBuilder extends MessageOrBuilder { + boolean hasTransactionId(); + + String getTransactionId(); + + ByteString getTransactionIdBytes(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasTargetId(); + + String getTargetId(); + + ByteString getTargetIdBytes(); + + boolean hasAlarmType(); + + int getAlarmType(); + + boolean hasTargetType(); + + int getTargetType(); + + boolean hasAlarmSource(); + + int getAlarmSource(); + + boolean hasAlarmLevel(); + + int getAlarmLevel(); + + boolean hasAlarmStatus(); + + int getAlarmStatus(); + + boolean hasAlarmTime(); + + long getAlarmTime(); + + boolean hasAlarmPlace(); + + String getAlarmPlace(); + + ByteString getAlarmPlaceBytes(); + + boolean hasAlarmRtsp(); + + String getAlarmRtsp(); + + ByteString getAlarmRtspBytes(); + + boolean hasAlarmFtp(); + + String getAlarmFtp(); + + ByteString getAlarmFtpBytes(); + + boolean hasAlarmLat(); + + double getAlarmLat(); + + boolean hasAlarmLon(); + + double getAlarmLon(); + + boolean hasMediaServerIp(); + + String getMediaServerIp(); + + ByteString getMediaServerIpBytes(); + + boolean hasAlarmId(); + + String getAlarmId(); + + ByteString getAlarmIdBytes(); + + boolean hasUntreatedAlarmCount(); + + int getUntreatedAlarmCount(); + } + + public static interface VideoWarnTargetInfoOrBuilder extends MessageOrBuilder { + boolean hasTransactionId(); + + String getTransactionId(); + + ByteString getTransactionIdBytes(); + + boolean hasCameraId(); + + int getCameraId(); + + boolean hasTargetId(); + + String getTargetId(); + + ByteString getTargetIdBytes(); + + boolean hasAlarmType(); + + int getAlarmType(); + + boolean hasTargetType(); + + int getTargetType(); + + boolean hasAlarmSource(); + + int getAlarmSource(); + + boolean hasAlarmLevel(); + + int getAlarmLevel(); + + boolean hasAlarmStatus(); + + int getAlarmStatus(); + + boolean hasAlarmTime(); + + long getAlarmTime(); + + boolean hasAlarmPlace(); + + String getAlarmPlace(); + + ByteString getAlarmPlaceBytes(); + + boolean hasAlarmRtsp(); + + String getAlarmRtsp(); + + ByteString getAlarmRtspBytes(); + + boolean hasAlarmFtp(); + + String getAlarmFtp(); + + ByteString getAlarmFtpBytes(); + + boolean hasAlarmLat(); + + double getAlarmLat(); + + boolean hasAlarmLon(); + + double getAlarmLon(); + + boolean hasTargetX(); + + double getTargetX(); + + boolean hasTargetY(); + + double getTargetY(); + + boolean hasTargetWidth(); + + double getTargetWidth(); + + boolean hasTargetHeight(); + + double getTargetHeight(); + + boolean hasTargetRealWidth(); + + double getTargetRealWidth(); + + boolean hasTargetRealHeight(); + + double getTargetRealHeight(); + + boolean hasTargetSpeed(); + + double getTargetSpeed(); + + boolean hasTargetDistance(); + + double getTargetDistance(); + + boolean hasRects(); + + RectInfos getRects(); + + RectInfosOrBuilder getRectsOrBuilder(); + + boolean hasAlarmId(); + + String getAlarmId(); + + ByteString getAlarmIdBytes(); + } +} diff --git a/src/main/java/com/zhichenhaixin/serializer/RadarTrackVo.java b/src/main/java/com/zhichenhaixin/serializer/RadarTrackVo.java new file mode 100644 index 0000000..770ce85 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/serializer/RadarTrackVo.java @@ -0,0 +1,373 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.serializer; + +import java.io.Serializable; + +public class RadarTrackVo implements Serializable, Comparable +{ + private static final long serialVersionUID = 691075381983340903L; + private int sysAreaCode; + private int sysId; + private int messageType; + private int trackNumber; + private float cartesianPosx; + private float cartesianPosy; + private double wgs84PosLon; + private double wgs84PosLat; + private float timeofDay; + private int trackType; + private boolean trackLastReport; + private int extraPolation; + private int trackPosCode; + private float sigmaX; + private float sigmaY; + private float sigmaXY; + private float ampofPriplot; + private double cartesianTrkvelVx; + private double cartesianTrkvelVy; + private double cog; + private double sog; + private int status; + private long timeStamp; + private int isSmuggle; + private double distance; + private String warnColor; + private int targetType; + private int signWindow; + private int cameraId; + private String trackby; + private int isWarn; + private long utc; + private String rtsp; + private int fllow; + private int mode; + private String warnSiteType; + + public RadarTrackVo() { + this.isSmuggle = 0; + this.warnColor = "0XFF0000"; + this.targetType = 0; + this.fllow = 1; + this.mode = 1; + } + + public String getWarnColor() { + return this.warnColor; + } + + public void setWarnColor(final String warnColor) { + this.warnColor = warnColor; + } + + public int getSignWindow() { + return this.signWindow; + } + + public void setSignWindow(final int signWindow) { + this.signWindow = signWindow; + } + + public int getIsWarn() { + return this.isWarn; + } + + public void setIsWarn(final int isWarn) { + this.isWarn = isWarn; + } + + public String getRtsp() { + return this.rtsp; + } + + public void setRtsp(final String rtsp) { + this.rtsp = rtsp; + } + + public int getFllow() { + return this.fllow; + } + + public void setFllow(final int fllow) { + this.fllow = fllow; + } + + public int getMode() { + return this.mode; + } + + public void setMode(final int mode) { + this.mode = mode; + } + + public int getSysAreaCode() { + return this.sysAreaCode; + } + + public void setSysAreaCode(final int sysAreaCode) { + this.sysAreaCode = sysAreaCode; + } + + public int getSysId() { + return this.sysId; + } + + public void setSysId(final int sysId) { + this.sysId = sysId; + } + + public int getMessageType() { + return this.messageType; + } + + public void setMessageType(final int messageType) { + this.messageType = messageType; + } + + public int getTrackNumber() { + return this.trackNumber; + } + + public void setTrackNumber(final int trackNumber) { + this.trackNumber = trackNumber; + } + + public float getCartesianPosx() { + return this.cartesianPosx; + } + + public void setCartesianPosx(final float cartesianPosx) { + this.cartesianPosx = cartesianPosx; + } + + public float getCartesianPosy() { + return this.cartesianPosy; + } + + public void setCartesianPosy(final float cartesianPosy) { + this.cartesianPosy = cartesianPosy; + } + + public double getWgs84PosLon() { + return this.wgs84PosLon; + } + + public void setWgs84PosLon(final double wgs84PosLon) { + this.wgs84PosLon = wgs84PosLon; + } + + public double getWgs84PosLat() { + return this.wgs84PosLat; + } + + public void setWgs84PosLat(final double wgs84PosLat) { + this.wgs84PosLat = wgs84PosLat; + } + + public float getTimeofDay() { + return this.timeofDay; + } + + public void setTimeofDay(final float timeofDay) { + this.timeofDay = timeofDay; + } + + public int getTrackType() { + return this.trackType; + } + + public void setTrackType(final int trackType) { + this.trackType = trackType; + } + + public boolean getTrackLastReport() { + return this.trackLastReport; + } + + public void setTrackLastReport(final boolean trackLastReport) { + this.trackLastReport = trackLastReport; + } + + public int getExtraPolation() { + return this.extraPolation; + } + + public void setExtraPolation(final int extraPolation) { + this.extraPolation = extraPolation; + } + + public int getTrackPosCode() { + return this.trackPosCode; + } + + public void setTrackPosCode(final int trackPosCode) { + this.trackPosCode = trackPosCode; + } + + public float getSigmaX() { + return this.sigmaX; + } + + public void setSigmaX(final float sigmaX) { + this.sigmaX = sigmaX; + } + + public float getSigmaY() { + return this.sigmaY; + } + + public void setSigmaY(final float sigmaY) { + this.sigmaY = sigmaY; + } + + public float getSigmaXY() { + return this.sigmaXY; + } + + public void setSigmaXY(final float sigmaXY) { + this.sigmaXY = sigmaXY; + } + + public float getAmpofPriplot() { + return this.ampofPriplot; + } + + public void setAmpofPriplot(final float ampofPriplot) { + this.ampofPriplot = ampofPriplot; + } + + public double getCartesianTrkvelVx() { + return this.cartesianTrkvelVx; + } + + public void setCartesianTrkvelVx(final double cartesianTrkvelVx) { + this.cartesianTrkvelVx = cartesianTrkvelVx; + } + + public double getCartesianTrkvelVy() { + return this.cartesianTrkvelVy; + } + + public void setCartesianTrkvelVy(final double cartesianTrkvelVy) { + this.cartesianTrkvelVy = cartesianTrkvelVy; + } + + public double getCog() { + return this.cog; + } + + public void setCog(final double cog) { + this.cog = cog; + } + + public double getSog() { + return this.sog; + } + + public void setSog(final double sog) { + this.sog = sog; + } + + public int getStatus() { + return this.status; + } + + public void setStatus(final int status) { + this.status = status; + } + + @Override + public int compareTo(final RadarTrackVo o) { + return this.status - o.status; + } + + public double getDistance() { + return this.distance; + } + + public void setDistance(final double distance) { + this.distance = distance; + } + + public int getIsSmuggle() { + return this.isSmuggle; + } + + public void setIsSmuggle(final int isSmuggle) { + this.isSmuggle = isSmuggle; + } + + public String getWarn_color() { + return this.warnColor; + } + + public void setWarn_color(final String warn_color) { + this.warnColor = warn_color; + } + + public int getTargetType() { + return this.targetType; + } + + public void setTargetType(final int targetType) { + this.targetType = targetType; + } + + public int getSign_window() { + return this.signWindow; + } + + public void setSign_window(final int sign_window) { + this.signWindow = sign_window; + } + + public int getIs_warn() { + return this.isWarn; + } + + public void setIs_warn(final int is_warn) { + this.isWarn = is_warn; + } + + public long getTimeStamp() { + return this.timeStamp; + } + + public void setTimeStamp(final long timeStamp) { + this.timeStamp = timeStamp; + } + + public int getCameraId() { + return this.cameraId; + } + + public void setCameraId(final int cameraId) { + this.cameraId = cameraId; + } + + public String getTrackby() { + return this.trackby; + } + + public void setTrackby(final String trackby) { + this.trackby = trackby; + } + + public String getWarnSiteType() { + return this.warnSiteType; + } + + public void setWarnSiteType(final String warnSiteType) { + this.warnSiteType = warnSiteType; + } + + public long getUtc() { + return this.utc; + } + + public void setUtc(final long utc) { + this.utc = utc; + } +} diff --git a/src/main/java/com/zhichenhaixin/stopcamera/RadarTrackEhcache.java b/src/main/java/com/zhichenhaixin/stopcamera/RadarTrackEhcache.java new file mode 100644 index 0000000..e97b3ef --- /dev/null +++ b/src/main/java/com/zhichenhaixin/stopcamera/RadarTrackEhcache.java @@ -0,0 +1,52 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.stopcamera; + +import net.sf.ehcache.Cache; +import net.sf.ehcache.CacheManager; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class RadarTrackEhcache +{ + public static final String CACHE_NAME = "radarTrackEhcache"; + + public static void put(final TrackSpotVo radarTrackVo) { + final Cache cache = CacheManager.getInstance().getCache("radarTrackEhcache"); + cache.put(new Element(radarTrackVo.getTrackNumber(), radarTrackVo)); + } + + public static void remove(final int trackNumber) { + CacheManager.getInstance().getCache("radarTrackEhcache").remove(trackNumber); + } + + public static List getAll() { + final Cache cache = CacheManager.getInstance().getCache("radarTrackEhcache"); + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((TrackSpotVo)element.getValue()); + } + } + return result; + } + + public static TrackSpotVo get(final int trackNumber) { + final Element element = CacheManager.getInstance().getCache("radarTrackEhcache").get(trackNumber); + if (element == null) { + return null; + } + return (TrackSpotVo)element.getValue(); + } + + public static void clear() { + CacheManager.getInstance().getCache("radarTrackEhcache").removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/stopcamera/StopCameraService.java b/src/main/java/com/zhichenhaixin/stopcamera/StopCameraService.java new file mode 100644 index 0000000..12c64f6 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/stopcamera/StopCameraService.java @@ -0,0 +1,34 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.stopcamera; + +import com.zhichenhaixin.proto.ZCHXFllow; + +import java.text.SimpleDateFormat; + +public class StopCameraService +{ + static SimpleDateFormat fmt; + + static { + StopCameraService.fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); + } + + public static void putTrackIncache(final ZCHXFllow.SpotVo vo) { + TrackSpotVo trackSpotVo = RadarTrackEhcache.get(vo.getTrackNumber()); + if (trackSpotVo == null) { + trackSpotVo = new TrackSpotVo(); + trackSpotVo.setTrackNumber(vo.getTrackNumber()); + } + trackSpotVo.setFllowType(vo.getFllowType()); + trackSpotVo.setObjectType(vo.getObjectType()); + trackSpotVo.setRtsp(vo.getRtsp()); + trackSpotVo.setCameraName(vo.getCameraName()); + trackSpotVo.setCameraId(vo.getCameraId()); + trackSpotVo.setWarnSiteType(vo.getWarnSiteType()); + trackSpotVo.setUpdateTime(System.currentTimeMillis()); + RadarTrackEhcache.put(trackSpotVo); + } +} diff --git a/src/main/java/com/zhichenhaixin/stopcamera/TrackSpotVo.java b/src/main/java/com/zhichenhaixin/stopcamera/TrackSpotVo.java new file mode 100644 index 0000000..b3b0ade --- /dev/null +++ b/src/main/java/com/zhichenhaixin/stopcamera/TrackSpotVo.java @@ -0,0 +1,84 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.stopcamera; + +import java.io.Serializable; + +public class TrackSpotVo implements Serializable +{ + private static final long serialVersionUID = 1L; + private int trackNumber; + private int fllowType; + private int objectType; + private String rtsp; + private String cameraName; + private int cameraId; + private long updateTime; + private String warnSiteType; + + public int getTrackNumber() { + return this.trackNumber; + } + + public void setTrackNumber(final int trackNumber) { + this.trackNumber = trackNumber; + } + + public int getFllowType() { + return this.fllowType; + } + + public void setFllowType(final int fllowType) { + this.fllowType = fllowType; + } + + public int getObjectType() { + return this.objectType; + } + + public void setObjectType(final int objectType) { + this.objectType = objectType; + } + + public String getRtsp() { + return this.rtsp; + } + + public void setRtsp(final String rtsp) { + this.rtsp = rtsp; + } + + public String getCameraName() { + return this.cameraName; + } + + public void setCameraName(final String cameraName) { + this.cameraName = cameraName; + } + + public int getCameraId() { + return this.cameraId; + } + + public void setCameraId(final int cameraId) { + this.cameraId = cameraId; + } + + public long getUpdateTime() { + return this.updateTime; + } + + public void setUpdateTime(final long updateTime) { + this.updateTime = updateTime; + } + + public String getWarnSiteType() { + return this.warnSiteType; + } + + public void setWarnSiteType(final String warnSiteType) { + this.warnSiteType = warnSiteType; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/BigScreenDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/BigScreenDaoImpl.java new file mode 100644 index 0000000..dcf85eb --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/BigScreenDaoImpl.java @@ -0,0 +1,168 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.base.model.MatrixCameraVo; +import com.zhichenhaixin.base.model.MatrixPCVo; +import com.zhichenhaixin.base.model.MatrixVo; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.base.util.TcpUtil; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.model.BigScreenInfo; +import com.zhichenhaixin.sys.model.MatrixCameraInfo; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Repository("bigScreenDaoImpl") +public class BigScreenDaoImpl extends BaseDaoImpl +{ + public int insertBigScreen(final BigScreenInfo bsInfo) { + int newBigScreenId = this.pg_template.insert("bigScreenInfo.insertBigScreenInfo", bsInfo); + if (newBigScreenId > 0) { + newBigScreenId = this.pg_template.selectOne("bigScreenInfo.selectNewBigScreenId"); + } + return newBigScreenId; + } + + public void saveMatrixCamInfoList(final List MCList) { + this.pg_template.insert("bigScreenInfo.insertBigScreenMatxInfo", MCList); + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditBigScreen(final BigScreenInfo bsInfo) { + final ResMsg msg = new ResMsg(); + if (bsInfo.getId() == 0) { + final int newBigScreenId = this.insertBigScreen(bsInfo); + if (newBigScreenId > 0) { + final List camera_list = bsInfo.getCamera_list(); + if (camera_list != null && camera_list.size() > 0) { + for (final MatrixCameraInfo matrixCameraInfo : camera_list) { + matrixCameraInfo.setId(newBigScreenId); + } + this.saveMatrixCamInfoList(camera_list); + } + } + msg.setCode(0); + msg.setMsg("\u5927\u5c4f\u5206\u7ec4\u65b0\u589e\u6210\u529f"); + } + else { + this.pg_template.update("bigScreenInfo.updateBigScreenInfo", bsInfo); + final List camera_list2 = bsInfo.getCamera_list(); + if (camera_list2 != null && camera_list2.size() > 0) { + this.pg_template.delete("bigScreenInfo.deleteMatrixCamInfo", bsInfo.getId()); + for (final MatrixCameraInfo matrixCameraInfo2 : camera_list2) { + matrixCameraInfo2.setId(bsInfo.getId()); + } + this.saveMatrixCamInfoList(camera_list2); + } + msg.setCode(0); + msg.setMsg("\u5927\u5c4f\u5206\u7ec4\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List findAllBigScreen() { + final Map map = new HashMap(); + final List bsInfolist = this.pg_template.selectList("bigScreenInfo.selectBigScreenInfo"); + for (final BigScreenInfo bigScreenInfo : bsInfolist) { + map.put("id", bigScreenInfo.getId()); + final List list = this.pg_template.selectList("bigScreenInfo.selectCamInfo", map); + bigScreenInfo.setCamera_list(list); + } + return bsInfolist; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg delBigScreen(final BigScreenInfo bsInfo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("bigScreenInfo.deleteBigScreenInfo", bsInfo); + msg.setCode(0); + msg.setMsg("\u5220\u9664\u6210\u529f"); + return msg; + } + + public ResMsg bigScreenDelivery(final BigScreenInfo bsInfo) { + final ResMsg msg = new ResMsg(); + final MatrixVo mVo = new MatrixVo(); + if (bsInfo.getSceneid() != 0) { + mVo.setSceneId(bsInfo.getSceneid()); + } + final List listCam = new ArrayList(); + final List listPC = new ArrayList(); + if (bsInfo.getCamera_list() != null && bsInfo.getCamera_list().size() > 0) { + for (final MatrixCameraInfo matrixCameraInfo : bsInfo.getCamera_list()) { + if (matrixCameraInfo.getDome() == 4) { + final MatrixPCVo mpcVo = new MatrixPCVo(); + final int pcid = this.pg_template.selectOne("bigScreenInfo.getCameraMode", matrixCameraInfo.getCameraid()); + mpcVo.setPcId(pcid); + mpcVo.setSplitScreenId(matrixCameraInfo.getScreenid()); + listPC.add(mpcVo); + } + else { + final MatrixCameraVo mcVo = new MatrixCameraVo(); + mcVo.setUserName(matrixCameraInfo.getUsername()); + if (matrixCameraInfo.getChannelid() != 0) { + mcVo.setChannelid(String.valueOf(matrixCameraInfo.getChannelid())); + } + mcVo.setPassWord(matrixCameraInfo.getPassword()); + mcVo.setSplitScreenId(matrixCameraInfo.getScreenid()); + mcVo.setVideoIp(matrixCameraInfo.getScreenip()); + if (StringUtil.notBlank(matrixCameraInfo.getScreenport())) { + mcVo.setVideoPort(Integer.parseInt(matrixCameraInfo.getScreenport())); + } + listCam.add(mcVo); + } + } + mVo.setComputerList(listPC); + mVo.setHCList(listCam); + } + final boolean b = TcpUtil.send(mVo); + if (b) { + msg.setCode(0); + msg.setMsg("\u4e0a\u5927\u5c4f\u6295\u653e\u6210\u529f"); + } + else { + msg.setCode(1); + msg.setMsg("\u4e0a\u5927\u5c4f\u6295\u653e\u5931\u8d25\uff0c\u672a\u8fde\u63a5\u5927\u5c4f\u670d\u52a1\u5668"); + } + return msg; + } + + public ResMsg seaChartBigScrDelivery(final MatrixCameraVo vo) { + final ResMsg msg = new ResMsg(); + final MatrixVo mVo = new MatrixVo(); + mVo.setSceneId(GlobalVariable.big_controll_big_screen); + final List listCam = new ArrayList(); + final List listPC = new ArrayList(); + final String channelid = vo.getChannelid(); + vo.setCameraId(0); + vo.setChannelid(null); + if (!"0".equals(channelid)) { + vo.setChannelid(vo.getChannelid()); + } + listCam.add(vo); + mVo.setHCList(listCam); + mVo.setComputerList(listPC); + final boolean b = TcpUtil.send(mVo); + if (b) { + msg.setCode(0); + msg.setMsg("\u6d77\u56fe\u4e0a\u5927\u5c4f\u6295\u653e\u6210\u529f"); + } + else { + msg.setCode(1); + msg.setMsg("\u6d77\u56fe\u4e0a\u5927\u5c4f\u6295\u653e\u5931\u8d25\uff0c\u672a\u8fde\u63a5\u5927\u5c4f\u670d\u52a1\u5668"); + } + return msg; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/CamInfoDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/CamInfoDaoImpl.java new file mode 100644 index 0000000..7ed8d20 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/CamInfoDaoImpl.java @@ -0,0 +1,234 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.vividsolutions.jts.geom.Polygon; +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.base.util.GeometryUtil; +import com.zhichenhaixin.base.util.PingUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.sys.model.*; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Repository("camInfoDaoImpl") +public class CamInfoDaoImpl extends BaseDaoImpl +{ + @Resource(name = "newlyDaoImpl") + private NewlyDaoImpl newlyDaoImpl; + @Resource(name = "userRoleManagerDaoImpl") + private UserRoleManagerDaoImpl userRoleManagerServiceImpl; + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditCamera(final CamInfo cInfo) { + final ResMsg msg = new ResMsg(); + if (cInfo.getId() == 0) { + this.setGeom(cInfo); + this.convet(cInfo); + this.pg_template.insert("camInfo.insertCamInfo", cInfo); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u65b0\u589e\u6210\u529f"); + } + else { + this.setGeom(cInfo); + this.convet(cInfo); + this.pg_template.update("camInfo.updateCamInfo", cInfo); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + public void convet(final CamInfo cInfo) { + final String screenip = cInfo.getScreenip(); + if (PingUtil.ping(screenip)) { + cInfo.setStatus("0"); + } + else { + cInfo.setStatus("512"); + } + } + + public void setGeom(final CamInfo cInfo) { + String radius = null; + if (cInfo.getDome() == 1) { + radius = SpringPropertyUtil.getProperty("qiuji.radius"); + } + else if (cInfo.getDome() == 3) { + radius = SpringPropertyUtil.getProperty("guangdianyi.radius"); + } + if (radius != null) { + final double dis = Math.round(Double.parseDouble(radius) * 100.0) * 10L / 107225.0; + final Polygon polygon = GeometryUtil.createCircle(cInfo.getLon(), cInfo.getLat(), dis); + cInfo.setGeom(polygon.toString()); + } + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List findAllCamera() { + final List list = this.pg_template.selectList("camInfo.seletCamInfo"); + return list; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryAllCameraList() { + final List lists = new ArrayList(); + final List list = this.pg_template.selectList("camInfo.seletMediaIpPort"); + for (final CameraInfo cameraInfo : list) { + if (cameraInfo != null && StringUtil.notBlank(cameraInfo.getMedia_ip()) && cameraInfo.getMedia_port() != 0) { + final MediaServerVo vo = new MediaServerVo(); + vo.setMediaIp(cameraInfo.getMedia_ip()); + vo.setMediaPort(cameraInfo.getMedia_port()); + final List cameraList = this.pg_template.selectList("camInfo.seletCameraInfo", cameraInfo); + vo.setCameraList(cameraList); + lists.add(vo); + } + } + return lists; + } + + public List queryCameraList() { + final List list = this.pg_template.selectList("camInfo.seletCameraInfoVo"); + return list; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List> findCameraSiteGroup() { + final List> list = new ArrayList>(); + final List list2 = this.pg_template.selectList("camInfo.seletCamInfoByGan"); + for (final CamInfo camInfo : list2) { + final Map map = new HashMap(); + map.put(camInfo.getGan_name(), camInfo); + list.add(map); + } + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteCamera(final CamInfo cInfo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("camInfo.deleteCamInfo", cInfo); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u5220\u9664\u6210\u529f"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '-' + #cpInfo.camera_id") + public List queryPresetInfo(final CamPresetInfo cpInfo) { + return this.pg_template.selectList("camInfo.selectPresetInfo", cpInfo); + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditPresetInfo(final CamPresetInfo cpInfo) { + final ResMsg msg = new ResMsg(); + if (cpInfo.getId() == 0) { + this.pg_template.insert("camInfo.insertPresetInfo", cpInfo); + msg.setCode(0); + msg.setMsg("\u9884\u7f6e\u4f4d\u65b0\u589e\u6210\u529f"); + } + else { + this.pg_template.update("camInfo.updatePresetInfo", cpInfo); + msg.setCode(0); + msg.setMsg("\u9884\u7f6e\u4f4d\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deletePresetInfo(final CamPresetInfo cpInfo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("camInfo.deletePresetInfo", cpInfo); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u9884\u7f6e\u4f4d\u5220\u9664\u6210\u529f"); + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public void zmq_ChangCameraStatus(final ZCHXFllow.CameraStatusInfo cameras) { + Map map = null; + map = new HashMap(); + map.put("status", cameras.getStatus()); + map.put("id", cameras.getCameraId()); + this.pg_template.update("camInfo.updateCamStatus", map); + } + + public List findQiuGuangCamera() { + final List list = this.pg_template.selectList("camInfo.seletCamInfoByqiugaung"); + return list; + } + + public CameraModel getCameraById(final int id) { + final CameraModel camera = this.pg_template.selectOne("camInfo.getCameraById", id); + return camera; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryAllCamera() { + final List cameraInfoList = this.pg_template.selectList("camInfo.queryAllCamera"); + for (final CameraModel cameraModel : cameraInfoList) { + cameraModel.setParam(null); + cameraModel.setGeom(null); + } + return cameraInfoList; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryXideweiServerByCamera() { + final List lists = this.pg_template.selectList("camInfo.selectXideweiDevice"); + for (final XideweiServerVo xideweiServerVo : lists) { + final List cameraList = this.pg_template.selectList("camInfo.selectXideweiByCamera", xideweiServerVo.getId()); + xideweiServerVo.setCameraList(cameraList); + } + return lists; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg updateCamMediaIpOrPort(final CamInfo info) { + final ResMsg msg = new ResMsg(); + this.pg_template.update("camInfo.updateCamMediaIpOrPort", info); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u7684\u6d41\u5a92\u4f53ip\u548c\u7aef\u53e3\u4fee\u6539\u6210\u529f"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '-' + #vo.role_id") + public List>> queryCameraSiteGroup(final RoleVo vo) { + final List>> list = new ArrayList>>(); + final List clist = this.userRoleManagerServiceImpl.queryCameraAuthList(vo); + final Map> map = new HashMap>(); + for (final CameraAuthorityVo camVo : clist) { + final List list2 = this.pg_template.selectList("camInfo.seletCameraByGanId", camVo); + for (final CamInfo camInfo : list2) { + camInfo.setRole_id(camVo.getRole_id()); + } + map.put(camVo.getGan_name(), list2); + } + list.add(map); + return list; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '-' + #vo.role_id") + public List queryAllCamera(final RoleVo vo) { + final List list = new ArrayList(); + final List clist = this.userRoleManagerServiceImpl.queryCameraAuthList(vo); + for (final CameraAuthorityVo cVo : clist) { + final CamInfo info = this.pg_template.selectOne("camInfo.seletCamInfoById", cVo); + info.setIscontrol(cVo.getIscontrol()); + info.setRole_id(cVo.getRole_id()); + list.add(info); + } + return list; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/DefenceDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/DefenceDaoImpl.java new file mode 100644 index 0000000..f6dd316 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/DefenceDaoImpl.java @@ -0,0 +1,167 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.cache.util.CustomFeatureEhcache; +import com.zhichenhaixin.sys.model.*; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository("defenceDaoImpl") +public class DefenceDaoImpl extends BaseDaoImpl +{ + public List getAllCamera() { + final List cameraList = this.pg_template.selectList("defenceDaoMapper.getAllCamera"); + return cameraList; + } + + public boolean saveDefTime(final TimeSpanVo times) { + final int result = this.pg_template.insert("defenceDaoMapper.saveDefTime", times); + return result > 0; + } + + public boolean saveOwnCamera(final THqCamera2 camera) { + final int result = this.pg_template.insert("defenceDaoMapper.saveOwnCamera", camera); + return result > 0; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public boolean delDefenceById(final int defenceId) { + this.pg_template.delete("defenceDaoMapper.delDefenceById", defenceId); + CustomFeatureEhcache.remove(defenceId); + return true; + } + + public List getTimeById(final int defenceId) { + final List timeSpanList = this.pg_template.selectList("defenceDaoMapper.getTimeById", defenceId); + return timeSpanList; + } + + public List getCameraById(final int defenceId) { + final List cameraList = this.pg_template.selectList("defenceDaoMapper.getCameraById", defenceId); + return cameraList; + } + + public boolean delCameraById(final int defenceId) { + this.pg_template.delete("defenceDaoMapper.delCameraById", defenceId); + return true; + } + + public boolean delTimeById(final int defenceId) { + this.pg_template.delete("defenceDaoMapper.delTimeById", defenceId); + return true; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List getAllCustomDefence() { + final List custom = this.pg_template.selectList("defenceDaoMapper.getAllCustomDefence"); + for (int i = 0; custom != null && i < custom.size(); ++i) { + final int defenceId = custom.get(i).getDefence_id(); + final List timeList = this.getTimeById(defenceId); + custom.get(i).setTimespans(timeList); + if (custom.get(i).getDefence_id() == GlobalVariable.defence_id) { + custom.remove(i); + } + } + return custom; + } + + public List initCustomDefence() { + final List customDefenceList = this.pg_template.selectList("defenceDaoMapper.getAllCustomDefence"); + return customDefenceList; + } + + public int addCustomDefences(final CustomDefence customDefenceVo) { + final int result = this.pg_template.insert("defenceDaoMapper.addCustomDefences", customDefenceVo); + if (result > 0) { + return this.pg_template.selectOne("defenceDaoMapper.getMaxDefenceId"); + } + return 0; + } + + public boolean updateCustomDefences(final CustomDefence customDefenceVo) { + final int result = this.pg_template.update("defenceDaoMapper.updateCustomDefences", customDefenceVo); + return result > 0; + } + + public List getNearestCamera(final String lon_lat) { + final List cameraList = this.pg_template.selectList("defenceDaoMapper.getNearestCamera", lon_lat); + return cameraList; + } + + public boolean updateDefence(final int defenceId, final String lonLat) { + final CustomDefence customDefence = new CustomDefence(); + customDefence.setDefence_id(defenceId); + customDefence.setLon_lat(lonLat); + final int result = this.pg_template.update("defenceDaoMapper.updateDefence", customDefence); + return result > 0; + } + + public boolean deleteBindCamera(final int defence_camwon_id) { + final int result = this.pg_template.delete("defenceDaoMapper.deleteBindCamera", defence_camwon_id); + return result > 0; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResVo saveDefences(final CustomDefence customDefence) { + customDefence.setTts("\u6709\u76ee\u6807\u8fdb\u5165" + customDefence.getDefence_name()); + customDefence.setWarn_level((customDefence.getWarn_level() == 0) ? 1 : customDefence.getWarn_level()); + final ResVo res = new ResVo(); + res.setCode(1000); + res.setMsg("\u6210\u529f"); + final String lon_lat = customDefence.getLon_lat(); + final String[] split = lon_lat.split(","); + if (customDefence.getDefence_shape() == 1) { + final String start_lon_lat = lon_lat.substring(lon_lat.indexOf("(") + 2, lon_lat.indexOf(",")); + final String end_lon_lat = lon_lat.substring(lon_lat.lastIndexOf(",") + 1, lon_lat.lastIndexOf(")") - 1); + if (split.length < 4 || !start_lon_lat.equals(end_lon_lat)) { + res.setCode(1001); + res.setMsg("\u591a\u8fb9\u5f62\u81f3\u5c11\u9700\u8981\u56db\u4e2a\u5750\u6807\u70b9\u6216\u8005\u5f00\u59cb\u5750\u6807\u70b9\u548c\u7ed3\u675f\u5750\u6807\u70b9\u5fc5\u987b\u76f8\u540c"); + return res; + } + } + int key = 0; + if (customDefence.getDefence_shape() == 3 && split.length < 2) { + res.setCode(1001); + res.setMsg("\u7ebf\u6bb5\u81f3\u5c11\u9700\u8981\u4e24\u4e2a\u5750\u6807\u70b9"); + return res; + } + if (customDefence.getDefence_id() == 0) { + key = this.addCustomDefences(customDefence); + customDefence.setDefence_id(key); + } + else { + key = customDefence.getDefence_id(); + this.updateCustomDefences(customDefence); + } + CustomFeatureEhcache.put(customDefence); + if (key != 0) { + final List timeList = customDefence.getTimespans(); + boolean result1 = this.delTimeById(key); + if (timeList != null) { + TimeSpanVo timeSpanVo = null; + for (int i = 0; i < timeList.size(); ++i) { + timeSpanVo = timeList.get(i); + timeSpanVo.setDefence_id(key); + result1 = this.saveDefTime(timeSpanVo); + if (!result1) { + res.setCode(1001); + res.setMsg("\u5e03\u9632\u65f6\u95f4\u4fdd\u5b58\u5931\u8d25"); + } + } + } + } + else { + res.setCode(1001); + res.setMsg("\u9632\u533a\u4fdd\u5b58\u5931\u8d25"); + } + return res; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/IslandCruiseDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/IslandCruiseDaoImpl.java new file mode 100644 index 0000000..58977fd --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/IslandCruiseDaoImpl.java @@ -0,0 +1,209 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.cache.util.SurLineDataEhcache; +import com.zhichenhaixin.list.model.AlarmInfoSearch; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.model.CamPresetInfo; +import com.zhichenhaixin.sys.model.CameraVo; +import com.zhichenhaixin.sys.model.InspectionPolicyInfo; +import com.zhichenhaixin.sys.model.SurLineInfo; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Repository("islandCruiseDaoImpl") +public class IslandCruiseDaoImpl extends BaseDaoImpl +{ + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg saveEditInspectionPolicyInfo(final InspectionPolicyInfo IPInfo) { + final ResMsg msg = new ResMsg(); + if (IPInfo.getCheck_plane_id() == 0) { + int insert = this.pg_template.insert("islandCruise.insertInspectionPolicyInfo", IPInfo); + if (insert > 0) { + insert = this.pg_template.selectOne("islandCruise.selectNewInsPolicyId"); + } + final List camera_list = IPInfo.getCamera_list(); + for (final CameraVo cameraVo : camera_list) { + cameraVo.setCheck_plane_id(insert); + final CamPresetInfo preset_info = cameraVo.getCamera_preset_info(); + if (preset_info != null) { + cameraVo.setPreset_id(preset_info.getId()); + } + } + this.pg_template.insert("islandCruise.insertInspectionPolicyByCamera", camera_list); + msg.setCode(0); + msg.setMsg("\u5de1\u67e5\u7b56\u7565\u4fe1\u606f\u65b0\u589e\u6210\u529f"); + } + else { + final Integer one = this.pg_template.selectOne("islandCruise.queryCheckId", IPInfo.getCheck_plane_id()); + if (one != null) { + this.pg_template.update("islandCruise.updateInspectionPolicyInfo", IPInfo); + final Map map = new HashMap(); + map.put("check_name", IPInfo.getCheck_name()); + map.put("check_id", one); + this.pg_template.update("islandCruise.updateCheckName", map); + final List camera_list2 = IPInfo.getCamera_list(); + if (camera_list2 != null && camera_list2.size() > 0) { + this.pg_template.delete("islandCruise.deleteCamera", IPInfo.getCheck_plane_id()); + for (final CameraVo cameraVo2 : camera_list2) { + cameraVo2.setCheck_plane_id(IPInfo.getCheck_plane_id()); + final CamPresetInfo preset_info2 = cameraVo2.getCamera_preset_info(); + if (preset_info2 != null) { + cameraVo2.setPreset_id(preset_info2.getId()); + } + } + this.pg_template.insert("islandCruise.insertInspectionPolicyByCamera", camera_list2); + } + } + msg.setCode(0); + msg.setMsg("\u5de1\u67e5\u7b56\u7565\u4fe1\u606f\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '_' + #IPInfo.check_plane_id + '_' + #IPInfo.check_name") + public List getInspectionPolicyInfo(final InspectionPolicyInfo IPInfo) { + final List list = this.pg_template.selectList("islandCruise.selectInspectionPolicyInfo", IPInfo); + for (final InspectionPolicyInfo info : list) { + final List camera_list = this.pg_template.selectList("islandCruise.selectCameraInfo", info.getCheck_plane_id()); + for (final CameraVo cameraVo : camera_list) { + final CamPresetInfo preset_info = this.pg_template.selectOne("islandCruise.selectPresetInfo", cameraVo.getPreset_id()); + cameraVo.setCamera_preset_info(preset_info); + } + info.setCamera_list(camera_list); + } + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg delInspectionPolicyInfo(final InspectionPolicyInfo IPInfo) { + final ResMsg msg = new ResMsg(); + final Integer one = this.pg_template.selectOne("islandCruise.queryCheckId", IPInfo.getCheck_plane_id()); + if (one != null) { + final Map map = new HashMap(); + map.put("check_plane_id", IPInfo.getCheck_plane_id()); + map.put("check_id", one); + this.pg_template.delete("islandCruise.deleteInspectionPolicyInfo", map); + } + msg.setCode(0); + msg.setMsg("\u5de1\u67e5\u7b56\u7565\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg editSurLineData(final SurLineInfo SIInfo) { + final ResMsg msg = new ResMsg(); + final String lon_lats = SIInfo.getLon_lats(); + final String start = lon_lats.substring(lon_lats.indexOf("(") + 1, lon_lats.indexOf(",")); + final String end = lon_lats.substring(lon_lats.lastIndexOf(",") + 1, lon_lats.lastIndexOf(")")); + if (start.equals(end)) { + this.pg_template.update("islandCruise.updateSurLineInfo", SIInfo); + msg.setCode(0); + msg.setMsg("\u73af\u5c9b\u7ebf\u8bbe\u7f6e\u4fe1\u606f\u7f16\u8f91\u6210\u529f"); + SurLineDataEhcache.put(SIInfo); + } + else { + msg.setCode(1); + msg.setMsg("\u73af\u5c9b\u7ebf\u8bbe\u7f6e\u4fe1\u606f\u7f16\u8f91\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u73af\u5c9b\u7ebf\u5f00\u59cb\u5750\u6807\u70b9\u548c\u7ed3\u675f\u5750\u6807\u70b9\u662f\u5426\u76f8\u540c"); + } + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List querySurLineData() { + final SurLineInfo surLine = new SurLineInfo(); + surLine.setSurline_number(GlobalVariable.surline_number); + final List list = this.pg_template.selectList("islandCruise.selectSurLineInfo", surLine); + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg resetSurLineData() { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("islandCruise.deleteSurLineInfo"); + final List list = this.pg_template.selectList("islandCruise.selectSLInfo"); + int id = 4; + for (final SurLineInfo surLineInfo : list) { + surLineInfo.setId(id); + this.pg_template.insert("islandCruise.insertSurLineInfo", surLineInfo); + SurLineDataEhcache.remove(id); + SurLineDataEhcache.put(surLineInfo); + ++id; + } + msg.setCode(0); + msg.setMsg("\u73af\u5c9b\u7ebf\u8bbe\u7f6e\u4fe1\u606f\u91cd\u7f6e\u6210\u529f"); + return msg; + } + + public int countSurLineWarn(final AlarmInfoSearch record, final String id) { + final Map map = new HashMap(); + map.put("type", record.getType()); + map.put("begin_time", record.getNBeginTime()); + map.put("end_time", record.getNEndTime()); + map.put("sitename", record.getStrSiteName()); + map.put("handler", record.getHandler()); + map.put("handle_status", record.getHandleStatus()); + map.put("t", new StringBuilder(String.valueOf(record.getT())).toString()); + map.put("alarm_site_no", id); + final int number = this.pg_template.selectOne("islandCruise.countWarnNum", map); + return number; + } + + public List statisSurLineWarn(final AlarmInfoSearch record) { + final List surLineList = this.querySurLineData(); + int i = 0; + for (final SurLineInfo surLine : surLineList) { + if (GlobalVariable.surline_number == 1) { + if (surLine.getId() == 6 || surLine.getId() == 5) { + continue; + } + final int number = this.countSurLineWarn(record, String.valueOf(surLine.getId())); + surLine.setWarnNum(number); + surLineList.set(i, surLine); + ++i; + } + else if (GlobalVariable.surline_number == 2) { + if (surLine.getId() == 6) { + continue; + } + final int number = this.countSurLineWarn(record, String.valueOf(surLine.getId())); + surLine.setWarnNum(number); + surLineList.set(i, surLine); + ++i; + } + else { + if (GlobalVariable.surline_number != 3) { + continue; + } + final int number = this.countSurLineWarn(record, String.valueOf(surLine.getId())); + surLine.setWarnNum(number); + surLineList.set(i, surLine); + ++i; + } + } + return surLineList; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public SurLineInfo getSurLineInfo() { + final List list = this.pg_template.selectList("islandCruise.selectSLInfo"); + return list.get(0); + } + + public void initSurLineData() { + final SurLineInfo surLine = new SurLineInfo(); + surLine.setSurline_number(GlobalVariable.surline_number); + final List list = this.pg_template.selectList("islandCruise.selectSurLineInfo", surLine); + SurLineDataEhcache.saveSurLineDataCache(list); + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/LogManagerInfoDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/LogManagerInfoDaoImpl.java new file mode 100644 index 0000000..f3a1482 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/LogManagerInfoDaoImpl.java @@ -0,0 +1,40 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.model.LogManagerInfo; +import com.zhichenhaixin.sys.model.UserVo; +import org.springframework.stereotype.Repository; + +import javax.annotation.Resource; +import java.util.List; + +@Repository("logManagerInfoDaoImpl") +public class LogManagerInfoDaoImpl extends BaseDaoImpl +{ + @Resource(name = "userRoleManagerDaoImpl") + private UserRoleManagerDaoImpl userRoleManagerDaoImpl; + + public ResMsg addLogManagerInfo(final LogManagerInfo lmInfo) { + final ResMsg rmg = new ResMsg(); + final UserVo uVo = new UserVo(); + uVo.setUser_account(lmInfo.getUsername()); + final UserVo vo = this.userRoleManagerDaoImpl.queryUserByAccount(uVo); + if (vo != null) { + lmInfo.setUserrealname(StringUtil.notBlank(vo.getUser_name()) ? vo.getUser_name() : "\u672a\u77e5"); + } + this.pg_template.insert("logInfo.insertLogInfo", lmInfo); + rmg.setCode(0); + rmg.setMsg("\u65e5\u5fd7\u65b0\u589e\u6210\u529f"); + return rmg; + } + + public List queryLogManagerInfo(final LogManagerInfo lmInfo) { + return this.pg_template.selectList("logInfo.selectLogInfo", lmInfo); + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/NewlyDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/NewlyDaoImpl.java new file mode 100644 index 0000000..4f3c629 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/NewlyDaoImpl.java @@ -0,0 +1,314 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.cache.util.NightModeEhcache; +import com.zhichenhaixin.cache.util.SmuggleEhcache; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.model.*; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import javax.annotation.Resource; +import java.util.List; + +@Repository("newlyDaoImpl") +public class NewlyDaoImpl extends BaseDaoImpl +{ + @Resource(name = "dbAlarmInfoDaoImpl") + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public RadarPatrolList queryRadarPatrol() { + final RadarPatrolList radarPatrolList = new RadarPatrolList(); + final List radar_list = this.pg_template.selectList("base.selectRadarVo"); + final List patrol_list = this.pg_template.selectList("base.selectPatrolVo"); + radarPatrolList.setRadar_list(radar_list); + radarPatrolList.setPatrol_list(patrol_list); + return radarPatrolList; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditNightMode(final NightModeVo vo) { + final ResMsg msg = new ResMsg(); + if (vo.getId() == 0) { + this.pg_template.insert("newly.insertNightModeVo", vo); + msg.setCode(0); + msg.setMsg("\u591c\u95f4\u6a21\u5f0f\u4fe1\u606f\u65b0\u589e\u6210\u529f\uff01"); + } + else { + this.pg_template.update("newly.updateNightModeVo", vo); + msg.setCode(0); + msg.setMsg("\u591c\u95f4\u6a21\u5f0f\u4fe1\u606f\u7f16\u8f91\u6210\u529f\uff01"); + } + NightModeEhcache.put(vo); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryNightMode() { + final List list = this.pg_template.selectList("newly.selectNightModeVo"); + return list; + } + + public void initNightMode() { + final List list = this.pg_template.selectList("newly.selectNightModeVo"); + NightModeEhcache.saveNightModeVoCache(list); + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteNightMode(final NightModeVo vo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deleteNightModeVo", vo); + NightModeEhcache.remove(vo.getId()); + msg.setCode(0); + msg.setMsg("\u591c\u95f4\u6a21\u5f0f\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + public ResMsg switchMode(final int model_type) { + final ResMsg msg = new ResMsg(); + if (model_type == 1) { + GlobalVariable.MODEL_TYPE = model_type; + msg.setCode(0); + msg.setMsg("\u624b\u52a8\u6a21\u5f0f\u5207\u6362\u6210\u529f"); + } + else if (model_type == 3) { + GlobalVariable.MODEL_TYPE = model_type; + msg.setCode(0); + msg.setMsg("\u81ea\u52a8\u6a21\u5f0f\u5207\u6362\u6210\u529f"); + } + else { + msg.setCode(2); + msg.setMsg("\u6a21\u5f0f\u5207\u6362\u5931\u8d25"); + } + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryEarlyWarn() { + final List list = this.pg_template.selectList("newly.selectEarlyWarnVo"); + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditEarlyWarn(final EarlyWarnVo vo) { + final ResMsg msg = new ResMsg(); + if (vo.getAuto_warn_id() == 0) { + this.pg_template.insert("newly.insertEarlyWarnVo", vo); + msg.setCode(0); + msg.setMsg("\u9884\u8b66\u7b49\u7ea7\u4fe1\u606f\u65b0\u589e\u6210\u529f\uff01"); + } + else { + this.pg_template.update("newly.updateEarlyWarnVo", vo); + msg.setCode(0); + msg.setMsg("\u9884\u8b66\u7b49\u7ea7\u4fe1\u606f\u7f16\u8f91\u6210\u529f\uff01"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteEarlyWarn(final EarlyWarnVo vo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deleteEarlyWarnVo", vo); + msg.setCode(0); + msg.setMsg("\u9884\u8b66\u7b49\u7ea7\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List querySmuggle() { + final List list = this.pg_template.selectList("newly.selectSmuggleVo"); + return list; + } + + public void initSmuggle() { + final List list = this.pg_template.selectList("newly.selectSmuggleVo"); + SmuggleEhcache.saveSmuggleVoCache(list); + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditSmuggle(final SmuggleVo vo) { + final ResMsg msg = new ResMsg(); + if (vo.getId() == 0) { + this.pg_template.insert("newly.insertSmuggleVo", vo); + msg.setCode(0); + msg.setMsg("\u8d70\u79c1\u884c\u4e3a\u4fe1\u606f\u65b0\u589e\u6210\u529f\uff01"); + } + else { + this.pg_template.update("newly.updateSmuggleVo", vo); + msg.setCode(0); + msg.setMsg("\u8d70\u79c1\u884c\u4e3a\u4fe1\u606f\u7f16\u8f91\u6210\u529f\uff01"); + } + SmuggleEhcache.put(vo); + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteSmuggle(final SmuggleVo vo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deleteSmuggleVo", vo); + SmuggleEhcache.remove(vo.getId()); + msg.setCode(0); + msg.setMsg("\u8d70\u79c1\u884c\u4e3a\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryPosMarkData() { + final List list = this.pg_template.selectList("newly.selectPosMarkData"); + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg addOrEditPosMarkData(final PosMarkData data) { + final ResMsg msg = new ResMsg(); + if (data.getId() == 0) { + this.pg_template.insert("newly.insertPosMarkData", data); + msg.setCode(0); + msg.setMsg("\u4f4d\u7f6e\u6807\u6ce8\u4fe1\u606f\u65b0\u589e\u6210\u529f\uff01"); + } + else { + this.pg_template.update("newly.updatePosMarkData", data); + msg.setCode(0); + msg.setMsg("\u4f4d\u7f6e\u6807\u6ce8\u4fe1\u606f\u7f16\u8f91\u6210\u529f\uff01"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg delPosMarkData(final PosMarkData data) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deletePosMarkData", data); + msg.setCode(0); + msg.setMsg("\u4f4d\u7f6e\u6807\u6ce8\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '_' + #info.user_account") + public List queryFocusPointInfo(final FocusPointInfo info) { + final List list = this.pg_template.selectList("newly.queryFocusPointInfo", info); + for (final FocusPointInfo focusPointInfo : list) { + final List camera_list = this.pg_template.selectList("newly.queryFocusPointByCamera", focusPointInfo.getId()); + focusPointInfo.setCamera_list(camera_list); + } + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg saveEditFocusPoint(final FocusPointInfo info) { + final ResMsg msg = new ResMsg(); + if (info.getId() == 0) { + int insert = this.pg_template.insert("newly.insertFocusPoint", info); + if (insert > 0) { + insert = this.pg_template.selectOne("newly.selectFocusPointId"); + } + final List list = info.getCamera_list(); + if (list != null && list.size() > 0) { + for (final CameraInfo cameraInfo : list) { + cameraInfo.setFocus_id(insert); + } + this.pg_template.insert("newly.insertFocusPointByCamera", list); + } + msg.setCode(0); + msg.setMsg("\u5173\u6ce8\u76f8\u673a\u4fe1\u606f\u65b0\u589e\u6210\u529f"); + } + else { + this.pg_template.update("newly.updateFocusPoint", info); + final List list2 = info.getCamera_list(); + if (list2 != null && list2.size() > 0) { + this.pg_template.delete("newly.deleteFocusPointByCamera", info); + for (final CameraInfo cameraInfo2 : list2) { + cameraInfo2.setFocus_id(info.getId()); + } + this.pg_template.insert("newly.insertFocusPointByCamera", list2); + } + msg.setCode(0); + msg.setMsg("\u5173\u6ce8\u76f8\u673a\u4fe1\u606f\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteFocusPointInfo(final FocusPointInfo info) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deleteFocusPoint", info); + msg.setCode(0); + msg.setMsg("\u5173\u6ce8\u76f8\u673a\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + public List queryGunBallLinkage(final GunBallLinkage vo) { + return this.pg_template.selectList("newly.queryGunBallLinkage", vo); + } + + public ResMsg saveEditGunBallLinkage(final GunBallLinkage vo) { + final ResMsg msg = new ResMsg(); + if (vo.getId() == 0) { + this.pg_template.insert("newly.insertGunBallLinkage", vo); + msg.setCode(0); + msg.setMsg("\u67aa\u7403\u8054\u52a8\u914d\u7f6e\u4fe1\u606f\u65b0\u589e\u6210\u529f"); + } + else { + this.pg_template.update("newly.updateGunBallLinkage", vo); + msg.setCode(0); + msg.setMsg("\u67aa\u7403\u8054\u52a8\u914d\u7f6e\u4fe1\u606f\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + public ResMsg deleteGunBallLinkage(final GunBallLinkage vo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deleteGunBallLinkage", vo.getId()); + msg.setCode(0); + msg.setMsg("\u67aa\u7403\u8054\u52a8\u914d\u7f6e\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '_' + #vo.camera_id") + public List queryCameraInitPreset(final CameraInitPreset vo) { + final List list = this.pg_template.selectList("newly.queryCameraInitPreset", vo); + for (final CameraInitPreset cameraInitPreset : list) { + final CamPresetInfo info = this.pg_template.selectOne("newly.queryCamPresetInfo", cameraInitPreset.getPreset_id()); + cameraInitPreset.setCamera_preset_info(info); + } + return list; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg saveEditCameraInitPreset(final CameraInitPreset vo) { + final ResMsg msg = new ResMsg(); + if (vo.getId() == 0) { + final List list = this.queryCameraInitPreset(vo); + if (list != null && list.size() > 0) { + msg.setCode(1); + msg.setMsg("\u76f8\u673aid\u5df2\u7ecf\u5b58\u5728\uff0c\u65e0\u6cd5\u65b0\u589e"); + return msg; + } + this.pg_template.insert("newly.insertCameraInitPreset", vo); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u521d\u59cb\u9884\u7f6e\u4f4d\u4fe1\u606f\u65b0\u589e\u6210\u529f"); + } + else { + this.pg_template.update("newly.updateCameraInitPreset", vo); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u521d\u59cb\u9884\u7f6e\u4f4d\u4fe1\u606f\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteCameraInitPreset(final CameraInitPreset vo) { + final ResMsg msg = new ResMsg(); + this.pg_template.delete("newly.deleteCameraInitPreset", vo.getCamera_id()); + msg.setCode(0); + msg.setMsg("\u76f8\u673a\u521d\u59cb\u9884\u7f6e\u4f4d\u4fe1\u606f\u5220\u9664\u6210\u529f"); + return msg; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/dao/impl/UserRoleManagerDaoImpl.java b/src/main/java/com/zhichenhaixin/sys/dao/impl/UserRoleManagerDaoImpl.java new file mode 100644 index 0000000..7960b74 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/dao/impl/UserRoleManagerDaoImpl.java @@ -0,0 +1,329 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.dao.impl; + +import com.zhichenhaixin.base.dao.impl.BaseDaoImpl; +import com.zhichenhaixin.base.util.HttpUtils; +import com.zhichenhaixin.base.util.MD5Utils; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.model.CameraAuthorityVo; +import com.zhichenhaixin.sys.model.FunFCnfVo; +import com.zhichenhaixin.sys.model.RoleVo; +import com.zhichenhaixin.sys.model.UserVo; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository("userRoleManagerDaoImpl") +public class UserRoleManagerDaoImpl extends BaseDaoImpl +{ + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryFunConsList() { + final List funFCnfList = this.pg_template.selectList("userRoleInfo.queryFunConsList"); + return funFCnfList; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryRoleComboxList() { + final List selectList = this.pg_template.selectList("userRoleInfo.queryRoleComboxList"); + return selectList; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List queryRoleList() { + final RoleVo vo = new RoleVo(); + final List roleVos = this.pg_template.selectList("userRoleInfo.findRole", vo); + for (final RoleVo roleVo : roleVos) { + final List funFCnList = this.pg_template.selectList("userRoleInfo.queryFunConsListByRoleId", roleVo.getRole_id()); + roleVo.setRole_fun_list(funFCnList); + } + return roleVos; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '_' + #uVo.user_account + '_' + #uVo.user_name") + public List queryUserList(final UserVo uVo) { + final List selectList = this.pg_template.selectList("userRoleInfo.queryUserList", uVo); + return selectList; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg saveEditRoleMsg(final RoleVo rVo) { + final ResMsg msg = new ResMsg(); + final List roleVos = this.pg_template.selectList("userRoleInfo.findRole", rVo); + if (rVo.getRole_id() == 0) { + if (roleVos != null && roleVos.size() > 0) { + msg.setCode(6); + msg.setMsg("\u8be5\u89d2\u8272\u5df2\u7ecf\u5b58\u5728"); + return msg; + } + final int newRoleId = this.insertRole(rVo); + if (newRoleId > 0) { + final List roleFunList = rVo.getRole_fun_list(); + if (roleFunList != null && roleFunList.size() > 0) { + for (final FunFCnfVo funFCnfVo : roleFunList) { + funFCnfVo.setRole_id(newRoleId); + } + this.saveRoleFunList(roleFunList); + } + } + msg.setCode(0); + msg.setMsg("\u89d2\u8272\u65b0\u589e\u6210\u529f"); + } + else { + if (rVo.getRole_id() == 1) { + msg.setCode(1); + msg.setMsg("\u8d85\u7ea7\u7ba1\u7406\u5458\u7684\u89d2\u8272\u6743\u9650\u4e0d\u80fd\u7f16\u8f91"); + return msg; + } + if (roleVos == null) { + msg.setCode(1); + msg.setMsg("\u8be5\u89d2\u8272\u4e0d\u5b58\u5728"); + return msg; + } + this.updateRole(rVo); + final List roleFunList2 = rVo.getRole_fun_list(); + if (roleFunList2 != null && roleFunList2.size() > 0) { + this.deleteRoleFunList(rVo.getRole_id()); + for (final FunFCnfVo funFCnfVo2 : roleFunList2) { + funFCnfVo2.setRole_id(rVo.getRole_id()); + } + this.saveRoleFunList(roleFunList2); + } + msg.setCode(0); + msg.setMsg("\u8be5\u89d2\u8272\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg saveEditUserMsg(final UserVo uVo) { + final UserVo userVo = this.queryUserByAccount(uVo); + final ResMsg msg = new ResMsg(); + if (uVo.getUser_id() == 0) { + if (userVo != null) { + msg.setCode(6); + msg.setMsg("\u8be5\u7528\u6237\u5df2\u7ecf\u5b58\u5728"); + return msg; + } + HttpUtils.sendUserInfoToRongKe(uVo, 1); + uVo.setUser_passwd(MD5Utils.EncoderByMd5(uVo.getUser_passwd())); + this.pg_template.insert("userRoleInfo.insertUser", uVo); + msg.setCode(0); + msg.setMsg("\u7528\u6237\u65b0\u589e\u6210\u529f"); + } + else { + if (userVo == null) { + msg.setCode(1); + msg.setMsg("\u8be5\u7528\u6237\u4e0d\u5b58\u5728"); + return msg; + } + if (!uVo.getUser_passwd().equals(userVo.getUser_passwd()) && StringUtil.notBlank(uVo.getUser_passwd())) { + HttpUtils.sendUserInfoToRongKe(uVo, 2); + uVo.setUser_passwd(MD5Utils.EncoderByMd5(uVo.getUser_passwd())); + } + this.pg_template.update("userRoleInfo.updateUser", uVo); + msg.setCode(0); + msg.setMsg("\u8be5\u7528\u6237\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public void saveEditUser(final UserVo uVo) { + uVo.setUser_passwd(MD5Utils.EncoderByMd5(uVo.getUser_passwd())); + if (uVo.getUser_id() == 0) { + this.pg_template.insert("userRoleInfo.insertUser", uVo); + } + else { + this.pg_template.update("userRoleInfo.updateUser", uVo); + } + } + + public UserVo queryUserByAccount(final UserVo uVo) { + return this.pg_template.selectOne("userRoleInfo.queryUserByAccount", uVo.getUser_account()); + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteRole(final RoleVo rVo) { + final ResMsg msg = new ResMsg(); + if (rVo.getRole_id() == 1) { + msg.setCode(1); + msg.setMsg("\u8d85\u7ea7\u7ba1\u7406\u5458\u7684\u89d2\u8272\u6743\u9650\u4e0d\u80fd\u5220\u9664"); + return msg; + } + this.deleteRoleCameraAuthList(rVo.getRole_id()); + this.deleteRoleFunList(rVo.getRole_id()); + this.delRoleFunList(rVo.getRole_id()); + this.pg_template.delete("userRoleInfo.deleteRole", rVo); + msg.setCode(0); + msg.setMsg("\u8be5\u89d2\u8272\u5220\u9664\u6210\u529f"); + return msg; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public void deleteUserMsg(final UserVo uVo) { + this.pg_template.delete("userRoleInfo.deleteUser", uVo); + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg deleteUser(UserVo uVo) { + final ResMsg msg = new ResMsg(); + if (uVo.getUser_id() == 1) { + msg.setCode(1); + msg.setMsg("\u8d85\u7ea7\u7ba1\u7406\u5458\u4e0d\u80fd\u5220\u9664"); + return msg; + } + uVo = this.pg_template.selectOne("userRoleInfo.queryUser", uVo.getUser_id()); + HttpUtils.sendUserInfoToRongKe(uVo, 3); + this.pg_template.delete("userRoleInfo.deleteUser", uVo); + msg.setCode(0); + msg.setMsg("\u8be5\u7528\u6237\u5220\u9664\u6210\u529f"); + return msg; + } + + public List getUserByRoleId(final int role_id) { + return this.pg_template.selectList("userRoleInfo.getUserByRoleId", role_id); + } + + public UserVo queryUserByLogin(final UserVo uVo) { + final UserVo vo = this.pg_template.selectOne("userRoleInfo.selectUserByLogin", uVo); + return vo; + } + + public int insertRole(final RoleVo rVo) { + int newRoleId = this.pg_template.insert("userRoleInfo.insertRole", rVo); + if (newRoleId > 0) { + newRoleId = this.pg_template.selectOne("userRoleInfo.selectNewRoleId"); + } + return newRoleId; + } + + public void saveRoleFunList(final List roleFunList) { + this.pg_template.insert("userRoleInfo.insertRoleFunList", roleFunList); + } + + public void andRoleFunList(final List roleFunList) { + this.pg_template.insert("userRoleInfo.andRoleFunList", roleFunList); + } + + public void updateRole(final RoleVo roleVo) { + this.pg_template.update("userRoleInfo.updateRole", roleVo); + } + + public void deleteRoleFunList(final int role_id) { + this.pg_template.delete("userRoleInfo.deleteRoleFunList", role_id); + } + + public void delRoleFunList(final int role_id) { + this.pg_template.delete("userRoleInfo.delRoleFunList", role_id); + } + + public List queryCurrentUserRights(final UserVo vo) { + final List funFCnList = this.pg_template.selectList("userRoleInfo.queryFunConsListByRoleId", vo.getRole_id()); + return funFCnList; + } + + @CacheEvict(value = { "daoCache" }, allEntries = true) + public ResMsg saveEditRoleMsgVo(final RoleVo vo) { + final ResMsg msg = new ResMsg(); + final List roleVos = this.pg_template.selectList("userRoleInfo.findRole", vo); + if (vo.getRole_id() == 0) { + if (roleVos != null && roleVos.size() > 0) { + msg.setCode(1); + msg.setMsg("\u8be5\u89d2\u8272\u5df2\u7ecf\u5b58\u5728"); + return msg; + } + final int newRoleId = this.insertRole(vo); + if (newRoleId > 0) { + final List roleFunList = vo.getRole_fun_list(); + if (roleFunList != null && roleFunList.size() > 0) { + for (final FunFCnfVo funFCnfVo : roleFunList) { + funFCnfVo.setRole_id(newRoleId); + } + this.andRoleFunList(roleFunList); + } + final List role_camera_list = vo.getRole_camera_list(); + if (role_camera_list != null && role_camera_list.size() > 0) { + for (final CameraAuthorityVo cameraAuthorityVo : role_camera_list) { + cameraAuthorityVo.setRole_id(newRoleId); + } + this.saveRoleCameraAuthList(role_camera_list); + } + } + msg.setCode(0); + msg.setMsg("\u89d2\u8272\u65b0\u589e\u6210\u529f"); + } + else { + if (vo.getRole_id() == 1) { + msg.setCode(1); + msg.setMsg("\u8d85\u7ea7\u7ba1\u7406\u5458\u7684\u89d2\u8272\u6743\u9650\u4e0d\u80fd\u7f16\u8f91"); + return msg; + } + if (roleVos == null) { + msg.setCode(1); + msg.setMsg("\u8be5\u89d2\u8272\u4e0d\u5b58\u5728"); + return msg; + } + this.updateRole(vo); + final List roleFunList2 = vo.getRole_fun_list(); + if (roleFunList2 != null && roleFunList2.size() > 0) { + this.delRoleFunList(vo.getRole_id()); + for (final FunFCnfVo funFCnfVo2 : roleFunList2) { + funFCnfVo2.setRole_id(vo.getRole_id()); + } + this.andRoleFunList(roleFunList2); + } + final List role_camera_list2 = vo.getRole_camera_list(); + if (role_camera_list2 != null && role_camera_list2.size() > 0) { + this.deleteRoleCameraAuthList(vo.getRole_id()); + for (final CameraAuthorityVo cameraAuthorityVo2 : role_camera_list2) { + cameraAuthorityVo2.setRole_id(vo.getRole_id()); + } + this.saveRoleCameraAuthList(role_camera_list2); + } + msg.setCode(0); + msg.setMsg("\u89d2\u8272\u7f16\u8f91\u6210\u529f"); + } + return msg; + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName + '_' + #vo.role_id") + public List findRoleList(final RoleVo vo) { + final List roleVos = this.pg_template.selectList("userRoleInfo.findRole", vo); + for (final RoleVo roleVo : roleVos) { + final List funFCnList = this.pg_template.selectList("userRoleInfo.findFunConsListByRoleId", roleVo.getRole_id()); + roleVo.setRole_fun_list(funFCnList); + roleVo.setRole_camera_list(this.queryCameraAuthList(roleVo)); + } + return roleVos; + } + + public List queryCameraAuthList(final RoleVo vo) { + final List cameraAuthVoList = this.pg_template.selectList("userRoleInfo.queryCameraAuthList", vo); + return cameraAuthVoList; + } + + public void saveRoleCameraAuthList(final List cameraAuthList) { + this.pg_template.insert("userRoleInfo.insertRoleCameraAuthList", cameraAuthList); + } + + public void deleteRoleCameraAuthList(final int role_id) { + this.pg_template.delete("userRoleInfo.deleteRoleCameraAuthList", role_id); + } + + @Cacheable(value = { "daoCache" }, key = "#root.methodName") + public List findFunConsList() { + final List funFCnfList = this.pg_template.selectList("userRoleInfo.findFunConsList"); + return funFCnfList; + } + + public List queryCurrentUser(final UserVo vo) { + final List funFCnList = this.pg_template.selectList("userRoleInfo.queryCurrentUserByRoleId", vo.getRole_id()); + return funFCnList; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/BigScreenInfo.java b/src/main/java/com/zhichenhaixin/sys/model/BigScreenInfo.java new file mode 100644 index 0000000..929743c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/BigScreenInfo.java @@ -0,0 +1,127 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class BigScreenInfo implements Serializable +{ + private static final long serialVersionUID = -4707229330618616142L; + private int id; + private String name; + private int sceneid; + private List camera_list; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BigScreenInfo)) { + return false; + } + final BigScreenInfo other = (BigScreenInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0078: { + if (this$name == null) { + if (other$name == null) { + break Label_0078; + } + } + else if (this$name.equals(other$name)) { + break Label_0078; + } + return false; + } + if (this.getSceneid() != other.getSceneid()) { + return false; + } + final Object this$camera_list = this.getCamera_list(); + final Object other$camera_list = other.getCamera_list(); + if (this$camera_list == null) { + if (other$camera_list == null) { + return true; + } + } + else if (this$camera_list.equals(other$camera_list)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof BigScreenInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + result = result * 59 + this.getSceneid(); + final Object $camera_list = this.getCamera_list(); + result = result * 59 + (($camera_list == null) ? 43 : $camera_list.hashCode()); + return result; + } + + @Override + public String toString() { + return "BigScreenInfo(id=" + this.getId() + ", name=" + this.getName() + ", sceneid=" + this.getSceneid() + ", camera_list=" + this.getCamera_list() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setSceneid(final int sceneid) { + this.sceneid = sceneid; + } + + public void setCamera_list(final List camera_list) { + this.camera_list = camera_list; + } + + public int getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public int getSceneid() { + return this.sceneid; + } + + public List getCamera_list() { + return this.camera_list; + } + + @ConstructorProperties({ "id", "name", "sceneid", "camera_list" }) + public BigScreenInfo(final int id, final String name, final int sceneid, final List camera_list) { + this.id = id; + this.name = name; + this.sceneid = sceneid; + this.camera_list = camera_list; + } + + public BigScreenInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CamInfo.java b/src/main/java/com/zhichenhaixin/sys/model/CamInfo.java new file mode 100644 index 0000000..bd685c1 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CamInfo.java @@ -0,0 +1,749 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CamInfo implements Serializable +{ + private static final long serialVersionUID = -4898034771108816580L; + private int id; + private String preview_rtsp_url; + private String record_rtsp_url; + private String vdeo_analysis_rtsp_url; + private String ip; + private String username; + private String password; + private String screenip; + private String name; + private int frame_rate; + private String port; + private String screenport; + private int preivew_chan; + private int camera_type; + private int dome; + private double lon; + private double lat; + private int left_view_angle; + private int right_view_angle; + private int view_range; + private String sbid; + private int nLinkCamID; + private int dome_child; + private int dome_child_child; + private String status; + private String param; + private String gan_name; + private double gan_lon; + private double gan_lat; + private String geom; + private int camera_color; + private double maxrange; + private String vdeo_fllow_rtsp_url; + private String media_ip; + private int media_port; + private int iscontrol; + private int role_id; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CamInfo)) { + return false; + } + final CamInfo other = (CamInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$preview_rtsp_url = this.getPreview_rtsp_url(); + final Object other$preview_rtsp_url = other.getPreview_rtsp_url(); + Label_0078: { + if (this$preview_rtsp_url == null) { + if (other$preview_rtsp_url == null) { + break Label_0078; + } + } + else if (this$preview_rtsp_url.equals(other$preview_rtsp_url)) { + break Label_0078; + } + return false; + } + final Object this$record_rtsp_url = this.getRecord_rtsp_url(); + final Object other$record_rtsp_url = other.getRecord_rtsp_url(); + Label_0115: { + if (this$record_rtsp_url == null) { + if (other$record_rtsp_url == null) { + break Label_0115; + } + } + else if (this$record_rtsp_url.equals(other$record_rtsp_url)) { + break Label_0115; + } + return false; + } + final Object this$vdeo_analysis_rtsp_url = this.getVdeo_analysis_rtsp_url(); + final Object other$vdeo_analysis_rtsp_url = other.getVdeo_analysis_rtsp_url(); + Label_0152: { + if (this$vdeo_analysis_rtsp_url == null) { + if (other$vdeo_analysis_rtsp_url == null) { + break Label_0152; + } + } + else if (this$vdeo_analysis_rtsp_url.equals(other$vdeo_analysis_rtsp_url)) { + break Label_0152; + } + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0189: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0189; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0189; + } + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0226: { + if (this$username == null) { + if (other$username == null) { + break Label_0226; + } + } + else if (this$username.equals(other$username)) { + break Label_0226; + } + return false; + } + final Object this$password = this.getPassword(); + final Object other$password = other.getPassword(); + Label_0263: { + if (this$password == null) { + if (other$password == null) { + break Label_0263; + } + } + else if (this$password.equals(other$password)) { + break Label_0263; + } + return false; + } + final Object this$screenip = this.getScreenip(); + final Object other$screenip = other.getScreenip(); + Label_0300: { + if (this$screenip == null) { + if (other$screenip == null) { + break Label_0300; + } + } + else if (this$screenip.equals(other$screenip)) { + break Label_0300; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0337: { + if (this$name == null) { + if (other$name == null) { + break Label_0337; + } + } + else if (this$name.equals(other$name)) { + break Label_0337; + } + return false; + } + if (this.getFrame_rate() != other.getFrame_rate()) { + return false; + } + final Object this$port = this.getPort(); + final Object other$port = other.getPort(); + Label_0387: { + if (this$port == null) { + if (other$port == null) { + break Label_0387; + } + } + else if (this$port.equals(other$port)) { + break Label_0387; + } + return false; + } + final Object this$screenport = this.getScreenport(); + final Object other$screenport = other.getScreenport(); + Label_0424: { + if (this$screenport == null) { + if (other$screenport == null) { + break Label_0424; + } + } + else if (this$screenport.equals(other$screenport)) { + break Label_0424; + } + return false; + } + if (this.getPreivew_chan() != other.getPreivew_chan()) { + return false; + } + if (this.getCamera_type() != other.getCamera_type()) { + return false; + } + if (this.getDome() != other.getDome()) { + return false; + } + if (Double.compare(this.getLon(), other.getLon()) != 0) { + return false; + } + if (Double.compare(this.getLat(), other.getLat()) != 0) { + return false; + } + if (this.getLeft_view_angle() != other.getLeft_view_angle()) { + return false; + } + if (this.getRight_view_angle() != other.getRight_view_angle()) { + return false; + } + if (this.getView_range() != other.getView_range()) { + return false; + } + final Object this$sbid = this.getSbid(); + final Object other$sbid = other.getSbid(); + Label_0571: { + if (this$sbid == null) { + if (other$sbid == null) { + break Label_0571; + } + } + else if (this$sbid.equals(other$sbid)) { + break Label_0571; + } + return false; + } + if (this.getNLinkCamID() != other.getNLinkCamID()) { + return false; + } + if (this.getDome_child() != other.getDome_child()) { + return false; + } + if (this.getDome_child_child() != other.getDome_child_child()) { + return false; + } + final Object this$status = this.getStatus(); + final Object other$status = other.getStatus(); + Label_0647: { + if (this$status == null) { + if (other$status == null) { + break Label_0647; + } + } + else if (this$status.equals(other$status)) { + break Label_0647; + } + return false; + } + final Object this$param = this.getParam(); + final Object other$param = other.getParam(); + Label_0684: { + if (this$param == null) { + if (other$param == null) { + break Label_0684; + } + } + else if (this$param.equals(other$param)) { + break Label_0684; + } + return false; + } + final Object this$gan_name = this.getGan_name(); + final Object other$gan_name = other.getGan_name(); + Label_0721: { + if (this$gan_name == null) { + if (other$gan_name == null) { + break Label_0721; + } + } + else if (this$gan_name.equals(other$gan_name)) { + break Label_0721; + } + return false; + } + if (Double.compare(this.getGan_lon(), other.getGan_lon()) != 0) { + return false; + } + if (Double.compare(this.getGan_lat(), other.getGan_lat()) != 0) { + return false; + } + final Object this$geom = this.getGeom(); + final Object other$geom = other.getGeom(); + Label_0790: { + if (this$geom == null) { + if (other$geom == null) { + break Label_0790; + } + } + else if (this$geom.equals(other$geom)) { + break Label_0790; + } + return false; + } + if (this.getCamera_color() != other.getCamera_color()) { + return false; + } + if (Double.compare(this.getMaxrange(), other.getMaxrange()) != 0) { + return false; + } + final Object this$vdeo_fllow_rtsp_url = this.getVdeo_fllow_rtsp_url(); + final Object other$vdeo_fllow_rtsp_url = other.getVdeo_fllow_rtsp_url(); + Label_0856: { + if (this$vdeo_fllow_rtsp_url == null) { + if (other$vdeo_fllow_rtsp_url == null) { + break Label_0856; + } + } + else if (this$vdeo_fllow_rtsp_url.equals(other$vdeo_fllow_rtsp_url)) { + break Label_0856; + } + return false; + } + final Object this$media_ip = this.getMedia_ip(); + final Object other$media_ip = other.getMedia_ip(); + if (this$media_ip == null) { + if (other$media_ip == null) { + return this.getMedia_port() == other.getMedia_port() && this.getIscontrol() == other.getIscontrol() && this.getRole_id() == other.getRole_id(); + } + } + else if (this$media_ip.equals(other$media_ip)) { + return this.getMedia_port() == other.getMedia_port() && this.getIscontrol() == other.getIscontrol() && this.getRole_id() == other.getRole_id(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CamInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $preview_rtsp_url = this.getPreview_rtsp_url(); + result = result * 59 + (($preview_rtsp_url == null) ? 43 : $preview_rtsp_url.hashCode()); + final Object $record_rtsp_url = this.getRecord_rtsp_url(); + result = result * 59 + (($record_rtsp_url == null) ? 43 : $record_rtsp_url.hashCode()); + final Object $vdeo_analysis_rtsp_url = this.getVdeo_analysis_rtsp_url(); + result = result * 59 + (($vdeo_analysis_rtsp_url == null) ? 43 : $vdeo_analysis_rtsp_url.hashCode()); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $password = this.getPassword(); + result = result * 59 + (($password == null) ? 43 : $password.hashCode()); + final Object $screenip = this.getScreenip(); + result = result * 59 + (($screenip == null) ? 43 : $screenip.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + result = result * 59 + this.getFrame_rate(); + final Object $port = this.getPort(); + result = result * 59 + (($port == null) ? 43 : $port.hashCode()); + final Object $screenport = this.getScreenport(); + result = result * 59 + (($screenport == null) ? 43 : $screenport.hashCode()); + result = result * 59 + this.getPreivew_chan(); + result = result * 59 + this.getCamera_type(); + result = result * 59 + this.getDome(); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + result = result * 59 + this.getLeft_view_angle(); + result = result * 59 + this.getRight_view_angle(); + result = result * 59 + this.getView_range(); + final Object $sbid = this.getSbid(); + result = result * 59 + (($sbid == null) ? 43 : $sbid.hashCode()); + result = result * 59 + this.getNLinkCamID(); + result = result * 59 + this.getDome_child(); + result = result * 59 + this.getDome_child_child(); + final Object $status = this.getStatus(); + result = result * 59 + (($status == null) ? 43 : $status.hashCode()); + final Object $param = this.getParam(); + result = result * 59 + (($param == null) ? 43 : $param.hashCode()); + final Object $gan_name = this.getGan_name(); + result = result * 59 + (($gan_name == null) ? 43 : $gan_name.hashCode()); + final long $gan_lon = Double.doubleToLongBits(this.getGan_lon()); + result = result * 59 + (int)($gan_lon ^ $gan_lon >>> 32); + final long $gan_lat = Double.doubleToLongBits(this.getGan_lat()); + result = result * 59 + (int)($gan_lat ^ $gan_lat >>> 32); + final Object $geom = this.getGeom(); + result = result * 59 + (($geom == null) ? 43 : $geom.hashCode()); + result = result * 59 + this.getCamera_color(); + final long $maxrange = Double.doubleToLongBits(this.getMaxrange()); + result = result * 59 + (int)($maxrange ^ $maxrange >>> 32); + final Object $vdeo_fllow_rtsp_url = this.getVdeo_fllow_rtsp_url(); + result = result * 59 + (($vdeo_fllow_rtsp_url == null) ? 43 : $vdeo_fllow_rtsp_url.hashCode()); + final Object $media_ip = this.getMedia_ip(); + result = result * 59 + (($media_ip == null) ? 43 : $media_ip.hashCode()); + result = result * 59 + this.getMedia_port(); + result = result * 59 + this.getIscontrol(); + result = result * 59 + this.getRole_id(); + return result; + } + + @Override + public String toString() { + return "CamInfo(id=" + this.getId() + ", preview_rtsp_url=" + this.getPreview_rtsp_url() + ", record_rtsp_url=" + this.getRecord_rtsp_url() + ", vdeo_analysis_rtsp_url=" + this.getVdeo_analysis_rtsp_url() + ", ip=" + this.getIp() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", screenip=" + this.getScreenip() + ", name=" + this.getName() + ", frame_rate=" + this.getFrame_rate() + ", port=" + this.getPort() + ", screenport=" + this.getScreenport() + ", preivew_chan=" + this.getPreivew_chan() + ", camera_type=" + this.getCamera_type() + ", dome=" + this.getDome() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ", left_view_angle=" + this.getLeft_view_angle() + ", right_view_angle=" + this.getRight_view_angle() + ", view_range=" + this.getView_range() + ", sbid=" + this.getSbid() + ", nLinkCamID=" + this.getNLinkCamID() + ", dome_child=" + this.getDome_child() + ", dome_child_child=" + this.getDome_child_child() + ", status=" + this.getStatus() + ", param=" + this.getParam() + ", gan_name=" + this.getGan_name() + ", gan_lon=" + this.getGan_lon() + ", gan_lat=" + this.getGan_lat() + ", geom=" + this.getGeom() + ", camera_color=" + this.getCamera_color() + ", maxrange=" + this.getMaxrange() + ", vdeo_fllow_rtsp_url=" + this.getVdeo_fllow_rtsp_url() + ", media_ip=" + this.getMedia_ip() + ", media_port=" + this.getMedia_port() + ", iscontrol=" + this.getIscontrol() + ", role_id=" + this.getRole_id() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setPreview_rtsp_url(final String preview_rtsp_url) { + this.preview_rtsp_url = preview_rtsp_url; + } + + public void setRecord_rtsp_url(final String record_rtsp_url) { + this.record_rtsp_url = record_rtsp_url; + } + + public void setVdeo_analysis_rtsp_url(final String vdeo_analysis_rtsp_url) { + this.vdeo_analysis_rtsp_url = vdeo_analysis_rtsp_url; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setScreenip(final String screenip) { + this.screenip = screenip; + } + + public void setName(final String name) { + this.name = name; + } + + public void setFrame_rate(final int frame_rate) { + this.frame_rate = frame_rate; + } + + public void setPort(final String port) { + this.port = port; + } + + public void setScreenport(final String screenport) { + this.screenport = screenport; + } + + public void setPreivew_chan(final int preivew_chan) { + this.preivew_chan = preivew_chan; + } + + public void setCamera_type(final int camera_type) { + this.camera_type = camera_type; + } + + public void setDome(final int dome) { + this.dome = dome; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public void setLeft_view_angle(final int left_view_angle) { + this.left_view_angle = left_view_angle; + } + + public void setRight_view_angle(final int right_view_angle) { + this.right_view_angle = right_view_angle; + } + + public void setView_range(final int view_range) { + this.view_range = view_range; + } + + public void setSbid(final String sbid) { + this.sbid = sbid; + } + + public void setNLinkCamID(final int nLinkCamID) { + this.nLinkCamID = nLinkCamID; + } + + public void setDome_child(final int dome_child) { + this.dome_child = dome_child; + } + + public void setDome_child_child(final int dome_child_child) { + this.dome_child_child = dome_child_child; + } + + public void setStatus(final String status) { + this.status = status; + } + + public void setParam(final String param) { + this.param = param; + } + + public void setGan_name(final String gan_name) { + this.gan_name = gan_name; + } + + public void setGan_lon(final double gan_lon) { + this.gan_lon = gan_lon; + } + + public void setGan_lat(final double gan_lat) { + this.gan_lat = gan_lat; + } + + public void setGeom(final String geom) { + this.geom = geom; + } + + public void setCamera_color(final int camera_color) { + this.camera_color = camera_color; + } + + public void setMaxrange(final double maxrange) { + this.maxrange = maxrange; + } + + public void setVdeo_fllow_rtsp_url(final String vdeo_fllow_rtsp_url) { + this.vdeo_fllow_rtsp_url = vdeo_fllow_rtsp_url; + } + + public void setMedia_ip(final String media_ip) { + this.media_ip = media_ip; + } + + public void setMedia_port(final int media_port) { + this.media_port = media_port; + } + + public void setIscontrol(final int iscontrol) { + this.iscontrol = iscontrol; + } + + public void setRole_id(final int role_id) { + this.role_id = role_id; + } + + public int getId() { + return this.id; + } + + public String getPreview_rtsp_url() { + return this.preview_rtsp_url; + } + + public String getRecord_rtsp_url() { + return this.record_rtsp_url; + } + + public String getVdeo_analysis_rtsp_url() { + return this.vdeo_analysis_rtsp_url; + } + + public String getIp() { + return this.ip; + } + + public String getUsername() { + return this.username; + } + + public String getPassword() { + return this.password; + } + + public String getScreenip() { + return this.screenip; + } + + public String getName() { + return this.name; + } + + public int getFrame_rate() { + return this.frame_rate; + } + + public String getPort() { + return this.port; + } + + public String getScreenport() { + return this.screenport; + } + + public int getPreivew_chan() { + return this.preivew_chan; + } + + public int getCamera_type() { + return this.camera_type; + } + + public int getDome() { + return this.dome; + } + + public double getLon() { + return this.lon; + } + + public double getLat() { + return this.lat; + } + + public int getLeft_view_angle() { + return this.left_view_angle; + } + + public int getRight_view_angle() { + return this.right_view_angle; + } + + public int getView_range() { + return this.view_range; + } + + public String getSbid() { + return this.sbid; + } + + public int getNLinkCamID() { + return this.nLinkCamID; + } + + public int getDome_child() { + return this.dome_child; + } + + public int getDome_child_child() { + return this.dome_child_child; + } + + public String getStatus() { + return this.status; + } + + public String getParam() { + return this.param; + } + + public String getGan_name() { + return this.gan_name; + } + + public double getGan_lon() { + return this.gan_lon; + } + + public double getGan_lat() { + return this.gan_lat; + } + + public String getGeom() { + return this.geom; + } + + public int getCamera_color() { + return this.camera_color; + } + + public double getMaxrange() { + return this.maxrange; + } + + public String getVdeo_fllow_rtsp_url() { + return this.vdeo_fllow_rtsp_url; + } + + public String getMedia_ip() { + return this.media_ip; + } + + public int getMedia_port() { + return this.media_port; + } + + public int getIscontrol() { + return this.iscontrol; + } + + public int getRole_id() { + return this.role_id; + } + + @ConstructorProperties({ "id", "preview_rtsp_url", "record_rtsp_url", "vdeo_analysis_rtsp_url", "ip", "username", "password", "screenip", "name", "frame_rate", "port", "screenport", "preivew_chan", "camera_type", "dome", "lon", "lat", "left_view_angle", "right_view_angle", "view_range", "sbid", "nLinkCamID", "dome_child", "dome_child_child", "status", "param", "gan_name", "gan_lon", "gan_lat", "geom", "camera_color", "maxrange", "vdeo_fllow_rtsp_url", "media_ip", "media_port", "iscontrol", "role_id" }) + public CamInfo(final int id, final String preview_rtsp_url, final String record_rtsp_url, final String vdeo_analysis_rtsp_url, final String ip, final String username, final String password, final String screenip, final String name, final int frame_rate, final String port, final String screenport, final int preivew_chan, final int camera_type, final int dome, final double lon, final double lat, final int left_view_angle, final int right_view_angle, final int view_range, final String sbid, final int nLinkCamID, final int dome_child, final int dome_child_child, final String status, final String param, final String gan_name, final double gan_lon, final double gan_lat, final String geom, final int camera_color, final double maxrange, final String vdeo_fllow_rtsp_url, final String media_ip, final int media_port, final int iscontrol, final int role_id) { + this.id = id; + this.preview_rtsp_url = preview_rtsp_url; + this.record_rtsp_url = record_rtsp_url; + this.vdeo_analysis_rtsp_url = vdeo_analysis_rtsp_url; + this.ip = ip; + this.username = username; + this.password = password; + this.screenip = screenip; + this.name = name; + this.frame_rate = frame_rate; + this.port = port; + this.screenport = screenport; + this.preivew_chan = preivew_chan; + this.camera_type = camera_type; + this.dome = dome; + this.lon = lon; + this.lat = lat; + this.left_view_angle = left_view_angle; + this.right_view_angle = right_view_angle; + this.view_range = view_range; + this.sbid = sbid; + this.nLinkCamID = nLinkCamID; + this.dome_child = dome_child; + this.dome_child_child = dome_child_child; + this.status = status; + this.param = param; + this.gan_name = gan_name; + this.gan_lon = gan_lon; + this.gan_lat = gan_lat; + this.geom = geom; + this.camera_color = camera_color; + this.maxrange = maxrange; + this.vdeo_fllow_rtsp_url = vdeo_fllow_rtsp_url; + this.media_ip = media_ip; + this.media_port = media_port; + this.iscontrol = iscontrol; + this.role_id = role_id; + } + + public CamInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CamPresetInfo.java b/src/main/java/com/zhichenhaixin/sys/model/CamPresetInfo.java new file mode 100644 index 0000000..173bdad --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CamPresetInfo.java @@ -0,0 +1,148 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CamPresetInfo implements Serializable +{ + private static final long serialVersionUID = 1L; + private int id; + private int camera_id; + private String name; + private double p; + private double t; + private double z; + private int preset_inernum; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CamPresetInfo)) { + return false; + } + final CamPresetInfo other = (CamPresetInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getCamera_id() != other.getCamera_id()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null) { + if (other$name == null) { + return Double.compare(this.getP(), other.getP()) == 0 && Double.compare(this.getT(), other.getT()) == 0 && Double.compare(this.getZ(), other.getZ()) == 0 && this.getPreset_inernum() == other.getPreset_inernum(); + } + } + else if (this$name.equals(other$name)) { + return Double.compare(this.getP(), other.getP()) == 0 && Double.compare(this.getT(), other.getT()) == 0 && Double.compare(this.getZ(), other.getZ()) == 0 && this.getPreset_inernum() == other.getPreset_inernum(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CamPresetInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getCamera_id(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final long $p = Double.doubleToLongBits(this.getP()); + result = result * 59 + (int)($p ^ $p >>> 32); + final long $t = Double.doubleToLongBits(this.getT()); + result = result * 59 + (int)($t ^ $t >>> 32); + final long $z = Double.doubleToLongBits(this.getZ()); + result = result * 59 + (int)($z ^ $z >>> 32); + result = result * 59 + this.getPreset_inernum(); + return result; + } + + @Override + public String toString() { + return "CamPresetInfo(id=" + this.getId() + ", camera_id=" + this.getCamera_id() + ", name=" + this.getName() + ", p=" + this.getP() + ", t=" + this.getT() + ", z=" + this.getZ() + ", preset_inernum=" + this.getPreset_inernum() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setCamera_id(final int camera_id) { + this.camera_id = camera_id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setP(final double p) { + this.p = p; + } + + public void setT(final double t) { + this.t = t; + } + + public void setZ(final double z) { + this.z = z; + } + + public void setPreset_inernum(final int preset_inernum) { + this.preset_inernum = preset_inernum; + } + + public int getId() { + return this.id; + } + + public int getCamera_id() { + return this.camera_id; + } + + public String getName() { + return this.name; + } + + public double getP() { + return this.p; + } + + public double getT() { + return this.t; + } + + public double getZ() { + return this.z; + } + + public int getPreset_inernum() { + return this.preset_inernum; + } + + @ConstructorProperties({ "id", "camera_id", "name", "p", "t", "z", "preset_inernum" }) + public CamPresetInfo(final int id, final int camera_id, final String name, final double p, final double t, final double z, final int preset_inernum) { + this.id = id; + this.camera_id = camera_id; + this.name = name; + this.p = p; + this.t = t; + this.z = z; + this.preset_inernum = preset_inernum; + } + + public CamPresetInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraAuthorityVo.java b/src/main/java/com/zhichenhaixin/sys/model/CameraAuthorityVo.java new file mode 100644 index 0000000..8e8115d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraAuthorityVo.java @@ -0,0 +1,179 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CameraAuthorityVo implements Serializable +{ + private static final long serialVersionUID = -2127047839182597237L; + private int id; + private int role_id; + private int camera_id; + private int iscontrol; + private String camera_name; + private String gan_id; + private String gan_name; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraAuthorityVo)) { + return false; + } + final CameraAuthorityVo other = (CameraAuthorityVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getRole_id() != other.getRole_id()) { + return false; + } + if (this.getCamera_id() != other.getCamera_id()) { + return false; + } + if (this.getIscontrol() != other.getIscontrol()) { + return false; + } + final Object this$camera_name = this.getCamera_name(); + final Object other$camera_name = other.getCamera_name(); + Label_0117: { + if (this$camera_name == null) { + if (other$camera_name == null) { + break Label_0117; + } + } + else if (this$camera_name.equals(other$camera_name)) { + break Label_0117; + } + return false; + } + final Object this$gan_id = this.getGan_id(); + final Object other$gan_id = other.getGan_id(); + Label_0154: { + if (this$gan_id == null) { + if (other$gan_id == null) { + break Label_0154; + } + } + else if (this$gan_id.equals(other$gan_id)) { + break Label_0154; + } + return false; + } + final Object this$gan_name = this.getGan_name(); + final Object other$gan_name = other.getGan_name(); + if (this$gan_name == null) { + if (other$gan_name == null) { + return true; + } + } + else if (this$gan_name.equals(other$gan_name)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraAuthorityVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getRole_id(); + result = result * 59 + this.getCamera_id(); + result = result * 59 + this.getIscontrol(); + final Object $camera_name = this.getCamera_name(); + result = result * 59 + (($camera_name == null) ? 43 : $camera_name.hashCode()); + final Object $gan_id = this.getGan_id(); + result = result * 59 + (($gan_id == null) ? 43 : $gan_id.hashCode()); + final Object $gan_name = this.getGan_name(); + result = result * 59 + (($gan_name == null) ? 43 : $gan_name.hashCode()); + return result; + } + + @Override + public String toString() { + return "CameraAuthorityVo(id=" + this.getId() + ", role_id=" + this.getRole_id() + ", camera_id=" + this.getCamera_id() + ", iscontrol=" + this.getIscontrol() + ", camera_name=" + this.getCamera_name() + ", gan_id=" + this.getGan_id() + ", gan_name=" + this.getGan_name() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setRole_id(final int role_id) { + this.role_id = role_id; + } + + public void setCamera_id(final int camera_id) { + this.camera_id = camera_id; + } + + public void setIscontrol(final int iscontrol) { + this.iscontrol = iscontrol; + } + + public void setCamera_name(final String camera_name) { + this.camera_name = camera_name; + } + + public void setGan_id(final String gan_id) { + this.gan_id = gan_id; + } + + public void setGan_name(final String gan_name) { + this.gan_name = gan_name; + } + + public int getId() { + return this.id; + } + + public int getRole_id() { + return this.role_id; + } + + public int getCamera_id() { + return this.camera_id; + } + + public int getIscontrol() { + return this.iscontrol; + } + + public String getCamera_name() { + return this.camera_name; + } + + public String getGan_id() { + return this.gan_id; + } + + public String getGan_name() { + return this.gan_name; + } + + @ConstructorProperties({ "id", "role_id", "camera_id", "iscontrol", "camera_name", "gan_id", "gan_name" }) + public CameraAuthorityVo(final int id, final int role_id, final int camera_id, final int iscontrol, final String camera_name, final String gan_id, final String gan_name) { + this.id = id; + this.role_id = role_id; + this.camera_id = camera_id; + this.iscontrol = iscontrol; + this.camera_name = camera_name; + this.gan_id = gan_id; + this.gan_name = gan_name; + } + + public CameraAuthorityVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraInfo.java b/src/main/java/com/zhichenhaixin/sys/model/CameraInfo.java new file mode 100644 index 0000000..7dc7621 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraInfo.java @@ -0,0 +1,1149 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class CameraInfo implements Serializable +{ + private static final long serialVersionUID = -2127047839182597237L; + private Integer id; + private String username; + private String password; + private String ip; + private String port; + private String screenip; + private String screenport; + private String name; + private Integer camera_type; + private Integer dome; + private Double lon; + private Double lat; + private String preview_rtsp_url; + private Integer camera_color; + private Float northangle; + private Float camheight; + private Float maxcamcentdist; + private Float targitw; + private Float zoomnearfac; + private Float zoomfarfac; + private Float maxrange; + private String media_ip; + private Integer media_port; + private Integer forceshipdect; + private Integer channelnum; + private String param; + private String record_rtsp_url; + private String vdeo_analysis_rtsp_url; + private Integer frame_rate; + private Integer preivew_chan; + private Integer left_view_angle; + private Integer right_view_angle; + private Integer view_range; + private String sbid; + private Integer dome_child; + private Integer dome_child_child; + private String status; + private String gan_name; + private Double gan_lon; + private Double gan_lat; + private Integer focus_id; + private Integer check_plane_id; + private Integer preset_id; + private List camera_preset_list; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraInfo)) { + return false; + } + final CameraInfo other = (CameraInfo)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$id = this.getId(); + final Object other$id = other.getId(); + Label_0065: { + if (this$id == null) { + if (other$id == null) { + break Label_0065; + } + } + else if (this$id.equals(other$id)) { + break Label_0065; + } + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0102: { + if (this$username == null) { + if (other$username == null) { + break Label_0102; + } + } + else if (this$username.equals(other$username)) { + break Label_0102; + } + return false; + } + final Object this$password = this.getPassword(); + final Object other$password = other.getPassword(); + Label_0139: { + if (this$password == null) { + if (other$password == null) { + break Label_0139; + } + } + else if (this$password.equals(other$password)) { + break Label_0139; + } + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0176: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0176; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0176; + } + return false; + } + final Object this$port = this.getPort(); + final Object other$port = other.getPort(); + Label_0213: { + if (this$port == null) { + if (other$port == null) { + break Label_0213; + } + } + else if (this$port.equals(other$port)) { + break Label_0213; + } + return false; + } + final Object this$screenip = this.getScreenip(); + final Object other$screenip = other.getScreenip(); + Label_0250: { + if (this$screenip == null) { + if (other$screenip == null) { + break Label_0250; + } + } + else if (this$screenip.equals(other$screenip)) { + break Label_0250; + } + return false; + } + final Object this$screenport = this.getScreenport(); + final Object other$screenport = other.getScreenport(); + Label_0287: { + if (this$screenport == null) { + if (other$screenport == null) { + break Label_0287; + } + } + else if (this$screenport.equals(other$screenport)) { + break Label_0287; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0324: { + if (this$name == null) { + if (other$name == null) { + break Label_0324; + } + } + else if (this$name.equals(other$name)) { + break Label_0324; + } + return false; + } + final Object this$camera_type = this.getCamera_type(); + final Object other$camera_type = other.getCamera_type(); + Label_0361: { + if (this$camera_type == null) { + if (other$camera_type == null) { + break Label_0361; + } + } + else if (this$camera_type.equals(other$camera_type)) { + break Label_0361; + } + return false; + } + final Object this$dome = this.getDome(); + final Object other$dome = other.getDome(); + Label_0398: { + if (this$dome == null) { + if (other$dome == null) { + break Label_0398; + } + } + else if (this$dome.equals(other$dome)) { + break Label_0398; + } + return false; + } + final Object this$lon = this.getLon(); + final Object other$lon = other.getLon(); + Label_0435: { + if (this$lon == null) { + if (other$lon == null) { + break Label_0435; + } + } + else if (this$lon.equals(other$lon)) { + break Label_0435; + } + return false; + } + final Object this$lat = this.getLat(); + final Object other$lat = other.getLat(); + Label_0472: { + if (this$lat == null) { + if (other$lat == null) { + break Label_0472; + } + } + else if (this$lat.equals(other$lat)) { + break Label_0472; + } + return false; + } + final Object this$preview_rtsp_url = this.getPreview_rtsp_url(); + final Object other$preview_rtsp_url = other.getPreview_rtsp_url(); + Label_0509: { + if (this$preview_rtsp_url == null) { + if (other$preview_rtsp_url == null) { + break Label_0509; + } + } + else if (this$preview_rtsp_url.equals(other$preview_rtsp_url)) { + break Label_0509; + } + return false; + } + final Object this$camera_color = this.getCamera_color(); + final Object other$camera_color = other.getCamera_color(); + Label_0546: { + if (this$camera_color == null) { + if (other$camera_color == null) { + break Label_0546; + } + } + else if (this$camera_color.equals(other$camera_color)) { + break Label_0546; + } + return false; + } + final Object this$northangle = this.getNorthangle(); + final Object other$northangle = other.getNorthangle(); + Label_0583: { + if (this$northangle == null) { + if (other$northangle == null) { + break Label_0583; + } + } + else if (this$northangle.equals(other$northangle)) { + break Label_0583; + } + return false; + } + final Object this$camheight = this.getCamheight(); + final Object other$camheight = other.getCamheight(); + Label_0620: { + if (this$camheight == null) { + if (other$camheight == null) { + break Label_0620; + } + } + else if (this$camheight.equals(other$camheight)) { + break Label_0620; + } + return false; + } + final Object this$maxcamcentdist = this.getMaxcamcentdist(); + final Object other$maxcamcentdist = other.getMaxcamcentdist(); + Label_0657: { + if (this$maxcamcentdist == null) { + if (other$maxcamcentdist == null) { + break Label_0657; + } + } + else if (this$maxcamcentdist.equals(other$maxcamcentdist)) { + break Label_0657; + } + return false; + } + final Object this$targitw = this.getTargitw(); + final Object other$targitw = other.getTargitw(); + Label_0694: { + if (this$targitw == null) { + if (other$targitw == null) { + break Label_0694; + } + } + else if (this$targitw.equals(other$targitw)) { + break Label_0694; + } + return false; + } + final Object this$zoomnearfac = this.getZoomnearfac(); + final Object other$zoomnearfac = other.getZoomnearfac(); + Label_0731: { + if (this$zoomnearfac == null) { + if (other$zoomnearfac == null) { + break Label_0731; + } + } + else if (this$zoomnearfac.equals(other$zoomnearfac)) { + break Label_0731; + } + return false; + } + final Object this$zoomfarfac = this.getZoomfarfac(); + final Object other$zoomfarfac = other.getZoomfarfac(); + Label_0768: { + if (this$zoomfarfac == null) { + if (other$zoomfarfac == null) { + break Label_0768; + } + } + else if (this$zoomfarfac.equals(other$zoomfarfac)) { + break Label_0768; + } + return false; + } + final Object this$maxrange = this.getMaxrange(); + final Object other$maxrange = other.getMaxrange(); + Label_0805: { + if (this$maxrange == null) { + if (other$maxrange == null) { + break Label_0805; + } + } + else if (this$maxrange.equals(other$maxrange)) { + break Label_0805; + } + return false; + } + final Object this$media_ip = this.getMedia_ip(); + final Object other$media_ip = other.getMedia_ip(); + Label_0842: { + if (this$media_ip == null) { + if (other$media_ip == null) { + break Label_0842; + } + } + else if (this$media_ip.equals(other$media_ip)) { + break Label_0842; + } + return false; + } + final Object this$media_port = this.getMedia_port(); + final Object other$media_port = other.getMedia_port(); + Label_0879: { + if (this$media_port == null) { + if (other$media_port == null) { + break Label_0879; + } + } + else if (this$media_port.equals(other$media_port)) { + break Label_0879; + } + return false; + } + final Object this$forceshipdect = this.getForceshipdect(); + final Object other$forceshipdect = other.getForceshipdect(); + Label_0916: { + if (this$forceshipdect == null) { + if (other$forceshipdect == null) { + break Label_0916; + } + } + else if (this$forceshipdect.equals(other$forceshipdect)) { + break Label_0916; + } + return false; + } + final Object this$channelnum = this.getChannelnum(); + final Object other$channelnum = other.getChannelnum(); + Label_0953: { + if (this$channelnum == null) { + if (other$channelnum == null) { + break Label_0953; + } + } + else if (this$channelnum.equals(other$channelnum)) { + break Label_0953; + } + return false; + } + final Object this$param = this.getParam(); + final Object other$param = other.getParam(); + Label_0990: { + if (this$param == null) { + if (other$param == null) { + break Label_0990; + } + } + else if (this$param.equals(other$param)) { + break Label_0990; + } + return false; + } + final Object this$record_rtsp_url = this.getRecord_rtsp_url(); + final Object other$record_rtsp_url = other.getRecord_rtsp_url(); + Label_1027: { + if (this$record_rtsp_url == null) { + if (other$record_rtsp_url == null) { + break Label_1027; + } + } + else if (this$record_rtsp_url.equals(other$record_rtsp_url)) { + break Label_1027; + } + return false; + } + final Object this$vdeo_analysis_rtsp_url = this.getVdeo_analysis_rtsp_url(); + final Object other$vdeo_analysis_rtsp_url = other.getVdeo_analysis_rtsp_url(); + Label_1064: { + if (this$vdeo_analysis_rtsp_url == null) { + if (other$vdeo_analysis_rtsp_url == null) { + break Label_1064; + } + } + else if (this$vdeo_analysis_rtsp_url.equals(other$vdeo_analysis_rtsp_url)) { + break Label_1064; + } + return false; + } + final Object this$frame_rate = this.getFrame_rate(); + final Object other$frame_rate = other.getFrame_rate(); + Label_1101: { + if (this$frame_rate == null) { + if (other$frame_rate == null) { + break Label_1101; + } + } + else if (this$frame_rate.equals(other$frame_rate)) { + break Label_1101; + } + return false; + } + final Object this$preivew_chan = this.getPreivew_chan(); + final Object other$preivew_chan = other.getPreivew_chan(); + Label_1138: { + if (this$preivew_chan == null) { + if (other$preivew_chan == null) { + break Label_1138; + } + } + else if (this$preivew_chan.equals(other$preivew_chan)) { + break Label_1138; + } + return false; + } + final Object this$left_view_angle = this.getLeft_view_angle(); + final Object other$left_view_angle = other.getLeft_view_angle(); + Label_1175: { + if (this$left_view_angle == null) { + if (other$left_view_angle == null) { + break Label_1175; + } + } + else if (this$left_view_angle.equals(other$left_view_angle)) { + break Label_1175; + } + return false; + } + final Object this$right_view_angle = this.getRight_view_angle(); + final Object other$right_view_angle = other.getRight_view_angle(); + Label_1212: { + if (this$right_view_angle == null) { + if (other$right_view_angle == null) { + break Label_1212; + } + } + else if (this$right_view_angle.equals(other$right_view_angle)) { + break Label_1212; + } + return false; + } + final Object this$view_range = this.getView_range(); + final Object other$view_range = other.getView_range(); + Label_1249: { + if (this$view_range == null) { + if (other$view_range == null) { + break Label_1249; + } + } + else if (this$view_range.equals(other$view_range)) { + break Label_1249; + } + return false; + } + final Object this$sbid = this.getSbid(); + final Object other$sbid = other.getSbid(); + Label_1286: { + if (this$sbid == null) { + if (other$sbid == null) { + break Label_1286; + } + } + else if (this$sbid.equals(other$sbid)) { + break Label_1286; + } + return false; + } + final Object this$dome_child = this.getDome_child(); + final Object other$dome_child = other.getDome_child(); + Label_1323: { + if (this$dome_child == null) { + if (other$dome_child == null) { + break Label_1323; + } + } + else if (this$dome_child.equals(other$dome_child)) { + break Label_1323; + } + return false; + } + final Object this$dome_child_child = this.getDome_child_child(); + final Object other$dome_child_child = other.getDome_child_child(); + Label_1360: { + if (this$dome_child_child == null) { + if (other$dome_child_child == null) { + break Label_1360; + } + } + else if (this$dome_child_child.equals(other$dome_child_child)) { + break Label_1360; + } + return false; + } + final Object this$status = this.getStatus(); + final Object other$status = other.getStatus(); + Label_1397: { + if (this$status == null) { + if (other$status == null) { + break Label_1397; + } + } + else if (this$status.equals(other$status)) { + break Label_1397; + } + return false; + } + final Object this$gan_name = this.getGan_name(); + final Object other$gan_name = other.getGan_name(); + Label_1434: { + if (this$gan_name == null) { + if (other$gan_name == null) { + break Label_1434; + } + } + else if (this$gan_name.equals(other$gan_name)) { + break Label_1434; + } + return false; + } + final Object this$gan_lon = this.getGan_lon(); + final Object other$gan_lon = other.getGan_lon(); + Label_1471: { + if (this$gan_lon == null) { + if (other$gan_lon == null) { + break Label_1471; + } + } + else if (this$gan_lon.equals(other$gan_lon)) { + break Label_1471; + } + return false; + } + final Object this$gan_lat = this.getGan_lat(); + final Object other$gan_lat = other.getGan_lat(); + Label_1508: { + if (this$gan_lat == null) { + if (other$gan_lat == null) { + break Label_1508; + } + } + else if (this$gan_lat.equals(other$gan_lat)) { + break Label_1508; + } + return false; + } + final Object this$focus_id = this.getFocus_id(); + final Object other$focus_id = other.getFocus_id(); + Label_1545: { + if (this$focus_id == null) { + if (other$focus_id == null) { + break Label_1545; + } + } + else if (this$focus_id.equals(other$focus_id)) { + break Label_1545; + } + return false; + } + final Object this$check_plane_id = this.getCheck_plane_id(); + final Object other$check_plane_id = other.getCheck_plane_id(); + Label_1582: { + if (this$check_plane_id == null) { + if (other$check_plane_id == null) { + break Label_1582; + } + } + else if (this$check_plane_id.equals(other$check_plane_id)) { + break Label_1582; + } + return false; + } + final Object this$preset_id = this.getPreset_id(); + final Object other$preset_id = other.getPreset_id(); + Label_1619: { + if (this$preset_id == null) { + if (other$preset_id == null) { + break Label_1619; + } + } + else if (this$preset_id.equals(other$preset_id)) { + break Label_1619; + } + return false; + } + final Object this$camera_preset_list = this.getCamera_preset_list(); + final Object other$camera_preset_list = other.getCamera_preset_list(); + if (this$camera_preset_list == null) { + if (other$camera_preset_list == null) { + return true; + } + } + else if (this$camera_preset_list.equals(other$camera_preset_list)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $id = this.getId(); + result = result * 59 + (($id == null) ? 43 : $id.hashCode()); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $password = this.getPassword(); + result = result * 59 + (($password == null) ? 43 : $password.hashCode()); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + final Object $port = this.getPort(); + result = result * 59 + (($port == null) ? 43 : $port.hashCode()); + final Object $screenip = this.getScreenip(); + result = result * 59 + (($screenip == null) ? 43 : $screenip.hashCode()); + final Object $screenport = this.getScreenport(); + result = result * 59 + (($screenport == null) ? 43 : $screenport.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final Object $camera_type = this.getCamera_type(); + result = result * 59 + (($camera_type == null) ? 43 : $camera_type.hashCode()); + final Object $dome = this.getDome(); + result = result * 59 + (($dome == null) ? 43 : $dome.hashCode()); + final Object $lon = this.getLon(); + result = result * 59 + (($lon == null) ? 43 : $lon.hashCode()); + final Object $lat = this.getLat(); + result = result * 59 + (($lat == null) ? 43 : $lat.hashCode()); + final Object $preview_rtsp_url = this.getPreview_rtsp_url(); + result = result * 59 + (($preview_rtsp_url == null) ? 43 : $preview_rtsp_url.hashCode()); + final Object $camera_color = this.getCamera_color(); + result = result * 59 + (($camera_color == null) ? 43 : $camera_color.hashCode()); + final Object $northangle = this.getNorthangle(); + result = result * 59 + (($northangle == null) ? 43 : $northangle.hashCode()); + final Object $camheight = this.getCamheight(); + result = result * 59 + (($camheight == null) ? 43 : $camheight.hashCode()); + final Object $maxcamcentdist = this.getMaxcamcentdist(); + result = result * 59 + (($maxcamcentdist == null) ? 43 : $maxcamcentdist.hashCode()); + final Object $targitw = this.getTargitw(); + result = result * 59 + (($targitw == null) ? 43 : $targitw.hashCode()); + final Object $zoomnearfac = this.getZoomnearfac(); + result = result * 59 + (($zoomnearfac == null) ? 43 : $zoomnearfac.hashCode()); + final Object $zoomfarfac = this.getZoomfarfac(); + result = result * 59 + (($zoomfarfac == null) ? 43 : $zoomfarfac.hashCode()); + final Object $maxrange = this.getMaxrange(); + result = result * 59 + (($maxrange == null) ? 43 : $maxrange.hashCode()); + final Object $media_ip = this.getMedia_ip(); + result = result * 59 + (($media_ip == null) ? 43 : $media_ip.hashCode()); + final Object $media_port = this.getMedia_port(); + result = result * 59 + (($media_port == null) ? 43 : $media_port.hashCode()); + final Object $forceshipdect = this.getForceshipdect(); + result = result * 59 + (($forceshipdect == null) ? 43 : $forceshipdect.hashCode()); + final Object $channelnum = this.getChannelnum(); + result = result * 59 + (($channelnum == null) ? 43 : $channelnum.hashCode()); + final Object $param = this.getParam(); + result = result * 59 + (($param == null) ? 43 : $param.hashCode()); + final Object $record_rtsp_url = this.getRecord_rtsp_url(); + result = result * 59 + (($record_rtsp_url == null) ? 43 : $record_rtsp_url.hashCode()); + final Object $vdeo_analysis_rtsp_url = this.getVdeo_analysis_rtsp_url(); + result = result * 59 + (($vdeo_analysis_rtsp_url == null) ? 43 : $vdeo_analysis_rtsp_url.hashCode()); + final Object $frame_rate = this.getFrame_rate(); + result = result * 59 + (($frame_rate == null) ? 43 : $frame_rate.hashCode()); + final Object $preivew_chan = this.getPreivew_chan(); + result = result * 59 + (($preivew_chan == null) ? 43 : $preivew_chan.hashCode()); + final Object $left_view_angle = this.getLeft_view_angle(); + result = result * 59 + (($left_view_angle == null) ? 43 : $left_view_angle.hashCode()); + final Object $right_view_angle = this.getRight_view_angle(); + result = result * 59 + (($right_view_angle == null) ? 43 : $right_view_angle.hashCode()); + final Object $view_range = this.getView_range(); + result = result * 59 + (($view_range == null) ? 43 : $view_range.hashCode()); + final Object $sbid = this.getSbid(); + result = result * 59 + (($sbid == null) ? 43 : $sbid.hashCode()); + final Object $dome_child = this.getDome_child(); + result = result * 59 + (($dome_child == null) ? 43 : $dome_child.hashCode()); + final Object $dome_child_child = this.getDome_child_child(); + result = result * 59 + (($dome_child_child == null) ? 43 : $dome_child_child.hashCode()); + final Object $status = this.getStatus(); + result = result * 59 + (($status == null) ? 43 : $status.hashCode()); + final Object $gan_name = this.getGan_name(); + result = result * 59 + (($gan_name == null) ? 43 : $gan_name.hashCode()); + final Object $gan_lon = this.getGan_lon(); + result = result * 59 + (($gan_lon == null) ? 43 : $gan_lon.hashCode()); + final Object $gan_lat = this.getGan_lat(); + result = result * 59 + (($gan_lat == null) ? 43 : $gan_lat.hashCode()); + final Object $focus_id = this.getFocus_id(); + result = result * 59 + (($focus_id == null) ? 43 : $focus_id.hashCode()); + final Object $check_plane_id = this.getCheck_plane_id(); + result = result * 59 + (($check_plane_id == null) ? 43 : $check_plane_id.hashCode()); + final Object $preset_id = this.getPreset_id(); + result = result * 59 + (($preset_id == null) ? 43 : $preset_id.hashCode()); + final Object $camera_preset_list = this.getCamera_preset_list(); + result = result * 59 + (($camera_preset_list == null) ? 43 : $camera_preset_list.hashCode()); + return result; + } + + @Override + public String toString() { + return "CameraInfo(id=" + this.getId() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", screenip=" + this.getScreenip() + ", screenport=" + this.getScreenport() + ", name=" + this.getName() + ", camera_type=" + this.getCamera_type() + ", dome=" + this.getDome() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ", preview_rtsp_url=" + this.getPreview_rtsp_url() + ", camera_color=" + this.getCamera_color() + ", northangle=" + this.getNorthangle() + ", camheight=" + this.getCamheight() + ", maxcamcentdist=" + this.getMaxcamcentdist() + ", targitw=" + this.getTargitw() + ", zoomnearfac=" + this.getZoomnearfac() + ", zoomfarfac=" + this.getZoomfarfac() + ", maxrange=" + this.getMaxrange() + ", media_ip=" + this.getMedia_ip() + ", media_port=" + this.getMedia_port() + ", forceshipdect=" + this.getForceshipdect() + ", channelnum=" + this.getChannelnum() + ", param=" + this.getParam() + ", record_rtsp_url=" + this.getRecord_rtsp_url() + ", vdeo_analysis_rtsp_url=" + this.getVdeo_analysis_rtsp_url() + ", frame_rate=" + this.getFrame_rate() + ", preivew_chan=" + this.getPreivew_chan() + ", left_view_angle=" + this.getLeft_view_angle() + ", right_view_angle=" + this.getRight_view_angle() + ", view_range=" + this.getView_range() + ", sbid=" + this.getSbid() + ", dome_child=" + this.getDome_child() + ", dome_child_child=" + this.getDome_child_child() + ", status=" + this.getStatus() + ", gan_name=" + this.getGan_name() + ", gan_lon=" + this.getGan_lon() + ", gan_lat=" + this.getGan_lat() + ", focus_id=" + this.getFocus_id() + ", check_plane_id=" + this.getCheck_plane_id() + ", preset_id=" + this.getPreset_id() + ", camera_preset_list=" + this.getCamera_preset_list() + ")"; + } + + public void setId(final Integer id) { + this.id = id; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final String port) { + this.port = port; + } + + public void setScreenip(final String screenip) { + this.screenip = screenip; + } + + public void setScreenport(final String screenport) { + this.screenport = screenport; + } + + public void setName(final String name) { + this.name = name; + } + + public void setCamera_type(final Integer camera_type) { + this.camera_type = camera_type; + } + + public void setDome(final Integer dome) { + this.dome = dome; + } + + public void setLon(final Double lon) { + this.lon = lon; + } + + public void setLat(final Double lat) { + this.lat = lat; + } + + public void setPreview_rtsp_url(final String preview_rtsp_url) { + this.preview_rtsp_url = preview_rtsp_url; + } + + public void setCamera_color(final Integer camera_color) { + this.camera_color = camera_color; + } + + public void setNorthangle(final Float northangle) { + this.northangle = northangle; + } + + public void setCamheight(final Float camheight) { + this.camheight = camheight; + } + + public void setMaxcamcentdist(final Float maxcamcentdist) { + this.maxcamcentdist = maxcamcentdist; + } + + public void setTargitw(final Float targitw) { + this.targitw = targitw; + } + + public void setZoomnearfac(final Float zoomnearfac) { + this.zoomnearfac = zoomnearfac; + } + + public void setZoomfarfac(final Float zoomfarfac) { + this.zoomfarfac = zoomfarfac; + } + + public void setMaxrange(final Float maxrange) { + this.maxrange = maxrange; + } + + public void setMedia_ip(final String media_ip) { + this.media_ip = media_ip; + } + + public void setMedia_port(final Integer media_port) { + this.media_port = media_port; + } + + public void setForceshipdect(final Integer forceshipdect) { + this.forceshipdect = forceshipdect; + } + + public void setChannelnum(final Integer channelnum) { + this.channelnum = channelnum; + } + + public void setParam(final String param) { + this.param = param; + } + + public void setRecord_rtsp_url(final String record_rtsp_url) { + this.record_rtsp_url = record_rtsp_url; + } + + public void setVdeo_analysis_rtsp_url(final String vdeo_analysis_rtsp_url) { + this.vdeo_analysis_rtsp_url = vdeo_analysis_rtsp_url; + } + + public void setFrame_rate(final Integer frame_rate) { + this.frame_rate = frame_rate; + } + + public void setPreivew_chan(final Integer preivew_chan) { + this.preivew_chan = preivew_chan; + } + + public void setLeft_view_angle(final Integer left_view_angle) { + this.left_view_angle = left_view_angle; + } + + public void setRight_view_angle(final Integer right_view_angle) { + this.right_view_angle = right_view_angle; + } + + public void setView_range(final Integer view_range) { + this.view_range = view_range; + } + + public void setSbid(final String sbid) { + this.sbid = sbid; + } + + public void setDome_child(final Integer dome_child) { + this.dome_child = dome_child; + } + + public void setDome_child_child(final Integer dome_child_child) { + this.dome_child_child = dome_child_child; + } + + public void setStatus(final String status) { + this.status = status; + } + + public void setGan_name(final String gan_name) { + this.gan_name = gan_name; + } + + public void setGan_lon(final Double gan_lon) { + this.gan_lon = gan_lon; + } + + public void setGan_lat(final Double gan_lat) { + this.gan_lat = gan_lat; + } + + public void setFocus_id(final Integer focus_id) { + this.focus_id = focus_id; + } + + public void setCheck_plane_id(final Integer check_plane_id) { + this.check_plane_id = check_plane_id; + } + + public void setPreset_id(final Integer preset_id) { + this.preset_id = preset_id; + } + + public void setCamera_preset_list(final List camera_preset_list) { + this.camera_preset_list = camera_preset_list; + } + + public Integer getId() { + return this.id; + } + + public String getUsername() { + return this.username; + } + + public String getPassword() { + return this.password; + } + + public String getIp() { + return this.ip; + } + + public String getPort() { + return this.port; + } + + public String getScreenip() { + return this.screenip; + } + + public String getScreenport() { + return this.screenport; + } + + public String getName() { + return this.name; + } + + public Integer getCamera_type() { + return this.camera_type; + } + + public Integer getDome() { + return this.dome; + } + + public Double getLon() { + return this.lon; + } + + public Double getLat() { + return this.lat; + } + + public String getPreview_rtsp_url() { + return this.preview_rtsp_url; + } + + public Integer getCamera_color() { + return this.camera_color; + } + + public Float getNorthangle() { + return this.northangle; + } + + public Float getCamheight() { + return this.camheight; + } + + public Float getMaxcamcentdist() { + return this.maxcamcentdist; + } + + public Float getTargitw() { + return this.targitw; + } + + public Float getZoomnearfac() { + return this.zoomnearfac; + } + + public Float getZoomfarfac() { + return this.zoomfarfac; + } + + public Float getMaxrange() { + return this.maxrange; + } + + public String getMedia_ip() { + return this.media_ip; + } + + public Integer getMedia_port() { + return this.media_port; + } + + public Integer getForceshipdect() { + return this.forceshipdect; + } + + public Integer getChannelnum() { + return this.channelnum; + } + + public String getParam() { + return this.param; + } + + public String getRecord_rtsp_url() { + return this.record_rtsp_url; + } + + public String getVdeo_analysis_rtsp_url() { + return this.vdeo_analysis_rtsp_url; + } + + public Integer getFrame_rate() { + return this.frame_rate; + } + + public Integer getPreivew_chan() { + return this.preivew_chan; + } + + public Integer getLeft_view_angle() { + return this.left_view_angle; + } + + public Integer getRight_view_angle() { + return this.right_view_angle; + } + + public Integer getView_range() { + return this.view_range; + } + + public String getSbid() { + return this.sbid; + } + + public Integer getDome_child() { + return this.dome_child; + } + + public Integer getDome_child_child() { + return this.dome_child_child; + } + + public String getStatus() { + return this.status; + } + + public String getGan_name() { + return this.gan_name; + } + + public Double getGan_lon() { + return this.gan_lon; + } + + public Double getGan_lat() { + return this.gan_lat; + } + + public Integer getFocus_id() { + return this.focus_id; + } + + public Integer getCheck_plane_id() { + return this.check_plane_id; + } + + public Integer getPreset_id() { + return this.preset_id; + } + + public List getCamera_preset_list() { + return this.camera_preset_list; + } + + @ConstructorProperties({ "id", "username", "password", "ip", "port", "screenip", "screenport", "name", "camera_type", "dome", "lon", "lat", "preview_rtsp_url", "camera_color", "northangle", "camheight", "maxcamcentdist", "targitw", "zoomnearfac", "zoomfarfac", "maxrange", "media_ip", "media_port", "forceshipdect", "channelnum", "param", "record_rtsp_url", "vdeo_analysis_rtsp_url", "frame_rate", "preivew_chan", "left_view_angle", "right_view_angle", "view_range", "sbid", "dome_child", "dome_child_child", "status", "gan_name", "gan_lon", "gan_lat", "focus_id", "check_plane_id", "preset_id", "camera_preset_list" }) + public CameraInfo(final Integer id, final String username, final String password, final String ip, final String port, final String screenip, final String screenport, final String name, final Integer camera_type, final Integer dome, final Double lon, final Double lat, final String preview_rtsp_url, final Integer camera_color, final Float northangle, final Float camheight, final Float maxcamcentdist, final Float targitw, final Float zoomnearfac, final Float zoomfarfac, final Float maxrange, final String media_ip, final Integer media_port, final Integer forceshipdect, final Integer channelnum, final String param, final String record_rtsp_url, final String vdeo_analysis_rtsp_url, final Integer frame_rate, final Integer preivew_chan, final Integer left_view_angle, final Integer right_view_angle, final Integer view_range, final String sbid, final Integer dome_child, final Integer dome_child_child, final String status, final String gan_name, final Double gan_lon, final Double gan_lat, final Integer focus_id, final Integer check_plane_id, final Integer preset_id, final List camera_preset_list) { + this.id = id; + this.username = username; + this.password = password; + this.ip = ip; + this.port = port; + this.screenip = screenip; + this.screenport = screenport; + this.name = name; + this.camera_type = camera_type; + this.dome = dome; + this.lon = lon; + this.lat = lat; + this.preview_rtsp_url = preview_rtsp_url; + this.camera_color = camera_color; + this.northangle = northangle; + this.camheight = camheight; + this.maxcamcentdist = maxcamcentdist; + this.targitw = targitw; + this.zoomnearfac = zoomnearfac; + this.zoomfarfac = zoomfarfac; + this.maxrange = maxrange; + this.media_ip = media_ip; + this.media_port = media_port; + this.forceshipdect = forceshipdect; + this.channelnum = channelnum; + this.param = param; + this.record_rtsp_url = record_rtsp_url; + this.vdeo_analysis_rtsp_url = vdeo_analysis_rtsp_url; + this.frame_rate = frame_rate; + this.preivew_chan = preivew_chan; + this.left_view_angle = left_view_angle; + this.right_view_angle = right_view_angle; + this.view_range = view_range; + this.sbid = sbid; + this.dome_child = dome_child; + this.dome_child_child = dome_child_child; + this.status = status; + this.gan_name = gan_name; + this.gan_lon = gan_lon; + this.gan_lat = gan_lat; + this.focus_id = focus_id; + this.check_plane_id = check_plane_id; + this.preset_id = preset_id; + this.camera_preset_list = camera_preset_list; + } + + public CameraInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraInfoVo.java b/src/main/java/com/zhichenhaixin/sys/model/CameraInfoVo.java new file mode 100644 index 0000000..bee125c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraInfoVo.java @@ -0,0 +1,572 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CameraInfoVo implements Serializable +{ + private static final long serialVersionUID = -2127047839182597237L; + private int id; + private String username; + private String password; + private String ip; + private String port; + private String screenIp; + private String screenPort; + private String name; + private int cameraType; + private int dome; + private double lon; + private double lat; + private String previewRtspUrl; + private String recordRtspUrl; + private String videoAnalysisRtspUrl; + private int leftViewAngle; + private int rightViewAngle; + private int viewRange; + private int frameRate; + private int preivewChan; + private double fNorthAngle; + private double fCamH; + private double fCamCentDist; + private double bReverse; + private String mediaIp; + private String videoFllowRtspUrl; + private int status; + private int nLinkCamID; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraInfoVo)) { + return false; + } + final CameraInfoVo other = (CameraInfoVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0078: { + if (this$username == null) { + if (other$username == null) { + break Label_0078; + } + } + else if (this$username.equals(other$username)) { + break Label_0078; + } + return false; + } + final Object this$password = this.getPassword(); + final Object other$password = other.getPassword(); + Label_0115: { + if (this$password == null) { + if (other$password == null) { + break Label_0115; + } + } + else if (this$password.equals(other$password)) { + break Label_0115; + } + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0152: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0152; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0152; + } + return false; + } + final Object this$port = this.getPort(); + final Object other$port = other.getPort(); + Label_0189: { + if (this$port == null) { + if (other$port == null) { + break Label_0189; + } + } + else if (this$port.equals(other$port)) { + break Label_0189; + } + return false; + } + final Object this$screenIp = this.getScreenIp(); + final Object other$screenIp = other.getScreenIp(); + Label_0226: { + if (this$screenIp == null) { + if (other$screenIp == null) { + break Label_0226; + } + } + else if (this$screenIp.equals(other$screenIp)) { + break Label_0226; + } + return false; + } + final Object this$screenPort = this.getScreenPort(); + final Object other$screenPort = other.getScreenPort(); + Label_0263: { + if (this$screenPort == null) { + if (other$screenPort == null) { + break Label_0263; + } + } + else if (this$screenPort.equals(other$screenPort)) { + break Label_0263; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0300: { + if (this$name == null) { + if (other$name == null) { + break Label_0300; + } + } + else if (this$name.equals(other$name)) { + break Label_0300; + } + return false; + } + if (this.getCameraType() != other.getCameraType()) { + return false; + } + if (this.getDome() != other.getDome()) { + return false; + } + if (Double.compare(this.getLon(), other.getLon()) != 0) { + return false; + } + if (Double.compare(this.getLat(), other.getLat()) != 0) { + return false; + } + final Object this$previewRtspUrl = this.getPreviewRtspUrl(); + final Object other$previewRtspUrl = other.getPreviewRtspUrl(); + Label_0395: { + if (this$previewRtspUrl == null) { + if (other$previewRtspUrl == null) { + break Label_0395; + } + } + else if (this$previewRtspUrl.equals(other$previewRtspUrl)) { + break Label_0395; + } + return false; + } + final Object this$recordRtspUrl = this.getRecordRtspUrl(); + final Object other$recordRtspUrl = other.getRecordRtspUrl(); + Label_0432: { + if (this$recordRtspUrl == null) { + if (other$recordRtspUrl == null) { + break Label_0432; + } + } + else if (this$recordRtspUrl.equals(other$recordRtspUrl)) { + break Label_0432; + } + return false; + } + final Object this$videoAnalysisRtspUrl = this.getVideoAnalysisRtspUrl(); + final Object other$videoAnalysisRtspUrl = other.getVideoAnalysisRtspUrl(); + Label_0469: { + if (this$videoAnalysisRtspUrl == null) { + if (other$videoAnalysisRtspUrl == null) { + break Label_0469; + } + } + else if (this$videoAnalysisRtspUrl.equals(other$videoAnalysisRtspUrl)) { + break Label_0469; + } + return false; + } + if (this.getLeftViewAngle() != other.getLeftViewAngle()) { + return false; + } + if (this.getRightViewAngle() != other.getRightViewAngle()) { + return false; + } + if (this.getViewRange() != other.getViewRange()) { + return false; + } + if (this.getFrameRate() != other.getFrameRate()) { + return false; + } + if (this.getPreivewChan() != other.getPreivewChan()) { + return false; + } + if (Double.compare(this.getFNorthAngle(), other.getFNorthAngle()) != 0) { + return false; + } + if (Double.compare(this.getFCamH(), other.getFCamH()) != 0) { + return false; + } + if (Double.compare(this.getFCamCentDist(), other.getFCamCentDist()) != 0) { + return false; + } + if (Double.compare(this.getBReverse(), other.getBReverse()) != 0) { + return false; + } + final Object this$mediaIp = this.getMediaIp(); + final Object other$mediaIp = other.getMediaIp(); + Label_0635: { + if (this$mediaIp == null) { + if (other$mediaIp == null) { + break Label_0635; + } + } + else if (this$mediaIp.equals(other$mediaIp)) { + break Label_0635; + } + return false; + } + final Object this$videoFllowRtspUrl = this.getVideoFllowRtspUrl(); + final Object other$videoFllowRtspUrl = other.getVideoFllowRtspUrl(); + if (this$videoFllowRtspUrl == null) { + if (other$videoFllowRtspUrl == null) { + return this.getStatus() == other.getStatus() && this.getNLinkCamID() == other.getNLinkCamID(); + } + } + else if (this$videoFllowRtspUrl.equals(other$videoFllowRtspUrl)) { + return this.getStatus() == other.getStatus() && this.getNLinkCamID() == other.getNLinkCamID(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraInfoVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $password = this.getPassword(); + result = result * 59 + (($password == null) ? 43 : $password.hashCode()); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + final Object $port = this.getPort(); + result = result * 59 + (($port == null) ? 43 : $port.hashCode()); + final Object $screenIp = this.getScreenIp(); + result = result * 59 + (($screenIp == null) ? 43 : $screenIp.hashCode()); + final Object $screenPort = this.getScreenPort(); + result = result * 59 + (($screenPort == null) ? 43 : $screenPort.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + result = result * 59 + this.getCameraType(); + result = result * 59 + this.getDome(); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + final Object $previewRtspUrl = this.getPreviewRtspUrl(); + result = result * 59 + (($previewRtspUrl == null) ? 43 : $previewRtspUrl.hashCode()); + final Object $recordRtspUrl = this.getRecordRtspUrl(); + result = result * 59 + (($recordRtspUrl == null) ? 43 : $recordRtspUrl.hashCode()); + final Object $videoAnalysisRtspUrl = this.getVideoAnalysisRtspUrl(); + result = result * 59 + (($videoAnalysisRtspUrl == null) ? 43 : $videoAnalysisRtspUrl.hashCode()); + result = result * 59 + this.getLeftViewAngle(); + result = result * 59 + this.getRightViewAngle(); + result = result * 59 + this.getViewRange(); + result = result * 59 + this.getFrameRate(); + result = result * 59 + this.getPreivewChan(); + final long $fNorthAngle = Double.doubleToLongBits(this.getFNorthAngle()); + result = result * 59 + (int)($fNorthAngle ^ $fNorthAngle >>> 32); + final long $fCamH = Double.doubleToLongBits(this.getFCamH()); + result = result * 59 + (int)($fCamH ^ $fCamH >>> 32); + final long $fCamCentDist = Double.doubleToLongBits(this.getFCamCentDist()); + result = result * 59 + (int)($fCamCentDist ^ $fCamCentDist >>> 32); + final long $bReverse = Double.doubleToLongBits(this.getBReverse()); + result = result * 59 + (int)($bReverse ^ $bReverse >>> 32); + final Object $mediaIp = this.getMediaIp(); + result = result * 59 + (($mediaIp == null) ? 43 : $mediaIp.hashCode()); + final Object $videoFllowRtspUrl = this.getVideoFllowRtspUrl(); + result = result * 59 + (($videoFllowRtspUrl == null) ? 43 : $videoFllowRtspUrl.hashCode()); + result = result * 59 + this.getStatus(); + result = result * 59 + this.getNLinkCamID(); + return result; + } + + @Override + public String toString() { + return "CameraInfoVo(id=" + this.getId() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", screenIp=" + this.getScreenIp() + ", screenPort=" + this.getScreenPort() + ", name=" + this.getName() + ", cameraType=" + this.getCameraType() + ", dome=" + this.getDome() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ", previewRtspUrl=" + this.getPreviewRtspUrl() + ", recordRtspUrl=" + this.getRecordRtspUrl() + ", videoAnalysisRtspUrl=" + this.getVideoAnalysisRtspUrl() + ", leftViewAngle=" + this.getLeftViewAngle() + ", rightViewAngle=" + this.getRightViewAngle() + ", viewRange=" + this.getViewRange() + ", frameRate=" + this.getFrameRate() + ", preivewChan=" + this.getPreivewChan() + ", fNorthAngle=" + this.getFNorthAngle() + ", fCamH=" + this.getFCamH() + ", fCamCentDist=" + this.getFCamCentDist() + ", bReverse=" + this.getBReverse() + ", mediaIp=" + this.getMediaIp() + ", videoFllowRtspUrl=" + this.getVideoFllowRtspUrl() + ", status=" + this.getStatus() + ", nLinkCamID=" + this.getNLinkCamID() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final String port) { + this.port = port; + } + + public void setScreenIp(final String screenIp) { + this.screenIp = screenIp; + } + + public void setScreenPort(final String screenPort) { + this.screenPort = screenPort; + } + + public void setName(final String name) { + this.name = name; + } + + public void setCameraType(final int cameraType) { + this.cameraType = cameraType; + } + + public void setDome(final int dome) { + this.dome = dome; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public void setPreviewRtspUrl(final String previewRtspUrl) { + this.previewRtspUrl = previewRtspUrl; + } + + public void setRecordRtspUrl(final String recordRtspUrl) { + this.recordRtspUrl = recordRtspUrl; + } + + public void setVideoAnalysisRtspUrl(final String videoAnalysisRtspUrl) { + this.videoAnalysisRtspUrl = videoAnalysisRtspUrl; + } + + public void setLeftViewAngle(final int leftViewAngle) { + this.leftViewAngle = leftViewAngle; + } + + public void setRightViewAngle(final int rightViewAngle) { + this.rightViewAngle = rightViewAngle; + } + + public void setViewRange(final int viewRange) { + this.viewRange = viewRange; + } + + public void setFrameRate(final int frameRate) { + this.frameRate = frameRate; + } + + public void setPreivewChan(final int preivewChan) { + this.preivewChan = preivewChan; + } + + public void setFNorthAngle(final double fNorthAngle) { + this.fNorthAngle = fNorthAngle; + } + + public void setFCamH(final double fCamH) { + this.fCamH = fCamH; + } + + public void setFCamCentDist(final double fCamCentDist) { + this.fCamCentDist = fCamCentDist; + } + + public void setBReverse(final double bReverse) { + this.bReverse = bReverse; + } + + public void setMediaIp(final String mediaIp) { + this.mediaIp = mediaIp; + } + + public void setVideoFllowRtspUrl(final String videoFllowRtspUrl) { + this.videoFllowRtspUrl = videoFllowRtspUrl; + } + + public void setStatus(final int status) { + this.status = status; + } + + public void setNLinkCamID(final int nLinkCamID) { + this.nLinkCamID = nLinkCamID; + } + + public int getId() { + return this.id; + } + + public String getUsername() { + return this.username; + } + + public String getPassword() { + return this.password; + } + + public String getIp() { + return this.ip; + } + + public String getPort() { + return this.port; + } + + public String getScreenIp() { + return this.screenIp; + } + + public String getScreenPort() { + return this.screenPort; + } + + public String getName() { + return this.name; + } + + public int getCameraType() { + return this.cameraType; + } + + public int getDome() { + return this.dome; + } + + public double getLon() { + return this.lon; + } + + public double getLat() { + return this.lat; + } + + public String getPreviewRtspUrl() { + return this.previewRtspUrl; + } + + public String getRecordRtspUrl() { + return this.recordRtspUrl; + } + + public String getVideoAnalysisRtspUrl() { + return this.videoAnalysisRtspUrl; + } + + public int getLeftViewAngle() { + return this.leftViewAngle; + } + + public int getRightViewAngle() { + return this.rightViewAngle; + } + + public int getViewRange() { + return this.viewRange; + } + + public int getFrameRate() { + return this.frameRate; + } + + public int getPreivewChan() { + return this.preivewChan; + } + + public double getFNorthAngle() { + return this.fNorthAngle; + } + + public double getFCamH() { + return this.fCamH; + } + + public double getFCamCentDist() { + return this.fCamCentDist; + } + + public double getBReverse() { + return this.bReverse; + } + + public String getMediaIp() { + return this.mediaIp; + } + + public String getVideoFllowRtspUrl() { + return this.videoFllowRtspUrl; + } + + public int getStatus() { + return this.status; + } + + public int getNLinkCamID() { + return this.nLinkCamID; + } + + @ConstructorProperties({ "id", "username", "password", "ip", "port", "screenIp", "screenPort", "name", "cameraType", "dome", "lon", "lat", "previewRtspUrl", "recordRtspUrl", "videoAnalysisRtspUrl", "leftViewAngle", "rightViewAngle", "viewRange", "frameRate", "preivewChan", "fNorthAngle", "fCamH", "fCamCentDist", "bReverse", "mediaIp", "videoFllowRtspUrl", "status", "nLinkCamID" }) + public CameraInfoVo(final int id, final String username, final String password, final String ip, final String port, final String screenIp, final String screenPort, final String name, final int cameraType, final int dome, final double lon, final double lat, final String previewRtspUrl, final String recordRtspUrl, final String videoAnalysisRtspUrl, final int leftViewAngle, final int rightViewAngle, final int viewRange, final int frameRate, final int preivewChan, final double fNorthAngle, final double fCamH, final double fCamCentDist, final double bReverse, final String mediaIp, final String videoFllowRtspUrl, final int status, final int nLinkCamID) { + this.id = id; + this.username = username; + this.password = password; + this.ip = ip; + this.port = port; + this.screenIp = screenIp; + this.screenPort = screenPort; + this.name = name; + this.cameraType = cameraType; + this.dome = dome; + this.lon = lon; + this.lat = lat; + this.previewRtspUrl = previewRtspUrl; + this.recordRtspUrl = recordRtspUrl; + this.videoAnalysisRtspUrl = videoAnalysisRtspUrl; + this.leftViewAngle = leftViewAngle; + this.rightViewAngle = rightViewAngle; + this.viewRange = viewRange; + this.frameRate = frameRate; + this.preivewChan = preivewChan; + this.fNorthAngle = fNorthAngle; + this.fCamH = fCamH; + this.fCamCentDist = fCamCentDist; + this.bReverse = bReverse; + this.mediaIp = mediaIp; + this.videoFllowRtspUrl = videoFllowRtspUrl; + this.status = status; + this.nLinkCamID = nLinkCamID; + } + + public CameraInfoVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraInitPreset.java b/src/main/java/com/zhichenhaixin/sys/model/CameraInitPreset.java new file mode 100644 index 0000000..52266a5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraInitPreset.java @@ -0,0 +1,115 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CameraInitPreset implements Serializable +{ + private static final long serialVersionUID = 1L; + private int id; + private int camera_id; + private int preset_id; + private CamPresetInfo camera_preset_info; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraInitPreset)) { + return false; + } + final CameraInitPreset other = (CameraInitPreset)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getCamera_id() != other.getCamera_id()) { + return false; + } + if (this.getPreset_id() != other.getPreset_id()) { + return false; + } + final Object this$camera_preset_info = this.getCamera_preset_info(); + final Object other$camera_preset_info = other.getCamera_preset_info(); + if (this$camera_preset_info == null) { + if (other$camera_preset_info == null) { + return true; + } + } + else if (this$camera_preset_info.equals(other$camera_preset_info)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraInitPreset; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getCamera_id(); + result = result * 59 + this.getPreset_id(); + final Object $camera_preset_info = this.getCamera_preset_info(); + result = result * 59 + (($camera_preset_info == null) ? 43 : $camera_preset_info.hashCode()); + return result; + } + + @Override + public String toString() { + return "CameraInitPreset(id=" + this.getId() + ", camera_id=" + this.getCamera_id() + ", preset_id=" + this.getPreset_id() + ", camera_preset_info=" + this.getCamera_preset_info() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setCamera_id(final int camera_id) { + this.camera_id = camera_id; + } + + public void setPreset_id(final int preset_id) { + this.preset_id = preset_id; + } + + public void setCamera_preset_info(final CamPresetInfo camera_preset_info) { + this.camera_preset_info = camera_preset_info; + } + + public int getId() { + return this.id; + } + + public int getCamera_id() { + return this.camera_id; + } + + public int getPreset_id() { + return this.preset_id; + } + + public CamPresetInfo getCamera_preset_info() { + return this.camera_preset_info; + } + + @ConstructorProperties({ "id", "camera_id", "preset_id", "camera_preset_info" }) + public CameraInitPreset(final int id, final int camera_id, final int preset_id, final CamPresetInfo camera_preset_info) { + this.id = id; + this.camera_id = camera_id; + this.preset_id = preset_id; + this.camera_preset_info = camera_preset_info; + } + + public CameraInitPreset() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraModel.java b/src/main/java/com/zhichenhaixin/sys/model/CameraModel.java new file mode 100644 index 0000000..349c95a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraModel.java @@ -0,0 +1,984 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.Date; + +public class CameraModel implements Serializable +{ + private static final long serialVersionUID = -8257246473057488377L; + private int id; + private String name; + private double lon; + private double lat; + private String rtsp; + private String ip; + private String port; + private int mode; + private String username; + private String password; + private double horizontalcoordinatereverse; + private double verticalcoordinatereverse; + private double horizontalcoordinatedeviation; + private double verticalcoordinatedeviation; + private double ptzheight; + private int groupid; + private Boolean available; + private int trackid; + private String type; + private String father; + private Date checktime; + private Boolean islock; + private String screenport; + private String screenip; + private int customid; + private String status; + private int preview_chan; + private String preview_rtsp_url; + private String record_rtsp_url; + private String vdeo_analysis_rtsp_url; + private int left_view_angle; + private int right_view_angle; + private int view_range; + private int camera_type; + private int frame_rate; + private int dome; + private int dome_child; + private int dome_child_child; + private String geom; + private int camera_color; + private String param; + private double northangle; + private double camheight; + private double maxcamcentdist; + private double targitw; + private double zoomnearfac; + private double zoomfarfac; + private double maxrange; + private double distance; + private String vdeo_fllow_rtsp_url; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraModel)) { + return false; + } + final CameraModel other = (CameraModel)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0078: { + if (this$name == null) { + if (other$name == null) { + break Label_0078; + } + } + else if (this$name.equals(other$name)) { + break Label_0078; + } + return false; + } + if (Double.compare(this.getLon(), other.getLon()) != 0) { + return false; + } + if (Double.compare(this.getLat(), other.getLat()) != 0) { + return false; + } + final Object this$rtsp = this.getRtsp(); + final Object other$rtsp = other.getRtsp(); + Label_0147: { + if (this$rtsp == null) { + if (other$rtsp == null) { + break Label_0147; + } + } + else if (this$rtsp.equals(other$rtsp)) { + break Label_0147; + } + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0184: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0184; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0184; + } + return false; + } + final Object this$port = this.getPort(); + final Object other$port = other.getPort(); + Label_0221: { + if (this$port == null) { + if (other$port == null) { + break Label_0221; + } + } + else if (this$port.equals(other$port)) { + break Label_0221; + } + return false; + } + if (this.getMode() != other.getMode()) { + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0271: { + if (this$username == null) { + if (other$username == null) { + break Label_0271; + } + } + else if (this$username.equals(other$username)) { + break Label_0271; + } + return false; + } + final Object this$password = this.getPassword(); + final Object other$password = other.getPassword(); + Label_0308: { + if (this$password == null) { + if (other$password == null) { + break Label_0308; + } + } + else if (this$password.equals(other$password)) { + break Label_0308; + } + return false; + } + if (Double.compare(this.getHorizontalcoordinatereverse(), other.getHorizontalcoordinatereverse()) != 0) { + return false; + } + if (Double.compare(this.getVerticalcoordinatereverse(), other.getVerticalcoordinatereverse()) != 0) { + return false; + } + if (Double.compare(this.getHorizontalcoordinatedeviation(), other.getHorizontalcoordinatedeviation()) != 0) { + return false; + } + if (Double.compare(this.getVerticalcoordinatedeviation(), other.getVerticalcoordinatedeviation()) != 0) { + return false; + } + if (Double.compare(this.getPtzheight(), other.getPtzheight()) != 0) { + return false; + } + if (this.getGroupid() != other.getGroupid()) { + return false; + } + final Object this$available = this.getAvailable(); + final Object other$available = other.getAvailable(); + Label_0438: { + if (this$available == null) { + if (other$available == null) { + break Label_0438; + } + } + else if (this$available.equals(other$available)) { + break Label_0438; + } + return false; + } + if (this.getTrackid() != other.getTrackid()) { + return false; + } + final Object this$type = this.getType(); + final Object other$type = other.getType(); + Label_0488: { + if (this$type == null) { + if (other$type == null) { + break Label_0488; + } + } + else if (this$type.equals(other$type)) { + break Label_0488; + } + return false; + } + final Object this$father = this.getFather(); + final Object other$father = other.getFather(); + Label_0525: { + if (this$father == null) { + if (other$father == null) { + break Label_0525; + } + } + else if (this$father.equals(other$father)) { + break Label_0525; + } + return false; + } + final Object this$checktime = this.getChecktime(); + final Object other$checktime = other.getChecktime(); + Label_0562: { + if (this$checktime == null) { + if (other$checktime == null) { + break Label_0562; + } + } + else if (this$checktime.equals(other$checktime)) { + break Label_0562; + } + return false; + } + final Object this$islock = this.getIslock(); + final Object other$islock = other.getIslock(); + Label_0599: { + if (this$islock == null) { + if (other$islock == null) { + break Label_0599; + } + } + else if (this$islock.equals(other$islock)) { + break Label_0599; + } + return false; + } + final Object this$screenport = this.getScreenport(); + final Object other$screenport = other.getScreenport(); + Label_0636: { + if (this$screenport == null) { + if (other$screenport == null) { + break Label_0636; + } + } + else if (this$screenport.equals(other$screenport)) { + break Label_0636; + } + return false; + } + final Object this$screenip = this.getScreenip(); + final Object other$screenip = other.getScreenip(); + Label_0673: { + if (this$screenip == null) { + if (other$screenip == null) { + break Label_0673; + } + } + else if (this$screenip.equals(other$screenip)) { + break Label_0673; + } + return false; + } + if (this.getCustomid() != other.getCustomid()) { + return false; + } + final Object this$status = this.getStatus(); + final Object other$status = other.getStatus(); + Label_0723: { + if (this$status == null) { + if (other$status == null) { + break Label_0723; + } + } + else if (this$status.equals(other$status)) { + break Label_0723; + } + return false; + } + if (this.getPreview_chan() != other.getPreview_chan()) { + return false; + } + final Object this$preview_rtsp_url = this.getPreview_rtsp_url(); + final Object other$preview_rtsp_url = other.getPreview_rtsp_url(); + Label_0773: { + if (this$preview_rtsp_url == null) { + if (other$preview_rtsp_url == null) { + break Label_0773; + } + } + else if (this$preview_rtsp_url.equals(other$preview_rtsp_url)) { + break Label_0773; + } + return false; + } + final Object this$record_rtsp_url = this.getRecord_rtsp_url(); + final Object other$record_rtsp_url = other.getRecord_rtsp_url(); + Label_0810: { + if (this$record_rtsp_url == null) { + if (other$record_rtsp_url == null) { + break Label_0810; + } + } + else if (this$record_rtsp_url.equals(other$record_rtsp_url)) { + break Label_0810; + } + return false; + } + final Object this$vdeo_analysis_rtsp_url = this.getVdeo_analysis_rtsp_url(); + final Object other$vdeo_analysis_rtsp_url = other.getVdeo_analysis_rtsp_url(); + Label_0847: { + if (this$vdeo_analysis_rtsp_url == null) { + if (other$vdeo_analysis_rtsp_url == null) { + break Label_0847; + } + } + else if (this$vdeo_analysis_rtsp_url.equals(other$vdeo_analysis_rtsp_url)) { + break Label_0847; + } + return false; + } + if (this.getLeft_view_angle() != other.getLeft_view_angle()) { + return false; + } + if (this.getRight_view_angle() != other.getRight_view_angle()) { + return false; + } + if (this.getView_range() != other.getView_range()) { + return false; + } + if (this.getCamera_type() != other.getCamera_type()) { + return false; + } + if (this.getFrame_rate() != other.getFrame_rate()) { + return false; + } + if (this.getDome() != other.getDome()) { + return false; + } + if (this.getDome_child() != other.getDome_child()) { + return false; + } + if (this.getDome_child_child() != other.getDome_child_child()) { + return false; + } + final Object this$geom = this.getGeom(); + final Object other$geom = other.getGeom(); + Label_0988: { + if (this$geom == null) { + if (other$geom == null) { + break Label_0988; + } + } + else if (this$geom.equals(other$geom)) { + break Label_0988; + } + return false; + } + if (this.getCamera_color() != other.getCamera_color()) { + return false; + } + final Object this$param = this.getParam(); + final Object other$param = other.getParam(); + Label_1038: { + if (this$param == null) { + if (other$param == null) { + break Label_1038; + } + } + else if (this$param.equals(other$param)) { + break Label_1038; + } + return false; + } + if (Double.compare(this.getNorthangle(), other.getNorthangle()) != 0) { + return false; + } + if (Double.compare(this.getCamheight(), other.getCamheight()) != 0) { + return false; + } + if (Double.compare(this.getMaxcamcentdist(), other.getMaxcamcentdist()) != 0) { + return false; + } + if (Double.compare(this.getTargitw(), other.getTargitw()) != 0) { + return false; + } + if (Double.compare(this.getZoomnearfac(), other.getZoomnearfac()) != 0) { + return false; + } + if (Double.compare(this.getZoomfarfac(), other.getZoomfarfac()) != 0) { + return false; + } + if (Double.compare(this.getMaxrange(), other.getMaxrange()) != 0) { + return false; + } + if (Double.compare(this.getDistance(), other.getDistance()) != 0) { + return false; + } + final Object this$vdeo_fllow_rtsp_url = this.getVdeo_fllow_rtsp_url(); + final Object other$vdeo_fllow_rtsp_url = other.getVdeo_fllow_rtsp_url(); + if (this$vdeo_fllow_rtsp_url == null) { + if (other$vdeo_fllow_rtsp_url == null) { + return true; + } + } + else if (this$vdeo_fllow_rtsp_url.equals(other$vdeo_fllow_rtsp_url)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraModel; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + final Object $rtsp = this.getRtsp(); + result = result * 59 + (($rtsp == null) ? 43 : $rtsp.hashCode()); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + final Object $port = this.getPort(); + result = result * 59 + (($port == null) ? 43 : $port.hashCode()); + result = result * 59 + this.getMode(); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $password = this.getPassword(); + result = result * 59 + (($password == null) ? 43 : $password.hashCode()); + final long $horizontalcoordinatereverse = Double.doubleToLongBits(this.getHorizontalcoordinatereverse()); + result = result * 59 + (int)($horizontalcoordinatereverse ^ $horizontalcoordinatereverse >>> 32); + final long $verticalcoordinatereverse = Double.doubleToLongBits(this.getVerticalcoordinatereverse()); + result = result * 59 + (int)($verticalcoordinatereverse ^ $verticalcoordinatereverse >>> 32); + final long $horizontalcoordinatedeviation = Double.doubleToLongBits(this.getHorizontalcoordinatedeviation()); + result = result * 59 + (int)($horizontalcoordinatedeviation ^ $horizontalcoordinatedeviation >>> 32); + final long $verticalcoordinatedeviation = Double.doubleToLongBits(this.getVerticalcoordinatedeviation()); + result = result * 59 + (int)($verticalcoordinatedeviation ^ $verticalcoordinatedeviation >>> 32); + final long $ptzheight = Double.doubleToLongBits(this.getPtzheight()); + result = result * 59 + (int)($ptzheight ^ $ptzheight >>> 32); + result = result * 59 + this.getGroupid(); + final Object $available = this.getAvailable(); + result = result * 59 + (($available == null) ? 43 : $available.hashCode()); + result = result * 59 + this.getTrackid(); + final Object $type = this.getType(); + result = result * 59 + (($type == null) ? 43 : $type.hashCode()); + final Object $father = this.getFather(); + result = result * 59 + (($father == null) ? 43 : $father.hashCode()); + final Object $checktime = this.getChecktime(); + result = result * 59 + (($checktime == null) ? 43 : $checktime.hashCode()); + final Object $islock = this.getIslock(); + result = result * 59 + (($islock == null) ? 43 : $islock.hashCode()); + final Object $screenport = this.getScreenport(); + result = result * 59 + (($screenport == null) ? 43 : $screenport.hashCode()); + final Object $screenip = this.getScreenip(); + result = result * 59 + (($screenip == null) ? 43 : $screenip.hashCode()); + result = result * 59 + this.getCustomid(); + final Object $status = this.getStatus(); + result = result * 59 + (($status == null) ? 43 : $status.hashCode()); + result = result * 59 + this.getPreview_chan(); + final Object $preview_rtsp_url = this.getPreview_rtsp_url(); + result = result * 59 + (($preview_rtsp_url == null) ? 43 : $preview_rtsp_url.hashCode()); + final Object $record_rtsp_url = this.getRecord_rtsp_url(); + result = result * 59 + (($record_rtsp_url == null) ? 43 : $record_rtsp_url.hashCode()); + final Object $vdeo_analysis_rtsp_url = this.getVdeo_analysis_rtsp_url(); + result = result * 59 + (($vdeo_analysis_rtsp_url == null) ? 43 : $vdeo_analysis_rtsp_url.hashCode()); + result = result * 59 + this.getLeft_view_angle(); + result = result * 59 + this.getRight_view_angle(); + result = result * 59 + this.getView_range(); + result = result * 59 + this.getCamera_type(); + result = result * 59 + this.getFrame_rate(); + result = result * 59 + this.getDome(); + result = result * 59 + this.getDome_child(); + result = result * 59 + this.getDome_child_child(); + final Object $geom = this.getGeom(); + result = result * 59 + (($geom == null) ? 43 : $geom.hashCode()); + result = result * 59 + this.getCamera_color(); + final Object $param = this.getParam(); + result = result * 59 + (($param == null) ? 43 : $param.hashCode()); + final long $northangle = Double.doubleToLongBits(this.getNorthangle()); + result = result * 59 + (int)($northangle ^ $northangle >>> 32); + final long $camheight = Double.doubleToLongBits(this.getCamheight()); + result = result * 59 + (int)($camheight ^ $camheight >>> 32); + final long $maxcamcentdist = Double.doubleToLongBits(this.getMaxcamcentdist()); + result = result * 59 + (int)($maxcamcentdist ^ $maxcamcentdist >>> 32); + final long $targitw = Double.doubleToLongBits(this.getTargitw()); + result = result * 59 + (int)($targitw ^ $targitw >>> 32); + final long $zoomnearfac = Double.doubleToLongBits(this.getZoomnearfac()); + result = result * 59 + (int)($zoomnearfac ^ $zoomnearfac >>> 32); + final long $zoomfarfac = Double.doubleToLongBits(this.getZoomfarfac()); + result = result * 59 + (int)($zoomfarfac ^ $zoomfarfac >>> 32); + final long $maxrange = Double.doubleToLongBits(this.getMaxrange()); + result = result * 59 + (int)($maxrange ^ $maxrange >>> 32); + final long $distance = Double.doubleToLongBits(this.getDistance()); + result = result * 59 + (int)($distance ^ $distance >>> 32); + final Object $vdeo_fllow_rtsp_url = this.getVdeo_fllow_rtsp_url(); + result = result * 59 + (($vdeo_fllow_rtsp_url == null) ? 43 : $vdeo_fllow_rtsp_url.hashCode()); + return result; + } + + @Override + public String toString() { + return "CameraModel(id=" + this.getId() + ", name=" + this.getName() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ", rtsp=" + this.getRtsp() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", mode=" + this.getMode() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", horizontalcoordinatereverse=" + this.getHorizontalcoordinatereverse() + ", verticalcoordinatereverse=" + this.getVerticalcoordinatereverse() + ", horizontalcoordinatedeviation=" + this.getHorizontalcoordinatedeviation() + ", verticalcoordinatedeviation=" + this.getVerticalcoordinatedeviation() + ", ptzheight=" + this.getPtzheight() + ", groupid=" + this.getGroupid() + ", available=" + this.getAvailable() + ", trackid=" + this.getTrackid() + ", type=" + this.getType() + ", father=" + this.getFather() + ", checktime=" + this.getChecktime() + ", islock=" + this.getIslock() + ", screenport=" + this.getScreenport() + ", screenip=" + this.getScreenip() + ", customid=" + this.getCustomid() + ", status=" + this.getStatus() + ", preview_chan=" + this.getPreview_chan() + ", preview_rtsp_url=" + this.getPreview_rtsp_url() + ", record_rtsp_url=" + this.getRecord_rtsp_url() + ", vdeo_analysis_rtsp_url=" + this.getVdeo_analysis_rtsp_url() + ", left_view_angle=" + this.getLeft_view_angle() + ", right_view_angle=" + this.getRight_view_angle() + ", view_range=" + this.getView_range() + ", camera_type=" + this.getCamera_type() + ", frame_rate=" + this.getFrame_rate() + ", dome=" + this.getDome() + ", dome_child=" + this.getDome_child() + ", dome_child_child=" + this.getDome_child_child() + ", geom=" + this.getGeom() + ", camera_color=" + this.getCamera_color() + ", param=" + this.getParam() + ", northangle=" + this.getNorthangle() + ", camheight=" + this.getCamheight() + ", maxcamcentdist=" + this.getMaxcamcentdist() + ", targitw=" + this.getTargitw() + ", zoomnearfac=" + this.getZoomnearfac() + ", zoomfarfac=" + this.getZoomfarfac() + ", maxrange=" + this.getMaxrange() + ", distance=" + this.getDistance() + ", vdeo_fllow_rtsp_url=" + this.getVdeo_fllow_rtsp_url() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public void setRtsp(final String rtsp) { + this.rtsp = rtsp; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final String port) { + this.port = port; + } + + public void setMode(final int mode) { + this.mode = mode; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setHorizontalcoordinatereverse(final double horizontalcoordinatereverse) { + this.horizontalcoordinatereverse = horizontalcoordinatereverse; + } + + public void setVerticalcoordinatereverse(final double verticalcoordinatereverse) { + this.verticalcoordinatereverse = verticalcoordinatereverse; + } + + public void setHorizontalcoordinatedeviation(final double horizontalcoordinatedeviation) { + this.horizontalcoordinatedeviation = horizontalcoordinatedeviation; + } + + public void setVerticalcoordinatedeviation(final double verticalcoordinatedeviation) { + this.verticalcoordinatedeviation = verticalcoordinatedeviation; + } + + public void setPtzheight(final double ptzheight) { + this.ptzheight = ptzheight; + } + + public void setGroupid(final int groupid) { + this.groupid = groupid; + } + + public void setAvailable(final Boolean available) { + this.available = available; + } + + public void setTrackid(final int trackid) { + this.trackid = trackid; + } + + public void setType(final String type) { + this.type = type; + } + + public void setFather(final String father) { + this.father = father; + } + + public void setChecktime(final Date checktime) { + this.checktime = checktime; + } + + public void setIslock(final Boolean islock) { + this.islock = islock; + } + + public void setScreenport(final String screenport) { + this.screenport = screenport; + } + + public void setScreenip(final String screenip) { + this.screenip = screenip; + } + + public void setCustomid(final int customid) { + this.customid = customid; + } + + public void setStatus(final String status) { + this.status = status; + } + + public void setPreview_chan(final int preview_chan) { + this.preview_chan = preview_chan; + } + + public void setPreview_rtsp_url(final String preview_rtsp_url) { + this.preview_rtsp_url = preview_rtsp_url; + } + + public void setRecord_rtsp_url(final String record_rtsp_url) { + this.record_rtsp_url = record_rtsp_url; + } + + public void setVdeo_analysis_rtsp_url(final String vdeo_analysis_rtsp_url) { + this.vdeo_analysis_rtsp_url = vdeo_analysis_rtsp_url; + } + + public void setLeft_view_angle(final int left_view_angle) { + this.left_view_angle = left_view_angle; + } + + public void setRight_view_angle(final int right_view_angle) { + this.right_view_angle = right_view_angle; + } + + public void setView_range(final int view_range) { + this.view_range = view_range; + } + + public void setCamera_type(final int camera_type) { + this.camera_type = camera_type; + } + + public void setFrame_rate(final int frame_rate) { + this.frame_rate = frame_rate; + } + + public void setDome(final int dome) { + this.dome = dome; + } + + public void setDome_child(final int dome_child) { + this.dome_child = dome_child; + } + + public void setDome_child_child(final int dome_child_child) { + this.dome_child_child = dome_child_child; + } + + public void setGeom(final String geom) { + this.geom = geom; + } + + public void setCamera_color(final int camera_color) { + this.camera_color = camera_color; + } + + public void setParam(final String param) { + this.param = param; + } + + public void setNorthangle(final double northangle) { + this.northangle = northangle; + } + + public void setCamheight(final double camheight) { + this.camheight = camheight; + } + + public void setMaxcamcentdist(final double maxcamcentdist) { + this.maxcamcentdist = maxcamcentdist; + } + + public void setTargitw(final double targitw) { + this.targitw = targitw; + } + + public void setZoomnearfac(final double zoomnearfac) { + this.zoomnearfac = zoomnearfac; + } + + public void setZoomfarfac(final double zoomfarfac) { + this.zoomfarfac = zoomfarfac; + } + + public void setMaxrange(final double maxrange) { + this.maxrange = maxrange; + } + + public void setDistance(final double distance) { + this.distance = distance; + } + + public void setVdeo_fllow_rtsp_url(final String vdeo_fllow_rtsp_url) { + this.vdeo_fllow_rtsp_url = vdeo_fllow_rtsp_url; + } + + public int getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public double getLon() { + return this.lon; + } + + public double getLat() { + return this.lat; + } + + public String getRtsp() { + return this.rtsp; + } + + public String getIp() { + return this.ip; + } + + public String getPort() { + return this.port; + } + + public int getMode() { + return this.mode; + } + + public String getUsername() { + return this.username; + } + + public String getPassword() { + return this.password; + } + + public double getHorizontalcoordinatereverse() { + return this.horizontalcoordinatereverse; + } + + public double getVerticalcoordinatereverse() { + return this.verticalcoordinatereverse; + } + + public double getHorizontalcoordinatedeviation() { + return this.horizontalcoordinatedeviation; + } + + public double getVerticalcoordinatedeviation() { + return this.verticalcoordinatedeviation; + } + + public double getPtzheight() { + return this.ptzheight; + } + + public int getGroupid() { + return this.groupid; + } + + public Boolean getAvailable() { + return this.available; + } + + public int getTrackid() { + return this.trackid; + } + + public String getType() { + return this.type; + } + + public String getFather() { + return this.father; + } + + public Date getChecktime() { + return this.checktime; + } + + public Boolean getIslock() { + return this.islock; + } + + public String getScreenport() { + return this.screenport; + } + + public String getScreenip() { + return this.screenip; + } + + public int getCustomid() { + return this.customid; + } + + public String getStatus() { + return this.status; + } + + public int getPreview_chan() { + return this.preview_chan; + } + + public String getPreview_rtsp_url() { + return this.preview_rtsp_url; + } + + public String getRecord_rtsp_url() { + return this.record_rtsp_url; + } + + public String getVdeo_analysis_rtsp_url() { + return this.vdeo_analysis_rtsp_url; + } + + public int getLeft_view_angle() { + return this.left_view_angle; + } + + public int getRight_view_angle() { + return this.right_view_angle; + } + + public int getView_range() { + return this.view_range; + } + + public int getCamera_type() { + return this.camera_type; + } + + public int getFrame_rate() { + return this.frame_rate; + } + + public int getDome() { + return this.dome; + } + + public int getDome_child() { + return this.dome_child; + } + + public int getDome_child_child() { + return this.dome_child_child; + } + + public String getGeom() { + return this.geom; + } + + public int getCamera_color() { + return this.camera_color; + } + + public String getParam() { + return this.param; + } + + public double getNorthangle() { + return this.northangle; + } + + public double getCamheight() { + return this.camheight; + } + + public double getMaxcamcentdist() { + return this.maxcamcentdist; + } + + public double getTargitw() { + return this.targitw; + } + + public double getZoomnearfac() { + return this.zoomnearfac; + } + + public double getZoomfarfac() { + return this.zoomfarfac; + } + + public double getMaxrange() { + return this.maxrange; + } + + public double getDistance() { + return this.distance; + } + + public String getVdeo_fllow_rtsp_url() { + return this.vdeo_fllow_rtsp_url; + } + + @ConstructorProperties({ "id", "name", "lon", "lat", "rtsp", "ip", "port", "mode", "username", "password", "horizontalcoordinatereverse", "verticalcoordinatereverse", "horizontalcoordinatedeviation", "verticalcoordinatedeviation", "ptzheight", "groupid", "available", "trackid", "type", "father", "checktime", "islock", "screenport", "screenip", "customid", "status", "preview_chan", "preview_rtsp_url", "record_rtsp_url", "vdeo_analysis_rtsp_url", "left_view_angle", "right_view_angle", "view_range", "camera_type", "frame_rate", "dome", "dome_child", "dome_child_child", "geom", "camera_color", "param", "northangle", "camheight", "maxcamcentdist", "targitw", "zoomnearfac", "zoomfarfac", "maxrange", "distance", "vdeo_fllow_rtsp_url" }) + public CameraModel(final int id, final String name, final double lon, final double lat, final String rtsp, final String ip, final String port, final int mode, final String username, final String password, final double horizontalcoordinatereverse, final double verticalcoordinatereverse, final double horizontalcoordinatedeviation, final double verticalcoordinatedeviation, final double ptzheight, final int groupid, final Boolean available, final int trackid, final String type, final String father, final Date checktime, final Boolean islock, final String screenport, final String screenip, final int customid, final String status, final int preview_chan, final String preview_rtsp_url, final String record_rtsp_url, final String vdeo_analysis_rtsp_url, final int left_view_angle, final int right_view_angle, final int view_range, final int camera_type, final int frame_rate, final int dome, final int dome_child, final int dome_child_child, final String geom, final int camera_color, final String param, final double northangle, final double camheight, final double maxcamcentdist, final double targitw, final double zoomnearfac, final double zoomfarfac, final double maxrange, final double distance, final String vdeo_fllow_rtsp_url) { + this.id = id; + this.name = name; + this.lon = lon; + this.lat = lat; + this.rtsp = rtsp; + this.ip = ip; + this.port = port; + this.mode = mode; + this.username = username; + this.password = password; + this.horizontalcoordinatereverse = horizontalcoordinatereverse; + this.verticalcoordinatereverse = verticalcoordinatereverse; + this.horizontalcoordinatedeviation = horizontalcoordinatedeviation; + this.verticalcoordinatedeviation = verticalcoordinatedeviation; + this.ptzheight = ptzheight; + this.groupid = groupid; + this.available = available; + this.trackid = trackid; + this.type = type; + this.father = father; + this.checktime = checktime; + this.islock = islock; + this.screenport = screenport; + this.screenip = screenip; + this.customid = customid; + this.status = status; + this.preview_chan = preview_chan; + this.preview_rtsp_url = preview_rtsp_url; + this.record_rtsp_url = record_rtsp_url; + this.vdeo_analysis_rtsp_url = vdeo_analysis_rtsp_url; + this.left_view_angle = left_view_angle; + this.right_view_angle = right_view_angle; + this.view_range = view_range; + this.camera_type = camera_type; + this.frame_rate = frame_rate; + this.dome = dome; + this.dome_child = dome_child; + this.dome_child_child = dome_child_child; + this.geom = geom; + this.camera_color = camera_color; + this.param = param; + this.northangle = northangle; + this.camheight = camheight; + this.maxcamcentdist = maxcamcentdist; + this.targitw = targitw; + this.zoomnearfac = zoomnearfac; + this.zoomfarfac = zoomfarfac; + this.maxrange = maxrange; + this.distance = distance; + this.vdeo_fllow_rtsp_url = vdeo_fllow_rtsp_url; + } + + public CameraModel() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraStatusInfoVo.java b/src/main/java/com/zhichenhaixin/sys/model/CameraStatusInfoVo.java new file mode 100644 index 0000000..aacf3de --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraStatusInfoVo.java @@ -0,0 +1,198 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CameraStatusInfoVo implements Serializable +{ + private static final long serialVersionUID = -2127047839182597237L; + private int id; + private String ip; + private String port; + private String screenIp; + private String screenPort; + private String name; + private int status; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraStatusInfoVo)) { + return false; + } + final CameraStatusInfoVo other = (CameraStatusInfoVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0078: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0078; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0078; + } + return false; + } + final Object this$port = this.getPort(); + final Object other$port = other.getPort(); + Label_0115: { + if (this$port == null) { + if (other$port == null) { + break Label_0115; + } + } + else if (this$port.equals(other$port)) { + break Label_0115; + } + return false; + } + final Object this$screenIp = this.getScreenIp(); + final Object other$screenIp = other.getScreenIp(); + Label_0152: { + if (this$screenIp == null) { + if (other$screenIp == null) { + break Label_0152; + } + } + else if (this$screenIp.equals(other$screenIp)) { + break Label_0152; + } + return false; + } + final Object this$screenPort = this.getScreenPort(); + final Object other$screenPort = other.getScreenPort(); + Label_0189: { + if (this$screenPort == null) { + if (other$screenPort == null) { + break Label_0189; + } + } + else if (this$screenPort.equals(other$screenPort)) { + break Label_0189; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null) { + if (other$name == null) { + return this.getStatus() == other.getStatus(); + } + } + else if (this$name.equals(other$name)) { + return this.getStatus() == other.getStatus(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraStatusInfoVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + final Object $port = this.getPort(); + result = result * 59 + (($port == null) ? 43 : $port.hashCode()); + final Object $screenIp = this.getScreenIp(); + result = result * 59 + (($screenIp == null) ? 43 : $screenIp.hashCode()); + final Object $screenPort = this.getScreenPort(); + result = result * 59 + (($screenPort == null) ? 43 : $screenPort.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + result = result * 59 + this.getStatus(); + return result; + } + + @Override + public String toString() { + return "CameraStatusInfoVo(id=" + this.getId() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", screenIp=" + this.getScreenIp() + ", screenPort=" + this.getScreenPort() + ", name=" + this.getName() + ", status=" + this.getStatus() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final String port) { + this.port = port; + } + + public void setScreenIp(final String screenIp) { + this.screenIp = screenIp; + } + + public void setScreenPort(final String screenPort) { + this.screenPort = screenPort; + } + + public void setName(final String name) { + this.name = name; + } + + public void setStatus(final int status) { + this.status = status; + } + + public int getId() { + return this.id; + } + + public String getIp() { + return this.ip; + } + + public String getPort() { + return this.port; + } + + public String getScreenIp() { + return this.screenIp; + } + + public String getScreenPort() { + return this.screenPort; + } + + public String getName() { + return this.name; + } + + public int getStatus() { + return this.status; + } + + @ConstructorProperties({ "id", "ip", "port", "screenIp", "screenPort", "name", "status" }) + public CameraStatusInfoVo(final int id, final String ip, final String port, final String screenIp, final String screenPort, final String name, final int status) { + this.id = id; + this.ip = ip; + this.port = port; + this.screenIp = screenIp; + this.screenPort = screenPort; + this.name = name; + this.status = status; + } + + public CameraStatusInfoVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CameraVo.java b/src/main/java/com/zhichenhaixin/sys/model/CameraVo.java new file mode 100644 index 0000000..5693e64 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CameraVo.java @@ -0,0 +1,279 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class CameraVo implements Serializable +{ + private static final long serialVersionUID = -631188425278817299L; + private int id; + private String name; + private String ip; + private int port; + private String screenip; + private String screenport; + private String username; + private String password; + private int check_plane_id; + private int preset_id; + private CamPresetInfo camera_preset_info; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CameraVo)) { + return false; + } + final CameraVo other = (CameraVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0078: { + if (this$name == null) { + if (other$name == null) { + break Label_0078; + } + } + else if (this$name.equals(other$name)) { + break Label_0078; + } + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0115: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0115; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0115; + } + return false; + } + if (this.getPort() != other.getPort()) { + return false; + } + final Object this$screenip = this.getScreenip(); + final Object other$screenip = other.getScreenip(); + Label_0165: { + if (this$screenip == null) { + if (other$screenip == null) { + break Label_0165; + } + } + else if (this$screenip.equals(other$screenip)) { + break Label_0165; + } + return false; + } + final Object this$screenport = this.getScreenport(); + final Object other$screenport = other.getScreenport(); + Label_0202: { + if (this$screenport == null) { + if (other$screenport == null) { + break Label_0202; + } + } + else if (this$screenport.equals(other$screenport)) { + break Label_0202; + } + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0239: { + if (this$username == null) { + if (other$username == null) { + break Label_0239; + } + } + else if (this$username.equals(other$username)) { + break Label_0239; + } + return false; + } + final Object this$password = this.getPassword(); + final Object other$password = other.getPassword(); + Label_0276: { + if (this$password == null) { + if (other$password == null) { + break Label_0276; + } + } + else if (this$password.equals(other$password)) { + break Label_0276; + } + return false; + } + if (this.getCheck_plane_id() != other.getCheck_plane_id()) { + return false; + } + if (this.getPreset_id() != other.getPreset_id()) { + return false; + } + final Object this$camera_preset_info = this.getCamera_preset_info(); + final Object other$camera_preset_info = other.getCamera_preset_info(); + if (this$camera_preset_info == null) { + if (other$camera_preset_info == null) { + return true; + } + } + else if (this$camera_preset_info.equals(other$camera_preset_info)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CameraVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + result = result * 59 + this.getPort(); + final Object $screenip = this.getScreenip(); + result = result * 59 + (($screenip == null) ? 43 : $screenip.hashCode()); + final Object $screenport = this.getScreenport(); + result = result * 59 + (($screenport == null) ? 43 : $screenport.hashCode()); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $password = this.getPassword(); + result = result * 59 + (($password == null) ? 43 : $password.hashCode()); + result = result * 59 + this.getCheck_plane_id(); + result = result * 59 + this.getPreset_id(); + final Object $camera_preset_info = this.getCamera_preset_info(); + result = result * 59 + (($camera_preset_info == null) ? 43 : $camera_preset_info.hashCode()); + return result; + } + + @Override + public String toString() { + return "CameraVo(id=" + this.getId() + ", name=" + this.getName() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", screenip=" + this.getScreenip() + ", screenport=" + this.getScreenport() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", check_plane_id=" + this.getCheck_plane_id() + ", preset_id=" + this.getPreset_id() + ", camera_preset_info=" + this.getCamera_preset_info() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final int port) { + this.port = port; + } + + public void setScreenip(final String screenip) { + this.screenip = screenip; + } + + public void setScreenport(final String screenport) { + this.screenport = screenport; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setCheck_plane_id(final int check_plane_id) { + this.check_plane_id = check_plane_id; + } + + public void setPreset_id(final int preset_id) { + this.preset_id = preset_id; + } + + public void setCamera_preset_info(final CamPresetInfo camera_preset_info) { + this.camera_preset_info = camera_preset_info; + } + + public int getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public String getIp() { + return this.ip; + } + + public int getPort() { + return this.port; + } + + public String getScreenip() { + return this.screenip; + } + + public String getScreenport() { + return this.screenport; + } + + public String getUsername() { + return this.username; + } + + public String getPassword() { + return this.password; + } + + public int getCheck_plane_id() { + return this.check_plane_id; + } + + public int getPreset_id() { + return this.preset_id; + } + + public CamPresetInfo getCamera_preset_info() { + return this.camera_preset_info; + } + + @ConstructorProperties({ "id", "name", "ip", "port", "screenip", "screenport", "username", "password", "check_plane_id", "preset_id", "camera_preset_info" }) + public CameraVo(final int id, final String name, final String ip, final int port, final String screenip, final String screenport, final String username, final String password, final int check_plane_id, final int preset_id, final CamPresetInfo camera_preset_info) { + this.id = id; + this.name = name; + this.ip = ip; + this.port = port; + this.screenip = screenip; + this.screenport = screenport; + this.username = username; + this.password = password; + this.check_plane_id = check_plane_id; + this.preset_id = preset_id; + this.camera_preset_info = camera_preset_info; + } + + public CameraVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/CustomDefence.java b/src/main/java/com/zhichenhaixin/sys/model/CustomDefence.java new file mode 100644 index 0000000..4b26b06 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/CustomDefence.java @@ -0,0 +1,409 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class CustomDefence implements Serializable +{ + private static final long serialVersionUID = 1L; + private int defence_id; + private String defence_name; + private String tts; + private int warn_flash; + private int warn_windows; + private int warn_voice; + private String warn_color; + private String lon_lat; + private int defence_shape; + private int defence_type; + private double radius; + private int warn_level; + private int is_warn; + private int bulletin_plan; + private int auto_fllow_time; + private String defence_color; + private String remark; + private List timespans; + private List cameraList; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CustomDefence)) { + return false; + } + final CustomDefence other = (CustomDefence)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getDefence_id() != other.getDefence_id()) { + return false; + } + final Object this$defence_name = this.getDefence_name(); + final Object other$defence_name = other.getDefence_name(); + Label_0078: { + if (this$defence_name == null) { + if (other$defence_name == null) { + break Label_0078; + } + } + else if (this$defence_name.equals(other$defence_name)) { + break Label_0078; + } + return false; + } + final Object this$tts = this.getTts(); + final Object other$tts = other.getTts(); + Label_0115: { + if (this$tts == null) { + if (other$tts == null) { + break Label_0115; + } + } + else if (this$tts.equals(other$tts)) { + break Label_0115; + } + return false; + } + if (this.getWarn_flash() != other.getWarn_flash()) { + return false; + } + if (this.getWarn_windows() != other.getWarn_windows()) { + return false; + } + if (this.getWarn_voice() != other.getWarn_voice()) { + return false; + } + final Object this$warn_color = this.getWarn_color(); + final Object other$warn_color = other.getWarn_color(); + Label_0191: { + if (this$warn_color == null) { + if (other$warn_color == null) { + break Label_0191; + } + } + else if (this$warn_color.equals(other$warn_color)) { + break Label_0191; + } + return false; + } + final Object this$lon_lat = this.getLon_lat(); + final Object other$lon_lat = other.getLon_lat(); + Label_0228: { + if (this$lon_lat == null) { + if (other$lon_lat == null) { + break Label_0228; + } + } + else if (this$lon_lat.equals(other$lon_lat)) { + break Label_0228; + } + return false; + } + if (this.getDefence_shape() != other.getDefence_shape()) { + return false; + } + if (this.getDefence_type() != other.getDefence_type()) { + return false; + } + if (Double.compare(this.getRadius(), other.getRadius()) != 0) { + return false; + } + if (this.getWarn_level() != other.getWarn_level()) { + return false; + } + if (this.getIs_warn() != other.getIs_warn()) { + return false; + } + if (this.getBulletin_plan() != other.getBulletin_plan()) { + return false; + } + if (this.getAuto_fllow_time() != other.getAuto_fllow_time()) { + return false; + } + final Object this$defence_color = this.getDefence_color(); + final Object other$defence_color = other.getDefence_color(); + Label_0359: { + if (this$defence_color == null) { + if (other$defence_color == null) { + break Label_0359; + } + } + else if (this$defence_color.equals(other$defence_color)) { + break Label_0359; + } + return false; + } + final Object this$remark = this.getRemark(); + final Object other$remark = other.getRemark(); + Label_0396: { + if (this$remark == null) { + if (other$remark == null) { + break Label_0396; + } + } + else if (this$remark.equals(other$remark)) { + break Label_0396; + } + return false; + } + final Object this$timespans = this.getTimespans(); + final Object other$timespans = other.getTimespans(); + Label_0433: { + if (this$timespans == null) { + if (other$timespans == null) { + break Label_0433; + } + } + else if (this$timespans.equals(other$timespans)) { + break Label_0433; + } + return false; + } + final Object this$cameraList = this.getCameraList(); + final Object other$cameraList = other.getCameraList(); + if (this$cameraList == null) { + if (other$cameraList == null) { + return true; + } + } + else if (this$cameraList.equals(other$cameraList)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof CustomDefence; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getDefence_id(); + final Object $defence_name = this.getDefence_name(); + result = result * 59 + (($defence_name == null) ? 43 : $defence_name.hashCode()); + final Object $tts = this.getTts(); + result = result * 59 + (($tts == null) ? 43 : $tts.hashCode()); + result = result * 59 + this.getWarn_flash(); + result = result * 59 + this.getWarn_windows(); + result = result * 59 + this.getWarn_voice(); + final Object $warn_color = this.getWarn_color(); + result = result * 59 + (($warn_color == null) ? 43 : $warn_color.hashCode()); + final Object $lon_lat = this.getLon_lat(); + result = result * 59 + (($lon_lat == null) ? 43 : $lon_lat.hashCode()); + result = result * 59 + this.getDefence_shape(); + result = result * 59 + this.getDefence_type(); + final long $radius = Double.doubleToLongBits(this.getRadius()); + result = result * 59 + (int)($radius ^ $radius >>> 32); + result = result * 59 + this.getWarn_level(); + result = result * 59 + this.getIs_warn(); + result = result * 59 + this.getBulletin_plan(); + result = result * 59 + this.getAuto_fllow_time(); + final Object $defence_color = this.getDefence_color(); + result = result * 59 + (($defence_color == null) ? 43 : $defence_color.hashCode()); + final Object $remark = this.getRemark(); + result = result * 59 + (($remark == null) ? 43 : $remark.hashCode()); + final Object $timespans = this.getTimespans(); + result = result * 59 + (($timespans == null) ? 43 : $timespans.hashCode()); + final Object $cameraList = this.getCameraList(); + result = result * 59 + (($cameraList == null) ? 43 : $cameraList.hashCode()); + return result; + } + + @Override + public String toString() { + return "CustomDefence(defence_id=" + this.getDefence_id() + ", defence_name=" + this.getDefence_name() + ", tts=" + this.getTts() + ", warn_flash=" + this.getWarn_flash() + ", warn_windows=" + this.getWarn_windows() + ", warn_voice=" + this.getWarn_voice() + ", warn_color=" + this.getWarn_color() + ", lon_lat=" + this.getLon_lat() + ", defence_shape=" + this.getDefence_shape() + ", defence_type=" + this.getDefence_type() + ", radius=" + this.getRadius() + ", warn_level=" + this.getWarn_level() + ", is_warn=" + this.getIs_warn() + ", bulletin_plan=" + this.getBulletin_plan() + ", auto_fllow_time=" + this.getAuto_fllow_time() + ", defence_color=" + this.getDefence_color() + ", remark=" + this.getRemark() + ", timespans=" + this.getTimespans() + ", cameraList=" + this.getCameraList() + ")"; + } + + public void setDefence_id(final int defence_id) { + this.defence_id = defence_id; + } + + public void setDefence_name(final String defence_name) { + this.defence_name = defence_name; + } + + public void setTts(final String tts) { + this.tts = tts; + } + + public void setWarn_flash(final int warn_flash) { + this.warn_flash = warn_flash; + } + + public void setWarn_windows(final int warn_windows) { + this.warn_windows = warn_windows; + } + + public void setWarn_voice(final int warn_voice) { + this.warn_voice = warn_voice; + } + + public void setWarn_color(final String warn_color) { + this.warn_color = warn_color; + } + + public void setLon_lat(final String lon_lat) { + this.lon_lat = lon_lat; + } + + public void setDefence_shape(final int defence_shape) { + this.defence_shape = defence_shape; + } + + public void setDefence_type(final int defence_type) { + this.defence_type = defence_type; + } + + public void setRadius(final double radius) { + this.radius = radius; + } + + public void setWarn_level(final int warn_level) { + this.warn_level = warn_level; + } + + public void setIs_warn(final int is_warn) { + this.is_warn = is_warn; + } + + public void setBulletin_plan(final int bulletin_plan) { + this.bulletin_plan = bulletin_plan; + } + + public void setAuto_fllow_time(final int auto_fllow_time) { + this.auto_fllow_time = auto_fllow_time; + } + + public void setDefence_color(final String defence_color) { + this.defence_color = defence_color; + } + + public void setRemark(final String remark) { + this.remark = remark; + } + + public void setTimespans(final List timespans) { + this.timespans = timespans; + } + + public void setCameraList(final List cameraList) { + this.cameraList = cameraList; + } + + public int getDefence_id() { + return this.defence_id; + } + + public String getDefence_name() { + return this.defence_name; + } + + public String getTts() { + return this.tts; + } + + public int getWarn_flash() { + return this.warn_flash; + } + + public int getWarn_windows() { + return this.warn_windows; + } + + public int getWarn_voice() { + return this.warn_voice; + } + + public String getWarn_color() { + return this.warn_color; + } + + public String getLon_lat() { + return this.lon_lat; + } + + public int getDefence_shape() { + return this.defence_shape; + } + + public int getDefence_type() { + return this.defence_type; + } + + public double getRadius() { + return this.radius; + } + + public int getWarn_level() { + return this.warn_level; + } + + public int getIs_warn() { + return this.is_warn; + } + + public int getBulletin_plan() { + return this.bulletin_plan; + } + + public int getAuto_fllow_time() { + return this.auto_fllow_time; + } + + public String getDefence_color() { + return this.defence_color; + } + + public String getRemark() { + return this.remark; + } + + public List getTimespans() { + return this.timespans; + } + + public List getCameraList() { + return this.cameraList; + } + + @ConstructorProperties({ "defence_id", "defence_name", "tts", "warn_flash", "warn_windows", "warn_voice", "warn_color", "lon_lat", "defence_shape", "defence_type", "radius", "warn_level", "is_warn", "bulletin_plan", "auto_fllow_time", "defence_color", "remark", "timespans", "cameraList" }) + public CustomDefence(final int defence_id, final String defence_name, final String tts, final int warn_flash, final int warn_windows, final int warn_voice, final String warn_color, final String lon_lat, final int defence_shape, final int defence_type, final double radius, final int warn_level, final int is_warn, final int bulletin_plan, final int auto_fllow_time, final String defence_color, final String remark, final List timespans, final List cameraList) { + this.timespans = new ArrayList(); + this.cameraList = new ArrayList(); + this.defence_id = defence_id; + this.defence_name = defence_name; + this.tts = tts; + this.warn_flash = warn_flash; + this.warn_windows = warn_windows; + this.warn_voice = warn_voice; + this.warn_color = warn_color; + this.lon_lat = lon_lat; + this.defence_shape = defence_shape; + this.defence_type = defence_type; + this.radius = radius; + this.warn_level = warn_level; + this.is_warn = is_warn; + this.bulletin_plan = bulletin_plan; + this.auto_fllow_time = auto_fllow_time; + this.defence_color = defence_color; + this.remark = remark; + this.timespans = timespans; + this.cameraList = cameraList; + } + + public CustomDefence() { + this.timespans = new ArrayList(); + this.cameraList = new ArrayList(); + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/EarlyWarnVo.java b/src/main/java/com/zhichenhaixin/sys/model/EarlyWarnVo.java new file mode 100644 index 0000000..24170cc --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/EarlyWarnVo.java @@ -0,0 +1,235 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class EarlyWarnVo implements Serializable +{ + private static final long serialVersionUID = 7096888992718382214L; + private int auto_warn_id; + private int warn_level; + private int warn_flash; + private int warn_voice; + private int warn_window; + private int show_video_client; + private int show_large_screen; + private int liandong; + private String warn_color; + private String create_date; + private String state; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof EarlyWarnVo)) { + return false; + } + final EarlyWarnVo other = (EarlyWarnVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getAuto_warn_id() != other.getAuto_warn_id()) { + return false; + } + if (this.getWarn_level() != other.getWarn_level()) { + return false; + } + if (this.getWarn_flash() != other.getWarn_flash()) { + return false; + } + if (this.getWarn_voice() != other.getWarn_voice()) { + return false; + } + if (this.getWarn_window() != other.getWarn_window()) { + return false; + } + if (this.getShow_video_client() != other.getShow_video_client()) { + return false; + } + if (this.getShow_large_screen() != other.getShow_large_screen()) { + return false; + } + if (this.getLiandong() != other.getLiandong()) { + return false; + } + final Object this$warn_color = this.getWarn_color(); + final Object other$warn_color = other.getWarn_color(); + Label_0169: { + if (this$warn_color == null) { + if (other$warn_color == null) { + break Label_0169; + } + } + else if (this$warn_color.equals(other$warn_color)) { + break Label_0169; + } + return false; + } + final Object this$create_date = this.getCreate_date(); + final Object other$create_date = other.getCreate_date(); + Label_0206: { + if (this$create_date == null) { + if (other$create_date == null) { + break Label_0206; + } + } + else if (this$create_date.equals(other$create_date)) { + break Label_0206; + } + return false; + } + final Object this$state = this.getState(); + final Object other$state = other.getState(); + if (this$state == null) { + if (other$state == null) { + return true; + } + } + else if (this$state.equals(other$state)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof EarlyWarnVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getAuto_warn_id(); + result = result * 59 + this.getWarn_level(); + result = result * 59 + this.getWarn_flash(); + result = result * 59 + this.getWarn_voice(); + result = result * 59 + this.getWarn_window(); + result = result * 59 + this.getShow_video_client(); + result = result * 59 + this.getShow_large_screen(); + result = result * 59 + this.getLiandong(); + final Object $warn_color = this.getWarn_color(); + result = result * 59 + (($warn_color == null) ? 43 : $warn_color.hashCode()); + final Object $create_date = this.getCreate_date(); + result = result * 59 + (($create_date == null) ? 43 : $create_date.hashCode()); + final Object $state = this.getState(); + result = result * 59 + (($state == null) ? 43 : $state.hashCode()); + return result; + } + + @Override + public String toString() { + return "EarlyWarnVo(auto_warn_id=" + this.getAuto_warn_id() + ", warn_level=" + this.getWarn_level() + ", warn_flash=" + this.getWarn_flash() + ", warn_voice=" + this.getWarn_voice() + ", warn_window=" + this.getWarn_window() + ", show_video_client=" + this.getShow_video_client() + ", show_large_screen=" + this.getShow_large_screen() + ", liandong=" + this.getLiandong() + ", warn_color=" + this.getWarn_color() + ", create_date=" + this.getCreate_date() + ", state=" + this.getState() + ")"; + } + + public void setAuto_warn_id(final int auto_warn_id) { + this.auto_warn_id = auto_warn_id; + } + + public void setWarn_level(final int warn_level) { + this.warn_level = warn_level; + } + + public void setWarn_flash(final int warn_flash) { + this.warn_flash = warn_flash; + } + + public void setWarn_voice(final int warn_voice) { + this.warn_voice = warn_voice; + } + + public void setWarn_window(final int warn_window) { + this.warn_window = warn_window; + } + + public void setShow_video_client(final int show_video_client) { + this.show_video_client = show_video_client; + } + + public void setShow_large_screen(final int show_large_screen) { + this.show_large_screen = show_large_screen; + } + + public void setLiandong(final int liandong) { + this.liandong = liandong; + } + + public void setWarn_color(final String warn_color) { + this.warn_color = warn_color; + } + + public void setCreate_date(final String create_date) { + this.create_date = create_date; + } + + public void setState(final String state) { + this.state = state; + } + + public int getAuto_warn_id() { + return this.auto_warn_id; + } + + public int getWarn_level() { + return this.warn_level; + } + + public int getWarn_flash() { + return this.warn_flash; + } + + public int getWarn_voice() { + return this.warn_voice; + } + + public int getWarn_window() { + return this.warn_window; + } + + public int getShow_video_client() { + return this.show_video_client; + } + + public int getShow_large_screen() { + return this.show_large_screen; + } + + public int getLiandong() { + return this.liandong; + } + + public String getWarn_color() { + return this.warn_color; + } + + public String getCreate_date() { + return this.create_date; + } + + public String getState() { + return this.state; + } + + @ConstructorProperties({ "auto_warn_id", "warn_level", "warn_flash", "warn_voice", "warn_window", "show_video_client", "show_large_screen", "liandong", "warn_color", "create_date", "state" }) + public EarlyWarnVo(final int auto_warn_id, final int warn_level, final int warn_flash, final int warn_voice, final int warn_window, final int show_video_client, final int show_large_screen, final int liandong, final String warn_color, final String create_date, final String state) { + this.auto_warn_id = auto_warn_id; + this.warn_level = warn_level; + this.warn_flash = warn_flash; + this.warn_voice = warn_voice; + this.warn_window = warn_window; + this.show_video_client = show_video_client; + this.show_large_screen = show_large_screen; + this.liandong = liandong; + this.warn_color = warn_color; + this.create_date = create_date; + this.state = state; + } + + public EarlyWarnVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/FocusPointInfo.java b/src/main/java/com/zhichenhaixin/sys/model/FocusPointInfo.java new file mode 100644 index 0000000..25a6ebe --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/FocusPointInfo.java @@ -0,0 +1,188 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class FocusPointInfo implements Serializable +{ + private static final long serialVersionUID = -7379952501194056925L; + private int id; + private String name; + private String user_account; + private String mark; + private String create_date; + private List camera_list; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FocusPointInfo)) { + return false; + } + final FocusPointInfo other = (FocusPointInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0078: { + if (this$name == null) { + if (other$name == null) { + break Label_0078; + } + } + else if (this$name.equals(other$name)) { + break Label_0078; + } + return false; + } + final Object this$user_account = this.getUser_account(); + final Object other$user_account = other.getUser_account(); + Label_0115: { + if (this$user_account == null) { + if (other$user_account == null) { + break Label_0115; + } + } + else if (this$user_account.equals(other$user_account)) { + break Label_0115; + } + return false; + } + final Object this$mark = this.getMark(); + final Object other$mark = other.getMark(); + Label_0152: { + if (this$mark == null) { + if (other$mark == null) { + break Label_0152; + } + } + else if (this$mark.equals(other$mark)) { + break Label_0152; + } + return false; + } + final Object this$create_date = this.getCreate_date(); + final Object other$create_date = other.getCreate_date(); + Label_0189: { + if (this$create_date == null) { + if (other$create_date == null) { + break Label_0189; + } + } + else if (this$create_date.equals(other$create_date)) { + break Label_0189; + } + return false; + } + final Object this$camera_list = this.getCamera_list(); + final Object other$camera_list = other.getCamera_list(); + if (this$camera_list == null) { + if (other$camera_list == null) { + return true; + } + } + else if (this$camera_list.equals(other$camera_list)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof FocusPointInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final Object $user_account = this.getUser_account(); + result = result * 59 + (($user_account == null) ? 43 : $user_account.hashCode()); + final Object $mark = this.getMark(); + result = result * 59 + (($mark == null) ? 43 : $mark.hashCode()); + final Object $create_date = this.getCreate_date(); + result = result * 59 + (($create_date == null) ? 43 : $create_date.hashCode()); + final Object $camera_list = this.getCamera_list(); + result = result * 59 + (($camera_list == null) ? 43 : $camera_list.hashCode()); + return result; + } + + @Override + public String toString() { + return "FocusPointInfo(id=" + this.getId() + ", name=" + this.getName() + ", user_account=" + this.getUser_account() + ", mark=" + this.getMark() + ", create_date=" + this.getCreate_date() + ", camera_list=" + this.getCamera_list() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setUser_account(final String user_account) { + this.user_account = user_account; + } + + public void setMark(final String mark) { + this.mark = mark; + } + + public void setCreate_date(final String create_date) { + this.create_date = create_date; + } + + public void setCamera_list(final List camera_list) { + this.camera_list = camera_list; + } + + public int getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public String getUser_account() { + return this.user_account; + } + + public String getMark() { + return this.mark; + } + + public String getCreate_date() { + return this.create_date; + } + + public List getCamera_list() { + return this.camera_list; + } + + @ConstructorProperties({ "id", "name", "user_account", "mark", "create_date", "camera_list" }) + public FocusPointInfo(final int id, final String name, final String user_account, final String mark, final String create_date, final List camera_list) { + this.id = id; + this.name = name; + this.user_account = user_account; + this.mark = mark; + this.create_date = create_date; + this.camera_list = camera_list; + } + + public FocusPointInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/FunFCnfVo.java b/src/main/java/com/zhichenhaixin/sys/model/FunFCnfVo.java new file mode 100644 index 0000000..c36ef2d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/FunFCnfVo.java @@ -0,0 +1,140 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class FunFCnfVo implements Serializable +{ + private static final long serialVersionUID = 6130454554915977204L; + private int fun_cnf_id; + private int role_id; + private int parent_id; + private String child_id; + private String name; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FunFCnfVo)) { + return false; + } + final FunFCnfVo other = (FunFCnfVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getFun_cnf_id() != other.getFun_cnf_id()) { + return false; + } + if (this.getRole_id() != other.getRole_id()) { + return false; + } + if (this.getParent_id() != other.getParent_id()) { + return false; + } + final Object this$child_id = this.getChild_id(); + final Object other$child_id = other.getChild_id(); + Label_0104: { + if (this$child_id == null) { + if (other$child_id == null) { + break Label_0104; + } + } + else if (this$child_id.equals(other$child_id)) { + break Label_0104; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null) { + if (other$name == null) { + return true; + } + } + else if (this$name.equals(other$name)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof FunFCnfVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getFun_cnf_id(); + result = result * 59 + this.getRole_id(); + result = result * 59 + this.getParent_id(); + final Object $child_id = this.getChild_id(); + result = result * 59 + (($child_id == null) ? 43 : $child_id.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + return result; + } + + @Override + public String toString() { + return "FunFCnfVo(fun_cnf_id=" + this.getFun_cnf_id() + ", role_id=" + this.getRole_id() + ", parent_id=" + this.getParent_id() + ", child_id=" + this.getChild_id() + ", name=" + this.getName() + ")"; + } + + public void setFun_cnf_id(final int fun_cnf_id) { + this.fun_cnf_id = fun_cnf_id; + } + + public void setRole_id(final int role_id) { + this.role_id = role_id; + } + + public void setParent_id(final int parent_id) { + this.parent_id = parent_id; + } + + public void setChild_id(final String child_id) { + this.child_id = child_id; + } + + public void setName(final String name) { + this.name = name; + } + + public int getFun_cnf_id() { + return this.fun_cnf_id; + } + + public int getRole_id() { + return this.role_id; + } + + public int getParent_id() { + return this.parent_id; + } + + public String getChild_id() { + return this.child_id; + } + + public String getName() { + return this.name; + } + + @ConstructorProperties({ "fun_cnf_id", "role_id", "parent_id", "child_id", "name" }) + public FunFCnfVo(final int fun_cnf_id, final int role_id, final int parent_id, final String child_id, final String name) { + this.fun_cnf_id = fun_cnf_id; + this.role_id = role_id; + this.parent_id = parent_id; + this.child_id = child_id; + this.name = name; + } + + public FunFCnfVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/GunBallLinkage.java b/src/main/java/com/zhichenhaixin/sys/model/GunBallLinkage.java new file mode 100644 index 0000000..12b691d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/GunBallLinkage.java @@ -0,0 +1,398 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class GunBallLinkage implements Serializable +{ + private static final long serialVersionUID = -4707229330618616142L; + private int id; + private int gun_id; + private int gun_left_top_corner_x; + private int gun_left_top_corner_y; + private int gun_left_lower_corner_x; + private int gun_left_lower_corner_y; + private int gun_right_top_corner_x; + private int gun_right_top_corner_y; + private int gun_right_lower_corner_x; + private int gun_right_lower_corner_y; + private int ball_id; + private int ball_left_top_corner_x; + private int ball_left_top_corner_y; + private int ball_left_lower_corner_x; + private int ball_left_lower_corner_y; + private int ball_right_top_corner_x; + private int ball_right_top_corner_y; + private int ball_right_lower_corner_x; + private int ball_right_lower_corner_y; + private int preset_inernum; + private double p; + private double t; + private double z; + private String create_time; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GunBallLinkage)) { + return false; + } + final GunBallLinkage other = (GunBallLinkage)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getGun_id() != other.getGun_id()) { + return false; + } + if (this.getGun_left_top_corner_x() != other.getGun_left_top_corner_x()) { + return false; + } + if (this.getGun_left_top_corner_y() != other.getGun_left_top_corner_y()) { + return false; + } + if (this.getGun_left_lower_corner_x() != other.getGun_left_lower_corner_x()) { + return false; + } + if (this.getGun_left_lower_corner_y() != other.getGun_left_lower_corner_y()) { + return false; + } + if (this.getGun_right_top_corner_x() != other.getGun_right_top_corner_x()) { + return false; + } + if (this.getGun_right_top_corner_y() != other.getGun_right_top_corner_y()) { + return false; + } + if (this.getGun_right_lower_corner_x() != other.getGun_right_lower_corner_x()) { + return false; + } + if (this.getGun_right_lower_corner_y() != other.getGun_right_lower_corner_y()) { + return false; + } + if (this.getBall_id() != other.getBall_id()) { + return false; + } + if (this.getBall_left_top_corner_x() != other.getBall_left_top_corner_x()) { + return false; + } + if (this.getBall_left_top_corner_y() != other.getBall_left_top_corner_y()) { + return false; + } + if (this.getBall_left_lower_corner_x() != other.getBall_left_lower_corner_x()) { + return false; + } + if (this.getBall_left_lower_corner_y() != other.getBall_left_lower_corner_y()) { + return false; + } + if (this.getBall_right_top_corner_x() != other.getBall_right_top_corner_x()) { + return false; + } + if (this.getBall_right_top_corner_y() != other.getBall_right_top_corner_y()) { + return false; + } + if (this.getBall_right_lower_corner_x() != other.getBall_right_lower_corner_x()) { + return false; + } + if (this.getBall_right_lower_corner_y() != other.getBall_right_lower_corner_y()) { + return false; + } + if (this.getPreset_inernum() != other.getPreset_inernum()) { + return false; + } + if (Double.compare(this.getP(), other.getP()) != 0) { + return false; + } + if (Double.compare(this.getT(), other.getT()) != 0) { + return false; + } + if (Double.compare(this.getZ(), other.getZ()) != 0) { + return false; + } + final Object this$create_time = this.getCreate_time(); + final Object other$create_time = other.getCreate_time(); + if (this$create_time == null) { + if (other$create_time == null) { + return true; + } + } + else if (this$create_time.equals(other$create_time)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof GunBallLinkage; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getGun_id(); + result = result * 59 + this.getGun_left_top_corner_x(); + result = result * 59 + this.getGun_left_top_corner_y(); + result = result * 59 + this.getGun_left_lower_corner_x(); + result = result * 59 + this.getGun_left_lower_corner_y(); + result = result * 59 + this.getGun_right_top_corner_x(); + result = result * 59 + this.getGun_right_top_corner_y(); + result = result * 59 + this.getGun_right_lower_corner_x(); + result = result * 59 + this.getGun_right_lower_corner_y(); + result = result * 59 + this.getBall_id(); + result = result * 59 + this.getBall_left_top_corner_x(); + result = result * 59 + this.getBall_left_top_corner_y(); + result = result * 59 + this.getBall_left_lower_corner_x(); + result = result * 59 + this.getBall_left_lower_corner_y(); + result = result * 59 + this.getBall_right_top_corner_x(); + result = result * 59 + this.getBall_right_top_corner_y(); + result = result * 59 + this.getBall_right_lower_corner_x(); + result = result * 59 + this.getBall_right_lower_corner_y(); + result = result * 59 + this.getPreset_inernum(); + final long $p = Double.doubleToLongBits(this.getP()); + result = result * 59 + (int)($p ^ $p >>> 32); + final long $t = Double.doubleToLongBits(this.getT()); + result = result * 59 + (int)($t ^ $t >>> 32); + final long $z = Double.doubleToLongBits(this.getZ()); + result = result * 59 + (int)($z ^ $z >>> 32); + final Object $create_time = this.getCreate_time(); + result = result * 59 + (($create_time == null) ? 43 : $create_time.hashCode()); + return result; + } + + @Override + public String toString() { + return "GunBallLinkage(id=" + this.getId() + ", gun_id=" + this.getGun_id() + ", gun_left_top_corner_x=" + this.getGun_left_top_corner_x() + ", gun_left_top_corner_y=" + this.getGun_left_top_corner_y() + ", gun_left_lower_corner_x=" + this.getGun_left_lower_corner_x() + ", gun_left_lower_corner_y=" + this.getGun_left_lower_corner_y() + ", gun_right_top_corner_x=" + this.getGun_right_top_corner_x() + ", gun_right_top_corner_y=" + this.getGun_right_top_corner_y() + ", gun_right_lower_corner_x=" + this.getGun_right_lower_corner_x() + ", gun_right_lower_corner_y=" + this.getGun_right_lower_corner_y() + ", ball_id=" + this.getBall_id() + ", ball_left_top_corner_x=" + this.getBall_left_top_corner_x() + ", ball_left_top_corner_y=" + this.getBall_left_top_corner_y() + ", ball_left_lower_corner_x=" + this.getBall_left_lower_corner_x() + ", ball_left_lower_corner_y=" + this.getBall_left_lower_corner_y() + ", ball_right_top_corner_x=" + this.getBall_right_top_corner_x() + ", ball_right_top_corner_y=" + this.getBall_right_top_corner_y() + ", ball_right_lower_corner_x=" + this.getBall_right_lower_corner_x() + ", ball_right_lower_corner_y=" + this.getBall_right_lower_corner_y() + ", preset_inernum=" + this.getPreset_inernum() + ", p=" + this.getP() + ", t=" + this.getT() + ", z=" + this.getZ() + ", create_time=" + this.getCreate_time() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setGun_id(final int gun_id) { + this.gun_id = gun_id; + } + + public void setGun_left_top_corner_x(final int gun_left_top_corner_x) { + this.gun_left_top_corner_x = gun_left_top_corner_x; + } + + public void setGun_left_top_corner_y(final int gun_left_top_corner_y) { + this.gun_left_top_corner_y = gun_left_top_corner_y; + } + + public void setGun_left_lower_corner_x(final int gun_left_lower_corner_x) { + this.gun_left_lower_corner_x = gun_left_lower_corner_x; + } + + public void setGun_left_lower_corner_y(final int gun_left_lower_corner_y) { + this.gun_left_lower_corner_y = gun_left_lower_corner_y; + } + + public void setGun_right_top_corner_x(final int gun_right_top_corner_x) { + this.gun_right_top_corner_x = gun_right_top_corner_x; + } + + public void setGun_right_top_corner_y(final int gun_right_top_corner_y) { + this.gun_right_top_corner_y = gun_right_top_corner_y; + } + + public void setGun_right_lower_corner_x(final int gun_right_lower_corner_x) { + this.gun_right_lower_corner_x = gun_right_lower_corner_x; + } + + public void setGun_right_lower_corner_y(final int gun_right_lower_corner_y) { + this.gun_right_lower_corner_y = gun_right_lower_corner_y; + } + + public void setBall_id(final int ball_id) { + this.ball_id = ball_id; + } + + public void setBall_left_top_corner_x(final int ball_left_top_corner_x) { + this.ball_left_top_corner_x = ball_left_top_corner_x; + } + + public void setBall_left_top_corner_y(final int ball_left_top_corner_y) { + this.ball_left_top_corner_y = ball_left_top_corner_y; + } + + public void setBall_left_lower_corner_x(final int ball_left_lower_corner_x) { + this.ball_left_lower_corner_x = ball_left_lower_corner_x; + } + + public void setBall_left_lower_corner_y(final int ball_left_lower_corner_y) { + this.ball_left_lower_corner_y = ball_left_lower_corner_y; + } + + public void setBall_right_top_corner_x(final int ball_right_top_corner_x) { + this.ball_right_top_corner_x = ball_right_top_corner_x; + } + + public void setBall_right_top_corner_y(final int ball_right_top_corner_y) { + this.ball_right_top_corner_y = ball_right_top_corner_y; + } + + public void setBall_right_lower_corner_x(final int ball_right_lower_corner_x) { + this.ball_right_lower_corner_x = ball_right_lower_corner_x; + } + + public void setBall_right_lower_corner_y(final int ball_right_lower_corner_y) { + this.ball_right_lower_corner_y = ball_right_lower_corner_y; + } + + public void setPreset_inernum(final int preset_inernum) { + this.preset_inernum = preset_inernum; + } + + public void setP(final double p) { + this.p = p; + } + + public void setT(final double t) { + this.t = t; + } + + public void setZ(final double z) { + this.z = z; + } + + public void setCreate_time(final String create_time) { + this.create_time = create_time; + } + + public int getId() { + return this.id; + } + + public int getGun_id() { + return this.gun_id; + } + + public int getGun_left_top_corner_x() { + return this.gun_left_top_corner_x; + } + + public int getGun_left_top_corner_y() { + return this.gun_left_top_corner_y; + } + + public int getGun_left_lower_corner_x() { + return this.gun_left_lower_corner_x; + } + + public int getGun_left_lower_corner_y() { + return this.gun_left_lower_corner_y; + } + + public int getGun_right_top_corner_x() { + return this.gun_right_top_corner_x; + } + + public int getGun_right_top_corner_y() { + return this.gun_right_top_corner_y; + } + + public int getGun_right_lower_corner_x() { + return this.gun_right_lower_corner_x; + } + + public int getGun_right_lower_corner_y() { + return this.gun_right_lower_corner_y; + } + + public int getBall_id() { + return this.ball_id; + } + + public int getBall_left_top_corner_x() { + return this.ball_left_top_corner_x; + } + + public int getBall_left_top_corner_y() { + return this.ball_left_top_corner_y; + } + + public int getBall_left_lower_corner_x() { + return this.ball_left_lower_corner_x; + } + + public int getBall_left_lower_corner_y() { + return this.ball_left_lower_corner_y; + } + + public int getBall_right_top_corner_x() { + return this.ball_right_top_corner_x; + } + + public int getBall_right_top_corner_y() { + return this.ball_right_top_corner_y; + } + + public int getBall_right_lower_corner_x() { + return this.ball_right_lower_corner_x; + } + + public int getBall_right_lower_corner_y() { + return this.ball_right_lower_corner_y; + } + + public int getPreset_inernum() { + return this.preset_inernum; + } + + public double getP() { + return this.p; + } + + public double getT() { + return this.t; + } + + public double getZ() { + return this.z; + } + + public String getCreate_time() { + return this.create_time; + } + + @ConstructorProperties({ "id", "gun_id", "gun_left_top_corner_x", "gun_left_top_corner_y", "gun_left_lower_corner_x", "gun_left_lower_corner_y", "gun_right_top_corner_x", "gun_right_top_corner_y", "gun_right_lower_corner_x", "gun_right_lower_corner_y", "ball_id", "ball_left_top_corner_x", "ball_left_top_corner_y", "ball_left_lower_corner_x", "ball_left_lower_corner_y", "ball_right_top_corner_x", "ball_right_top_corner_y", "ball_right_lower_corner_x", "ball_right_lower_corner_y", "preset_inernum", "p", "t", "z", "create_time" }) + public GunBallLinkage(final int id, final int gun_id, final int gun_left_top_corner_x, final int gun_left_top_corner_y, final int gun_left_lower_corner_x, final int gun_left_lower_corner_y, final int gun_right_top_corner_x, final int gun_right_top_corner_y, final int gun_right_lower_corner_x, final int gun_right_lower_corner_y, final int ball_id, final int ball_left_top_corner_x, final int ball_left_top_corner_y, final int ball_left_lower_corner_x, final int ball_left_lower_corner_y, final int ball_right_top_corner_x, final int ball_right_top_corner_y, final int ball_right_lower_corner_x, final int ball_right_lower_corner_y, final int preset_inernum, final double p, final double t, final double z, final String create_time) { + this.id = id; + this.gun_id = gun_id; + this.gun_left_top_corner_x = gun_left_top_corner_x; + this.gun_left_top_corner_y = gun_left_top_corner_y; + this.gun_left_lower_corner_x = gun_left_lower_corner_x; + this.gun_left_lower_corner_y = gun_left_lower_corner_y; + this.gun_right_top_corner_x = gun_right_top_corner_x; + this.gun_right_top_corner_y = gun_right_top_corner_y; + this.gun_right_lower_corner_x = gun_right_lower_corner_x; + this.gun_right_lower_corner_y = gun_right_lower_corner_y; + this.ball_id = ball_id; + this.ball_left_top_corner_x = ball_left_top_corner_x; + this.ball_left_top_corner_y = ball_left_top_corner_y; + this.ball_left_lower_corner_x = ball_left_lower_corner_x; + this.ball_left_lower_corner_y = ball_left_lower_corner_y; + this.ball_right_top_corner_x = ball_right_top_corner_x; + this.ball_right_top_corner_y = ball_right_top_corner_y; + this.ball_right_lower_corner_x = ball_right_lower_corner_x; + this.ball_right_lower_corner_y = ball_right_lower_corner_y; + this.preset_inernum = preset_inernum; + this.p = p; + this.t = t; + this.z = z; + this.create_time = create_time; + } + + public GunBallLinkage() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/InspectionPolicyInfo.java b/src/main/java/com/zhichenhaixin/sys/model/InspectionPolicyInfo.java new file mode 100644 index 0000000..cc5d0dc --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/InspectionPolicyInfo.java @@ -0,0 +1,127 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class InspectionPolicyInfo implements Serializable +{ + private static final long serialVersionUID = 344837858632517140L; + private int check_plane_id; + private String check_name; + private int switch_time; + private List camera_list; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InspectionPolicyInfo)) { + return false; + } + final InspectionPolicyInfo other = (InspectionPolicyInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getCheck_plane_id() != other.getCheck_plane_id()) { + return false; + } + final Object this$check_name = this.getCheck_name(); + final Object other$check_name = other.getCheck_name(); + Label_0078: { + if (this$check_name == null) { + if (other$check_name == null) { + break Label_0078; + } + } + else if (this$check_name.equals(other$check_name)) { + break Label_0078; + } + return false; + } + if (this.getSwitch_time() != other.getSwitch_time()) { + return false; + } + final Object this$camera_list = this.getCamera_list(); + final Object other$camera_list = other.getCamera_list(); + if (this$camera_list == null) { + if (other$camera_list == null) { + return true; + } + } + else if (this$camera_list.equals(other$camera_list)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof InspectionPolicyInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getCheck_plane_id(); + final Object $check_name = this.getCheck_name(); + result = result * 59 + (($check_name == null) ? 43 : $check_name.hashCode()); + result = result * 59 + this.getSwitch_time(); + final Object $camera_list = this.getCamera_list(); + result = result * 59 + (($camera_list == null) ? 43 : $camera_list.hashCode()); + return result; + } + + @Override + public String toString() { + return "InspectionPolicyInfo(check_plane_id=" + this.getCheck_plane_id() + ", check_name=" + this.getCheck_name() + ", switch_time=" + this.getSwitch_time() + ", camera_list=" + this.getCamera_list() + ")"; + } + + public void setCheck_plane_id(final int check_plane_id) { + this.check_plane_id = check_plane_id; + } + + public void setCheck_name(final String check_name) { + this.check_name = check_name; + } + + public void setSwitch_time(final int switch_time) { + this.switch_time = switch_time; + } + + public void setCamera_list(final List camera_list) { + this.camera_list = camera_list; + } + + public int getCheck_plane_id() { + return this.check_plane_id; + } + + public String getCheck_name() { + return this.check_name; + } + + public int getSwitch_time() { + return this.switch_time; + } + + public List getCamera_list() { + return this.camera_list; + } + + @ConstructorProperties({ "check_plane_id", "check_name", "switch_time", "camera_list" }) + public InspectionPolicyInfo(final int check_plane_id, final String check_name, final int switch_time, final List camera_list) { + this.check_plane_id = check_plane_id; + this.check_name = check_name; + this.switch_time = switch_time; + this.camera_list = camera_list; + } + + public InspectionPolicyInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/LogManagerInfo.java b/src/main/java/com/zhichenhaixin/sys/model/LogManagerInfo.java new file mode 100644 index 0000000..b29f7f9 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/LogManagerInfo.java @@ -0,0 +1,251 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class LogManagerInfo implements Serializable +{ + private static final long serialVersionUID = 5767536120115530386L; + private int id; + private String username; + private String userrealname; + private int cameraid; + private String cameraname; + private String opercontent; + private String opertime; + private String begin_time; + private String end_time; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof LogManagerInfo)) { + return false; + } + final LogManagerInfo other = (LogManagerInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0078: { + if (this$username == null) { + if (other$username == null) { + break Label_0078; + } + } + else if (this$username.equals(other$username)) { + break Label_0078; + } + return false; + } + final Object this$userrealname = this.getUserrealname(); + final Object other$userrealname = other.getUserrealname(); + Label_0115: { + if (this$userrealname == null) { + if (other$userrealname == null) { + break Label_0115; + } + } + else if (this$userrealname.equals(other$userrealname)) { + break Label_0115; + } + return false; + } + if (this.getCameraid() != other.getCameraid()) { + return false; + } + final Object this$cameraname = this.getCameraname(); + final Object other$cameraname = other.getCameraname(); + Label_0165: { + if (this$cameraname == null) { + if (other$cameraname == null) { + break Label_0165; + } + } + else if (this$cameraname.equals(other$cameraname)) { + break Label_0165; + } + return false; + } + final Object this$opercontent = this.getOpercontent(); + final Object other$opercontent = other.getOpercontent(); + Label_0202: { + if (this$opercontent == null) { + if (other$opercontent == null) { + break Label_0202; + } + } + else if (this$opercontent.equals(other$opercontent)) { + break Label_0202; + } + return false; + } + final Object this$opertime = this.getOpertime(); + final Object other$opertime = other.getOpertime(); + Label_0239: { + if (this$opertime == null) { + if (other$opertime == null) { + break Label_0239; + } + } + else if (this$opertime.equals(other$opertime)) { + break Label_0239; + } + return false; + } + final Object this$begin_time = this.getBegin_time(); + final Object other$begin_time = other.getBegin_time(); + Label_0276: { + if (this$begin_time == null) { + if (other$begin_time == null) { + break Label_0276; + } + } + else if (this$begin_time.equals(other$begin_time)) { + break Label_0276; + } + return false; + } + final Object this$end_time = this.getEnd_time(); + final Object other$end_time = other.getEnd_time(); + if (this$end_time == null) { + if (other$end_time == null) { + return true; + } + } + else if (this$end_time.equals(other$end_time)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof LogManagerInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $userrealname = this.getUserrealname(); + result = result * 59 + (($userrealname == null) ? 43 : $userrealname.hashCode()); + result = result * 59 + this.getCameraid(); + final Object $cameraname = this.getCameraname(); + result = result * 59 + (($cameraname == null) ? 43 : $cameraname.hashCode()); + final Object $opercontent = this.getOpercontent(); + result = result * 59 + (($opercontent == null) ? 43 : $opercontent.hashCode()); + final Object $opertime = this.getOpertime(); + result = result * 59 + (($opertime == null) ? 43 : $opertime.hashCode()); + final Object $begin_time = this.getBegin_time(); + result = result * 59 + (($begin_time == null) ? 43 : $begin_time.hashCode()); + final Object $end_time = this.getEnd_time(); + result = result * 59 + (($end_time == null) ? 43 : $end_time.hashCode()); + return result; + } + + @Override + public String toString() { + return "LogManagerInfo(id=" + this.getId() + ", username=" + this.getUsername() + ", userrealname=" + this.getUserrealname() + ", cameraid=" + this.getCameraid() + ", cameraname=" + this.getCameraname() + ", opercontent=" + this.getOpercontent() + ", opertime=" + this.getOpertime() + ", begin_time=" + this.getBegin_time() + ", end_time=" + this.getEnd_time() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setUserrealname(final String userrealname) { + this.userrealname = userrealname; + } + + public void setCameraid(final int cameraid) { + this.cameraid = cameraid; + } + + public void setCameraname(final String cameraname) { + this.cameraname = cameraname; + } + + public void setOpercontent(final String opercontent) { + this.opercontent = opercontent; + } + + public void setOpertime(final String opertime) { + this.opertime = opertime; + } + + public void setBegin_time(final String begin_time) { + this.begin_time = begin_time; + } + + public void setEnd_time(final String end_time) { + this.end_time = end_time; + } + + public int getId() { + return this.id; + } + + public String getUsername() { + return this.username; + } + + public String getUserrealname() { + return this.userrealname; + } + + public int getCameraid() { + return this.cameraid; + } + + public String getCameraname() { + return this.cameraname; + } + + public String getOpercontent() { + return this.opercontent; + } + + public String getOpertime() { + return this.opertime; + } + + public String getBegin_time() { + return this.begin_time; + } + + public String getEnd_time() { + return this.end_time; + } + + @ConstructorProperties({ "id", "username", "userrealname", "cameraid", "cameraname", "opercontent", "opertime", "begin_time", "end_time" }) + public LogManagerInfo(final int id, final String username, final String userrealname, final int cameraid, final String cameraname, final String opercontent, final String opertime, final String begin_time, final String end_time) { + this.id = id; + this.username = username; + this.userrealname = userrealname; + this.cameraid = cameraid; + this.cameraname = cameraname; + this.opercontent = opercontent; + this.opertime = opertime; + this.begin_time = begin_time; + this.end_time = end_time; + } + + public LogManagerInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/MatrixCameraInfo.java b/src/main/java/com/zhichenhaixin/sys/model/MatrixCameraInfo.java new file mode 100644 index 0000000..aba4b2e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/MatrixCameraInfo.java @@ -0,0 +1,276 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class MatrixCameraInfo implements Serializable +{ + private static final long serialVersionUID = -8629305465407269166L; + private int id; + private int cameraid; + private int screenid; + private String name; + private String ip; + private int port; + private String username; + private String password; + private String screenip; + private String screenport; + private int channelid; + private int dome; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MatrixCameraInfo)) { + return false; + } + final MatrixCameraInfo other = (MatrixCameraInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getCameraid() != other.getCameraid()) { + return false; + } + if (this.getScreenid() != other.getScreenid()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0104: { + if (this$name == null) { + if (other$name == null) { + break Label_0104; + } + } + else if (this$name.equals(other$name)) { + break Label_0104; + } + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0141: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0141; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0141; + } + return false; + } + if (this.getPort() != other.getPort()) { + return false; + } + final Object this$username = this.getUsername(); + final Object other$username = other.getUsername(); + Label_0191: { + if (this$username == null) { + if (other$username == null) { + break Label_0191; + } + } + else if (this$username.equals(other$username)) { + break Label_0191; + } + return false; + } + final Object this$password = this.getPassword(); + final Object other$password = other.getPassword(); + Label_0228: { + if (this$password == null) { + if (other$password == null) { + break Label_0228; + } + } + else if (this$password.equals(other$password)) { + break Label_0228; + } + return false; + } + final Object this$screenip = this.getScreenip(); + final Object other$screenip = other.getScreenip(); + Label_0265: { + if (this$screenip == null) { + if (other$screenip == null) { + break Label_0265; + } + } + else if (this$screenip.equals(other$screenip)) { + break Label_0265; + } + return false; + } + final Object this$screenport = this.getScreenport(); + final Object other$screenport = other.getScreenport(); + if (this$screenport == null) { + if (other$screenport == null) { + return this.getChannelid() == other.getChannelid() && this.getDome() == other.getDome(); + } + } + else if (this$screenport.equals(other$screenport)) { + return this.getChannelid() == other.getChannelid() && this.getDome() == other.getDome(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof MatrixCameraInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getCameraid(); + result = result * 59 + this.getScreenid(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + result = result * 59 + this.getPort(); + final Object $username = this.getUsername(); + result = result * 59 + (($username == null) ? 43 : $username.hashCode()); + final Object $password = this.getPassword(); + result = result * 59 + (($password == null) ? 43 : $password.hashCode()); + final Object $screenip = this.getScreenip(); + result = result * 59 + (($screenip == null) ? 43 : $screenip.hashCode()); + final Object $screenport = this.getScreenport(); + result = result * 59 + (($screenport == null) ? 43 : $screenport.hashCode()); + result = result * 59 + this.getChannelid(); + result = result * 59 + this.getDome(); + return result; + } + + @Override + public String toString() { + return "MatrixCameraInfo(id=" + this.getId() + ", cameraid=" + this.getCameraid() + ", screenid=" + this.getScreenid() + ", name=" + this.getName() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", screenip=" + this.getScreenip() + ", screenport=" + this.getScreenport() + ", channelid=" + this.getChannelid() + ", dome=" + this.getDome() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setCameraid(final int cameraid) { + this.cameraid = cameraid; + } + + public void setScreenid(final int screenid) { + this.screenid = screenid; + } + + public void setName(final String name) { + this.name = name; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final int port) { + this.port = port; + } + + public void setUsername(final String username) { + this.username = username; + } + + public void setPassword(final String password) { + this.password = password; + } + + public void setScreenip(final String screenip) { + this.screenip = screenip; + } + + public void setScreenport(final String screenport) { + this.screenport = screenport; + } + + public void setChannelid(final int channelid) { + this.channelid = channelid; + } + + public void setDome(final int dome) { + this.dome = dome; + } + + public int getId() { + return this.id; + } + + public int getCameraid() { + return this.cameraid; + } + + public int getScreenid() { + return this.screenid; + } + + public String getName() { + return this.name; + } + + public String getIp() { + return this.ip; + } + + public int getPort() { + return this.port; + } + + public String getUsername() { + return this.username; + } + + public String getPassword() { + return this.password; + } + + public String getScreenip() { + return this.screenip; + } + + public String getScreenport() { + return this.screenport; + } + + public int getChannelid() { + return this.channelid; + } + + public int getDome() { + return this.dome; + } + + @ConstructorProperties({ "id", "cameraid", "screenid", "name", "ip", "port", "username", "password", "screenip", "screenport", "channelid", "dome" }) + public MatrixCameraInfo(final int id, final int cameraid, final int screenid, final String name, final String ip, final int port, final String username, final String password, final String screenip, final String screenport, final int channelid, final int dome) { + this.id = id; + this.cameraid = cameraid; + this.screenid = screenid; + this.name = name; + this.ip = ip; + this.port = port; + this.username = username; + this.password = password; + this.screenip = screenip; + this.screenport = screenport; + this.channelid = channelid; + this.dome = dome; + } + + public MatrixCameraInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/MediaServerVo.java b/src/main/java/com/zhichenhaixin/sys/model/MediaServerVo.java new file mode 100644 index 0000000..9e8ddec --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/MediaServerVo.java @@ -0,0 +1,113 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class MediaServerVo implements Serializable +{ + private static final long serialVersionUID = -6172436558900650246L; + private String mediaIp; + private int mediaPort; + private List cameraList; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MediaServerVo)) { + return false; + } + final MediaServerVo other = (MediaServerVo)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$mediaIp = this.getMediaIp(); + final Object other$mediaIp = other.getMediaIp(); + Label_0065: { + if (this$mediaIp == null) { + if (other$mediaIp == null) { + break Label_0065; + } + } + else if (this$mediaIp.equals(other$mediaIp)) { + break Label_0065; + } + return false; + } + if (this.getMediaPort() != other.getMediaPort()) { + return false; + } + final Object this$cameraList = this.getCameraList(); + final Object other$cameraList = other.getCameraList(); + if (this$cameraList == null) { + if (other$cameraList == null) { + return true; + } + } + else if (this$cameraList.equals(other$cameraList)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof MediaServerVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $mediaIp = this.getMediaIp(); + result = result * 59 + (($mediaIp == null) ? 43 : $mediaIp.hashCode()); + result = result * 59 + this.getMediaPort(); + final Object $cameraList = this.getCameraList(); + result = result * 59 + (($cameraList == null) ? 43 : $cameraList.hashCode()); + return result; + } + + @Override + public String toString() { + return "MediaServerVo(mediaIp=" + this.getMediaIp() + ", mediaPort=" + this.getMediaPort() + ", cameraList=" + this.getCameraList() + ")"; + } + + public void setMediaIp(final String mediaIp) { + this.mediaIp = mediaIp; + } + + public void setMediaPort(final int mediaPort) { + this.mediaPort = mediaPort; + } + + public void setCameraList(final List cameraList) { + this.cameraList = cameraList; + } + + public String getMediaIp() { + return this.mediaIp; + } + + public int getMediaPort() { + return this.mediaPort; + } + + public List getCameraList() { + return this.cameraList; + } + + @ConstructorProperties({ "mediaIp", "mediaPort", "cameraList" }) + public MediaServerVo(final String mediaIp, final int mediaPort, final List cameraList) { + this.mediaIp = mediaIp; + this.mediaPort = mediaPort; + this.cameraList = cameraList; + } + + public MediaServerVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/MediaXideweiListVo.java b/src/main/java/com/zhichenhaixin/sys/model/MediaXideweiListVo.java new file mode 100644 index 0000000..5bc9caf --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/MediaXideweiListVo.java @@ -0,0 +1,99 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class MediaXideweiListVo implements Serializable +{ + private static final long serialVersionUID = -1843173553429255588L; + private List xideweiVoList; + private List MediaVoList; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MediaXideweiListVo)) { + return false; + } + final MediaXideweiListVo other = (MediaXideweiListVo)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$xideweiVoList = this.getXideweiVoList(); + final Object other$xideweiVoList = other.getXideweiVoList(); + Label_0065: { + if (this$xideweiVoList == null) { + if (other$xideweiVoList == null) { + break Label_0065; + } + } + else if (this$xideweiVoList.equals(other$xideweiVoList)) { + break Label_0065; + } + return false; + } + final Object this$MediaVoList = this.getMediaVoList(); + final Object other$MediaVoList = other.getMediaVoList(); + if (this$MediaVoList == null) { + if (other$MediaVoList == null) { + return true; + } + } + else if (this$MediaVoList.equals(other$MediaVoList)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof MediaXideweiListVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $xideweiVoList = this.getXideweiVoList(); + result = result * 59 + (($xideweiVoList == null) ? 43 : $xideweiVoList.hashCode()); + final Object $MediaVoList = this.getMediaVoList(); + result = result * 59 + (($MediaVoList == null) ? 43 : $MediaVoList.hashCode()); + return result; + } + + @Override + public String toString() { + return "MediaXideweiListVo(xideweiVoList=" + this.getXideweiVoList() + ", MediaVoList=" + this.getMediaVoList() + ")"; + } + + public void setXideweiVoList(final List xideweiVoList) { + this.xideweiVoList = xideweiVoList; + } + + public void setMediaVoList(final List MediaVoList) { + this.MediaVoList = MediaVoList; + } + + public List getXideweiVoList() { + return this.xideweiVoList; + } + + public List getMediaVoList() { + return this.MediaVoList; + } + + @ConstructorProperties({ "xideweiVoList", "MediaVoList" }) + public MediaXideweiListVo(final List xideweiVoList, final List MediaVoList) { + this.xideweiVoList = xideweiVoList; + this.MediaVoList = MediaVoList; + } + + public MediaXideweiListVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/NightModeVo.java b/src/main/java/com/zhichenhaixin/sys/model/NightModeVo.java new file mode 100644 index 0000000..1e54cd7 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/NightModeVo.java @@ -0,0 +1,126 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class NightModeVo implements Serializable +{ + private static final long serialVersionUID = -5445813449984000566L; + private int id; + private int is_open; + private String start_time; + private String end_time; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NightModeVo)) { + return false; + } + final NightModeVo other = (NightModeVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getIs_open() != other.getIs_open()) { + return false; + } + final Object this$start_time = this.getStart_time(); + final Object other$start_time = other.getStart_time(); + Label_0091: { + if (this$start_time == null) { + if (other$start_time == null) { + break Label_0091; + } + } + else if (this$start_time.equals(other$start_time)) { + break Label_0091; + } + return false; + } + final Object this$end_time = this.getEnd_time(); + final Object other$end_time = other.getEnd_time(); + if (this$end_time == null) { + if (other$end_time == null) { + return true; + } + } + else if (this$end_time.equals(other$end_time)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof NightModeVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getIs_open(); + final Object $start_time = this.getStart_time(); + result = result * 59 + (($start_time == null) ? 43 : $start_time.hashCode()); + final Object $end_time = this.getEnd_time(); + result = result * 59 + (($end_time == null) ? 43 : $end_time.hashCode()); + return result; + } + + @Override + public String toString() { + return "NightModeVo(id=" + this.getId() + ", is_open=" + this.getIs_open() + ", start_time=" + this.getStart_time() + ", end_time=" + this.getEnd_time() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setIs_open(final int is_open) { + this.is_open = is_open; + } + + public void setStart_time(final String start_time) { + this.start_time = start_time; + } + + public void setEnd_time(final String end_time) { + this.end_time = end_time; + } + + public int getId() { + return this.id; + } + + public int getIs_open() { + return this.is_open; + } + + public String getStart_time() { + return this.start_time; + } + + public String getEnd_time() { + return this.end_time; + } + + @ConstructorProperties({ "id", "is_open", "start_time", "end_time" }) + public NightModeVo(final int id, final int is_open, final String start_time, final String end_time) { + this.id = id; + this.is_open = is_open; + this.start_time = start_time; + this.end_time = end_time; + } + + public NightModeVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/PosMarkData.java b/src/main/java/com/zhichenhaixin/sys/model/PosMarkData.java new file mode 100644 index 0000000..f2a8168 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/PosMarkData.java @@ -0,0 +1,142 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class PosMarkData implements Serializable +{ + private static final long serialVersionUID = -7653670550461345416L; + private int id; + private double lat; + private double lon; + private String name; + private String mark; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PosMarkData)) { + return false; + } + final PosMarkData other = (PosMarkData)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (Double.compare(this.getLat(), other.getLat()) != 0) { + return false; + } + if (Double.compare(this.getLon(), other.getLon()) != 0) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0110: { + if (this$name == null) { + if (other$name == null) { + break Label_0110; + } + } + else if (this$name.equals(other$name)) { + break Label_0110; + } + return false; + } + final Object this$mark = this.getMark(); + final Object other$mark = other.getMark(); + if (this$mark == null) { + if (other$mark == null) { + return true; + } + } + else if (this$mark.equals(other$mark)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof PosMarkData; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final Object $mark = this.getMark(); + result = result * 59 + (($mark == null) ? 43 : $mark.hashCode()); + return result; + } + + @Override + public String toString() { + return "PosMarkData(id=" + this.getId() + ", lat=" + this.getLat() + ", lon=" + this.getLon() + ", name=" + this.getName() + ", mark=" + this.getMark() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setName(final String name) { + this.name = name; + } + + public void setMark(final String mark) { + this.mark = mark; + } + + public int getId() { + return this.id; + } + + public double getLat() { + return this.lat; + } + + public double getLon() { + return this.lon; + } + + public String getName() { + return this.name; + } + + public String getMark() { + return this.mark; + } + + @ConstructorProperties({ "id", "lat", "lon", "name", "mark" }) + public PosMarkData(final int id, final double lat, final double lon, final String name, final String mark) { + this.id = id; + this.lat = lat; + this.lon = lon; + this.name = name; + this.mark = mark; + } + + public PosMarkData() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/RadarPatrolList.java b/src/main/java/com/zhichenhaixin/sys/model/RadarPatrolList.java new file mode 100644 index 0000000..156cf05 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/RadarPatrolList.java @@ -0,0 +1,99 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class RadarPatrolList implements Serializable +{ + private static final long serialVersionUID = 5596713807049616358L; + private List radar_list; + private List patrol_list; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RadarPatrolList)) { + return false; + } + final RadarPatrolList other = (RadarPatrolList)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$radar_list = this.getRadar_list(); + final Object other$radar_list = other.getRadar_list(); + Label_0065: { + if (this$radar_list == null) { + if (other$radar_list == null) { + break Label_0065; + } + } + else if (this$radar_list.equals(other$radar_list)) { + break Label_0065; + } + return false; + } + final Object this$patrol_list = this.getPatrol_list(); + final Object other$patrol_list = other.getPatrol_list(); + if (this$patrol_list == null) { + if (other$patrol_list == null) { + return true; + } + } + else if (this$patrol_list.equals(other$patrol_list)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof RadarPatrolList; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $radar_list = this.getRadar_list(); + result = result * 59 + (($radar_list == null) ? 43 : $radar_list.hashCode()); + final Object $patrol_list = this.getPatrol_list(); + result = result * 59 + (($patrol_list == null) ? 43 : $patrol_list.hashCode()); + return result; + } + + @Override + public String toString() { + return "RadarPatrolList(radar_list=" + this.getRadar_list() + ", patrol_list=" + this.getPatrol_list() + ")"; + } + + public void setRadar_list(final List radar_list) { + this.radar_list = radar_list; + } + + public void setPatrol_list(final List patrol_list) { + this.patrol_list = patrol_list; + } + + public List getRadar_list() { + return this.radar_list; + } + + public List getPatrol_list() { + return this.patrol_list; + } + + @ConstructorProperties({ "radar_list", "patrol_list" }) + public RadarPatrolList(final List radar_list, final List patrol_list) { + this.radar_list = radar_list; + this.patrol_list = patrol_list; + } + + public RadarPatrolList() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/RadarPatrolVo.java b/src/main/java/com/zhichenhaixin/sys/model/RadarPatrolVo.java new file mode 100644 index 0000000..8aeff2e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/RadarPatrolVo.java @@ -0,0 +1,136 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class RadarPatrolVo implements Serializable +{ + private static final long serialVersionUID = 6399960334038736997L; + private int id; + private String sbid; + private String name; + private double lon; + private double lat; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RadarPatrolVo)) { + return false; + } + final RadarPatrolVo other = (RadarPatrolVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$sbid = this.getSbid(); + final Object other$sbid = other.getSbid(); + Label_0078: { + if (this$sbid == null) { + if (other$sbid == null) { + break Label_0078; + } + } + else if (this$sbid.equals(other$sbid)) { + break Label_0078; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null) { + if (other$name == null) { + return Double.compare(this.getLon(), other.getLon()) == 0 && Double.compare(this.getLat(), other.getLat()) == 0; + } + } + else if (this$name.equals(other$name)) { + return Double.compare(this.getLon(), other.getLon()) == 0 && Double.compare(this.getLat(), other.getLat()) == 0; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof RadarPatrolVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $sbid = this.getSbid(); + result = result * 59 + (($sbid == null) ? 43 : $sbid.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + return result; + } + + @Override + public String toString() { + return "RadarPatrolVo(id=" + this.getId() + ", sbid=" + this.getSbid() + ", name=" + this.getName() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setSbid(final String sbid) { + this.sbid = sbid; + } + + public void setName(final String name) { + this.name = name; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public int getId() { + return this.id; + } + + public String getSbid() { + return this.sbid; + } + + public String getName() { + return this.name; + } + + public double getLon() { + return this.lon; + } + + public double getLat() { + return this.lat; + } + + @ConstructorProperties({ "id", "sbid", "name", "lon", "lat" }) + public RadarPatrolVo(final int id, final String sbid, final String name, final double lon, final double lat) { + this.id = id; + this.sbid = sbid; + this.name = name; + this.lon = lon; + this.lat = lat; + } + + public RadarPatrolVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/ResVo.java b/src/main/java/com/zhichenhaixin/sys/model/ResVo.java new file mode 100644 index 0000000..078fc4f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/ResVo.java @@ -0,0 +1,59 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class ResVo implements Serializable +{ + private static final long serialVersionUID = -6394109949932343705L; + private int code; + private String msg; + private Object data; + + public void setCode(final int code) { + this.code = code; + } + + public void setMsg(final String msg) { + this.msg = msg; + } + + public void setData(final Object data) { + this.data = data; + } + + public int getCode() { + return this.code; + } + + public String getMsg() { + return this.msg; + } + + public Object getData() { + return this.data; + } + + @ConstructorProperties({ "code", "msg", "data" }) + public ResVo(final int code, final String msg, final Object data) { + this.code = 1000; + this.msg = "\u6210\u529f"; + this.code = code; + this.msg = msg; + this.data = data; + } + + public ResVo() { + this.code = 1000; + this.msg = "\u6210\u529f"; + } + + @Override + public String toString() { + return "ResVo(code=" + this.getCode() + ", msg=" + this.getMsg() + ", data=" + this.getData() + ")"; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/RoleVo.java b/src/main/java/com/zhichenhaixin/sys/model/RoleVo.java new file mode 100644 index 0000000..20218f2 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/RoleVo.java @@ -0,0 +1,163 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class RoleVo implements Serializable +{ + private static final long serialVersionUID = 5467491075054815001L; + private int role_id; + private String role_name; + private String role_desc; + private List role_fun_list; + private List role_camera_list; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RoleVo)) { + return false; + } + final RoleVo other = (RoleVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getRole_id() != other.getRole_id()) { + return false; + } + final Object this$role_name = this.getRole_name(); + final Object other$role_name = other.getRole_name(); + Label_0078: { + if (this$role_name == null) { + if (other$role_name == null) { + break Label_0078; + } + } + else if (this$role_name.equals(other$role_name)) { + break Label_0078; + } + return false; + } + final Object this$role_desc = this.getRole_desc(); + final Object other$role_desc = other.getRole_desc(); + Label_0115: { + if (this$role_desc == null) { + if (other$role_desc == null) { + break Label_0115; + } + } + else if (this$role_desc.equals(other$role_desc)) { + break Label_0115; + } + return false; + } + final Object this$role_fun_list = this.getRole_fun_list(); + final Object other$role_fun_list = other.getRole_fun_list(); + Label_0152: { + if (this$role_fun_list == null) { + if (other$role_fun_list == null) { + break Label_0152; + } + } + else if (this$role_fun_list.equals(other$role_fun_list)) { + break Label_0152; + } + return false; + } + final Object this$role_camera_list = this.getRole_camera_list(); + final Object other$role_camera_list = other.getRole_camera_list(); + if (this$role_camera_list == null) { + if (other$role_camera_list == null) { + return true; + } + } + else if (this$role_camera_list.equals(other$role_camera_list)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof RoleVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getRole_id(); + final Object $role_name = this.getRole_name(); + result = result * 59 + (($role_name == null) ? 43 : $role_name.hashCode()); + final Object $role_desc = this.getRole_desc(); + result = result * 59 + (($role_desc == null) ? 43 : $role_desc.hashCode()); + final Object $role_fun_list = this.getRole_fun_list(); + result = result * 59 + (($role_fun_list == null) ? 43 : $role_fun_list.hashCode()); + final Object $role_camera_list = this.getRole_camera_list(); + result = result * 59 + (($role_camera_list == null) ? 43 : $role_camera_list.hashCode()); + return result; + } + + @Override + public String toString() { + return "RoleVo(role_id=" + this.getRole_id() + ", role_name=" + this.getRole_name() + ", role_desc=" + this.getRole_desc() + ", role_fun_list=" + this.getRole_fun_list() + ", role_camera_list=" + this.getRole_camera_list() + ")"; + } + + public void setRole_id(final int role_id) { + this.role_id = role_id; + } + + public void setRole_name(final String role_name) { + this.role_name = role_name; + } + + public void setRole_desc(final String role_desc) { + this.role_desc = role_desc; + } + + public void setRole_fun_list(final List role_fun_list) { + this.role_fun_list = role_fun_list; + } + + public void setRole_camera_list(final List role_camera_list) { + this.role_camera_list = role_camera_list; + } + + public int getRole_id() { + return this.role_id; + } + + public String getRole_name() { + return this.role_name; + } + + public String getRole_desc() { + return this.role_desc; + } + + public List getRole_fun_list() { + return this.role_fun_list; + } + + public List getRole_camera_list() { + return this.role_camera_list; + } + + @ConstructorProperties({ "role_id", "role_name", "role_desc", "role_fun_list", "role_camera_list" }) + public RoleVo(final int role_id, final String role_name, final String role_desc, final List role_fun_list, final List role_camera_list) { + this.role_id = role_id; + this.role_name = role_name; + this.role_desc = role_desc; + this.role_fun_list = role_fun_list; + this.role_camera_list = role_camera_list; + } + + public RoleVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/SmuggleVo.java b/src/main/java/com/zhichenhaixin/sys/model/SmuggleVo.java new file mode 100644 index 0000000..943f131 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/SmuggleVo.java @@ -0,0 +1,114 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class SmuggleVo implements Serializable +{ + private static final long serialVersionUID = 6058705429896308535L; + private int id; + private int startup; + private int smuggle_bound; + private int people_num; + private int car_num; + private int ship_num; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SmuggleVo)) { + return false; + } + final SmuggleVo other = (SmuggleVo)o; + return other.canEqual(this) && this.getId() == other.getId() && this.getStartup() == other.getStartup() && this.getSmuggle_bound() == other.getSmuggle_bound() && this.getPeople_num() == other.getPeople_num() && this.getCar_num() == other.getCar_num() && this.getShip_num() == other.getShip_num(); + } + + protected boolean canEqual(final Object other) { + return other instanceof SmuggleVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getStartup(); + result = result * 59 + this.getSmuggle_bound(); + result = result * 59 + this.getPeople_num(); + result = result * 59 + this.getCar_num(); + result = result * 59 + this.getShip_num(); + return result; + } + + @Override + public String toString() { + return "SmuggleVo(id=" + this.getId() + ", startup=" + this.getStartup() + ", smuggle_bound=" + this.getSmuggle_bound() + ", people_num=" + this.getPeople_num() + ", car_num=" + this.getCar_num() + ", ship_num=" + this.getShip_num() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setStartup(final int startup) { + this.startup = startup; + } + + public void setSmuggle_bound(final int smuggle_bound) { + this.smuggle_bound = smuggle_bound; + } + + public void setPeople_num(final int people_num) { + this.people_num = people_num; + } + + public void setCar_num(final int car_num) { + this.car_num = car_num; + } + + public void setShip_num(final int ship_num) { + this.ship_num = ship_num; + } + + public int getId() { + return this.id; + } + + public int getStartup() { + return this.startup; + } + + public int getSmuggle_bound() { + return this.smuggle_bound; + } + + public int getPeople_num() { + return this.people_num; + } + + public int getCar_num() { + return this.car_num; + } + + public int getShip_num() { + return this.ship_num; + } + + @ConstructorProperties({ "id", "startup", "smuggle_bound", "people_num", "car_num", "ship_num" }) + public SmuggleVo(final int id, final int startup, final int smuggle_bound, final int people_num, final int car_num, final int ship_num) { + this.id = id; + this.startup = startup; + this.smuggle_bound = smuggle_bound; + this.people_num = people_num; + this.car_num = car_num; + this.ship_num = ship_num; + } + + public SmuggleVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/SurLineInfo.java b/src/main/java/com/zhichenhaixin/sys/model/SurLineInfo.java new file mode 100644 index 0000000..d33f624 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/SurLineInfo.java @@ -0,0 +1,254 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class SurLineInfo implements Serializable +{ + private static final long serialVersionUID = -6916875552440165463L; + private int id; + private String name; + private int extrapolate; + private String lon_lats; + private int warn_flash; + private int sign_window; + private int warn_voice; + private int show_mv; + private String warn_color; + private String tts; + private int warnNum; + private int surline_number; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SurLineInfo)) { + return false; + } + final SurLineInfo other = (SurLineInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + Label_0078: { + if (this$name == null) { + if (other$name == null) { + break Label_0078; + } + } + else if (this$name.equals(other$name)) { + break Label_0078; + } + return false; + } + if (this.getExtrapolate() != other.getExtrapolate()) { + return false; + } + final Object this$lon_lats = this.getLon_lats(); + final Object other$lon_lats = other.getLon_lats(); + Label_0128: { + if (this$lon_lats == null) { + if (other$lon_lats == null) { + break Label_0128; + } + } + else if (this$lon_lats.equals(other$lon_lats)) { + break Label_0128; + } + return false; + } + if (this.getWarn_flash() != other.getWarn_flash()) { + return false; + } + if (this.getSign_window() != other.getSign_window()) { + return false; + } + if (this.getWarn_voice() != other.getWarn_voice()) { + return false; + } + if (this.getShow_mv() != other.getShow_mv()) { + return false; + } + final Object this$warn_color = this.getWarn_color(); + final Object other$warn_color = other.getWarn_color(); + Label_0217: { + if (this$warn_color == null) { + if (other$warn_color == null) { + break Label_0217; + } + } + else if (this$warn_color.equals(other$warn_color)) { + break Label_0217; + } + return false; + } + final Object this$tts = this.getTts(); + final Object other$tts = other.getTts(); + if (this$tts == null) { + if (other$tts == null) { + return this.getWarnNum() == other.getWarnNum() && this.getSurline_number() == other.getSurline_number(); + } + } + else if (this$tts.equals(other$tts)) { + return this.getWarnNum() == other.getWarnNum() && this.getSurline_number() == other.getSurline_number(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof SurLineInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + result = result * 59 + this.getExtrapolate(); + final Object $lon_lats = this.getLon_lats(); + result = result * 59 + (($lon_lats == null) ? 43 : $lon_lats.hashCode()); + result = result * 59 + this.getWarn_flash(); + result = result * 59 + this.getSign_window(); + result = result * 59 + this.getWarn_voice(); + result = result * 59 + this.getShow_mv(); + final Object $warn_color = this.getWarn_color(); + result = result * 59 + (($warn_color == null) ? 43 : $warn_color.hashCode()); + final Object $tts = this.getTts(); + result = result * 59 + (($tts == null) ? 43 : $tts.hashCode()); + result = result * 59 + this.getWarnNum(); + result = result * 59 + this.getSurline_number(); + return result; + } + + @Override + public String toString() { + return "SurLineInfo(id=" + this.getId() + ", name=" + this.getName() + ", extrapolate=" + this.getExtrapolate() + ", lon_lats=" + this.getLon_lats() + ", warn_flash=" + this.getWarn_flash() + ", sign_window=" + this.getSign_window() + ", warn_voice=" + this.getWarn_voice() + ", show_mv=" + this.getShow_mv() + ", warn_color=" + this.getWarn_color() + ", tts=" + this.getTts() + ", warnNum=" + this.getWarnNum() + ", surline_number=" + this.getSurline_number() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setExtrapolate(final int extrapolate) { + this.extrapolate = extrapolate; + } + + public void setLon_lats(final String lon_lats) { + this.lon_lats = lon_lats; + } + + public void setWarn_flash(final int warn_flash) { + this.warn_flash = warn_flash; + } + + public void setSign_window(final int sign_window) { + this.sign_window = sign_window; + } + + public void setWarn_voice(final int warn_voice) { + this.warn_voice = warn_voice; + } + + public void setShow_mv(final int show_mv) { + this.show_mv = show_mv; + } + + public void setWarn_color(final String warn_color) { + this.warn_color = warn_color; + } + + public void setTts(final String tts) { + this.tts = tts; + } + + public void setWarnNum(final int warnNum) { + this.warnNum = warnNum; + } + + public void setSurline_number(final int surline_number) { + this.surline_number = surline_number; + } + + public int getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public int getExtrapolate() { + return this.extrapolate; + } + + public String getLon_lats() { + return this.lon_lats; + } + + public int getWarn_flash() { + return this.warn_flash; + } + + public int getSign_window() { + return this.sign_window; + } + + public int getWarn_voice() { + return this.warn_voice; + } + + public int getShow_mv() { + return this.show_mv; + } + + public String getWarn_color() { + return this.warn_color; + } + + public String getTts() { + return this.tts; + } + + public int getWarnNum() { + return this.warnNum; + } + + public int getSurline_number() { + return this.surline_number; + } + + @ConstructorProperties({ "id", "name", "extrapolate", "lon_lats", "warn_flash", "sign_window", "warn_voice", "show_mv", "warn_color", "tts", "warnNum", "surline_number" }) + public SurLineInfo(final int id, final String name, final int extrapolate, final String lon_lats, final int warn_flash, final int sign_window, final int warn_voice, final int show_mv, final String warn_color, final String tts, final int warnNum, final int surline_number) { + this.id = id; + this.name = name; + this.extrapolate = extrapolate; + this.lon_lats = lon_lats; + this.warn_flash = warn_flash; + this.sign_window = sign_window; + this.warn_voice = warn_voice; + this.show_mv = show_mv; + this.warn_color = warn_color; + this.tts = tts; + this.warnNum = warnNum; + this.surline_number = surline_number; + } + + public SurLineInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/THqCamera2.java b/src/main/java/com/zhichenhaixin/sys/model/THqCamera2.java new file mode 100644 index 0000000..d2edfd7 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/THqCamera2.java @@ -0,0 +1,137 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class THqCamera2 implements Serializable +{ + private static final long serialVersionUID = 1L; + private int camera_id; + private int defence_id; + private String camera_ip; + private String camera_name; + private int defence_camwon_id; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof THqCamera2)) { + return false; + } + final THqCamera2 other = (THqCamera2)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getCamera_id() != other.getCamera_id()) { + return false; + } + if (this.getDefence_id() != other.getDefence_id()) { + return false; + } + final Object this$camera_ip = this.getCamera_ip(); + final Object other$camera_ip = other.getCamera_ip(); + Label_0091: { + if (this$camera_ip == null) { + if (other$camera_ip == null) { + break Label_0091; + } + } + else if (this$camera_ip.equals(other$camera_ip)) { + break Label_0091; + } + return false; + } + final Object this$camera_name = this.getCamera_name(); + final Object other$camera_name = other.getCamera_name(); + if (this$camera_name == null) { + if (other$camera_name == null) { + return this.getDefence_camwon_id() == other.getDefence_camwon_id(); + } + } + else if (this$camera_name.equals(other$camera_name)) { + return this.getDefence_camwon_id() == other.getDefence_camwon_id(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof THqCamera2; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getCamera_id(); + result = result * 59 + this.getDefence_id(); + final Object $camera_ip = this.getCamera_ip(); + result = result * 59 + (($camera_ip == null) ? 43 : $camera_ip.hashCode()); + final Object $camera_name = this.getCamera_name(); + result = result * 59 + (($camera_name == null) ? 43 : $camera_name.hashCode()); + result = result * 59 + this.getDefence_camwon_id(); + return result; + } + + @Override + public String toString() { + return "THqCamera2(camera_id=" + this.getCamera_id() + ", defence_id=" + this.getDefence_id() + ", camera_ip=" + this.getCamera_ip() + ", camera_name=" + this.getCamera_name() + ", defence_camwon_id=" + this.getDefence_camwon_id() + ")"; + } + + public void setCamera_id(final int camera_id) { + this.camera_id = camera_id; + } + + public void setDefence_id(final int defence_id) { + this.defence_id = defence_id; + } + + public void setCamera_ip(final String camera_ip) { + this.camera_ip = camera_ip; + } + + public void setCamera_name(final String camera_name) { + this.camera_name = camera_name; + } + + public void setDefence_camwon_id(final int defence_camwon_id) { + this.defence_camwon_id = defence_camwon_id; + } + + public int getCamera_id() { + return this.camera_id; + } + + public int getDefence_id() { + return this.defence_id; + } + + public String getCamera_ip() { + return this.camera_ip; + } + + public String getCamera_name() { + return this.camera_name; + } + + public int getDefence_camwon_id() { + return this.defence_camwon_id; + } + + @ConstructorProperties({ "camera_id", "defence_id", "camera_ip", "camera_name", "defence_camwon_id" }) + public THqCamera2(final int camera_id, final int defence_id, final String camera_ip, final String camera_name, final int defence_camwon_id) { + this.camera_id = camera_id; + this.defence_id = defence_id; + this.camera_ip = camera_ip; + this.camera_name = camera_name; + this.defence_camwon_id = defence_camwon_id; + } + + public THqCamera2() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/Targit.java b/src/main/java/com/zhichenhaixin/sys/model/Targit.java new file mode 100644 index 0000000..91d8e9a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/Targit.java @@ -0,0 +1,143 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class Targit implements Serializable +{ + private static final long serialVersionUID = -1059436727846367810L; + private int bEnable; + private long nTime; + private double nPtx; + private double nPty; + private double nWidth; + private double nHeight; + private double nLon; + private double nLat; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Targit)) { + return false; + } + final Targit other = (Targit)o; + return other.canEqual(this) && this.getBEnable() == other.getBEnable() && this.getNTime() == other.getNTime() && Double.compare(this.getNPtx(), other.getNPtx()) == 0 && Double.compare(this.getNPty(), other.getNPty()) == 0 && Double.compare(this.getNWidth(), other.getNWidth()) == 0 && Double.compare(this.getNHeight(), other.getNHeight()) == 0 && Double.compare(this.getNLon(), other.getNLon()) == 0 && Double.compare(this.getNLat(), other.getNLat()) == 0; + } + + protected boolean canEqual(final Object other) { + return other instanceof Targit; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getBEnable(); + final long $nTime = this.getNTime(); + result = result * 59 + (int)($nTime ^ $nTime >>> 32); + final long $nPtx = Double.doubleToLongBits(this.getNPtx()); + result = result * 59 + (int)($nPtx ^ $nPtx >>> 32); + final long $nPty = Double.doubleToLongBits(this.getNPty()); + result = result * 59 + (int)($nPty ^ $nPty >>> 32); + final long $nWidth = Double.doubleToLongBits(this.getNWidth()); + result = result * 59 + (int)($nWidth ^ $nWidth >>> 32); + final long $nHeight = Double.doubleToLongBits(this.getNHeight()); + result = result * 59 + (int)($nHeight ^ $nHeight >>> 32); + final long $nLon = Double.doubleToLongBits(this.getNLon()); + result = result * 59 + (int)($nLon ^ $nLon >>> 32); + final long $nLat = Double.doubleToLongBits(this.getNLat()); + result = result * 59 + (int)($nLat ^ $nLat >>> 32); + return result; + } + + @Override + public String toString() { + return "Targit(bEnable=" + this.getBEnable() + ", nTime=" + this.getNTime() + ", nPtx=" + this.getNPtx() + ", nPty=" + this.getNPty() + ", nWidth=" + this.getNWidth() + ", nHeight=" + this.getNHeight() + ", nLon=" + this.getNLon() + ", nLat=" + this.getNLat() + ")"; + } + + public void setBEnable(final int bEnable) { + this.bEnable = bEnable; + } + + public void setNTime(final long nTime) { + this.nTime = nTime; + } + + public void setNPtx(final double nPtx) { + this.nPtx = nPtx; + } + + public void setNPty(final double nPty) { + this.nPty = nPty; + } + + public void setNWidth(final double nWidth) { + this.nWidth = nWidth; + } + + public void setNHeight(final double nHeight) { + this.nHeight = nHeight; + } + + public void setNLon(final double nLon) { + this.nLon = nLon; + } + + public void setNLat(final double nLat) { + this.nLat = nLat; + } + + public int getBEnable() { + return this.bEnable; + } + + public long getNTime() { + return this.nTime; + } + + public double getNPtx() { + return this.nPtx; + } + + public double getNPty() { + return this.nPty; + } + + public double getNWidth() { + return this.nWidth; + } + + public double getNHeight() { + return this.nHeight; + } + + public double getNLon() { + return this.nLon; + } + + public double getNLat() { + return this.nLat; + } + + @ConstructorProperties({ "bEnable", "nTime", "nPtx", "nPty", "nWidth", "nHeight", "nLon", "nLat" }) + public Targit(final int bEnable, final long nTime, final double nPtx, final double nPty, final double nWidth, final double nHeight, final double nLon, final double nLat) { + this.bEnable = bEnable; + this.nTime = nTime; + this.nPtx = nPtx; + this.nPty = nPty; + this.nWidth = nWidth; + this.nHeight = nHeight; + this.nLon = nLon; + this.nLat = nLat; + } + + public Targit() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/TimeSpanVo.java b/src/main/java/com/zhichenhaixin/sys/model/TimeSpanVo.java new file mode 100644 index 0000000..01c0c9b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/TimeSpanVo.java @@ -0,0 +1,159 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class TimeSpanVo implements Serializable +{ + private static final long serialVersionUID = 1L; + private int defence_time_id; + private String starttime; + private String endtime; + private String name; + private int defence_id; + private int time_cycle; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TimeSpanVo)) { + return false; + } + final TimeSpanVo other = (TimeSpanVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getDefence_time_id() != other.getDefence_time_id()) { + return false; + } + final Object this$starttime = this.getStarttime(); + final Object other$starttime = other.getStarttime(); + Label_0078: { + if (this$starttime == null) { + if (other$starttime == null) { + break Label_0078; + } + } + else if (this$starttime.equals(other$starttime)) { + break Label_0078; + } + return false; + } + final Object this$endtime = this.getEndtime(); + final Object other$endtime = other.getEndtime(); + Label_0115: { + if (this$endtime == null) { + if (other$endtime == null) { + break Label_0115; + } + } + else if (this$endtime.equals(other$endtime)) { + break Label_0115; + } + return false; + } + final Object this$name = this.getName(); + final Object other$name = other.getName(); + if (this$name == null) { + if (other$name == null) { + return this.getDefence_id() == other.getDefence_id() && this.getTime_cycle() == other.getTime_cycle(); + } + } + else if (this$name.equals(other$name)) { + return this.getDefence_id() == other.getDefence_id() && this.getTime_cycle() == other.getTime_cycle(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof TimeSpanVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getDefence_time_id(); + final Object $starttime = this.getStarttime(); + result = result * 59 + (($starttime == null) ? 43 : $starttime.hashCode()); + final Object $endtime = this.getEndtime(); + result = result * 59 + (($endtime == null) ? 43 : $endtime.hashCode()); + final Object $name = this.getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + result = result * 59 + this.getDefence_id(); + result = result * 59 + this.getTime_cycle(); + return result; + } + + @Override + public String toString() { + return "TimeSpanVo(defence_time_id=" + this.getDefence_time_id() + ", starttime=" + this.getStarttime() + ", endtime=" + this.getEndtime() + ", name=" + this.getName() + ", defence_id=" + this.getDefence_id() + ", time_cycle=" + this.getTime_cycle() + ")"; + } + + public void setDefence_time_id(final int defence_time_id) { + this.defence_time_id = defence_time_id; + } + + public void setStarttime(final String starttime) { + this.starttime = starttime; + } + + public void setEndtime(final String endtime) { + this.endtime = endtime; + } + + public void setName(final String name) { + this.name = name; + } + + public void setDefence_id(final int defence_id) { + this.defence_id = defence_id; + } + + public void setTime_cycle(final int time_cycle) { + this.time_cycle = time_cycle; + } + + public int getDefence_time_id() { + return this.defence_time_id; + } + + public String getStarttime() { + return this.starttime; + } + + public String getEndtime() { + return this.endtime; + } + + public String getName() { + return this.name; + } + + public int getDefence_id() { + return this.defence_id; + } + + public int getTime_cycle() { + return this.time_cycle; + } + + @ConstructorProperties({ "defence_time_id", "starttime", "endtime", "name", "defence_id", "time_cycle" }) + public TimeSpanVo(final int defence_time_id, final String starttime, final String endtime, final String name, final int defence_id, final int time_cycle) { + this.defence_time_id = defence_time_id; + this.starttime = starttime; + this.endtime = endtime; + this.name = name; + this.defence_id = defence_id; + this.time_cycle = time_cycle; + } + + public TimeSpanVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/TrackCameraVo.java b/src/main/java/com/zhichenhaixin/sys/model/TrackCameraVo.java new file mode 100644 index 0000000..8dca6ae --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/TrackCameraVo.java @@ -0,0 +1,326 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import com.alibaba.fastjson.annotation.JSONField; + +import java.io.Serializable; + +public class TrackCameraVo implements Serializable +{ + private static final long serialVersionUID = -833521248219376312L; + int commandID; + int seqID; + String objectID; + int objectState; + int objectType; + int analyzeType; + int alarmType; + int cameraID; + String cameraIP; + float cameraX; + float cameraY; + float trackingCameraX; + float trackingCameraY; + int trackingCameraID; + String trackingCameraIP; + String timeStamp; + double objectMapPosX; + double objectMapPosY; + int objectImagePosX; + int objectImagePosY; + double objectSpeed; + float objectMoveDirection; + private String alertAreaName; + private String trackby; + private double distance; + private int isSmuggle; + private String warn_color; + private double node_num; + String targetId; + + public TrackCameraVo() { + this.isSmuggle = 0; + this.warn_color = "0XFF0000"; + } + + @JSONField(name = "CommandID") + public int getCommandID() { + return this.commandID; + } + + @JSONField(name = "CommandID") + public void setCommandID(final int commandID) { + this.commandID = commandID; + } + + @JSONField(name = "SeqID") + public int getSeqID() { + return this.seqID; + } + + @JSONField(name = "SeqID") + public void setSeqID(final int seqID) { + this.seqID = seqID; + } + + @JSONField(name = "AlertAreaName") + public String getAlertAreaName() { + return this.alertAreaName; + } + + @JSONField(name = "AlertAreaName") + public void setAlertAreaName(final String alertAreaName) { + this.alertAreaName = alertAreaName; + } + + @JSONField(name = "ObjectID") + public String getObjectID() { + return this.objectID; + } + + @JSONField(name = "ObjectID") + public void setObjectID(final String objectID) { + this.objectID = objectID; + } + + @JSONField(name = "ObjectState") + public int getObjectState() { + return this.objectState; + } + + @JSONField(name = "ObjectState") + public void setObjectState(final int objectState) { + this.objectState = objectState; + } + + @JSONField(name = "ObjectType") + public int getObjectType() { + return this.objectType; + } + + @JSONField(name = "ObjectType") + public void setObjectType(final int objectType) { + this.objectType = objectType; + } + + @JSONField(name = "AnalyzeType") + public int getAnalyzeType() { + return this.analyzeType; + } + + @JSONField(name = "AnalyzeType") + public void setAnalyzeType(final int analyzeType) { + this.analyzeType = analyzeType; + } + + @JSONField(name = "AlarmType") + public int getAlarmType() { + return this.alarmType; + } + + @JSONField(name = "AlarmType") + public void setAlarmType(final int alarmType) { + this.alarmType = alarmType; + } + + @JSONField(name = "CameraID") + public int getCameraID() { + return this.cameraID; + } + + @JSONField(name = "CameraID") + public void setCameraID(final int cameraID) { + this.cameraID = cameraID; + } + + @JSONField(name = "CameraIP") + public String getCameraIP() { + return this.cameraIP; + } + + @JSONField(name = "CameraIP") + public void setCameraIP(final String cameraIP) { + this.cameraIP = cameraIP; + } + + @JSONField(name = "CameraX") + public float getCameraX() { + return this.cameraX; + } + + @JSONField(name = "CameraX") + public void setCameraX(final float cameraX) { + this.cameraX = cameraX; + } + + @JSONField(name = "CameraY") + public float getCameraY() { + return this.cameraY; + } + + @JSONField(name = "CameraY") + public void setCameraY(final float cameraY) { + this.cameraY = cameraY; + } + + @JSONField(name = "TrackingCameraX") + public float getTrackingCameraX() { + return this.trackingCameraX; + } + + @JSONField(name = "TrackingCameraX") + public void setTrackingCameraX(final float trackingCameraX) { + this.trackingCameraX = trackingCameraX; + } + + @JSONField(name = "TrackingCameraY") + public float getTrackingCameraY() { + return this.trackingCameraY; + } + + @JSONField(name = "TrackingCameraY") + public void setTrackingCameraY(final float trackingCameraY) { + this.trackingCameraY = trackingCameraY; + } + + @JSONField(name = "TrackingCameraID") + public int getTrackingCameraID() { + return this.trackingCameraID; + } + + @JSONField(name = "TrackingCameraID") + public void setTrackingCameraID(final int trackingCameraID) { + this.trackingCameraID = trackingCameraID; + } + + @JSONField(name = "TrackingCameraIP") + public String getTrackingCameraIP() { + return this.trackingCameraIP; + } + + @JSONField(name = "TrackingCameraIP") + public void setTrackingCameraIP(final String trackingCameraIP) { + this.trackingCameraIP = trackingCameraIP; + } + + @JSONField(name = "TimeStamp") + public String getTimeStamp() { + return this.timeStamp; + } + + @JSONField(name = "TimeStamp") + public void setTimeStamp(final String timeStamp) { + this.timeStamp = timeStamp; + } + + @JSONField(name = "ObjectMapPosX") + public double getObjectMapPosX() { + return this.objectMapPosX; + } + + @JSONField(name = "ObjectMapPosX") + public void setObjectMapPosX(final double objectMapPosX) { + this.objectMapPosX = objectMapPosX; + } + + @JSONField(name = "ObjectMapPosY") + public double getObjectMapPosY() { + return this.objectMapPosY; + } + + @JSONField(name = "ObjectMapPosY") + public void setObjectMapPosY(final double objectMapPosY) { + this.objectMapPosY = objectMapPosY; + } + + @JSONField(name = "ObjectImagePosX") + public int getObjectImagePosX() { + return this.objectImagePosX; + } + + @JSONField(name = "ObjectImagePosX") + public void setObjectImagePosX(final int objectImagePosX) { + this.objectImagePosX = objectImagePosX; + } + + @JSONField(name = "ObjectImagePosY") + public int getObjectImagePosY() { + return this.objectImagePosY; + } + + @JSONField(name = "ObjectImagePosY") + public void setObjectImagePosY(final int objectImagePosY) { + this.objectImagePosY = objectImagePosY; + } + + @JSONField(name = "ObjectSpeed") + public double getObjectSpeed() { + return this.objectSpeed; + } + + @JSONField(name = "ObjectSpeed") + public void setObjectSpeed(final double objectSpeed) { + this.objectSpeed = objectSpeed; + } + + @JSONField(name = "ObjectMoveDirection") + public float getObjectMoveDirection() { + return this.objectMoveDirection; + } + + @JSONField(name = "ObjectMoveDirection") + public void setObjectMoveDirection(final float objectMoveDirection) { + this.objectMoveDirection = objectMoveDirection; + } + + public String getTrackby() { + return this.trackby; + } + + public void setTrackby(final String trackby) { + this.trackby = trackby; + } + + public double getDistance() { + return this.distance; + } + + public void setDistance(final double distance) { + this.distance = distance; + } + + public int getIsSmuggle() { + return this.isSmuggle; + } + + public void setIsSmuggle(final int isSmuggle) { + this.isSmuggle = isSmuggle; + } + + public String getWarn_color() { + return this.warn_color; + } + + public void setWarn_color(final String warn_color) { + this.warn_color = warn_color; + } + + public double getNode_num() { + return this.node_num; + } + + public void setNode_num(final double node_num) { + this.node_num = node_num; + } + + public String getTargetId() { + return this.targetId; + } + + public void setTargetId(final String targetId) { + this.targetId = targetId; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/UserLoginLogInfo.java b/src/main/java/com/zhichenhaixin/sys/model/UserLoginLogInfo.java new file mode 100644 index 0000000..ebf3cac --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/UserLoginLogInfo.java @@ -0,0 +1,176 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class UserLoginLogInfo implements Serializable +{ + private static final long serialVersionUID = -7548297765650847779L; + private int id; + private String user_account; + private String cre_date; + private int operation; + private String module; + private String des_msg; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UserLoginLogInfo)) { + return false; + } + final UserLoginLogInfo other = (UserLoginLogInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$user_account = this.getUser_account(); + final Object other$user_account = other.getUser_account(); + Label_0078: { + if (this$user_account == null) { + if (other$user_account == null) { + break Label_0078; + } + } + else if (this$user_account.equals(other$user_account)) { + break Label_0078; + } + return false; + } + final Object this$cre_date = this.getCre_date(); + final Object other$cre_date = other.getCre_date(); + Label_0115: { + if (this$cre_date == null) { + if (other$cre_date == null) { + break Label_0115; + } + } + else if (this$cre_date.equals(other$cre_date)) { + break Label_0115; + } + return false; + } + if (this.getOperation() != other.getOperation()) { + return false; + } + final Object this$module = this.getModule(); + final Object other$module = other.getModule(); + Label_0165: { + if (this$module == null) { + if (other$module == null) { + break Label_0165; + } + } + else if (this$module.equals(other$module)) { + break Label_0165; + } + return false; + } + final Object this$des_msg = this.getDes_msg(); + final Object other$des_msg = other.getDes_msg(); + if (this$des_msg == null) { + if (other$des_msg == null) { + return true; + } + } + else if (this$des_msg.equals(other$des_msg)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof UserLoginLogInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $user_account = this.getUser_account(); + result = result * 59 + (($user_account == null) ? 43 : $user_account.hashCode()); + final Object $cre_date = this.getCre_date(); + result = result * 59 + (($cre_date == null) ? 43 : $cre_date.hashCode()); + result = result * 59 + this.getOperation(); + final Object $module = this.getModule(); + result = result * 59 + (($module == null) ? 43 : $module.hashCode()); + final Object $des_msg = this.getDes_msg(); + result = result * 59 + (($des_msg == null) ? 43 : $des_msg.hashCode()); + return result; + } + + @Override + public String toString() { + return "UserLoginLogInfo(id=" + this.getId() + ", user_account=" + this.getUser_account() + ", cre_date=" + this.getCre_date() + ", operation=" + this.getOperation() + ", module=" + this.getModule() + ", des_msg=" + this.getDes_msg() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setUser_account(final String user_account) { + this.user_account = user_account; + } + + public void setCre_date(final String cre_date) { + this.cre_date = cre_date; + } + + public void setOperation(final int operation) { + this.operation = operation; + } + + public void setModule(final String module) { + this.module = module; + } + + public void setDes_msg(final String des_msg) { + this.des_msg = des_msg; + } + + public int getId() { + return this.id; + } + + public String getUser_account() { + return this.user_account; + } + + public String getCre_date() { + return this.cre_date; + } + + public int getOperation() { + return this.operation; + } + + public String getModule() { + return this.module; + } + + public String getDes_msg() { + return this.des_msg; + } + + @ConstructorProperties({ "id", "user_account", "cre_date", "operation", "module", "des_msg" }) + public UserLoginLogInfo(final int id, final String user_account, final String cre_date, final int operation, final String module, final String des_msg) { + this.id = id; + this.user_account = user_account; + this.cre_date = cre_date; + this.operation = operation; + this.module = module; + this.des_msg = des_msg; + } + + public UserLoginLogInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/UserVo.java b/src/main/java/com/zhichenhaixin/sys/model/UserVo.java new file mode 100644 index 0000000..2776a51 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/UserVo.java @@ -0,0 +1,404 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class UserVo implements Serializable +{ + private static final long serialVersionUID = -8881390544787236312L; + private int user_id; + private String user_name; + private String user_account; + private String user_passwd; + private int sex; + private String phone_num; + private String email; + private String birthday; + private String dept_name; + private String duty_name; + private String duty_desc; + private int role_id; + private int status; + private String new_passwd; + private String confirm_passwd; + private String ssession_id; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UserVo)) { + return false; + } + final UserVo other = (UserVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getUser_id() != other.getUser_id()) { + return false; + } + final Object this$user_name = this.getUser_name(); + final Object other$user_name = other.getUser_name(); + Label_0078: { + if (this$user_name == null) { + if (other$user_name == null) { + break Label_0078; + } + } + else if (this$user_name.equals(other$user_name)) { + break Label_0078; + } + return false; + } + final Object this$user_account = this.getUser_account(); + final Object other$user_account = other.getUser_account(); + Label_0115: { + if (this$user_account == null) { + if (other$user_account == null) { + break Label_0115; + } + } + else if (this$user_account.equals(other$user_account)) { + break Label_0115; + } + return false; + } + final Object this$user_passwd = this.getUser_passwd(); + final Object other$user_passwd = other.getUser_passwd(); + Label_0152: { + if (this$user_passwd == null) { + if (other$user_passwd == null) { + break Label_0152; + } + } + else if (this$user_passwd.equals(other$user_passwd)) { + break Label_0152; + } + return false; + } + if (this.getSex() != other.getSex()) { + return false; + } + final Object this$phone_num = this.getPhone_num(); + final Object other$phone_num = other.getPhone_num(); + Label_0202: { + if (this$phone_num == null) { + if (other$phone_num == null) { + break Label_0202; + } + } + else if (this$phone_num.equals(other$phone_num)) { + break Label_0202; + } + return false; + } + final Object this$email = this.getEmail(); + final Object other$email = other.getEmail(); + Label_0239: { + if (this$email == null) { + if (other$email == null) { + break Label_0239; + } + } + else if (this$email.equals(other$email)) { + break Label_0239; + } + return false; + } + final Object this$birthday = this.getBirthday(); + final Object other$birthday = other.getBirthday(); + Label_0276: { + if (this$birthday == null) { + if (other$birthday == null) { + break Label_0276; + } + } + else if (this$birthday.equals(other$birthday)) { + break Label_0276; + } + return false; + } + final Object this$dept_name = this.getDept_name(); + final Object other$dept_name = other.getDept_name(); + Label_0313: { + if (this$dept_name == null) { + if (other$dept_name == null) { + break Label_0313; + } + } + else if (this$dept_name.equals(other$dept_name)) { + break Label_0313; + } + return false; + } + final Object this$duty_name = this.getDuty_name(); + final Object other$duty_name = other.getDuty_name(); + Label_0350: { + if (this$duty_name == null) { + if (other$duty_name == null) { + break Label_0350; + } + } + else if (this$duty_name.equals(other$duty_name)) { + break Label_0350; + } + return false; + } + final Object this$duty_desc = this.getDuty_desc(); + final Object other$duty_desc = other.getDuty_desc(); + Label_0387: { + if (this$duty_desc == null) { + if (other$duty_desc == null) { + break Label_0387; + } + } + else if (this$duty_desc.equals(other$duty_desc)) { + break Label_0387; + } + return false; + } + if (this.getRole_id() != other.getRole_id()) { + return false; + } + if (this.getStatus() != other.getStatus()) { + return false; + } + final Object this$new_passwd = this.getNew_passwd(); + final Object other$new_passwd = other.getNew_passwd(); + Label_0450: { + if (this$new_passwd == null) { + if (other$new_passwd == null) { + break Label_0450; + } + } + else if (this$new_passwd.equals(other$new_passwd)) { + break Label_0450; + } + return false; + } + final Object this$confirm_passwd = this.getConfirm_passwd(); + final Object other$confirm_passwd = other.getConfirm_passwd(); + Label_0487: { + if (this$confirm_passwd == null) { + if (other$confirm_passwd == null) { + break Label_0487; + } + } + else if (this$confirm_passwd.equals(other$confirm_passwd)) { + break Label_0487; + } + return false; + } + final Object this$ssession_id = this.getSsession_id(); + final Object other$ssession_id = other.getSsession_id(); + if (this$ssession_id == null) { + if (other$ssession_id == null) { + return true; + } + } + else if (this$ssession_id.equals(other$ssession_id)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof UserVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getUser_id(); + final Object $user_name = this.getUser_name(); + result = result * 59 + (($user_name == null) ? 43 : $user_name.hashCode()); + final Object $user_account = this.getUser_account(); + result = result * 59 + (($user_account == null) ? 43 : $user_account.hashCode()); + final Object $user_passwd = this.getUser_passwd(); + result = result * 59 + (($user_passwd == null) ? 43 : $user_passwd.hashCode()); + result = result * 59 + this.getSex(); + final Object $phone_num = this.getPhone_num(); + result = result * 59 + (($phone_num == null) ? 43 : $phone_num.hashCode()); + final Object $email = this.getEmail(); + result = result * 59 + (($email == null) ? 43 : $email.hashCode()); + final Object $birthday = this.getBirthday(); + result = result * 59 + (($birthday == null) ? 43 : $birthday.hashCode()); + final Object $dept_name = this.getDept_name(); + result = result * 59 + (($dept_name == null) ? 43 : $dept_name.hashCode()); + final Object $duty_name = this.getDuty_name(); + result = result * 59 + (($duty_name == null) ? 43 : $duty_name.hashCode()); + final Object $duty_desc = this.getDuty_desc(); + result = result * 59 + (($duty_desc == null) ? 43 : $duty_desc.hashCode()); + result = result * 59 + this.getRole_id(); + result = result * 59 + this.getStatus(); + final Object $new_passwd = this.getNew_passwd(); + result = result * 59 + (($new_passwd == null) ? 43 : $new_passwd.hashCode()); + final Object $confirm_passwd = this.getConfirm_passwd(); + result = result * 59 + (($confirm_passwd == null) ? 43 : $confirm_passwd.hashCode()); + final Object $ssession_id = this.getSsession_id(); + result = result * 59 + (($ssession_id == null) ? 43 : $ssession_id.hashCode()); + return result; + } + + @Override + public String toString() { + return "UserVo(user_id=" + this.getUser_id() + ", user_name=" + this.getUser_name() + ", user_account=" + this.getUser_account() + ", user_passwd=" + this.getUser_passwd() + ", sex=" + this.getSex() + ", phone_num=" + this.getPhone_num() + ", email=" + this.getEmail() + ", birthday=" + this.getBirthday() + ", dept_name=" + this.getDept_name() + ", duty_name=" + this.getDuty_name() + ", duty_desc=" + this.getDuty_desc() + ", role_id=" + this.getRole_id() + ", status=" + this.getStatus() + ", new_passwd=" + this.getNew_passwd() + ", confirm_passwd=" + this.getConfirm_passwd() + ", ssession_id=" + this.getSsession_id() + ")"; + } + + public void setUser_id(final int user_id) { + this.user_id = user_id; + } + + public void setUser_name(final String user_name) { + this.user_name = user_name; + } + + public void setUser_account(final String user_account) { + this.user_account = user_account; + } + + public void setUser_passwd(final String user_passwd) { + this.user_passwd = user_passwd; + } + + public void setSex(final int sex) { + this.sex = sex; + } + + public void setPhone_num(final String phone_num) { + this.phone_num = phone_num; + } + + public void setEmail(final String email) { + this.email = email; + } + + public void setBirthday(final String birthday) { + this.birthday = birthday; + } + + public void setDept_name(final String dept_name) { + this.dept_name = dept_name; + } + + public void setDuty_name(final String duty_name) { + this.duty_name = duty_name; + } + + public void setDuty_desc(final String duty_desc) { + this.duty_desc = duty_desc; + } + + public void setRole_id(final int role_id) { + this.role_id = role_id; + } + + public void setStatus(final int status) { + this.status = status; + } + + public void setNew_passwd(final String new_passwd) { + this.new_passwd = new_passwd; + } + + public void setConfirm_passwd(final String confirm_passwd) { + this.confirm_passwd = confirm_passwd; + } + + public void setSsession_id(final String ssession_id) { + this.ssession_id = ssession_id; + } + + public int getUser_id() { + return this.user_id; + } + + public String getUser_name() { + return this.user_name; + } + + public String getUser_account() { + return this.user_account; + } + + public String getUser_passwd() { + return this.user_passwd; + } + + public int getSex() { + return this.sex; + } + + public String getPhone_num() { + return this.phone_num; + } + + public String getEmail() { + return this.email; + } + + public String getBirthday() { + return this.birthday; + } + + public String getDept_name() { + return this.dept_name; + } + + public String getDuty_name() { + return this.duty_name; + } + + public String getDuty_desc() { + return this.duty_desc; + } + + public int getRole_id() { + return this.role_id; + } + + public int getStatus() { + return this.status; + } + + public String getNew_passwd() { + return this.new_passwd; + } + + public String getConfirm_passwd() { + return this.confirm_passwd; + } + + public String getSsession_id() { + return this.ssession_id; + } + + @ConstructorProperties({ "user_id", "user_name", "user_account", "user_passwd", "sex", "phone_num", "email", "birthday", "dept_name", "duty_name", "duty_desc", "role_id", "status", "new_passwd", "confirm_passwd", "ssession_id" }) + public UserVo(final int user_id, final String user_name, final String user_account, final String user_passwd, final int sex, final String phone_num, final String email, final String birthday, final String dept_name, final String duty_name, final String duty_desc, final int role_id, final int status, final String new_passwd, final String confirm_passwd, final String ssession_id) { + this.user_id = user_id; + this.user_name = user_name; + this.user_account = user_account; + this.user_passwd = user_passwd; + this.sex = sex; + this.phone_num = phone_num; + this.email = email; + this.birthday = birthday; + this.dept_name = dept_name; + this.duty_name = duty_name; + this.duty_desc = duty_desc; + this.role_id = role_id; + this.status = status; + this.new_passwd = new_passwd; + this.confirm_passwd = confirm_passwd; + this.ssession_id = ssession_id; + } + + public UserVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/WarnComposeVideoVo.java b/src/main/java/com/zhichenhaixin/sys/model/WarnComposeVideoVo.java new file mode 100644 index 0000000..e781b74 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/WarnComposeVideoVo.java @@ -0,0 +1,256 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class WarnComposeVideoVo implements Serializable +{ + private static final long serialVersionUID = 7722763635895345834L; + private int id; + private String alarm_id; + private long begintime; + private long endtime; + private String rtsp; + private String ftp; + private String false_alarm_rtsp; + private String create_time; + private String camera_name; + private static WarnComposeVideoVo BaseCredit; + + static { + WarnComposeVideoVo.BaseCredit = new WarnComposeVideoVo(); + } + + public static WarnComposeVideoVo getClone() { + try { + return (WarnComposeVideoVo)WarnComposeVideoVo.BaseCredit.clone(); + } + catch (CloneNotSupportedException e) { + return new WarnComposeVideoVo(); + } + } + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WarnComposeVideoVo)) { + return false; + } + final WarnComposeVideoVo other = (WarnComposeVideoVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$alarm_id = this.getAlarm_id(); + final Object other$alarm_id = other.getAlarm_id(); + Label_0078: { + if (this$alarm_id == null) { + if (other$alarm_id == null) { + break Label_0078; + } + } + else if (this$alarm_id.equals(other$alarm_id)) { + break Label_0078; + } + return false; + } + if (this.getBegintime() != other.getBegintime()) { + return false; + } + if (this.getEndtime() != other.getEndtime()) { + return false; + } + final Object this$rtsp = this.getRtsp(); + final Object other$rtsp = other.getRtsp(); + Label_0143: { + if (this$rtsp == null) { + if (other$rtsp == null) { + break Label_0143; + } + } + else if (this$rtsp.equals(other$rtsp)) { + break Label_0143; + } + return false; + } + final Object this$ftp = this.getFtp(); + final Object other$ftp = other.getFtp(); + Label_0180: { + if (this$ftp == null) { + if (other$ftp == null) { + break Label_0180; + } + } + else if (this$ftp.equals(other$ftp)) { + break Label_0180; + } + return false; + } + final Object this$false_alarm_rtsp = this.getFalse_alarm_rtsp(); + final Object other$false_alarm_rtsp = other.getFalse_alarm_rtsp(); + Label_0217: { + if (this$false_alarm_rtsp == null) { + if (other$false_alarm_rtsp == null) { + break Label_0217; + } + } + else if (this$false_alarm_rtsp.equals(other$false_alarm_rtsp)) { + break Label_0217; + } + return false; + } + final Object this$create_time = this.getCreate_time(); + final Object other$create_time = other.getCreate_time(); + Label_0254: { + if (this$create_time == null) { + if (other$create_time == null) { + break Label_0254; + } + } + else if (this$create_time.equals(other$create_time)) { + break Label_0254; + } + return false; + } + final Object this$camera_name = this.getCamera_name(); + final Object other$camera_name = other.getCamera_name(); + if (this$camera_name == null) { + if (other$camera_name == null) { + return true; + } + } + else if (this$camera_name.equals(other$camera_name)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof WarnComposeVideoVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $alarm_id = this.getAlarm_id(); + result = result * 59 + (($alarm_id == null) ? 43 : $alarm_id.hashCode()); + final long $begintime = this.getBegintime(); + result = result * 59 + (int)($begintime ^ $begintime >>> 32); + final long $endtime = this.getEndtime(); + result = result * 59 + (int)($endtime ^ $endtime >>> 32); + final Object $rtsp = this.getRtsp(); + result = result * 59 + (($rtsp == null) ? 43 : $rtsp.hashCode()); + final Object $ftp = this.getFtp(); + result = result * 59 + (($ftp == null) ? 43 : $ftp.hashCode()); + final Object $false_alarm_rtsp = this.getFalse_alarm_rtsp(); + result = result * 59 + (($false_alarm_rtsp == null) ? 43 : $false_alarm_rtsp.hashCode()); + final Object $create_time = this.getCreate_time(); + result = result * 59 + (($create_time == null) ? 43 : $create_time.hashCode()); + final Object $camera_name = this.getCamera_name(); + result = result * 59 + (($camera_name == null) ? 43 : $camera_name.hashCode()); + return result; + } + + @Override + public String toString() { + return "WarnComposeVideoVo(id=" + this.getId() + ", alarm_id=" + this.getAlarm_id() + ", begintime=" + this.getBegintime() + ", endtime=" + this.getEndtime() + ", rtsp=" + this.getRtsp() + ", ftp=" + this.getFtp() + ", false_alarm_rtsp=" + this.getFalse_alarm_rtsp() + ", create_time=" + this.getCreate_time() + ", camera_name=" + this.getCamera_name() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setAlarm_id(final String alarm_id) { + this.alarm_id = alarm_id; + } + + public void setBegintime(final long begintime) { + this.begintime = begintime; + } + + public void setEndtime(final long endtime) { + this.endtime = endtime; + } + + public void setRtsp(final String rtsp) { + this.rtsp = rtsp; + } + + public void setFtp(final String ftp) { + this.ftp = ftp; + } + + public void setFalse_alarm_rtsp(final String false_alarm_rtsp) { + this.false_alarm_rtsp = false_alarm_rtsp; + } + + public void setCreate_time(final String create_time) { + this.create_time = create_time; + } + + public void setCamera_name(final String camera_name) { + this.camera_name = camera_name; + } + + public int getId() { + return this.id; + } + + public String getAlarm_id() { + return this.alarm_id; + } + + public long getBegintime() { + return this.begintime; + } + + public long getEndtime() { + return this.endtime; + } + + public String getRtsp() { + return this.rtsp; + } + + public String getFtp() { + return this.ftp; + } + + public String getFalse_alarm_rtsp() { + return this.false_alarm_rtsp; + } + + public String getCreate_time() { + return this.create_time; + } + + public String getCamera_name() { + return this.camera_name; + } + + @ConstructorProperties({ "id", "alarm_id", "begintime", "endtime", "rtsp", "ftp", "false_alarm_rtsp", "create_time", "camera_name" }) + public WarnComposeVideoVo(final int id, final String alarm_id, final long begintime, final long endtime, final String rtsp, final String ftp, final String false_alarm_rtsp, final String create_time, final String camera_name) { + this.id = id; + this.alarm_id = alarm_id; + this.begintime = begintime; + this.endtime = endtime; + this.rtsp = rtsp; + this.ftp = ftp; + this.false_alarm_rtsp = false_alarm_rtsp; + this.create_time = create_time; + this.camera_name = camera_name; + } + + public WarnComposeVideoVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/WarnInfoBean.java b/src/main/java/com/zhichenhaixin/sys/model/WarnInfoBean.java new file mode 100644 index 0000000..bcf59fc --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/WarnInfoBean.java @@ -0,0 +1,715 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.sql.Timestamp; +import java.util.List; + +public class WarnInfoBean implements Serializable +{ + private static final long serialVersionUID = 7722763635895345834L; + private String id; + private long begintime; + private long endtime; + private String alarm_site; + private String alarm_source; + private String alarm_type; + private String alarm_level; + private String alarm_status; + private Timestamp create_time; + private String camera_id; + private String object_type; + private String object_id; + private String alarm_site_no; + private double x; + private double y; + private String sign; + private String rtsp; + private String ftp; + private String param; + private String handler; + private String handle_time; + private String mark; + private int handle_status; + private int handle_result; + private String tts; + private String warnSiteType; + private List compose_Video_list; + private List aTargit; + private int untreated_alarm_count; + private static WarnInfoBean BaseCredit; + + static { + WarnInfoBean.BaseCredit = new WarnInfoBean(); + } + + public static WarnInfoBean getClone() { + try { + return (WarnInfoBean)WarnInfoBean.BaseCredit.clone(); + } + catch (CloneNotSupportedException e) { + return new WarnInfoBean(); + } + } + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WarnInfoBean)) { + return false; + } + final WarnInfoBean other = (WarnInfoBean)o; + if (!other.canEqual(this)) { + return false; + } + final Object this$id = this.getId(); + final Object other$id = other.getId(); + Label_0065: { + if (this$id == null) { + if (other$id == null) { + break Label_0065; + } + } + else if (this$id.equals(other$id)) { + break Label_0065; + } + return false; + } + if (this.getBegintime() != other.getBegintime()) { + return false; + } + if (this.getEndtime() != other.getEndtime()) { + return false; + } + final Object this$alarm_site = this.getAlarm_site(); + final Object other$alarm_site = other.getAlarm_site(); + Label_0130: { + if (this$alarm_site == null) { + if (other$alarm_site == null) { + break Label_0130; + } + } + else if (this$alarm_site.equals(other$alarm_site)) { + break Label_0130; + } + return false; + } + final Object this$alarm_source = this.getAlarm_source(); + final Object other$alarm_source = other.getAlarm_source(); + Label_0167: { + if (this$alarm_source == null) { + if (other$alarm_source == null) { + break Label_0167; + } + } + else if (this$alarm_source.equals(other$alarm_source)) { + break Label_0167; + } + return false; + } + final Object this$alarm_type = this.getAlarm_type(); + final Object other$alarm_type = other.getAlarm_type(); + Label_0204: { + if (this$alarm_type == null) { + if (other$alarm_type == null) { + break Label_0204; + } + } + else if (this$alarm_type.equals(other$alarm_type)) { + break Label_0204; + } + return false; + } + final Object this$alarm_level = this.getAlarm_level(); + final Object other$alarm_level = other.getAlarm_level(); + Label_0241: { + if (this$alarm_level == null) { + if (other$alarm_level == null) { + break Label_0241; + } + } + else if (this$alarm_level.equals(other$alarm_level)) { + break Label_0241; + } + return false; + } + final Object this$alarm_status = this.getAlarm_status(); + final Object other$alarm_status = other.getAlarm_status(); + Label_0278: { + if (this$alarm_status == null) { + if (other$alarm_status == null) { + break Label_0278; + } + } + else if (this$alarm_status.equals(other$alarm_status)) { + break Label_0278; + } + return false; + } + final Object this$create_time = this.getCreate_time(); + final Object other$create_time = other.getCreate_time(); + Label_0315: { + if (this$create_time == null) { + if (other$create_time == null) { + break Label_0315; + } + } + else if (this$create_time.equals(other$create_time)) { + break Label_0315; + } + return false; + } + final Object this$camera_id = this.getCamera_id(); + final Object other$camera_id = other.getCamera_id(); + Label_0352: { + if (this$camera_id == null) { + if (other$camera_id == null) { + break Label_0352; + } + } + else if (this$camera_id.equals(other$camera_id)) { + break Label_0352; + } + return false; + } + final Object this$object_type = this.getObject_type(); + final Object other$object_type = other.getObject_type(); + Label_0389: { + if (this$object_type == null) { + if (other$object_type == null) { + break Label_0389; + } + } + else if (this$object_type.equals(other$object_type)) { + break Label_0389; + } + return false; + } + final Object this$object_id = this.getObject_id(); + final Object other$object_id = other.getObject_id(); + Label_0426: { + if (this$object_id == null) { + if (other$object_id == null) { + break Label_0426; + } + } + else if (this$object_id.equals(other$object_id)) { + break Label_0426; + } + return false; + } + final Object this$alarm_site_no = this.getAlarm_site_no(); + final Object other$alarm_site_no = other.getAlarm_site_no(); + Label_0463: { + if (this$alarm_site_no == null) { + if (other$alarm_site_no == null) { + break Label_0463; + } + } + else if (this$alarm_site_no.equals(other$alarm_site_no)) { + break Label_0463; + } + return false; + } + if (Double.compare(this.getX(), other.getX()) != 0) { + return false; + } + if (Double.compare(this.getY(), other.getY()) != 0) { + return false; + } + final Object this$sign = this.getSign(); + final Object other$sign = other.getSign(); + Label_0532: { + if (this$sign == null) { + if (other$sign == null) { + break Label_0532; + } + } + else if (this$sign.equals(other$sign)) { + break Label_0532; + } + return false; + } + final Object this$rtsp = this.getRtsp(); + final Object other$rtsp = other.getRtsp(); + Label_0569: { + if (this$rtsp == null) { + if (other$rtsp == null) { + break Label_0569; + } + } + else if (this$rtsp.equals(other$rtsp)) { + break Label_0569; + } + return false; + } + final Object this$ftp = this.getFtp(); + final Object other$ftp = other.getFtp(); + Label_0606: { + if (this$ftp == null) { + if (other$ftp == null) { + break Label_0606; + } + } + else if (this$ftp.equals(other$ftp)) { + break Label_0606; + } + return false; + } + final Object this$param = this.getParam(); + final Object other$param = other.getParam(); + Label_0643: { + if (this$param == null) { + if (other$param == null) { + break Label_0643; + } + } + else if (this$param.equals(other$param)) { + break Label_0643; + } + return false; + } + final Object this$handler = this.getHandler(); + final Object other$handler = other.getHandler(); + Label_0680: { + if (this$handler == null) { + if (other$handler == null) { + break Label_0680; + } + } + else if (this$handler.equals(other$handler)) { + break Label_0680; + } + return false; + } + final Object this$handle_time = this.getHandle_time(); + final Object other$handle_time = other.getHandle_time(); + Label_0717: { + if (this$handle_time == null) { + if (other$handle_time == null) { + break Label_0717; + } + } + else if (this$handle_time.equals(other$handle_time)) { + break Label_0717; + } + return false; + } + final Object this$mark = this.getMark(); + final Object other$mark = other.getMark(); + Label_0754: { + if (this$mark == null) { + if (other$mark == null) { + break Label_0754; + } + } + else if (this$mark.equals(other$mark)) { + break Label_0754; + } + return false; + } + if (this.getHandle_status() != other.getHandle_status()) { + return false; + } + if (this.getHandle_result() != other.getHandle_result()) { + return false; + } + final Object this$tts = this.getTts(); + final Object other$tts = other.getTts(); + Label_0817: { + if (this$tts == null) { + if (other$tts == null) { + break Label_0817; + } + } + else if (this$tts.equals(other$tts)) { + break Label_0817; + } + return false; + } + final Object this$warnSiteType = this.getWarnSiteType(); + final Object other$warnSiteType = other.getWarnSiteType(); + Label_0854: { + if (this$warnSiteType == null) { + if (other$warnSiteType == null) { + break Label_0854; + } + } + else if (this$warnSiteType.equals(other$warnSiteType)) { + break Label_0854; + } + return false; + } + final Object this$compose_Video_list = this.getCompose_Video_list(); + final Object other$compose_Video_list = other.getCompose_Video_list(); + Label_0891: { + if (this$compose_Video_list == null) { + if (other$compose_Video_list == null) { + break Label_0891; + } + } + else if (this$compose_Video_list.equals(other$compose_Video_list)) { + break Label_0891; + } + return false; + } + final Object this$aTargit = this.getATargit(); + final Object other$aTargit = other.getATargit(); + if (this$aTargit == null) { + if (other$aTargit == null) { + return this.getUntreated_alarm_count() == other.getUntreated_alarm_count(); + } + } + else if (this$aTargit.equals(other$aTargit)) { + return this.getUntreated_alarm_count() == other.getUntreated_alarm_count(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof WarnInfoBean; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final Object $id = this.getId(); + result = result * 59 + (($id == null) ? 43 : $id.hashCode()); + final long $begintime = this.getBegintime(); + result = result * 59 + (int)($begintime ^ $begintime >>> 32); + final long $endtime = this.getEndtime(); + result = result * 59 + (int)($endtime ^ $endtime >>> 32); + final Object $alarm_site = this.getAlarm_site(); + result = result * 59 + (($alarm_site == null) ? 43 : $alarm_site.hashCode()); + final Object $alarm_source = this.getAlarm_source(); + result = result * 59 + (($alarm_source == null) ? 43 : $alarm_source.hashCode()); + final Object $alarm_type = this.getAlarm_type(); + result = result * 59 + (($alarm_type == null) ? 43 : $alarm_type.hashCode()); + final Object $alarm_level = this.getAlarm_level(); + result = result * 59 + (($alarm_level == null) ? 43 : $alarm_level.hashCode()); + final Object $alarm_status = this.getAlarm_status(); + result = result * 59 + (($alarm_status == null) ? 43 : $alarm_status.hashCode()); + final Object $create_time = this.getCreate_time(); + result = result * 59 + (($create_time == null) ? 43 : $create_time.hashCode()); + final Object $camera_id = this.getCamera_id(); + result = result * 59 + (($camera_id == null) ? 43 : $camera_id.hashCode()); + final Object $object_type = this.getObject_type(); + result = result * 59 + (($object_type == null) ? 43 : $object_type.hashCode()); + final Object $object_id = this.getObject_id(); + result = result * 59 + (($object_id == null) ? 43 : $object_id.hashCode()); + final Object $alarm_site_no = this.getAlarm_site_no(); + result = result * 59 + (($alarm_site_no == null) ? 43 : $alarm_site_no.hashCode()); + final long $x = Double.doubleToLongBits(this.getX()); + result = result * 59 + (int)($x ^ $x >>> 32); + final long $y = Double.doubleToLongBits(this.getY()); + result = result * 59 + (int)($y ^ $y >>> 32); + final Object $sign = this.getSign(); + result = result * 59 + (($sign == null) ? 43 : $sign.hashCode()); + final Object $rtsp = this.getRtsp(); + result = result * 59 + (($rtsp == null) ? 43 : $rtsp.hashCode()); + final Object $ftp = this.getFtp(); + result = result * 59 + (($ftp == null) ? 43 : $ftp.hashCode()); + final Object $param = this.getParam(); + result = result * 59 + (($param == null) ? 43 : $param.hashCode()); + final Object $handler = this.getHandler(); + result = result * 59 + (($handler == null) ? 43 : $handler.hashCode()); + final Object $handle_time = this.getHandle_time(); + result = result * 59 + (($handle_time == null) ? 43 : $handle_time.hashCode()); + final Object $mark = this.getMark(); + result = result * 59 + (($mark == null) ? 43 : $mark.hashCode()); + result = result * 59 + this.getHandle_status(); + result = result * 59 + this.getHandle_result(); + final Object $tts = this.getTts(); + result = result * 59 + (($tts == null) ? 43 : $tts.hashCode()); + final Object $warnSiteType = this.getWarnSiteType(); + result = result * 59 + (($warnSiteType == null) ? 43 : $warnSiteType.hashCode()); + final Object $compose_Video_list = this.getCompose_Video_list(); + result = result * 59 + (($compose_Video_list == null) ? 43 : $compose_Video_list.hashCode()); + final Object $aTargit = this.getATargit(); + result = result * 59 + (($aTargit == null) ? 43 : $aTargit.hashCode()); + result = result * 59 + this.getUntreated_alarm_count(); + return result; + } + + @Override + public String toString() { + return "WarnInfoBean(id=" + this.getId() + ", begintime=" + this.getBegintime() + ", endtime=" + this.getEndtime() + ", alarm_site=" + this.getAlarm_site() + ", alarm_source=" + this.getAlarm_source() + ", alarm_type=" + this.getAlarm_type() + ", alarm_level=" + this.getAlarm_level() + ", alarm_status=" + this.getAlarm_status() + ", create_time=" + this.getCreate_time() + ", camera_id=" + this.getCamera_id() + ", object_type=" + this.getObject_type() + ", object_id=" + this.getObject_id() + ", alarm_site_no=" + this.getAlarm_site_no() + ", x=" + this.getX() + ", y=" + this.getY() + ", sign=" + this.getSign() + ", rtsp=" + this.getRtsp() + ", ftp=" + this.getFtp() + ", param=" + this.getParam() + ", handler=" + this.getHandler() + ", handle_time=" + this.getHandle_time() + ", mark=" + this.getMark() + ", handle_status=" + this.getHandle_status() + ", handle_result=" + this.getHandle_result() + ", tts=" + this.getTts() + ", warnSiteType=" + this.getWarnSiteType() + ", compose_Video_list=" + this.getCompose_Video_list() + ", aTargit=" + this.getATargit() + ", untreated_alarm_count=" + this.getUntreated_alarm_count() + ")"; + } + + public void setId(final String id) { + this.id = id; + } + + public void setBegintime(final long begintime) { + this.begintime = begintime; + } + + public void setEndtime(final long endtime) { + this.endtime = endtime; + } + + public void setAlarm_site(final String alarm_site) { + this.alarm_site = alarm_site; + } + + public void setAlarm_source(final String alarm_source) { + this.alarm_source = alarm_source; + } + + public void setAlarm_type(final String alarm_type) { + this.alarm_type = alarm_type; + } + + public void setAlarm_level(final String alarm_level) { + this.alarm_level = alarm_level; + } + + public void setAlarm_status(final String alarm_status) { + this.alarm_status = alarm_status; + } + + public void setCreate_time(final Timestamp create_time) { + this.create_time = create_time; + } + + public void setCamera_id(final String camera_id) { + this.camera_id = camera_id; + } + + public void setObject_type(final String object_type) { + this.object_type = object_type; + } + + public void setObject_id(final String object_id) { + this.object_id = object_id; + } + + public void setAlarm_site_no(final String alarm_site_no) { + this.alarm_site_no = alarm_site_no; + } + + public void setX(final double x) { + this.x = x; + } + + public void setY(final double y) { + this.y = y; + } + + public void setSign(final String sign) { + this.sign = sign; + } + + public void setRtsp(final String rtsp) { + this.rtsp = rtsp; + } + + public void setFtp(final String ftp) { + this.ftp = ftp; + } + + public void setParam(final String param) { + this.param = param; + } + + public void setHandler(final String handler) { + this.handler = handler; + } + + public void setHandle_time(final String handle_time) { + this.handle_time = handle_time; + } + + public void setMark(final String mark) { + this.mark = mark; + } + + public void setHandle_status(final int handle_status) { + this.handle_status = handle_status; + } + + public void setHandle_result(final int handle_result) { + this.handle_result = handle_result; + } + + public void setTts(final String tts) { + this.tts = tts; + } + + public void setWarnSiteType(final String warnSiteType) { + this.warnSiteType = warnSiteType; + } + + public void setCompose_Video_list(final List compose_Video_list) { + this.compose_Video_list = compose_Video_list; + } + + public void setATargit(final List aTargit) { + this.aTargit = aTargit; + } + + public void setUntreated_alarm_count(final int untreated_alarm_count) { + this.untreated_alarm_count = untreated_alarm_count; + } + + public String getId() { + return this.id; + } + + public long getBegintime() { + return this.begintime; + } + + public long getEndtime() { + return this.endtime; + } + + public String getAlarm_site() { + return this.alarm_site; + } + + public String getAlarm_source() { + return this.alarm_source; + } + + public String getAlarm_type() { + return this.alarm_type; + } + + public String getAlarm_level() { + return this.alarm_level; + } + + public String getAlarm_status() { + return this.alarm_status; + } + + public Timestamp getCreate_time() { + return this.create_time; + } + + public String getCamera_id() { + return this.camera_id; + } + + public String getObject_type() { + return this.object_type; + } + + public String getObject_id() { + return this.object_id; + } + + public String getAlarm_site_no() { + return this.alarm_site_no; + } + + public double getX() { + return this.x; + } + + public double getY() { + return this.y; + } + + public String getSign() { + return this.sign; + } + + public String getRtsp() { + return this.rtsp; + } + + public String getFtp() { + return this.ftp; + } + + public String getParam() { + return this.param; + } + + public String getHandler() { + return this.handler; + } + + public String getHandle_time() { + return this.handle_time; + } + + public String getMark() { + return this.mark; + } + + public int getHandle_status() { + return this.handle_status; + } + + public int getHandle_result() { + return this.handle_result; + } + + public String getTts() { + return this.tts; + } + + public String getWarnSiteType() { + return this.warnSiteType; + } + + public List getCompose_Video_list() { + return this.compose_Video_list; + } + + public List getATargit() { + return this.aTargit; + } + + public int getUntreated_alarm_count() { + return this.untreated_alarm_count; + } + + @ConstructorProperties({ "id", "begintime", "endtime", "alarm_site", "alarm_source", "alarm_type", "alarm_level", "alarm_status", "create_time", "camera_id", "object_type", "object_id", "alarm_site_no", "x", "y", "sign", "rtsp", "ftp", "param", "handler", "handle_time", "mark", "handle_status", "handle_result", "tts", "warnSiteType", "compose_Video_list", "aTargit", "untreated_alarm_count" }) + public WarnInfoBean(final String id, final long begintime, final long endtime, final String alarm_site, final String alarm_source, final String alarm_type, final String alarm_level, final String alarm_status, final Timestamp create_time, final String camera_id, final String object_type, final String object_id, final String alarm_site_no, final double x, final double y, final String sign, final String rtsp, final String ftp, final String param, final String handler, final String handle_time, final String mark, final int handle_status, final int handle_result, final String tts, final String warnSiteType, final List compose_Video_list, final List aTargit, final int untreated_alarm_count) { + this.handle_status = 2; + this.id = id; + this.begintime = begintime; + this.endtime = endtime; + this.alarm_site = alarm_site; + this.alarm_source = alarm_source; + this.alarm_type = alarm_type; + this.alarm_level = alarm_level; + this.alarm_status = alarm_status; + this.create_time = create_time; + this.camera_id = camera_id; + this.object_type = object_type; + this.object_id = object_id; + this.alarm_site_no = alarm_site_no; + this.x = x; + this.y = y; + this.sign = sign; + this.rtsp = rtsp; + this.ftp = ftp; + this.param = param; + this.handler = handler; + this.handle_time = handle_time; + this.mark = mark; + this.handle_status = handle_status; + this.handle_result = handle_result; + this.tts = tts; + this.warnSiteType = warnSiteType; + this.compose_Video_list = compose_Video_list; + this.aTargit = aTargit; + this.untreated_alarm_count = untreated_alarm_count; + } + + public WarnInfoBean() { + this.handle_status = 2; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/XideweiServerVo.java b/src/main/java/com/zhichenhaixin/sys/model/XideweiServerVo.java new file mode 100644 index 0000000..d9a03ad --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/XideweiServerVo.java @@ -0,0 +1,202 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; +import java.util.List; + +public class XideweiServerVo implements Serializable +{ + private static final long serialVersionUID = 4730148793263250560L; + private int id; + private String ip; + private int port; + private String uid; + private String pwd; + private String device_name; + private List cameraList; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof XideweiServerVo)) { + return false; + } + final XideweiServerVo other = (XideweiServerVo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + final Object this$ip = this.getIp(); + final Object other$ip = other.getIp(); + Label_0078: { + if (this$ip == null) { + if (other$ip == null) { + break Label_0078; + } + } + else if (this$ip.equals(other$ip)) { + break Label_0078; + } + return false; + } + if (this.getPort() != other.getPort()) { + return false; + } + final Object this$uid = this.getUid(); + final Object other$uid = other.getUid(); + Label_0128: { + if (this$uid == null) { + if (other$uid == null) { + break Label_0128; + } + } + else if (this$uid.equals(other$uid)) { + break Label_0128; + } + return false; + } + final Object this$pwd = this.getPwd(); + final Object other$pwd = other.getPwd(); + Label_0165: { + if (this$pwd == null) { + if (other$pwd == null) { + break Label_0165; + } + } + else if (this$pwd.equals(other$pwd)) { + break Label_0165; + } + return false; + } + final Object this$device_name = this.getDevice_name(); + final Object other$device_name = other.getDevice_name(); + Label_0202: { + if (this$device_name == null) { + if (other$device_name == null) { + break Label_0202; + } + } + else if (this$device_name.equals(other$device_name)) { + break Label_0202; + } + return false; + } + final Object this$cameraList = this.getCameraList(); + final Object other$cameraList = other.getCameraList(); + if (this$cameraList == null) { + if (other$cameraList == null) { + return true; + } + } + else if (this$cameraList.equals(other$cameraList)) { + return true; + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof XideweiServerVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + final Object $ip = this.getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + result = result * 59 + this.getPort(); + final Object $uid = this.getUid(); + result = result * 59 + (($uid == null) ? 43 : $uid.hashCode()); + final Object $pwd = this.getPwd(); + result = result * 59 + (($pwd == null) ? 43 : $pwd.hashCode()); + final Object $device_name = this.getDevice_name(); + result = result * 59 + (($device_name == null) ? 43 : $device_name.hashCode()); + final Object $cameraList = this.getCameraList(); + result = result * 59 + (($cameraList == null) ? 43 : $cameraList.hashCode()); + return result; + } + + @Override + public String toString() { + return "XideweiServerVo(id=" + this.getId() + ", ip=" + this.getIp() + ", port=" + this.getPort() + ", uid=" + this.getUid() + ", pwd=" + this.getPwd() + ", device_name=" + this.getDevice_name() + ", cameraList=" + this.getCameraList() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public void setPort(final int port) { + this.port = port; + } + + public void setUid(final String uid) { + this.uid = uid; + } + + public void setPwd(final String pwd) { + this.pwd = pwd; + } + + public void setDevice_name(final String device_name) { + this.device_name = device_name; + } + + public void setCameraList(final List cameraList) { + this.cameraList = cameraList; + } + + public int getId() { + return this.id; + } + + public String getIp() { + return this.ip; + } + + public int getPort() { + return this.port; + } + + public String getUid() { + return this.uid; + } + + public String getPwd() { + return this.pwd; + } + + public String getDevice_name() { + return this.device_name; + } + + public List getCameraList() { + return this.cameraList; + } + + @ConstructorProperties({ "id", "ip", "port", "uid", "pwd", "device_name", "cameraList" }) + public XideweiServerVo(final int id, final String ip, final int port, final String uid, final String pwd, final String device_name, final List cameraList) { + this.id = id; + this.ip = ip; + this.port = port; + this.uid = uid; + this.pwd = pwd; + this.device_name = device_name; + this.cameraList = cameraList; + } + + public XideweiServerVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/CamParam.java b/src/main/java/com/zhichenhaixin/sys/model/param/CamParam.java new file mode 100644 index 0000000..30244cf --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/CamParam.java @@ -0,0 +1,36 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class CamParam +{ + private MapRect mapRect; + private TurnParam turnParam; + private LinkParam linkParam; + + public void setMapRect(final MapRect mapRect) { + this.mapRect = mapRect; + } + + public void setTurnParam(final TurnParam turnParam) { + this.turnParam = turnParam; + } + + public void setLinkParam(final LinkParam linkParam) { + this.linkParam = linkParam; + } + + public MapRect getMapRect() { + return this.mapRect; + } + + public TurnParam getTurnParam() { + return this.turnParam; + } + + public LinkParam getLinkParam() { + return this.linkParam; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/Line_parameter.java b/src/main/java/com/zhichenhaixin/sys/model/param/Line_parameter.java new file mode 100644 index 0000000..9542774 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/Line_parameter.java @@ -0,0 +1,36 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class Line_parameter +{ + private Ptstart ptstart; + private Ptend ptend; + private int lineRealLen; + + public void setPtstart(final Ptstart ptstart) { + this.ptstart = ptstart; + } + + public void setPtend(final Ptend ptend) { + this.ptend = ptend; + } + + public void setLineRealLen(final int lineRealLen) { + this.lineRealLen = lineRealLen; + } + + public Ptstart getPtstart() { + return this.ptstart; + } + + public Ptend getPtend() { + return this.ptend; + } + + public int getLineRealLen() { + return this.lineRealLen; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/LinkParam.java b/src/main/java/com/zhichenhaixin/sys/model/param/LinkParam.java new file mode 100644 index 0000000..9a61a09 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/LinkParam.java @@ -0,0 +1,18 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class LinkParam +{ + private int linkCameraID; + + public void setLinkCameraID(final int linkCameraID) { + this.linkCameraID = linkCameraID; + } + + public int getLinkCameraID() { + return this.linkCameraID; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/MapRect.java b/src/main/java/com/zhichenhaixin/sys/model/param/MapRect.java new file mode 100644 index 0000000..9758b8e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/MapRect.java @@ -0,0 +1,54 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class MapRect +{ + private Line_parameter topLine; + private Line_parameter rightLine; + private Line_parameter bottomLine; + private Line_parameter leftLine; + private Line_parameter lineToNorth; + + public void setTopLine(final Line_parameter topLine) { + this.topLine = topLine; + } + + public void setRightLine(final Line_parameter rightLine) { + this.rightLine = rightLine; + } + + public void setBottomLine(final Line_parameter bottomLine) { + this.bottomLine = bottomLine; + } + + public void setLeftLine(final Line_parameter leftLine) { + this.leftLine = leftLine; + } + + public void setLineToNorth(final Line_parameter lineToNorth) { + this.lineToNorth = lineToNorth; + } + + public Line_parameter getTopLine() { + return this.topLine; + } + + public Line_parameter getRightLine() { + return this.rightLine; + } + + public Line_parameter getBottomLine() { + return this.bottomLine; + } + + public Line_parameter getLeftLine() { + return this.leftLine; + } + + public Line_parameter getLineToNorth() { + return this.lineToNorth; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/Ptend.java b/src/main/java/com/zhichenhaixin/sys/model/param/Ptend.java new file mode 100644 index 0000000..24dcc8c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/Ptend.java @@ -0,0 +1,27 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class Ptend +{ + private double x; + private double y; + + public void setX(final double x) { + this.x = x; + } + + public void setY(final double y) { + this.y = y; + } + + public double getX() { + return this.x; + } + + public double getY() { + return this.y; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/Ptstart.java b/src/main/java/com/zhichenhaixin/sys/model/param/Ptstart.java new file mode 100644 index 0000000..948430d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/Ptstart.java @@ -0,0 +1,27 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class Ptstart +{ + private double x; + private double y; + + public void setX(final double x) { + this.x = x; + } + + public void setY(final double y) { + this.y = y; + } + + public double getX() { + return this.x; + } + + public double getY() { + return this.y; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/model/param/TurnParam.java b/src/main/java/com/zhichenhaixin/sys/model/param/TurnParam.java new file mode 100644 index 0000000..ba7701b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/model/param/TurnParam.java @@ -0,0 +1,72 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.model.param; + +public class TurnParam +{ + private int fCamMaxZoomFactor; + private int fCamMaxDist; + private int fCamH; + private int fCamCentDist; + private int fNorthAngle; + private int fTargitW; + private int bReverse; + + public void setFCamMaxZoomFactor(final int fCamMaxZoomFactor) { + this.fCamMaxZoomFactor = fCamMaxZoomFactor; + } + + public void setFCamMaxDist(final int fCamMaxDist) { + this.fCamMaxDist = fCamMaxDist; + } + + public void setFCamH(final int fCamH) { + this.fCamH = fCamH; + } + + public void setFCamCentDist(final int fCamCentDist) { + this.fCamCentDist = fCamCentDist; + } + + public void setFNorthAngle(final int fNorthAngle) { + this.fNorthAngle = fNorthAngle; + } + + public void setFTargitW(final int fTargitW) { + this.fTargitW = fTargitW; + } + + public void setBReverse(final int bReverse) { + this.bReverse = bReverse; + } + + public int getFCamMaxZoomFactor() { + return this.fCamMaxZoomFactor; + } + + public int getFCamMaxDist() { + return this.fCamMaxDist; + } + + public int getFCamH() { + return this.fCamH; + } + + public int getFCamCentDist() { + return this.fCamCentDist; + } + + public int getFNorthAngle() { + return this.fNorthAngle; + } + + public int getFTargitW() { + return this.fTargitW; + } + + public int getBReverse() { + return this.bReverse; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/service/RadarService.java b/src/main/java/com/zhichenhaixin/sys/service/RadarService.java new file mode 100644 index 0000000..2421d97 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/service/RadarService.java @@ -0,0 +1,26 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.service; + +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.stopcamera.TrackSpotVo; +import com.zhichenhaixin.sys.model.ResVo; + +public interface RadarService +{ + RadarTrackVo judgeWarn(final RadarTrackVo p0); + + ResVo getPointNealyCamera(final RadarTrackVo p0); + + ResVo stopTrackCamera(final RadarTrackVo p0); + + boolean judgeCloseCamera(final RadarTrackVo p0, final boolean p1); + + void judgeCloseCamera(final int p0); + + void stopCameraTrack(final TrackSpotVo p0); + + String getPolygon(final RadarTrackVo p0) throws Exception; +} diff --git a/src/main/java/com/zhichenhaixin/sys/service/impl/CLURDICServiceImpl.java b/src/main/java/com/zhichenhaixin/sys/service/impl/CLURDICServiceImpl.java new file mode 100644 index 0000000..e5dd3e1 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/service/impl/CLURDICServiceImpl.java @@ -0,0 +1,291 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.model.MatrixCameraVo; +import com.zhichenhaixin.base.service.impl.BaseServiceImpl; +import com.zhichenhaixin.base.util.MD5Utils; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.dao.impl.*; +import com.zhichenhaixin.sys.model.*; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service("clurdicServiceImpl") +public class CLURDICServiceImpl extends BaseServiceImpl +{ + @Resource(name = "camInfoDaoImpl") + private CamInfoDaoImpl camInfoDaoImpl; + @Resource(name = "logManagerInfoDaoImpl") + private LogManagerInfoDaoImpl logManagerInfoDaoImpl; + @Resource(name = "userRoleManagerDaoImpl") + private UserRoleManagerDaoImpl userRoleManagerServiceImpl; + @Resource(name = "bigScreenDaoImpl") + private BigScreenDaoImpl bigScreenServiceImpl; + @Resource(name = "islandCruiseDaoImpl") + private IslandCruiseDaoImpl islandCruiseServiceImpl; + + public ResMsg addOrEditCamera(final CamInfo cInfo) { + return this.camInfoDaoImpl.addOrEditCamera(cInfo); + } + + public List findAllCamera() { + return this.camInfoDaoImpl.findAllCamera(); + } + + public List queryAllCameraList() { + return this.camInfoDaoImpl.queryAllCameraList(); + } + + public List queryCameraList() { + return this.camInfoDaoImpl.queryCameraList(); + } + + public List> findCameraSiteGroup() { + return this.camInfoDaoImpl.findCameraSiteGroup(); + } + + public ResMsg deleteCamera(final CamInfo cInfo) { + final ResMsg msg = this.camInfoDaoImpl.deleteCamera(cInfo); + return msg; + } + + public List findPresetInfo(final CamPresetInfo cpInfo) { + return this.camInfoDaoImpl.queryPresetInfo(cpInfo); + } + + public ResMsg addOrEditPresetInfo(final CamPresetInfo cpInfo) { + return this.camInfoDaoImpl.addOrEditPresetInfo(cpInfo); + } + + public ResMsg deletePresetInfo(final CamPresetInfo cpInfo) { + return this.camInfoDaoImpl.deletePresetInfo(cpInfo); + } + + public ResMsg addLogManagerInfo(final LogManagerInfo lmInfo) { + return this.logManagerInfoDaoImpl.addLogManagerInfo(lmInfo); + } + + public List queryLogManagerInfo(final LogManagerInfo lmInfo) { + return this.logManagerInfoDaoImpl.queryLogManagerInfo(lmInfo); + } + + public List queryFunConsList() { + return this.userRoleManagerServiceImpl.queryFunConsList(); + } + + public ResMsg saveEditRoleMsg(final RoleVo rVo) { + return this.userRoleManagerServiceImpl.saveEditRoleMsg(rVo); + } + + public List queryRoleList() { + final List list = this.userRoleManagerServiceImpl.queryRoleList(); + return list; + } + + public ResMsg deleteRole(final RoleVo rVo) { + ResMsg msg = new ResMsg(); + final List userList = this.userRoleManagerServiceImpl.getUserByRoleId(rVo.getRole_id()); + if (userList != null && userList.size() > 0) { + msg.setCode(1); + msg.setMsg("\u8be5\u89d2\u8272\u4e2d\u5b58\u5728\u7528\u6237\uff0c\u4e0d\u80fd\u5220\u9664"); + } + else { + msg = this.userRoleManagerServiceImpl.deleteRole(rVo); + } + return msg; + } + + public List queryRoleComboxList() { + return this.userRoleManagerServiceImpl.queryRoleComboxList(); + } + + public ResMsg saveEditUserMsg(final UserVo uVo) { + return this.userRoleManagerServiceImpl.saveEditUserMsg(uVo); + } + + public void saveEditUser(final UserVo uVo) { + this.userRoleManagerServiceImpl.saveEditUser(uVo); + } + + public List queryUserList(final UserVo uVo) { + return this.userRoleManagerServiceImpl.queryUserList(uVo); + } + + public ResMsg deleteUser(final UserVo uVo) { + return this.userRoleManagerServiceImpl.deleteUser(uVo); + } + + public void deleteUserMsg(final UserVo uVo) { + this.userRoleManagerServiceImpl.deleteUserMsg(uVo); + } + + public UserVo queryUserByLogin(final UserVo uVo) { + uVo.setUser_passwd(MD5Utils.EncoderByMd5(uVo.getUser_passwd())); + return this.userRoleManagerServiceImpl.queryUserByLogin(uVo); + } + + public ResMsg login(final UserVo uVo) { + final ResMsg msg = new ResMsg(); + final UserLoginLogInfo info = new UserLoginLogInfo(); + info.setUser_account(uVo.getUser_account()); + info.setOperation(1); + info.setModule("\u767b\u5f55"); + msg.setCode(7); + if (StringUtil.isBlank(uVo.getUser_account()) || StringUtil.isBlank(uVo.getUser_passwd())) { + msg.setMsg("\u8d26\u53f7\u548c\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a"); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + uVo.setUser_passwd(MD5Utils.EncoderByMd5(uVo.getUser_passwd())); + UserVo userVo = this.userRoleManagerServiceImpl.queryUserByLogin(uVo); + if (userVo == null) { + msg.setMsg("\u8d26\u53f7\u6216\u8005\u5bc6\u7801\u9519\u8bef"); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + uVo.setStatus(-1); + userVo = this.userRoleManagerServiceImpl.queryUserByLogin(uVo); + if (userVo == null) { + msg.setMsg("\u8be5\u8d26\u53f7\u5df2\u7ecf\u88ab\u505c\u7528"); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + if (Constant.loginMap.containsKey(uVo.getUser_account())) { + msg.setCode(6); + msg.setMsg("\u8be5\u7528\u6237\u5df2\u7ecf\u767b\u5f55"); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + Constant.loginMap.put(uVo.getUser_account(), uVo); + msg.setCode(0); + msg.setMsg("\u767b\u5f55\u6210\u529f"); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + + public ResMsg logout(final UserVo uVo) { + final ResMsg msg = new ResMsg(); + msg.setCode(1); + final UserLoginLogInfo info = new UserLoginLogInfo(); + info.setUser_account(uVo.getUser_account()); + info.setOperation(6); + info.setModule("\u9000\u51fa"); + if (StringUtil.isBlank(uVo.getUser_account())) { + msg.setMsg("\u8d26\u53f7\u4e0d\u80fd\u4e3a\u7a7a"); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + msg.setCode(0); + msg.setMsg("\u9000\u51fa\u6210\u529f"); + Constant.loginMap.remove(uVo.getUser_account()); + info.setDes_msg(msg.getMsg()); + this.saveLoginLog(info); + return msg; + } + + public ResMsg addOrEditBigScreen(final BigScreenInfo bsInfo) { + return this.bigScreenServiceImpl.addOrEditBigScreen(bsInfo); + } + + public List findAllBigScreen() { + return this.bigScreenServiceImpl.findAllBigScreen(); + } + + public ResMsg delBigScreen(final BigScreenInfo bsInfo) { + return this.bigScreenServiceImpl.delBigScreen(bsInfo); + } + + public ResMsg bigScreenDelivery(final BigScreenInfo bsInfo) { + return this.bigScreenServiceImpl.bigScreenDelivery(bsInfo); + } + + public ResMsg seaChartBigScrDelivery(final MatrixCameraVo vo) { + return this.bigScreenServiceImpl.seaChartBigScrDelivery(vo); + } + + public ResMsg saveEditInspectionPolicyInfo(final InspectionPolicyInfo IPInfo) { + return this.islandCruiseServiceImpl.saveEditInspectionPolicyInfo(IPInfo); + } + + public List getInspectionPolicyInfo(final InspectionPolicyInfo IPInfo) { + return this.islandCruiseServiceImpl.getInspectionPolicyInfo(IPInfo); + } + + public ResMsg delInspectionPolicyInfo(final InspectionPolicyInfo IPInfo) { + return this.islandCruiseServiceImpl.delInspectionPolicyInfo(IPInfo); + } + + public ResMsg editSurLineData(final List list) { + ResMsg msg = new ResMsg(); + for (final JSONObject jsonObject : list) { + final SurLineInfo bean = JSON.toJavaObject(jsonObject, SurLineInfo.class); + msg = this.islandCruiseServiceImpl.editSurLineData(bean); + } + return msg; + } + + public List querySurLineData() { + final List surLineList = this.islandCruiseServiceImpl.querySurLineData(); + return surLineList; + } + + public ResMsg resetSurLineData() { + return this.islandCruiseServiceImpl.resetSurLineData(); + } + + public List queryCurrentUserRights(final UserVo vo) { + return this.userRoleManagerServiceImpl.queryCurrentUserRights(vo); + } + + public UserVo queryUserByAccount(final UserVo uVo) { + return this.userRoleManagerServiceImpl.queryUserByAccount(uVo); + } + + public List queryXideweiServerByCamera() { + return this.camInfoDaoImpl.queryXideweiServerByCamera(); + } + + public ResMsg updateCamMediaIpOrPort(final CamInfo info) { + return this.camInfoDaoImpl.updateCamMediaIpOrPort(info); + } + + public List>> queryCameraSiteGroup(final RoleVo vo) { + return this.camInfoDaoImpl.queryCameraSiteGroup(vo); + } + + public List queryAllCamera(final RoleVo vo) { + return this.camInfoDaoImpl.queryAllCamera(vo); + } + + public List findFunConsList() { + return this.userRoleManagerServiceImpl.findFunConsList(); + } + + public List findRoleList(final RoleVo vo) { + return this.userRoleManagerServiceImpl.findRoleList(vo); + } + + public ResMsg saveEditRoleMsgVo(final RoleVo vo) { + return this.userRoleManagerServiceImpl.saveEditRoleMsgVo(vo); + } + + public List queryCurrentUser(final UserVo vo) { + return this.userRoleManagerServiceImpl.queryCurrentUser(vo); + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/service/impl/DefenceServiceImpl.java b/src/main/java/com/zhichenhaixin/sys/service/impl/DefenceServiceImpl.java new file mode 100644 index 0000000..d8fee5f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/service/impl/DefenceServiceImpl.java @@ -0,0 +1,159 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.service.impl; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKTReader; +import com.zhichenhaixin.base.service.impl.BaseServiceImpl; +import com.zhichenhaixin.base.util.GeometryUtil; +import com.zhichenhaixin.cache.util.DefenceCacheUtil; +import com.zhichenhaixin.sys.dao.impl.DefenceDaoImpl; +import com.zhichenhaixin.sys.model.*; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.*; + +@Service("defenceServiceImpl") +public class DefenceServiceImpl extends BaseServiceImpl +{ + @Resource(name = "defenceDaoImpl") + private DefenceDaoImpl dao; + + public void initDefences() { + final List custom = this.dao.initCustomDefence(); + for (int i = 0; custom != null && i < custom.size(); ++i) { + final int defenceId = custom.get(i).getDefence_id(); + final List timeList = this.dao.getTimeById(defenceId); + custom.get(i).setTimespans(timeList); + } + if (custom != null && custom.size() > 0) { + DefenceCacheUtil.saveDefenceCache(custom); + } + } + + public List getAllCamera() { + return this.dao.getAllCamera(); + } + + public ResVo deleteDefenceById(final CustomDefence defence) { + final ResVo resVo = new ResVo(); + resVo.setCode(1000); + resVo.setMsg("\u6210\u529f"); + this.dao.delCameraById(defence.getDefence_id()); + this.dao.delTimeById(defence.getDefence_id()); + this.dao.delDefenceById(defence.getDefence_id()); + return resVo; + } + + public List getAllDefences() { + final List custom = this.dao.getAllCustomDefence(); + return custom; + } + + public ResVo saveDefences(final CustomDefence customDefence) { + return this.dao.saveDefences(customDefence); + } + + public List getNearestCamera(final List cameraList, final Geometry defence) { + final List camera2List = new ArrayList(); + double distance = 0.0; + final Map cameraMap = new HashMap(); + for (final CameraModel camera : cameraList) { + final Coordinate defencePoint = defence.getInteriorPoint().getCoordinate(); + final double defencePointX = defencePoint.x; + final double defencePointY = defencePoint.y; + final double cameraPointX = camera.getLon(); + final double cameraPointY = camera.getLat(); + distance = GeometryUtil.getDistance(defencePointX, defencePointY, cameraPointX, cameraPointY); + cameraMap.put(camera.getId(), distance); + } + final List> resultMap = sortMap(cameraMap); + THqCamera2 camera2 = null; + for (int i = 0; i < 5; ++i) { + final int cameraId = resultMap.get(i).getKey(); + camera2 = new THqCamera2(); + camera2.setCamera_id(cameraId); + for (final CameraModel camera3 : cameraList) { + if (camera3.getId() == cameraId) { + camera2.setCamera_ip(camera3.getIp()); + break; + } + } + camera2List.add(camera2); + } + return camera2List; + } + + public static List> sortMap(final Map map) { + final List> list = new ArrayList>(map.entrySet()); + Collections.sort(list, new Comparator>() { + @Override + public int compare(final Map.Entry o1, final Map.Entry o2) { + return o1.getValue().compareTo(o2.getValue()); + } + }); + return list; + } + + public ResVo resetCamera(final CustomDefence customDefence) { + final int defenceId = customDefence.getDefence_id(); + final String lonLat = customDefence.getLon_lat(); + final ResVo res = new ResVo(); + res.setCode(1000); + res.setMsg("\u6210\u529f"); + final boolean update = this.dao.updateDefence(defenceId, lonLat); + if (update) { + try { + final Geometry defence = new WKTReader().read(lonLat); + final List cameraList = this.dao.getNearestCamera(lonLat); + List camera2List = new ArrayList(); + if (cameraList.size() > 5) { + camera2List = this.getNearestCamera(cameraList, defence); + } + else { + THqCamera2 camera2 = null; + for (final CameraModel camera3 : cameraList) { + camera2 = new THqCamera2(); + camera2.setCamera_id(camera3.getId()); + camera2.setCamera_ip(camera3.getIp()); + camera2List.add(camera2); + } + } + boolean result = this.dao.delCameraById(defenceId); + THqCamera2 thqCamera2 = null; + for (int i = 0; i < camera2List.size(); ++i) { + thqCamera2 = camera2List.get(i); + thqCamera2.setDefence_id(defenceId); + result = this.dao.saveOwnCamera(thqCamera2); + if (!result) { + res.setCode(1001); + res.setMsg("\u9632\u533a\u7ed1\u5b9a\u76f8\u673a\u4fdd\u5b58\u5931\u8d25"); + } + } + } + catch (ParseException e) { + e.printStackTrace(); + res.setCode(1001); + res.setMsg("\u9632\u533a\u91cd\u7f6e\u76f8\u673a\u5931\u8d25"); + } + } + return res; + } + + public ResVo deleteBindCamera(final int defence_camwon_id) { + final ResVo res = new ResVo(); + res.setCode(1000); + res.setMsg("\u6210\u529f"); + final boolean result = this.dao.deleteBindCamera(defence_camwon_id); + if (!result) { + res.setCode(1001); + res.setMsg("\u76f8\u673a\u5220\u9664\u5931\u8d25"); + } + return res; + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/service/impl/NewlyServiceImpl.java b/src/main/java/com/zhichenhaixin/sys/service/impl/NewlyServiceImpl.java new file mode 100644 index 0000000..e5cac36 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/service/impl/NewlyServiceImpl.java @@ -0,0 +1,114 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.service.impl; + +import com.zhichenhaixin.base.service.impl.BaseServiceImpl; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.dao.impl.NewlyDaoImpl; +import com.zhichenhaixin.sys.model.*; +import com.zhichenhaixin.sys.vo.ManipulateConfiguraVo; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service("newlyServiceImpl") +public class NewlyServiceImpl extends BaseServiceImpl +{ + @Resource(name = "newlyDaoImpl") + private NewlyDaoImpl newlyDaoImpl; + + public RadarPatrolList queryRadarPatrol() { + return this.newlyDaoImpl.queryRadarPatrol(); + } + + public ResMsg addOrEditNightMode(final NightModeVo vo) { + return this.newlyDaoImpl.addOrEditNightMode(vo); + } + + public List queryNightMode() { + return this.newlyDaoImpl.queryNightMode(); + } + + public ResMsg deleteNightMode(final NightModeVo vo) { + return this.newlyDaoImpl.deleteNightMode(vo); + } + + public ResMsg switchMode(final ManipulateConfiguraVo vo) { + return this.newlyDaoImpl.switchMode(vo.getModel_type()); + } + + public List queryEarlyWarn() { + return this.newlyDaoImpl.queryEarlyWarn(); + } + + public ResMsg addOrEditEarlyWarn(final EarlyWarnVo vo) { + return this.newlyDaoImpl.addOrEditEarlyWarn(vo); + } + + public ResMsg deleteEarlyWarn(final EarlyWarnVo vo) { + return this.newlyDaoImpl.deleteEarlyWarn(vo); + } + + public List querySmuggle() { + return this.newlyDaoImpl.querySmuggle(); + } + + public ResMsg addOrEditSmuggle(final SmuggleVo vo) { + return this.newlyDaoImpl.addOrEditSmuggle(vo); + } + + public ResMsg deleteSmuggle(final SmuggleVo vo) { + return this.newlyDaoImpl.deleteSmuggle(vo); + } + + public List getPosMarkData() { + return this.newlyDaoImpl.queryPosMarkData(); + } + + public ResMsg addOrEditPosMarkData(final PosMarkData data) { + return this.newlyDaoImpl.addOrEditPosMarkData(data); + } + + public ResMsg delPosMarkData(final PosMarkData data) { + return this.newlyDaoImpl.delPosMarkData(data); + } + + public List queryFocusPointInfo(final FocusPointInfo info) { + return this.newlyDaoImpl.queryFocusPointInfo(info); + } + + public ResMsg saveEditFocusPoint(final FocusPointInfo info) { + return this.newlyDaoImpl.saveEditFocusPoint(info); + } + + public ResMsg deleteFocusPointInfo(final FocusPointInfo info) { + return this.newlyDaoImpl.deleteFocusPointInfo(info); + } + + public List queryGunBallLinkage(final GunBallLinkage vo) { + return this.newlyDaoImpl.queryGunBallLinkage(vo); + } + + public ResMsg saveEditGunBallLinkage(final GunBallLinkage vo) { + return this.newlyDaoImpl.saveEditGunBallLinkage(vo); + } + + public ResMsg deleteGunBallLinkage(final GunBallLinkage vo) { + return this.newlyDaoImpl.deleteGunBallLinkage(vo); + } + + public List queryCameraInitPreset(final CameraInitPreset vo) { + return this.newlyDaoImpl.queryCameraInitPreset(vo); + } + + public ResMsg saveEditCameraInitPreset(final CameraInitPreset vo) { + return this.newlyDaoImpl.saveEditCameraInitPreset(vo); + } + + public ResMsg deleteCameraInitPreset(final CameraInitPreset vo) { + return this.newlyDaoImpl.deleteCameraInitPreset(vo); + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/service/impl/RadarServiceImpl.java b/src/main/java/com/zhichenhaixin/sys/service/impl/RadarServiceImpl.java new file mode 100644 index 0000000..2a9c97f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/service/impl/RadarServiceImpl.java @@ -0,0 +1,517 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.service.impl; + +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.Point; +import com.vividsolutions.jts.geom.Polygon; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKTReader; +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.service.impl.BaseServiceImpl; +import com.zhichenhaixin.base.util.DateUtil; +import com.zhichenhaixin.base.util.DistanceUtil; +import com.zhichenhaixin.base.util.Kml2polygonUtil; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.cache.util.*; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.stopcamera.RadarTrackEhcache; +import com.zhichenhaixin.stopcamera.TrackSpotVo; +import com.zhichenhaixin.sys.dao.impl.BigScreenDaoImpl; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import com.zhichenhaixin.sys.dao.impl.IslandCruiseDaoImpl; +import com.zhichenhaixin.sys.dao.impl.NewlyDaoImpl; +import com.zhichenhaixin.sys.model.*; +import com.zhichenhaixin.sys.service.RadarService; +import com.zhichenhaixin.thread.ControllerFllowThread; +import com.zhichenhaixin.thread.FllowSocket; +import com.zhichenhaixin.thread.FllowThread; +import com.zhichenhaixin.zmq.model.RadarInfoUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.sql.Timestamp; +import java.util.List; + +@Service("radarServiceImpl") +public class RadarServiceImpl extends BaseServiceImpl implements RadarService +{ + private final Log log; + private static Polygon po1; + private static Polygon po2; + private static Polygon po3; + private static SurLineInfo bean1; + private static SurLineInfo bean2; + private static SurLineInfo bean3; + @Resource(name = "islandCruiseDaoImpl") + private IslandCruiseDaoImpl islandCruiseDaoImpl; + @Resource(name = "dbAlarmInfoDaoImpl") + DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + @Resource(name = "camInfoDaoImpl") + CamInfoDaoImpl camInfoDaoImpl; + @Resource(name = "bigScreenDaoImpl") + private BigScreenDaoImpl bigScreenDaoImpl; + @Resource(name = "newlyDaoImpl") + private NewlyDaoImpl newlyDaoImpl; + + static { + RadarServiceImpl.po1 = null; + RadarServiceImpl.po2 = null; + RadarServiceImpl.po3 = null; + RadarServiceImpl.bean1 = null; + RadarServiceImpl.bean2 = null; + RadarServiceImpl.bean3 = null; + } + + public RadarServiceImpl() { + this.log = LogFactory.getLog(RadarServiceImpl.class); + } + + @Override + public RadarTrackVo judgeWarn(final RadarTrackVo vo) { + this.initLineString(); + this.judgeCusDefence(vo); + this.judgeSurroundLine(vo); + return vo; + } + + @Override + public ResVo getPointNealyCamera(final RadarTrackVo radarTrackVo) { + final ResVo resVo = new ResVo(); + try { + final double lon = radarTrackVo.getWgs84PosLon(); + final double lat = radarTrackVo.getWgs84PosLat(); + final int target_id = radarTrackVo.getTrackNumber(); + final RadarTrackVo point = new RadarTrackVo(); + if (target_id == 0) { + point.setTrackNumber(-1); + } + else { + point.setTrackNumber(target_id); + } + point.setWgs84PosLon(lon); + point.setWgs84PosLat(lat); + final int fllow = (target_id > 0) ? 2 : 1; + point.setFllow(fllow); + point.setMode(2); + point.setWarnSiteType(""); + final RadarTrackVo vo = AgilTrackEhcache.get(target_id); + if (vo != null) { + point.setCog(vo.getCog()); + point.setSog(vo.getSog()); + } + final long timeMillis = System.currentTimeMillis(); + point.setUtc(timeMillis); + ControllerFllowThread.sendMsg(point); + FllowSocket.sendMsg(point); + this.log.info("-> \u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u7ed9\u63a7\u5236\u5668\u53d1\u9001\u76ee\u6807\u7f16\u53f7\uff1a " + point.getTrackNumber()); + if (target_id != 0) { + FllowThread.map.put(String.valueOf(target_id), timeMillis); + } + resVo.setCode(1000); + resVo.setMsg("\u70ed\u70b9\u6216\u624b\u52a8\u8ddf\u8e2a\u6210\u529f"); + } + catch (Exception e) { + resVo.setCode(1001); + resVo.setMsg("\u70ed\u70b9\u6216\u624b\u52a8\u8ddf\u8e2a\u5f02\u5e38"); + this.log.error("\u70ed\u70b9\u6216\u624b\u52a8\u8ddf\u8e2a\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return resVo; + } + + @Override + public ResVo stopTrackCamera(final RadarTrackVo radarTrackVo) { + final ResVo resVo = new ResVo(); + try { + radarTrackVo.setMode(1); + radarTrackVo.setWarnSiteType(""); + final RadarTrackVo vo = AgilTrackEhcache.get(radarTrackVo.getTrackNumber()); + if (vo != null) { + radarTrackVo.setCog(vo.getCog()); + radarTrackVo.setSog(vo.getSog()); + } + radarTrackVo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(radarTrackVo); + FllowSocket.sendMsg(radarTrackVo); + final int trackNumber = radarTrackVo.getTrackNumber(); + if (trackNumber != 0 && FllowThread.map != null && FllowThread.map.containsKey(String.valueOf(trackNumber))) { + this.log.info("==> \u505c\u6b62\u8ddf\u8e2a\uff0c\u6e05\u9664\u8ddf\u8e2a\u6570\u636e\uff1a " + radarTrackVo.getTrackNumber()); + FllowThread.map.remove(String.valueOf(trackNumber)); + } + resVo.setCode(1000); + resVo.setMsg("\u505c\u6b62\u8ddf\u8e2a\u6210\u529f"); + } + catch (Exception e) { + resVo.setCode(1001); + resVo.setMsg("\u505c\u6b62\u8ddf\u8e2a\u5f02\u5e38"); + this.log.error("\u505c\u6b62\u8ddf\u8e2a\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + return resVo; + } + + @Override + public boolean judgeCloseCamera(final RadarTrackVo radarTrackVo, final boolean lastReport) { + boolean result = false; + final int trackNumber = radarTrackVo.getTrackNumber(); + if (lastReport && radarTrackVo.getTrackLastReport()) { + RadarInfoUtil.targetLose(trackNumber); + final TrackSpotVo point = RadarTrackEhcache.get(trackNumber); + if (point != null) { + this.stopCameraTrack(point); + this.log.info("\u76ee\u6807\u4e22\u5931\uff0c\u505c\u6b62\u76f8\u673a\u8ddf\u8e2a\uff1a" + trackNumber); + } + AgilTrackEhcache.remove(trackNumber); + TrackPointEhcache.remove(trackNumber); + Constant.removeWarnMap("line_one" + trackNumber); + Constant.removeWarnMap("line_two" + trackNumber); + Constant.removeWarnMap("line_three" + trackNumber); + Constant.removeWarnMap("defence" + trackNumber); + this.log.info("\u4e22\uff1a" + trackNumber); + if (FllowThread.map != null && FllowThread.map.containsKey(String.valueOf(trackNumber))) { + this.log.info("\u76ee\u6807\u4e22\u5931\uff0c\u6e05\u9664\u8ddf\u8e2a\u7684\u6570\u636e\uff1a" + trackNumber); + FllowThread.map.remove(String.valueOf(trackNumber)); + } + result = true; + } + return result; + } + + @Override + public void judgeCloseCamera(final int trackNumber) { + final TrackSpotVo point = RadarTrackEhcache.get(trackNumber); + if (point != null) { + this.stopCameraTrack(point); + this.log.info("\u76ee\u6807\u4e22\u5931\uff0c\u505c\u6b62\u76f8\u673a\u8ddf\u8e2a\uff1a" + trackNumber); + } + AgilTrackEhcache.remove(trackNumber); + TrackPointEhcache.remove(trackNumber); + Constant.removeWarnMap("line_one" + trackNumber); + Constant.removeWarnMap("line_two" + trackNumber); + Constant.removeWarnMap("line_three" + trackNumber); + Constant.removeWarnMap("defence" + trackNumber); + this.log.info("\u4e22\uff1a" + trackNumber); + if (FllowThread.map != null && FllowThread.map.containsKey(String.valueOf(trackNumber))) { + this.log.info("\u76ee\u6807\u4e22\u5931\uff0c\u6e05\u9664\u8ddf\u8e2a\u7684\u6570\u636e\uff1a" + trackNumber); + FllowThread.map.remove(String.valueOf(trackNumber)); + } + } + + @Override + public void stopCameraTrack(final TrackSpotVo point) { + final RadarTrackVo radarTrack = new RadarTrackVo(); + radarTrack.setTrackNumber(point.getTrackNumber()); + radarTrack.setFllow(3); + radarTrack.setMode(1); + radarTrack.setRtsp(point.getRtsp()); + radarTrack.setCameraId(point.getCameraId()); + radarTrack.setWarnSiteType(point.getWarnSiteType()); + final RadarTrackVo vo = AgilTrackEhcache.get(point.getTrackNumber()); + if (vo != null) { + radarTrack.setCog(vo.getCog()); + radarTrack.setSog(vo.getSog()); + } + radarTrack.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(radarTrack); + FllowSocket.sendMsg(radarTrack); + RadarTrackEhcache.remove(point.getTrackNumber()); + } + + @Override + public String getPolygon(final RadarTrackVo radarTrackVo) throws Exception { + final SurLineInfo surLineInfo = this.islandCruiseDaoImpl.getSurLineInfo(); + final String lon_lats = surLineInfo.getLon_lats(); + final WKTReader reader = new WKTReader(); + final LineString ls1 = (LineString)reader.read(lon_lats); + RadarServiceImpl.po1 = Kml2polygonUtil.linestring2poly(ls1); + final Point point = Kml2polygonUtil.xy2point(radarTrackVo.getWgs84PosLon(), radarTrackVo.getWgs84PosLat()); + if (RadarServiceImpl.po1 != null && !RadarServiceImpl.po1.contains(point)) { + return null; + } + return lon_lats; + } + + private void initLineString() { + List slist = SurLineDataEhcache.getAll(); + final WKTReader reader = new WKTReader(); + LineString ls1 = null; + LineString ls2 = null; + LineString ls3 = null; + if (slist != null && slist.size() > 0) { + try { + for (final SurLineInfo bean : slist) { + if (bean.getId() == 4) { + ls1 = (LineString)reader.read(bean.getLon_lats()); + RadarServiceImpl.bean1 = bean; + RadarServiceImpl.po1 = Kml2polygonUtil.linestring2poly(ls1); + } + if (bean.getId() == 5) { + ls2 = (LineString)reader.read(bean.getLon_lats()); + RadarServiceImpl.bean2 = bean; + RadarServiceImpl.po2 = Kml2polygonUtil.linestring2poly(ls2); + } + if (bean.getId() == 6) { + ls3 = (LineString)reader.read(bean.getLon_lats()); + RadarServiceImpl.bean3 = bean; + RadarServiceImpl.po3 = Kml2polygonUtil.linestring2poly(ls3); + } + } + } + catch (ParseException e) { + this.log.info(e.getMessage()); + } + slist.clear(); + slist = null; + } + } + + private void handleLineWarn(final SurLineInfo bean, final RadarTrackVo vo, final int status) { + if (bean.getShow_mv() == 1 && bean.getSign_window() == 1) { + if (bean.getWarn_flash() == 1) { + vo.setStatus(status); + } + if (StringUtil.notBlank(bean.getWarn_color())) { + vo.setWarn_color(bean.getWarn_color()); + } + vo.setSign_window(bean.getSign_window()); + vo.setTimeStamp(System.currentTimeMillis()); + final WarnInfoBean warnInfoVo = WarnInfoBean.getClone(); + warnInfoVo.setAlarm_source("2"); + final List list = SmuggleEhcache.getAll(); + SmuggleVo smu = (list == null || list.size() <= 0) ? null : list.get(0); + if (smu != null && smu.getStartup() == 1) { + final boolean flag = DistanceUtil.verifyIsSmuggle(null, TrackCameraEhcache.getAll(), vo, AgilTrackEhcache.getAll(), smu.getPeople_num(), smu.getCar_num(), smu.getShip_num(), smu.getSmuggle_bound()); + if (flag) { + warnInfoVo.setAlarm_source("5"); + vo.setIsSmuggle(1); + } + smu = null; + } + warnInfoVo.setId(DateUtil.getCurMillion()); + warnInfoVo.setBegintime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + warnInfoVo.setAlarm_level(String.valueOf(status)); + warnInfoVo.setAlarm_site(bean.getName()); + warnInfoVo.setAlarm_site_no(String.valueOf(bean.getId())); + warnInfoVo.setAlarm_status("2"); + warnInfoVo.setCreate_time(new Timestamp(System.currentTimeMillis())); + warnInfoVo.setAlarm_type("1"); + warnInfoVo.setObject_id(String.valueOf(vo.getTrackNumber())); + warnInfoVo.setObject_type("3"); + warnInfoVo.setX(vo.getWgs84PosLon()); + warnInfoVo.setY(vo.getWgs84PosLat()); + warnInfoVo.setMark(null); + warnInfoVo.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + warnInfoVo.setTts(bean.getTts()); + if (status == 4) { + warnInfoVo.setHandle_status(3); + warnInfoVo.setWarnSiteType("line_two"); + if (Constant.surline_number == 3) { + warnInfoVo.setWarnSiteType("line_three"); + } + } + else if (status == 3) { + warnInfoVo.setWarnSiteType("line_one"); + } + final Object warn = Constant.warnMap.get(String.valueOf(warnInfoVo.getWarnSiteType()) + vo.getTrackNumber()); + if (warn == null) { + Constant.addWarnMap(String.valueOf(warnInfoVo.getWarnSiteType()) + vo.getTrackNumber(), warnInfoVo.getTts()); + this.log.info("\u8fdb\uff1a" + warnInfoVo.getWarnSiteType() + vo.getTrackNumber()); + TrackAlarmEhcache.put(warnInfoVo); + final Object infoBeanThree = Constant.warnMap.get("line_three" + vo.getTrackNumber()); + final Object infoBeanTwo = Constant.warnMap.get("line_two" + vo.getTrackNumber()); + final Object infoBeanOne = Constant.warnMap.get("line_one" + vo.getTrackNumber()); + if (Constant.surline_number == 3) { + if (infoBeanThree != null && infoBeanTwo == null) { + this.log.info("\u96f7\u8fbe\u7f16\u53f7\u4e3a\uff1a" + vo.getTrackNumber() + "\uff0c\u8fdb\u5165\u4e09\u7ea7\u73af\u5c9b\u7ebf\uff0c\u6682\u672a\u8fdb\u5165\u4e8c\u7ea7\u73af\u5c9b\u7ebf"); + } + else if (infoBeanThree != null && infoBeanTwo != null) { + this.log.info("\u96f7\u8fbe\u7f16\u53f7\u4e3a\uff1a" + vo.getTrackNumber() + "\uff0c\u8fdb\u5165\u4e09\u7ea7\u73af\u5c9b\u7ebf\uff0c\u8fdb\u5165\u4e86\u4e8c\u7ea7\u73af\u5c9b\u7ebf"); + } + } + if (infoBeanTwo != null && infoBeanOne != null) { + this.log.info("\u96f7\u8fbe\u7f16\u53f7\u4e3a\uff1a" + vo.getTrackNumber() + "\uff0c\u9996\u5148\u8fdb\u5165\u4e8c\u7ea7\u73af\u5c9b\u7ebf\uff0c\u7136\u540e\u8fdb\u5165\u4e00\u7ea7\u73af\u5c9b\u7ebf"); + } + else if (infoBeanTwo == null && infoBeanOne != null) { + this.log.info("\u96f7\u8fbe\u7f16\u53f7\u4e3a\uff1a" + vo.getTrackNumber() + "\uff0c\u672a\u8fdb\u5165\u4e8c\u7ea7\u73af\u5c9b\u7ebf\uff0c\u76f4\u63a5\u8fdb\u5165\u4e86\u4e00\u7ea7\u73af\u5c9b\u7ebf\uff0c\u5219\u8ba4\u4e3a\u662f\u865a\u8b66\uff0c\u4f46\u662f\u4f1a\u7ed9\u63a7\u5236\u5668\u53d1\u9001\u8ddf\u8e2a\u4fe1\u606f"); + } + else if (infoBeanOne == null && infoBeanTwo != null) { + this.log.info("\u96f7\u8fbe\u7f16\u53f7\u4e3a\uff1a" + vo.getTrackNumber() + "\uff0c\u8fdb\u5165\u4e8c\u7ea7\u73af\u5c9b\u7ebf\uff0c\u6682\u672a\u8fdb\u5165\u4e00\u7ea7\u73af\u5c9b\u7ebf"); + } + if (Constant.MODEL_TYPE == 3) { + final Object object = Constant.warnMap.get("defence" + vo.getTrackNumber()); + if ((infoBeanTwo != null && infoBeanOne != null) || (infoBeanThree != null && infoBeanTwo != null) || object != null) { + vo.setFllow(3); + vo.setMode(1); + if (object != null) { + vo.setWarnSiteType("defence"); + this.log.info("\u8be5\u76ee\u6807\u7f16\u53f7\u662f\uff1a" + vo.getTrackNumber() + "\u5df2\u8fdb\u5165\u4e8c\u7ea7\u73af\u5c9b\u7ebf\uff0c\u9700\u8981\u53d1\u9001\u505c\u6b62\u6b63\u5728\u8ddf\u8e2a\u9632\u533a\u544a\u8b66\u4fe1\u606f\uff0c\u540c\u65f6\u53d1\u9001\u5f00\u59cb\u8ddf\u8e2a\u4e8c\u7ea7\u73af\u5c9b\u7ebf\u7684\u63d0\u793a\u544a\u8b66\u4fe1\u606f"); + } + else { + vo.setWarnSiteType("line_two"); + this.log.info("\u8be5\u76ee\u6807\u7f16\u53f7\u662f\uff1a" + vo.getTrackNumber() + "\u5df2\u8fdb\u5165\u4e00\u7ea7\u73af\u5c9b\u7ebf\uff0c\u9700\u8981\u53d1\u9001\u505c\u6b62\u6b63\u5728\u8ddf\u8e2a\u4e8c\u7ea7\u73af\u5c9b\u7ebf\u7684\u63d0\u793a\u544a\u8b66\u4fe1\u606f\uff0c\u540c\u65f6\u53d1\u9001\u5f00\u59cb\u8ddf\u8e2a\u4e00\u7ea7\u73af\u5c9b\u7ebf\u7684\u5cb8\u7ebf\u544a\u8b66\u4fe1\u606f"); + } + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + } + } + if (Constant.MODEL_TYPE == 3) { + RadarInfoUtil.warnCount(vo.getTrackNumber()); + vo.setFllow(2); + vo.setMode(1); + vo.setWarnSiteType(warnInfoVo.getWarnSiteType()); + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + } + } + + private void judgeSurroundLine(final RadarTrackVo vo) { + final int trackNum = vo.getTrackNumber(); + final Point point = Kml2polygonUtil.xy2point(vo.getWgs84PosLon(), vo.getWgs84PosLat()); + if (RadarServiceImpl.po3 != null && RadarServiceImpl.po3.contains(point) && RadarServiceImpl.po2 != null && !RadarServiceImpl.po2.contains(point)) { + if (Constant.surline_number == 3) { + this.handleLineWarn(RadarServiceImpl.bean3, vo, 4); + } + } + else if (RadarServiceImpl.po2 != null && RadarServiceImpl.po2.contains(point) && RadarServiceImpl.po1 != null && !RadarServiceImpl.po1.contains(point)) { + if (Constant.surline_number == 2 || Constant.surline_number == 3) { + this.handleLineWarn(RadarServiceImpl.bean2, vo, 4); + } + } + else if (RadarServiceImpl.po1 != null && RadarServiceImpl.po1.contains(point)) { + this.handleLineWarn(RadarServiceImpl.bean1, vo, 3); + } + else { + if (Constant.warnMap.get("line_one" + trackNum) != null) { + this.log.info("\u51fa\uff1aline_one" + trackNum); + if (Constant.MODEL_TYPE == 3) { + vo.setFllow(3); + vo.setMode(1); + vo.setWarnSiteType("line_one"); + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + } + Constant.removeWarnMap("line_one" + trackNum); + if (Constant.surline_number == 2 || Constant.surline_number == 3) { + if (Constant.warnMap.get("line_two" + trackNum) != null) { + this.log.info("\u51fa\uff1aline_two" + trackNum); + if (Constant.MODEL_TYPE == 3) { + vo.setFllow(3); + vo.setMode(1); + vo.setWarnSiteType("line_two"); + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + } + Constant.removeWarnMap("line_two" + trackNum); + if (Constant.warnMap.get("line_three" + trackNum) != null) { + this.log.info("\u51fa\uff1aline_three" + trackNum); + if (Constant.MODEL_TYPE == 3) { + vo.setFllow(3); + vo.setMode(1); + vo.setWarnSiteType("line_three"); + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + } + Constant.removeWarnMap("line_three" + trackNum); + } + } + } + + private void judgeCusDefence(final RadarTrackVo vo) { + final int trackNum = vo.getTrackNumber(); + final Point point = Kml2polygonUtil.xy2point(vo.getWgs84PosLon(), vo.getWgs84PosLat()); + final CustomDefence customLayer = CustomFeatureEhcache.isContainArea(point); + final WarnInfoBean warnInfoVo = WarnInfoBean.getClone(); + if (customLayer != null && customLayer.getBulletin_plan() == 1) { + if (DefenceCacheUtil.judgeSetDefence(customLayer.getTimespans())) { + vo.setStatus(customLayer.getWarn_level()); + if (StringUtil.notBlank(customLayer.getWarn_color())) { + vo.setWarn_color(customLayer.getWarn_color()); + } + vo.setIs_warn(customLayer.getIs_warn()); + warnInfoVo.setAlarm_source("2"); + final List list = SmuggleEhcache.getAll(); + SmuggleVo smu = (list == null || list.size() <= 0) ? null : list.get(0); + if (smu != null && smu.getStartup() == 1) { + final boolean flag = DistanceUtil.verifyIsSmuggle(null, TrackCameraEhcache.getAll(), vo, AgilTrackEhcache.getAll(), smu.getPeople_num(), smu.getCar_num(), smu.getShip_num(), smu.getSmuggle_bound()); + if (flag) { + warnInfoVo.setAlarm_source("5"); + vo.setIsSmuggle(1); + } + smu = null; + } + warnInfoVo.setId(DateUtil.getCurMillion()); + warnInfoVo.setBegintime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + warnInfoVo.setAlarm_level("2"); + warnInfoVo.setAlarm_site(customLayer.getDefence_name()); + warnInfoVo.setAlarm_site_no(String.valueOf(customLayer.getDefence_id())); + warnInfoVo.setAlarm_status("2"); + warnInfoVo.setCreate_time(new Timestamp(System.currentTimeMillis())); + warnInfoVo.setAlarm_type("1"); + warnInfoVo.setObject_id(String.valueOf(trackNum)); + warnInfoVo.setObject_type("3"); + warnInfoVo.setX(vo.getWgs84PosLon()); + warnInfoVo.setY(vo.getWgs84PosLat()); + warnInfoVo.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + warnInfoVo.setTts(customLayer.getTts()); + warnInfoVo.setWarnSiteType("defence"); + final Object warn = Constant.warnMap.get(String.valueOf(warnInfoVo.getWarnSiteType()) + vo.getTrackNumber()); + if (warn == null) { + if (customLayer.getDefence_id() == Constant.defence_id) { + warnInfoVo.setAlarm_level("3"); + warnInfoVo.setAlarm_site("\u4e00\u7ea7\u73af\u5c9b\u7ebf"); + this.dbAlarmInfoDaoImpl.saveWarnRecord(warnInfoVo); + final WarnComposeVideoVo wvo = WarnComposeVideoVo.getClone(); + wvo.setAlarm_id(warnInfoVo.getId()); + wvo.setBegintime(warnInfoVo.getBegintime()); + warnInfoVo.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + wvo.setEndtime(warnInfoVo.getEndtime()); + wvo.setRtsp(""); + wvo.setFtp(""); + this.dbAlarmInfoDaoImpl.andComposeVideo(wvo); + } + Constant.addWarnMap(String.valueOf(warnInfoVo.getWarnSiteType()) + vo.getTrackNumber(), warnInfoVo.getTts()); + TrackAlarmEhcache.put(warnInfoVo); + this.log.info("\u8fdb\uff1a" + warnInfoVo.getWarnSiteType() + vo.getTrackNumber()); + } + if (Constant.MODEL_TYPE == 3) { + RadarInfoUtil.warnCount(vo.getTrackNumber()); + vo.setFllow(2); + vo.setMode(1); + vo.setWarnSiteType("defence"); + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + } + } + else if (customLayer == null) { + vo.setIsSmuggle(0); + if (Constant.warnMap.get("defence" + trackNum) != null) { + this.log.info("\u51fa\uff1adefence" + vo.getTrackNumber()); + if (Constant.MODEL_TYPE == 3) { + vo.setFllow(3); + vo.setMode(1); + vo.setWarnSiteType("defence"); + vo.setUtc(System.currentTimeMillis()); + ControllerFllowThread.sendMsg(vo); + FllowSocket.sendMsg(vo); + } + Constant.removeWarnMap("defence" + vo.getTrackNumber()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/sys/vo/ManipulateConfiguraVo.java b/src/main/java/com/zhichenhaixin/sys/vo/ManipulateConfiguraVo.java new file mode 100644 index 0000000..f99af0e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/sys/vo/ManipulateConfiguraVo.java @@ -0,0 +1,59 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.sys.vo; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class ManipulateConfiguraVo implements Serializable +{ + private static final long serialVersionUID = 3211459333663981032L; + private int model_type; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ManipulateConfiguraVo)) { + return false; + } + final ManipulateConfiguraVo other = (ManipulateConfiguraVo)o; + return other.canEqual(this) && this.getModel_type() == other.getModel_type(); + } + + protected boolean canEqual(final Object other) { + return other instanceof ManipulateConfiguraVo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getModel_type(); + return result; + } + + @Override + public String toString() { + return "ManipulateConfiguraVo(model_type=" + this.getModel_type() + ")"; + } + + public void setModel_type(final int model_type) { + this.model_type = model_type; + } + + public int getModel_type() { + return this.model_type; + } + + @ConstructorProperties({ "model_type" }) + public ManipulateConfiguraVo(final int model_type) { + this.model_type = model_type; + } + + public ManipulateConfiguraVo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/tcp/model/NyGuideCamPosModel.java b/src/main/java/com/zhichenhaixin/tcp/model/NyGuideCamPosModel.java new file mode 100644 index 0000000..d1aaa3a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/tcp/model/NyGuideCamPosModel.java @@ -0,0 +1,52 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.tcp.model; + +import java.beans.ConstructorProperties; + +/** + * 引导光电位置 + */ +public class NyGuideCamPosModel +{ + /** + * 距离(单位:米) + */ + private int dis; + + /** + * 方位(相对于大地北,单位:度) + */ + private float azimuth; + + + public int getDis() { + return dis; + } + + public void setDis(int dis) { + this.dis = dis; + } + + public float getAzimuth() { + return azimuth; + } + + public void setAzimuth(float azimuth) { + this.azimuth = azimuth; + } + + public NyGuideCamPosModel() { + } + + + @ConstructorProperties({ "dis","azimuth" }) + public NyGuideCamPosModel(final int dis, final float azimuth) { + this.dis=dis; + this.azimuth=azimuth; + } + + +} diff --git a/src/main/java/com/zhichenhaixin/tcp/model/RadarRESPackageModel.java b/src/main/java/com/zhichenhaixin/tcp/model/RadarRESPackageModel.java new file mode 100644 index 0000000..3ab1326 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/tcp/model/RadarRESPackageModel.java @@ -0,0 +1,85 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.tcp.model; + +import com.zhichenhaixin.util.BitConverter; + +import java.beans.ConstructorProperties; + +/** + * todo 雷达总体数据 + * 1.包头标识 mark + * 2.数据类型 dataType + * 3.整包数据的长度 dataLength + * 4.数据数量 dataNum + * 5.雷达数据 allBytes + */ +public class RadarRESPackageModel +{ + private byte[] allBytes; + + public int getMark() { + final int mark = BitConverter.bytes2IntSmallEndian(this.allBytes, 0); + return mark; + } + + public int getDataType() { + final int dataType = BitConverter.bytes2IntSmallEndian(this.allBytes, 4); + return dataType; + } + + public int getDataLength() { + final int dataLength = BitConverter.bytes2IntSmallEndian(this.allBytes, 8); + return dataLength; + } + + public int getDataNum() { + final int dataNum = BitConverter.bytes2IntSmallEndian(this.allBytes, 12); + return dataNum; + } + + public boolean isIntegrated() { + boolean flag = false; + if (this.getDataLength() <= this.allBytes.length) { + flag = true; + } + return flag; + } + + public byte[] getData() { + final int len = this.getDataLength() - 16; + final byte[] bs = new byte[len]; + System.arraycopy(this.allBytes, 16, bs, 0, len); + return bs; + } + + public byte[] getRemain() { + final int len = this.getDataLength(); + byte[] bs = null; + if (len < this.allBytes.length) { + bs = new byte[this.allBytes.length - len]; + System.arraycopy(this.allBytes, len, bs, 0, this.allBytes.length - len); + } + return bs; + } + + public RadarRESPackageModel() { + this.allBytes = null; + } + + @ConstructorProperties({ "allBytes" }) + public RadarRESPackageModel(final byte[] allBytes) { + this.allBytes = null; + this.allBytes = allBytes; + } + + public void setAllBytes(final byte[] allBytes) { + this.allBytes = allBytes; + } + + public byte[] getAllBytes() { + return this.allBytes; + } +} diff --git a/src/main/java/com/zhichenhaixin/tcp/model/RadarStateModel.java b/src/main/java/com/zhichenhaixin/tcp/model/RadarStateModel.java new file mode 100644 index 0000000..eb90974 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/tcp/model/RadarStateModel.java @@ -0,0 +1,101 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.tcp.model; + +import java.beans.ConstructorProperties; + +/** + * 雷达状态数据 + */ +public class RadarStateModel +{ + private int radarId; + private long timestamp; + private char workState; + private char sendState; + private float temperature; + private float longitude; + private float latitude; + private float altitude; + + public void setRadarId(final int radarId) { + this.radarId = radarId; + } + + public void setTimestamp(final long timestamp) { + this.timestamp = timestamp; + } + + public void setWorkState(final char workState) { + this.workState = workState; + } + + public void setSendState(final char sendState) { + this.sendState = sendState; + } + + public void setTemperature(final float temperature) { + this.temperature = temperature; + } + + public void setLongitude(final float longitude) { + this.longitude = longitude; + } + + public void setLatitude(final float latitude) { + this.latitude = latitude; + } + + public void setAltitude(final float altitude) { + this.altitude = altitude; + } + + public int getRadarId() { + return this.radarId; + } + + public long getTimestamp() { + return this.timestamp; + } + + public char getWorkState() { + return this.workState; + } + + public char getSendState() { + return this.sendState; + } + + public float getTemperature() { + return this.temperature; + } + + public float getLongitude() { + return this.longitude; + } + + public float getLatitude() { + return this.latitude; + } + + public float getAltitude() { + return this.altitude; + } + + public RadarStateModel() { + } + + @ConstructorProperties({ "radarId", "timestamp", "workState", "sendState", "temperature", "longitude", "latitude", "altitude" }) + public RadarStateModel(final int radarId, final long timestamp, final char workState, final char sendState, final float temperature, final float longitude, final float latitude, final float altitude) { + this.radarId = radarId; + this.timestamp = timestamp; + this.workState = workState; + this.sendState = sendState; + this.temperature = temperature; + this.longitude = longitude; + this.latitude = latitude; + this.altitude = altitude; + } +} diff --git a/src/main/java/com/zhichenhaixin/tcp/model/RadarTargetModel.java b/src/main/java/com/zhichenhaixin/tcp/model/RadarTargetModel.java new file mode 100644 index 0000000..008d037 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/tcp/model/RadarTargetModel.java @@ -0,0 +1,91 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.tcp.model; + +import java.beans.ConstructorProperties; + +/** + * 雷达点迹数据 + */ +public class RadarTargetModel +{ + private int radarId; + private long timestamp; + private int dis; + private float azimuth; + private float longitude; + private float latitude; + private float altitude; + + public void setRadarId(final int radarId) { + this.radarId = radarId; + } + + public void setTimestamp(final long timestamp) { + this.timestamp = timestamp; + } + + public void setDis(final int dis) { + this.dis = dis; + } + + public void setAzimuth(final float azimuth) { + this.azimuth = azimuth; + } + + public void setLongitude(final float longitude) { + this.longitude = longitude; + } + + public void setLatitude(final float latitude) { + this.latitude = latitude; + } + + public void setAltitude(final float altitude) { + this.altitude = altitude; + } + + public int getRadarId() { + return this.radarId; + } + + public long getTimestamp() { + return this.timestamp; + } + + public int getDis() { + return this.dis; + } + + public float getAzimuth() { + return this.azimuth; + } + + public float getLongitude() { + return this.longitude; + } + + public float getLatitude() { + return this.latitude; + } + + public float getAltitude() { + return this.altitude; + } + + public RadarTargetModel() { + } + + @ConstructorProperties({ "radarId", "timestamp", "dis", "azimuth", "longitude", "latitude", "altitude" }) + public RadarTargetModel(final int radarId, final long timestamp, final int dis, final float azimuth, final float longitude, final float latitude, final float altitude) { + this.radarId = radarId; + this.timestamp = timestamp; + this.dis = dis; + this.azimuth = azimuth; + this.longitude = longitude; + this.latitude = latitude; + this.altitude = altitude; + } +} diff --git a/src/main/java/com/zhichenhaixin/tcp/model/RadarTrackModel.java b/src/main/java/com/zhichenhaixin/tcp/model/RadarTrackModel.java new file mode 100644 index 0000000..e25e890 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/tcp/model/RadarTrackModel.java @@ -0,0 +1,225 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.tcp.model; + +import java.beans.ConstructorProperties; + +/** + * 雷达航迹数据 + */ +public class RadarTrackModel +{ + private int radarId;//设备ID + private long timestamp;//时间戳 + private int trackId;//航迹ID(目标批号) + private char trackState;//目标状态 + private int dis;//距离 + private float azimuth;//方位角 + private float speed;//速度 + private float course;//航向 + private float longitude;//经度 + private float latitude;//纬度 + private float altitude;//海拔(估算目标高度) + private char type;//目标类型 + + //todo 增加字段 + private int deviceOwnerId;//设备所属站点ID + + private int counter;//目标消息 + + private int timeoutToNext; + + public int getdeviceOwnerId() { + return deviceOwnerId; + } + + public void setdeviceOwnerId(int deviceOwnerId) { + this.deviceOwnerId = deviceOwnerId; + } + + public int getCounter() { + return counter; + } + + public void setCounter(int counter) { + this.counter = counter; + } + + public int getDeviceOwnerId() { + return deviceOwnerId; + } + + public void setDeviceOwnerId(int deviceOwnerId) { + this.deviceOwnerId = deviceOwnerId; + } + + public int getTimeoutToNext() { + return timeoutToNext; + } + + public void setTimeoutToNext(int timeoutToNext) { + this.timeoutToNext = timeoutToNext; + } + + public void setRadarId(final int radarId) { + this.radarId = radarId; + } + + public void setTimestamp(final long timestamp) { + this.timestamp = timestamp; + } + + public void setTrackId(final int trackId) { + this.trackId = trackId; + } + + public void setTrackState(final char trackState) { + this.trackState = trackState; + } + + public void setDis(final int dis) { + this.dis = dis; + } + + public void setAzimuth(final float azimuth) { + this.azimuth = azimuth; + } + + public void setSpeed(final float speed) { + this.speed = speed; + } + + public void setCourse(final float course) { + this.course = course; + } + + public void setLongitude(final float longitude) { + this.longitude = longitude; + } + + public void setLatitude(final float latitude) { + this.latitude = latitude; + } + + public void setAltitude(final float altitude) { + this.altitude = altitude; + } + + public void setType(final char type) { + this.type = type; + } + + public int getRadarId() { + return this.radarId; + } + + public long getTimestamp() { + return this.timestamp; + } + + public int getTrackId() { + return this.trackId; + } + + public char getTrackState() { + return this.trackState; + } + + public int getDis() { + return this.dis; + } + + public float getAzimuth() { + return this.azimuth; + } + + public float getSpeed() { + return this.speed; + } + + public float getCourse() { + return this.course; + } + + public float getLongitude() { + return this.longitude; + } + + public float getLatitude() { + return this.latitude; + } + + public float getAltitude() { + return this.altitude; + } + + public char getType() { + return this.type; + } + + public RadarTrackModel() { + } + + @ConstructorProperties({ "radarId", "timestamp", "trackId", "trackState", "dis", "azimuth", "speed", "course", "longitude", "latitude", "altitude", "type" }) + public RadarTrackModel(final int radarId, + final long timestamp, + final int trackId, + final char trackState, + final int dis, + final float azimuth, + final float speed, + final float course, + final float longitude, + final float latitude, + final float altitude, + final char type) { + this.radarId = radarId; + this.timestamp = timestamp; + this.trackId = trackId; + this.trackState = trackState; + this.dis = dis; + this.azimuth = azimuth; + this.speed = speed; + this.course = course; + this.longitude = longitude; + this.latitude = latitude; + this.altitude = altitude; + this.type = type; + } + + //todo : 把新增字段的加入构造函数 + @ConstructorProperties({ "radarId", "timestamp", "trackId", "trackState", "dis", "azimuth", "speed", "course", "longitude", "latitude", "altitude", "type" ,"deviceOwnerId","counter","timeoutToNext"}) + public RadarTrackModel(final int radarId, + final long timestamp, + final int trackId, + final char trackState, + final int dis, + final float azimuth, + final float speed, + final float course, + final float longitude, + final float latitude, + final float altitude, + final char type, + final int deviceOwnerId, + final int counter, + final int timeoutToNext) { + this.radarId = radarId; + this.timestamp = timestamp; + this.trackId = trackId; + this.trackState = trackState; + this.dis = dis; + this.azimuth = azimuth; + this.speed = speed; + this.course = course; + this.longitude = longitude; + this.latitude = latitude; + this.altitude = altitude; + this.type = type; + this.deviceOwnerId=deviceOwnerId; + this.counter=counter; + this.timeoutToNext=timeoutToNext; + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/BrokerServerThread.java b/src/main/java/com/zhichenhaixin/thread/BrokerServerThread.java new file mode 100644 index 0000000..3f7460f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/BrokerServerThread.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zeromq.ZMQ; + +public class BrokerServerThread extends Thread +{ + private Log log; + private static final int ROUTER_PORT; + private static final int DEALER_PORT; + private String addr_dealer; + private String addr_router; + ZMQ.Socket router; + ZMQ.Socket dealer; + ZMQ.Poller items; + + static { + ROUTER_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("zmq.router.server.port")); + DEALER_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("zmq.dealer.server.port")); + } + + public BrokerServerThread() { + this.log = LogFactory.getLog(BrokerServerThread.class); + this.addr_dealer = "tcp://" + GlobalVariable.IP + ":" + BrokerServerThread.DEALER_PORT; + this.addr_router = "tcp://" + GlobalVariable.IP + ":" + BrokerServerThread.ROUTER_PORT; + } + + public void initZMQServerDy() { + this.router = GlobalVariable.context.socket(6); + this.dealer = GlobalVariable.context.socket(5); + this.router.bind(this.addr_router); + this.dealer.bind(this.addr_dealer); + this.log.info("launch and connect broker."); + (this.items = new ZMQ.Poller(2)).register(this.router, 1); + this.items.register(this.dealer, 1); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + this.initZMQServerDy(); + boolean more = false; + while (!Thread.currentThread().isInterrupted()) { + this.items.poll(); + if (this.items.pollin(0)) { + while (!Thread.currentThread().isInterrupted()) { + final byte[] message = this.router.recv(0); + more = this.router.hasReceiveMore(); + this.dealer.send(message, more ? 2 : 0); + if (!more) { + break; + } + } + } + if (this.items.pollin(1)) { + while (!Thread.currentThread().isInterrupted()) { + final byte[] message = this.dealer.recv(0); + more = this.dealer.hasReceiveMore(); + this.router.send(message, more ? 2 : 0); + if (!more) { + break; + } + } + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/CamBrokerServerThread.java b/src/main/java/com/zhichenhaixin/thread/CamBrokerServerThread.java new file mode 100644 index 0000000..ea9937d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/CamBrokerServerThread.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zeromq.ZMQ; + +public class CamBrokerServerThread extends Thread +{ + private Log log; + private static final int ROUTER_PORT; + private static final int DEALER_PORT; + private String addr_dealer; + private String addr_router; + ZMQ.Socket router; + ZMQ.Socket dealer; + ZMQ.Poller items; + + static { + ROUTER_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("cam.router.server.port")); + DEALER_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("cam.dealer.server.port")); + } + + public CamBrokerServerThread() { + this.log = LogFactory.getLog(CamBrokerServerThread.class); + this.addr_dealer = "tcp://" + GlobalVariable.IP + ":" + CamBrokerServerThread.DEALER_PORT; + this.addr_router = "tcp://" + GlobalVariable.IP + ":" + CamBrokerServerThread.ROUTER_PORT; + } + + public void initZMQServerDy() { + this.router = GlobalVariable.context.socket(6); + this.dealer = GlobalVariable.context.socket(5); + this.router.bind(this.addr_router); + this.dealer.bind(this.addr_dealer); + this.log.info("launch and connect broker."); + (this.items = new ZMQ.Poller(2)).register(this.router, 1); + this.items.register(this.dealer, 1); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + this.initZMQServerDy(); + boolean more = false; + while (!Thread.currentThread().isInterrupted()) { + this.items.poll(); + if (this.items.pollin(0)) { + while (!Thread.currentThread().isInterrupted()) { + final byte[] message = this.router.recv(0); + more = this.router.hasReceiveMore(); + this.dealer.send(message, more ? 2 : 0); + if (!more) { + break; + } + } + } + if (this.items.pollin(1)) { + while (!Thread.currentThread().isInterrupted()) { + final byte[] message = this.dealer.recv(0); + more = this.dealer.hasReceiveMore(); + this.router.send(message, more ? 2 : 0); + if (!more) { + break; + } + } + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/CamWorkerServerThread.java b/src/main/java/com/zhichenhaixin/thread/CamWorkerServerThread.java new file mode 100644 index 0000000..116bea5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/CamWorkerServerThread.java @@ -0,0 +1,244 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.alibaba.fastjson.JSON; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringBeanUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.proto.ZCHXCamera; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import com.zhichenhaixin.sys.model.CamInfo; +import com.zhichenhaixin.sys.model.CameraInfo; +import com.zhichenhaixin.sys.model.MediaServerVo; +import com.zhichenhaixin.sys.model.XideweiServerVo; +import com.zhichenhaixin.sys.model.param.CamParam; +import com.zhichenhaixin.sys.model.param.MapRect; +import com.zhichenhaixin.sys.service.impl.CLURDICServiceImpl; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +public class CamWorkerServerThread extends Thread +{ + private Logger log; + private static final int camera_port; + private static CamInfoDaoImpl camInfoDaoImpl; + private static CLURDICServiceImpl clurdicServiceImpl; + private String addr; + ZMQ.Socket socket; + List dbList; + String head; + String time; + int num; + byte[] rev; + + static { + camera_port = Integer.parseInt(SpringPropertyUtil.getProperty("cam.dealer.server.port")); + CamWorkerServerThread.camInfoDaoImpl = (CamInfoDaoImpl)SpringBeanUtil.getBean("camInfoDaoImpl"); + CamWorkerServerThread.clurdicServiceImpl = (CLURDICServiceImpl)SpringBeanUtil.getBean("clurdicServiceImpl"); + } + + public CamWorkerServerThread() { + this.log = Logger.getLogger(CamWorkerServerThread.class); + this.addr = "tcp://" + GlobalVariable.IP + ":" + CamWorkerServerThread.camera_port; + this.dbList = null; + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + (this.socket = GlobalVariable.context.socket(4)).connect(this.addr); + } + + @Override + public synchronized void start() { + super.start(); + } + + public void init() { + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head == null) { + continue; + } + if (this.head.equals(SpringPropertyUtil.getProperty("cameraConfigInfo.topic"))) { + this.cameraConfigInfo(this.head); + } + else { + if (!this.head.equals(SpringPropertyUtil.getProperty("cameraList.topic"))) { + continue; + } + this.cameraStatusInfo(this.head); + } + } + catch (Exception e) { + this.log.error("\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void cameraStatusInfo(final String head) { + final ZCHXFllow.ReqFllowVo.Builder builder = ZCHXFllow.ReqFllowVo.newBuilder(); + this.dbList = CamWorkerServerThread.camInfoDaoImpl.findAllCamera(); + for (final CamInfo cam : this.dbList) { + if (cam.getIp() != null) { + final ZCHXFllow.CameraInfo.Builder info = ZCHXFllow.CameraInfo.newBuilder(); + info.setCameraId(cam.getId()); + info.setCameraName(cam.getName()); + info.setControlIp(cam.getScreenip()); + info.setControlPort(Integer.valueOf(cam.getScreenport())); + info.setCameraUid(cam.getUsername()); + info.setCameraPwd(cam.getPassword()); + info.setLat(cam.getLat()); + info.setLon(cam.getLon()); + info.setDestLat(0.0); + info.setDestLon(0.0); + info.setCameraType(cam.getCamera_type()); + info.setCameraColor(cam.getCamera_color()); + info.setDome(cam.getDome()); + info.setMaxRange(cam.getMaxrange()); + info.setRtsp(cam.getRecord_rtsp_url()); + builder.addCameraList(info); + } + } + final byte[] data = builder.build().toByteArray(); + this.sendData(head, data); + this.log.info("\u76f8\u673a\u5217\u8868\u6570\u636e\u53d1\u9001\u6210\u529f"); + } + + public void cameraConfigInfo(final String head) { + final ZCHXCamera.MediaXideweiListInfo.Builder builder = ZCHXCamera.MediaXideweiListInfo.newBuilder(); + final List cameraList = CamWorkerServerThread.clurdicServiceImpl.queryAllCameraList(); + for (final MediaServerVo vo : cameraList) { + final ZCHXCamera.MediaServerInfo.Builder mVo = ZCHXCamera.MediaServerInfo.newBuilder(); + mVo.setMediaIp(vo.getMediaIp()); + mVo.setMediaPort(vo.getMediaPort()); + for (final CameraInfo cameraInfo : vo.getCameraList()) { + final ZCHXCamera.CameraInfo.Builder info = ZCHXCamera.CameraInfo.newBuilder(); + info.setCameraId((cameraInfo.getId() == null) ? 0 : cameraInfo.getId()); + info.setCameraName((cameraInfo.getName() == null) ? "" : cameraInfo.getName()); + info.setCameraUid((cameraInfo.getUsername() == null) ? "" : cameraInfo.getUsername()); + info.setCameraPwd((cameraInfo.getPassword() == null) ? "" : cameraInfo.getPassword()); + info.setControlIp((cameraInfo.getIp() == null) ? "" : cameraInfo.getIp()); + info.setControlPort((cameraInfo.getPort() == null || cameraInfo.getPort() == "") ? 0 : Integer.parseInt(cameraInfo.getPort())); + info.setLat((cameraInfo.getLat() == null) ? 0.0 : cameraInfo.getLat()); + info.setLon((cameraInfo.getLon() == null) ? 0.0 : cameraInfo.getLon()); + info.setDestLat(0.0); + info.setDestLon(0.0); + info.setCameraType((cameraInfo.getCamera_type() == null) ? 0 : cameraInfo.getCamera_type()); + info.setCameraColor((cameraInfo.getCamera_color() == null) ? 0 : cameraInfo.getCamera_color()); + info.setDome((cameraInfo.getDome() == null) ? 0 : cameraInfo.getDome()); + info.setCamHeight((cameraInfo.getCamheight() == null) ? 0.0f : cameraInfo.getCamheight()); + info.setMaxCamCentDist((cameraInfo.getMaxcamcentdist() == null) ? 0.0f : cameraInfo.getMaxcamcentdist()); + info.setMaxRange((cameraInfo.getMaxrange() == null) ? 0.0 : ((double)cameraInfo.getMaxrange())); + info.setNorthAngle((cameraInfo.getNorthangle() == null) ? 0.0f : cameraInfo.getNorthangle()); + info.setTargitW((cameraInfo.getTargitw() == null) ? 0.0f : cameraInfo.getTargitw()); + info.setZoomFarFac((cameraInfo.getZoomfarfac() == null) ? 0.0f : cameraInfo.getZoomfarfac()); + info.setZoomNearFac((cameraInfo.getZoomnearfac() == null) ? 0.0f : cameraInfo.getZoomnearfac()); + info.setMediaIp((cameraInfo.getMedia_ip() == null) ? "" : cameraInfo.getMedia_ip()); + info.setRtsp((cameraInfo.getPreview_rtsp_url() == null) ? "" : cameraInfo.getPreview_rtsp_url()); + mVo.addCameraList(info); + } + builder.addMediainfoList(mVo); + } + final List list = CamWorkerServerThread.clurdicServiceImpl.queryXideweiServerByCamera(); + for (final XideweiServerVo vo2 : list) { + final ZCHXCamera.XideweiServerInfo.Builder xVo = ZCHXCamera.XideweiServerInfo.newBuilder(); + xVo.setUid(vo2.getUid()); + xVo.setPwd(vo2.getPwd()); + xVo.setIp(vo2.getIp()); + xVo.setPort(vo2.getPort()); + xVo.setDeviceName(vo2.getDevice_name()); + for (final CameraInfo cameraInfo2 : vo2.getCameraList()) { + final ZCHXCamera.Camera_analyst_parameter.Builder info2 = ZCHXCamera.Camera_analyst_parameter.newBuilder(); + info2.setCameraId((cameraInfo2.getId() == null) ? 0 : cameraInfo2.getId()); + info2.setCameraName((cameraInfo2.getName() == null) ? "" : cameraInfo2.getName()); + info2.setDome((cameraInfo2.getDome() == null) ? 0 : cameraInfo2.getDome()); + info2.setBaseLon((cameraInfo2.getLon() == null) ? 0.0 : cameraInfo2.getLon()); + info2.setBaseLat((cameraInfo2.getLat() == null) ? 0.0 : cameraInfo2.getLat()); + info2.setChannel((cameraInfo2.getChannelnum() == null) ? 0 : cameraInfo2.getChannelnum()); + info2.setForceShipType((cameraInfo2.getForceshipdect() == null) ? 0 : cameraInfo2.getForceshipdect()); + if (cameraInfo2.getParam() != null && cameraInfo2.getParam() != "") { + final String json = cameraInfo2.getParam(); + final CamParam param = JSON.parseObject(json, CamParam.class); + final MapRect re = param.getMapRect(); + final ZCHXCamera.Line_parameter.Builder topLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder rightLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder bottomLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder leftLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder lineToNorth = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + info2.setTopLine(topLine); + info2.setRightLine(rightLine); + info2.setBottomLine(bottomLine); + info2.setLeftLine(leftLine); + info2.setLine2North(lineToNorth); + } + xVo.addCameraAnalystParamList(info2); + } + builder.addXideweiinfoList(xVo); + } + final byte[] data = builder.build().toByteArray(); + this.sendData(head, data); + this.log.info("length:" + data.length); + this.log.info("\u5e0c\u7279\u5a01\u76f8\u673a\u914d\u7f6e\u6570\u636e\u53d1\u9001\u6210\u529f"); + } + + public synchronized void sendData(final String topic, final byte[] data) { + this.socket.send(topic.getBytes(), 2); + this.socket.send(new StringBuilder(String.valueOf(System.currentTimeMillis())).toString().getBytes(), 2); + this.socket.send(data, 0); + this.log.info( Arrays.toString(data)); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/CameraThread.java b/src/main/java/com/zhichenhaixin/thread/CameraThread.java new file mode 100644 index 0000000..ae254e1 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/CameraThread.java @@ -0,0 +1,265 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.alibaba.fastjson.JSON; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringBeanUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.proto.ZCHXCamera; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import com.zhichenhaixin.sys.model.CamInfo; +import com.zhichenhaixin.sys.model.CameraInfo; +import com.zhichenhaixin.sys.model.MediaServerVo; +import com.zhichenhaixin.sys.model.XideweiServerVo; +import com.zhichenhaixin.sys.model.param.CamParam; +import com.zhichenhaixin.sys.model.param.MapRect; +import com.zhichenhaixin.sys.service.impl.CLURDICServiceImpl; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Iterator; +import java.util.List; + +public class CameraThread extends Thread +{ + private Logger log; + private static final int camera_recicve_port; + private static CamInfoDaoImpl camInfoDaoImpl; + private static CLURDICServiceImpl clurdicServiceImpl; + private static String cam_list_topic; + private static String camera_status_topic; + private String addr; + ZMQ.Socket socket; + List dbList; + String head; + int num; + byte[] rev; + ZCHXFllow.CamerastatusListInfo cameras; + + static { + camera_recicve_port = Integer.parseInt(SpringPropertyUtil.getProperty("camera_recicve_port")); + CameraThread.camInfoDaoImpl = (CamInfoDaoImpl)SpringBeanUtil.getBean("camInfoDaoImpl"); + CameraThread.clurdicServiceImpl = (CLURDICServiceImpl)SpringBeanUtil.getBean("clurdicServiceImpl"); + CameraThread.cam_list_topic = SpringPropertyUtil.getProperty("ctrl.cam.list.topic"); + CameraThread.camera_status_topic = SpringPropertyUtil.getProperty("cameraStatus.topic"); + } + + public void init() { + this.head = null; + this.num = 1; + this.rev = null; + this.dbList = null; + this.cameras = null; + } + + public CameraThread() { + this.log = Logger.getLogger(CameraThread.class); + this.addr = "tcp://" + GlobalVariable.IP + ":" + CameraThread.camera_recicve_port; + this.dbList = null; + this.head = null; + this.num = 1; + this.rev = null; + this.cameras = null; + (this.socket = GlobalVariable.context.socket(7)).bind(this.addr); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head == null) { + continue; + } + if (this.head.equals(SpringPropertyUtil.getProperty("cameraConfigInfo.topic"))) { + this.cameraConfigInfo(this.head); + } + else if (this.head.equals(SpringPropertyUtil.getProperty("cameraList.topic"))) { + this.cameraStatusInfo(this.head); + } + else if (this.head.equals(CameraThread.cam_list_topic)) { + final byte[] bytes = ControllerFllowThread.sendCamForCtrl(); + if (bytes == null) { + continue; + } + WarnGPSDyDataThread.getZMQPUB().sendDataCamera(CameraThread.cam_list_topic, bytes); + this.log.info("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u521d\u59cb\u5316\u76f8\u673a\u5217\u8868\u7684\u957f\u5ea6\uff1a" + bytes.length); + } + else { + if (!this.head.equals(CameraThread.camera_status_topic)) { + continue; + } + this.cameras = ZCHXFllow.CamerastatusListInfo.parseFrom(this.rev); + final ZCHXFllow.CamerastatusListInfo.Builder builder = ZCHXFllow.CamerastatusListInfo.newBuilder(); + for (int i = 0; i < this.cameras.getListCount(); ++i) { + final ZCHXFllow.CameraStatusInfo.Builder cameraStatus = this.cameras.getList(i).toBuilder(); + cameraStatus.setStatus((cameraStatus.getStatus() == 0) ? 512 : 0); + CameraThread.camInfoDaoImpl.zmq_ChangCameraStatus(cameraStatus.build()); + builder.addList(cameraStatus); + } + if (builder.getListCount() <= 0) { + continue; + } + this.log.info("\u76f8\u673a\u72b6\u6001\u53d8\u66f4\u4e2a\u6570\uff1a" + builder.getListCount()); + ZMQServerPubCam.getZMQPUB().sendData(this.head, String.valueOf(System.currentTimeMillis()), builder.build().toByteArray()); + ControllerFllowThread.sendCamStatusForCtrl(builder.build()); + FllowSocket.sendCamStatusForCtrl(builder.build()); + } + } + catch (Exception e) { + this.log.error("\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void cameraStatusInfo(final String head) { + final ZCHXFllow.ReqFllowVo.Builder builder = ZCHXFllow.ReqFllowVo.newBuilder(); + this.dbList = CameraThread.camInfoDaoImpl.findAllCamera(); + for (final CamInfo cam : this.dbList) { + if (cam.getIp() != null) { + final ZCHXFllow.CameraInfo.Builder info = ZCHXFllow.CameraInfo.newBuilder(); + info.setCameraId(cam.getId()); + info.setCameraName(cam.getName()); + info.setControlIp(cam.getScreenip()); + info.setControlPort(Integer.valueOf(cam.getScreenport())); + info.setCameraUid(cam.getUsername()); + info.setCameraPwd(cam.getPassword()); + info.setLat(cam.getLat()); + info.setLon(cam.getLon()); + info.setDestLat(0.0); + info.setDestLon(0.0); + info.setCameraType(cam.getCamera_type()); + info.setCameraColor(cam.getCamera_color()); + info.setDome(cam.getDome()); + info.setMaxRange(cam.getMaxrange()); + info.setRtsp(cam.getRecord_rtsp_url()); + builder.addCameraList(info); + } + } + final byte[] data = builder.build().toByteArray(); + WarnGPSDyDataThread.getZMQPUB().sendDataCamera(head, data); + this.log.info("\u76f8\u673a\u5217\u8868\u6570\u636e\u53d1\u9001\u6210\u529f"); + } + + public void cameraConfigInfo(final String head) { + final ZCHXCamera.MediaXideweiListInfo.Builder builder = ZCHXCamera.MediaXideweiListInfo.newBuilder(); + final List list = CameraThread.clurdicServiceImpl.queryAllCameraList(); + for (final MediaServerVo vo : list) { + final ZCHXCamera.MediaServerInfo.Builder mVo = ZCHXCamera.MediaServerInfo.newBuilder(); + mVo.setMediaIp(vo.getMediaIp()); + mVo.setMediaPort(vo.getMediaPort()); + for (final CameraInfo cameraInfo : vo.getCameraList()) { + final ZCHXCamera.CameraInfo.Builder info = ZCHXCamera.CameraInfo.newBuilder(); + info.setCameraId((cameraInfo.getId() == null) ? 0 : cameraInfo.getId()); + info.setCameraName((cameraInfo.getName() == null) ? "" : cameraInfo.getName()); + info.setCameraUid((cameraInfo.getUsername() == null) ? "" : cameraInfo.getUsername()); + info.setCameraPwd((cameraInfo.getPassword() == null) ? "" : cameraInfo.getPassword()); + info.setControlIp((cameraInfo.getIp() == null) ? "" : cameraInfo.getIp()); + info.setControlPort((cameraInfo.getPort() == null || cameraInfo.getPort() == "") ? 0 : Integer.parseInt(cameraInfo.getPort())); + info.setLat((cameraInfo.getLat() == null) ? 0.0 : cameraInfo.getLat()); + info.setLon((cameraInfo.getLon() == null) ? 0.0 : cameraInfo.getLon()); + info.setDestLat(0.0); + info.setDestLon(0.0); + info.setCameraType((cameraInfo.getCamera_type() == null) ? 0 : cameraInfo.getCamera_type()); + info.setCameraColor((cameraInfo.getCamera_color() == null) ? 0 : cameraInfo.getCamera_color()); + info.setDome((cameraInfo.getDome() == null) ? 0 : cameraInfo.getDome()); + info.setCamHeight((cameraInfo.getCamheight() == null) ? 0.0f : cameraInfo.getCamheight()); + info.setMaxCamCentDist((cameraInfo.getMaxcamcentdist() == null) ? 0.0f : cameraInfo.getMaxcamcentdist()); + info.setMaxRange((cameraInfo.getMaxrange() == null) ? 0.0 : ((double)cameraInfo.getMaxrange())); + info.setNorthAngle((cameraInfo.getNorthangle() == null) ? 0.0f : cameraInfo.getNorthangle()); + info.setTargitW((cameraInfo.getTargitw() == null) ? 0.0f : cameraInfo.getTargitw()); + info.setZoomFarFac((cameraInfo.getZoomfarfac() == null) ? 0.0f : cameraInfo.getZoomfarfac()); + info.setZoomNearFac((cameraInfo.getZoomnearfac() == null) ? 0.0f : cameraInfo.getZoomnearfac()); + info.setMediaIp((cameraInfo.getMedia_ip() == null) ? "" : cameraInfo.getMedia_ip()); + info.setRtsp((cameraInfo.getPreview_rtsp_url() == null) ? "" : cameraInfo.getPreview_rtsp_url()); + mVo.addCameraList(info); + } + builder.addMediainfoList(mVo); + } + final List list2 = CameraThread.clurdicServiceImpl.queryXideweiServerByCamera(); + for (final XideweiServerVo vo2 : list2) { + final ZCHXCamera.XideweiServerInfo.Builder xVo = ZCHXCamera.XideweiServerInfo.newBuilder(); + xVo.setUid(vo2.getUid()); + xVo.setPwd(vo2.getPwd()); + xVo.setIp(vo2.getIp()); + xVo.setPort(vo2.getPort()); + xVo.setDeviceName(vo2.getDevice_name()); + for (final CameraInfo cameraInfo2 : vo2.getCameraList()) { + final ZCHXCamera.Camera_analyst_parameter.Builder info2 = ZCHXCamera.Camera_analyst_parameter.newBuilder(); + info2.setCameraId((cameraInfo2.getId() == null) ? 0 : cameraInfo2.getId()); + info2.setCameraName((cameraInfo2.getName() == null) ? "" : cameraInfo2.getName()); + info2.setDome((cameraInfo2.getDome() == null) ? 0 : cameraInfo2.getDome()); + info2.setBaseLon((cameraInfo2.getLon() == null) ? 0.0 : cameraInfo2.getLon()); + info2.setBaseLat((cameraInfo2.getLat() == null) ? 0.0 : cameraInfo2.getLat()); + info2.setChannel((cameraInfo2.getChannelnum() == null) ? 0 : cameraInfo2.getChannelnum()); + info2.setForceShipType((cameraInfo2.getForceshipdect() == null) ? 0 : cameraInfo2.getForceshipdect()); + if (cameraInfo2.getParam() != null && cameraInfo2.getParam() != "") { + final String json = cameraInfo2.getParam(); + final CamParam param = JSON.parseObject(json, CamParam.class); + final MapRect re = param.getMapRect(); + final ZCHXCamera.Line_parameter.Builder topLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder rightLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder bottomLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder leftLine = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + final ZCHXCamera.Line_parameter.Builder lineToNorth = ZCHXCamera.Line_parameter.newBuilder(); + topLine.setStartX(re.getTopLine().getPtstart().getX()); + topLine.setStartY(re.getTopLine().getPtstart().getY()); + topLine.setEndX(re.getTopLine().getPtend().getX()); + topLine.setEndY(re.getTopLine().getPtend().getY()); + topLine.setLineRealLen(re.getTopLine().getLineRealLen()); + info2.setTopLine(topLine); + info2.setRightLine(rightLine); + info2.setBottomLine(bottomLine); + info2.setLeftLine(leftLine); + info2.setLine2North(lineToNorth); + } + xVo.addCameraAnalystParamList(info2); + } + builder.addXideweiinfoList(xVo); + } + final byte[] data = builder.build().toByteArray(); + WarnGPSDyDataThread.getZMQPUB().sendDataCamera(head, data); + this.log.info("\u5e0c\u7279\u5a01\u76f8\u673a\u914d\u7f6e\u6570\u636e\u7684\u957f\u5ea6\uff1a" + data.length); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/ControllerFllowThread.java b/src/main/java/com/zhichenhaixin/thread/ControllerFllowThread.java new file mode 100644 index 0000000..9a69d23 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ControllerFllowThread.java @@ -0,0 +1,431 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.*; +import com.zhichenhaixin.cache.util.*; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.stopcamera.StopCameraService; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import com.zhichenhaixin.sys.model.CameraModel; +import com.zhichenhaixin.sys.model.NightModeVo; +import com.zhichenhaixin.sys.model.WarnComposeVideoVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import com.zhichenhaixin.zmq.model.RadarInfoUtil; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hbase.util.Bytes; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.sql.Timestamp; +import java.text.ParseException; +import java.util.Iterator; +import java.util.List; + +public class ControllerFllowThread extends Thread +{ + private static Log log; + private static String ctrl_fllow_host; + private static int ctrl_fllow_port; + private static String clientTopic; + private static CamInfoDaoImpl mdao; + private static DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + private static String ctrl_topic; + private static String cam_list_topic; + private static int cam_interval_time; + private String addr; + private ZMQ.Socket socket; + private String head; + private int num; + private byte[] rev; + + static { + ControllerFllowThread.log = LogFactory.getLog(ControllerFllowThread.class); + ControllerFllowThread.ctrl_fllow_host = ResourceUtil.getCtrlFllowHost(); + ControllerFllowThread.ctrl_fllow_port = ResourceUtil.getCtrlFllowPort(); + ControllerFllowThread.clientTopic = ResourceUtil.getClientTopic(); + ControllerFllowThread.mdao = (CamInfoDaoImpl)SpringBeanUtil.getBean("camInfoDaoImpl"); + ControllerFllowThread.dbAlarmInfoDaoImpl = (DbAlarmInfoDaoImpl)SpringBeanUtil.getBean("dbAlarmInfoDaoImpl"); + ControllerFllowThread.ctrl_topic = SpringPropertyUtil.getProperty("fllow.topic"); + ControllerFllowThread.cam_list_topic = SpringPropertyUtil.getProperty("ctrl.cam.list.topic"); + ControllerFllowThread.cam_interval_time = Integer.valueOf(SpringPropertyUtil.getProperty("cam.interval.time")); + ControllerFllowThread.cam_interval_time = ControllerFllowThread.cam_interval_time * 60 * 1000; + } + + public void init() { + this.head = null; + this.num = 1; + this.rev = null; + } + + public ControllerFllowThread() { + this.addr = "tcp://" + ControllerFllowThread.ctrl_fllow_host + ":" + ControllerFllowThread.ctrl_fllow_port; + this.head = null; + this.num = 1; + this.rev = null; + (this.socket = Constant.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + final byte[] bytes = sendCamForCtrl(); + if (bytes != null) { + WarnGPSDyDataThread.getZMQPUB().sendDataCamera(ControllerFllowThread.cam_list_topic, bytes); + ControllerFllowThread.log.info("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u521d\u59cb\u5316\u76f8\u673a\u5217\u8868\u7684\u957f\u5ea6\uff1a" + bytes.length); + } + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head != null && this.head.equals(ControllerFllowThread.ctrl_topic)) { + this.handleReceiveCtrlInfo(this.rev); + } + Thread.sleep(500L); + } + catch (Exception e) { + ControllerFllowThread.log.error("-> \u5904\u7406\u6570\u636e\u65f6\u51fa\u73b0\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void handleReceiveCtrlInfo(final byte[] rev) throws InvalidProtocolBufferException, ParseException { + final ZCHXFllow.SpotVo vo = ZCHXFllow.SpotVo.parseFrom(rev); + ControllerFllowThread.log.info("-> \u63a5\u6536\u5230\u63a7\u5236\u5668\u8fd4\u56de\u6765\u7684\u6d88\u606f\uff0c\u5982\u4e0b\uff1a\n" + vo); + final CameraModel model = ControllerFllowThread.mdao.getCameraById(vo.getCameraId()); + if (model != null && !"512".equals(model.getStatus())) { + String trackby = ""; + if (vo.getFllowType() == 1) { + trackby = "1"; + } + if (vo.getFllowType() == 1 || vo.getFllowType() == 2 || vo.getFllowType() == 4) { + final ZCHXFllow.CtrlVo.Builder ctrvo = ZCHXFllow.CtrlVo.newBuilder(); + ctrvo.setRtsp(vo.getRtsp()); + if (vo.getFllowType() == 4) { + ctrvo.setStatus(2); + } + else { + ctrvo.setStatus(vo.getFllowType()); + } + if (vo.getTrackNumber() > 0) { + ctrvo.setTrackNumber(vo.getTrackNumber()); + } + else { + ctrvo.setTrackNumber(1); + } + if (StringUtils.isNotBlank(vo.getCameraName())) { + ctrvo.setCameraName(vo.getCameraName()); + } + if (vo.getCameraId() != 0) { + ctrvo.setCameraId(vo.getCameraId()); + } + ctrvo.setLockStatus(vo.getLockStatus()); + if (vo.getMode() == 2) { + CtrlVoEhcache.put(ctrvo.build()); + SendManualFllowDataThread.map.put(vo.getTrackNumber(), System.currentTimeMillis()); + FllowTimeOutThread.timeout.put(vo.getTrackNumber(), System.currentTimeMillis()); + FllowTimeOutThread.ctrlVos.put(vo.getTrackNumber(), ctrvo); + if (vo.getFllowType() == 2 || vo.getFllowType() == 4) { + FllowTimeOutThread.timeout.remove(vo.getTrackNumber()); + FllowTimeOutThread.ctrlVos.remove(vo.getTrackNumber()); + } + } + else { + ZMQServerDyData.getZMQPUB().sendData(ControllerFllowThread.clientTopic, String.valueOf(System.currentTimeMillis()), ctrvo.build().toByteArray()); + if (vo.getFllowType() == 1) { + FllowTimeOutThread.timeout.put(vo.getTrackNumber(), System.currentTimeMillis()); + FllowTimeOutThread.ctrlVos.put(vo.getTrackNumber(), ctrvo); + } + if (vo.getFllowType() == 2 || vo.getFllowType() == 4) { + FllowTimeOutThread.timeout.remove(vo.getTrackNumber()); + FllowTimeOutThread.ctrlVos.remove(vo.getTrackNumber()); + } + ControllerFllowThread.log.info("-> \u81ea\u52a8\u8ddf\u8e2a\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u547d\u4ee4\uff0c\u5982\u4e0b\uff1a\n" + ctrvo.build()); + } + } + this.handleWarn(vo); + RadarInfoUtil.radarFalseAlarm(vo.getFllowType(), vo.getTrackNumber()); + final RadarTrackVo radar = AgilTrackEhcache.get(vo.getTrackNumber()); + if (radar != null) { + radar.setTrackby(trackby); + radar.setTargetType(vo.getObjectType()); + AgilTrackEhcache.put(radar); + } + if (vo.getTrackNumber() > 0 && vo.getFllowType() == 1) { + StopCameraService.putTrackIncache(vo); + } + } + } + + public static byte[] sendCamForCtrl() { + byte[] bytes = null; + try { + final List list = ControllerFllowThread.mdao.queryAllCamera(); + final ZCHXFllow.ReqFllowVoForCtrl.Builder req = ZCHXFllow.ReqFllowVoForCtrl.newBuilder(); + for (int size = list.size(), i = 0; i < size; ++i) { + final CameraModel vo = list.get(i); + final ZCHXFllow.CameraInfoForCtrl.Builder info = ZCHXFllow.CameraInfoForCtrl.newBuilder(); + info.setCameraId(vo.getId()); + info.setCameraName(vo.getName()); + info.setCameraColor((vo.getCamera_color() == 0) ? 1 : vo.getCamera_color()); + info.setControlIp(vo.getIp()); + info.setControlPort(Integer.parseInt(vo.getPort())); + info.setCameraUid(vo.getUsername()); + info.setCameraPwd(vo.getPassword()); + info.setDome(vo.getDome()); + double big = vo.getLon(); + info.setLon((big == 0.0) ? 0.0 : big); + big = vo.getLat(); + info.setLat((big == 0.0) ? 0.0 : big); + info.setRtsp((vo.getVdeo_fllow_rtsp_url() == null) ? " " : vo.getVdeo_fllow_rtsp_url()); + info.setDestLon(0.0); + info.setDestLat(0.0); + info.setNorthAngle((float)((vo.getNorthangle() == 0.0) ? 0.0 : vo.getNorthangle())); + info.setCamHeight((float)((vo.getCamheight() == 0.0) ? 0.0 : vo.getCamheight())); + info.setMaxCamCentDist((float)((vo.getMaxcamcentdist() == 0.0) ? 0.0 : vo.getMaxcamcentdist())); + info.setTargitW((float)((vo.getTargitw() == 0.0) ? 0.0 : vo.getTargitw())); + info.setZoomNearFac((float)((vo.getZoomnearfac() == 0.0) ? 0.0 : vo.getZoomnearfac())); + info.setZoomFarFac((float)((vo.getZoomfarfac() == 0.0) ? 0.0 : vo.getZoomfarfac())); + info.setMaxRange((vo.getMaxrange() == 0.0) ? 0.0 : vo.getMaxrange()); + info.setCameraType((vo.getCamera_type() == 0) ? 0 : vo.getCamera_type()); + info.setCameraStatus(Integer.valueOf(StringUtil.notBlank(vo.getStatus()) ? vo.getStatus() : "0")); + req.addCameraList(info); + } + bytes = req.build().toByteArray(); + } + catch (Exception e) { + bytes = null; + } + return bytes; + } + + public static void sendCamStatusForCtrl(final ZCHXFllow.CamerastatusListInfo camerastatusListInfo) { + try { + final ZCHXFllow.ReqFllowVoForCtrl.Builder req = ZCHXFllow.ReqFllowVoForCtrl.newBuilder(); + for (int size = camerastatusListInfo.getListCount(), i = 0; i < size; ++i) { + final ZCHXFllow.CameraInfoForCtrl.Builder info = ZCHXFllow.CameraInfoForCtrl.newBuilder(); + info.setCameraId(camerastatusListInfo.getList(i).getCameraId()); + info.setCameraName(""); + info.setCameraColor(1); + info.setControlIp(""); + info.setControlPort(0); + info.setCameraUid(""); + info.setCameraPwd(""); + info.setDome(1); + info.setLon(0.0); + info.setLat(0.0); + info.setRtsp(""); + info.setDestLon(0.0); + info.setDestLat(0.0); + info.setNorthAngle(0.0f); + info.setCamHeight(0.0f); + info.setMaxCamCentDist(0.0f); + info.setTargitW(0.0f); + info.setZoomNearFac(0.0f); + info.setZoomFarFac(0.0f); + info.setMaxRange(0.0); + info.setCameraType(0); + info.setCameraStatus(camerastatusListInfo.getList(i).getStatus()); + req.addCameraList(info); + } + final byte[] bytes = req.build().toByteArray(); + WarnGPSDyDataThread.getZMQPUB().sendDataCamera(ControllerFllowThread.cam_list_topic, bytes); + ControllerFllowThread.log.info("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u76f8\u673a\u72b6\u6001\u53d1\u751f\u53d8\u5316\u7684\u76f8\u673a\u5217\u8868\u7684\u957f\u5ea6\uff1a" + bytes.length); + } + catch (Exception e) { + ControllerFllowThread.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u76f8\u673a\u72b6\u6001\u53d1\u751f\u53d8\u5316\u7684\u76f8\u673a\u5217\u8868\u5931\u8d25\uff01"); + } + } + + public static void sendMsg(final RadarTrackVo point) { + try { + if (!RadarInfoUtil.falseAlarm(point)) { + final ZCHXFllow.ReqFllowVoForCtrl.Builder req = ZCHXFllow.ReqFllowVoForCtrl.newBuilder(); + final ZCHXFllow.FllowVo.Builder fv = ZCHXFllow.FllowVo.newBuilder(); + fv.setFllow(point.getFllow()); + fv.setMode(point.getMode()); + fv.setTrackNumber(point.getTrackNumber()); + fv.setWgs84PosLat(point.getWgs84PosLat()); + fv.setWgs84PosLong(point.getWgs84PosLon()); + fv.setUtc(point.getUtc()); + fv.setRtsp(StringUtil.isBlank(point.getRtsp()) ? "" : point.getRtsp()); + fv.setCameraId(point.getCameraId()); + fv.setWarnSiteType(StringUtil.isBlank(point.getWarnSiteType()) ? "not" : point.getWarnSiteType()); + fv.setCog(point.getCog()); + fv.setSog(point.getSog()); + final List list = NightModeEhcache.getAll(); + final NightModeVo nig = (list == null || list.size() <= 0) ? null : list.get(0); + int cameraColor = 1; + if (nig != null && nig.getIs_open() == 1) { + cameraColor = isOpenNigModel(nig.getStart_time(), nig.getEnd_time()); + } + fv.setCameraColor(cameraColor); + req.setFllowVo(fv); + final byte[] bytes = req.build().toByteArray(); + WarnGPSDyDataThread.getZMQPUB().sendDataCtrl(ControllerFllowThread.ctrl_topic, bytes); + } + } + catch (Exception e) { + ControllerFllowThread.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u6570\u636e\u5931\u8d25\uff01"); + } + } + + public void handleWarn(final ZCHXFllow.SpotVo vo) throws ParseException { + WarnInfoBean warnInfoBean = TrackAlarmEhcache.get(String.valueOf(vo.getWarnSiteType()) + vo.getTrackNumber()); + if (vo.getMode() == 0) { + final String camTime = ControllerFllowThread.dbAlarmInfoDaoImpl.queryCamTime(String.valueOf(vo.getCameraId())); + if (vo.getFllowType() == 1) { + warnInfoBean = this.covertWarnInfoBean(vo); + if (StringUtil.isBlank(camTime) || (StringUtil.notBlank(camTime) && System.currentTimeMillis() - DateUtil.format.parse(camTime).getTime() >= ControllerFllowThread.cam_interval_time)) { + if (!Constant.warnMap.containsKey("Y" + vo.getTrackNumber())) { + Constant.addWarnMap("Y" + vo.getTrackNumber(), "\u6709\u76ee\u6807\u8fdb\u5165" + warnInfoBean.getAlarm_site()); + ControllerFllowThread.dbAlarmInfoDaoImpl.saveWarnRecord(warnInfoBean); + TrackAlarmEhcache.put(warnInfoBean); + } + } + else { + ControllerFllowThread.log.info("\u76f8\u673aID\uff1a" + vo.getCameraId() + "\uff0c\u6ca1\u6709\u95f4\u9694\u5728" + ControllerFllowThread.cam_interval_time / 1000 / 60 + "\u5206\u949f\u540e\u544a\u8b66\uff0c\u5f53\u865a\u8b66\u5904\u7406\uff0c\u4e0d\u518d\u63a8\u9001\u81f3\u5ba2\u6237\u7aef"); + } + } + else if (warnInfoBean != null && (vo.getFllowType() == 2 || vo.getFllowType() == 4)) { + if (vo.getFllowType() == 2) { + Constant.removeWarnMap("Y" + vo.getTrackNumber()); + } + final WarnComposeVideoVo wvo = WarnComposeVideoVo.getClone(); + wvo.setAlarm_id(warnInfoBean.getId()); + wvo.setBegintime(warnInfoBean.getBegintime()); + warnInfoBean.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + wvo.setEndtime(warnInfoBean.getEndtime()); + wvo.setCamera_name(vo.getCameraName()); + if (StringUtil.isBlank(camTime) || (StringUtil.notBlank(camTime) && System.currentTimeMillis() - DateUtil.format.parse(camTime).getTime() >= ControllerFllowThread.cam_interval_time)) { + wvo.setRtsp(vo.getComposeRtsp()); + wvo.setFtp(vo.getComposeFtp()); + warnInfoBean.setAlarm_status("4"); + warnInfoBean.setRtsp(vo.getComposeRtsp()); + warnInfoBean.setUntreated_alarm_count(WarnAlarmCountEhcache.get()); + Constant.sendClient(warnInfoBean); + warnInfoBean.setSign("1"); + HttpUtils.sendWarnToRongKe(warnInfoBean); + ControllerFllowThread.log.info("-> \uff08\u89c6\u9891\u5206\u6790\u670d\u52a1\u5668\u68c0\u6d4b\u7684\u76ee\u6807\uff09\u8ddf\u8e2a\u5408\u6210\u5f55\u50cf\u6587\u4ef6\u7684\u544a\u8b66\u5730\u70b9\u7c7b\u578b\u662f\uff1a" + vo.getWarnSiteType() + "\uff0c\u76ee\u6807\u7f16\u53f7\u662f\uff1a" + vo.getTrackNumber()); + } + else { + wvo.setFalse_alarm_rtsp(String.valueOf(vo.getComposeRtsp()) + "-t"); + ControllerFllowThread.log.info("\u76f8\u673aID\uff1a" + vo.getCameraId() + "\uff0c\u6ca1\u6709\u95f4\u9694\u5728" + ControllerFllowThread.cam_interval_time / 1000 / 60 + "\u5206\u949f\u540e\u544a\u8b66\uff0c\u5f53\u865a\u8b66\u5904\u7406"); + } + ControllerFllowThread.dbAlarmInfoDaoImpl.andComposeVideo(wvo); + warnInfoBean.setBegintime(warnInfoBean.getEndtime()); + TrackAlarmEhcache.put(warnInfoBean); + } + } + else { + if (warnInfoBean == null) { + return; + } + warnInfoBean.setCamera_id(String.valueOf(vo.getCameraId())); + final WarnComposeVideoVo wvo2 = WarnComposeVideoVo.getClone(); + wvo2.setAlarm_id(warnInfoBean.getId()); + wvo2.setBegintime(warnInfoBean.getBegintime()); + warnInfoBean.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + wvo2.setEndtime(warnInfoBean.getEndtime()); + wvo2.setCamera_name(vo.getCameraName()); + final Object infoBeanTwo = Constant.warnMap.get("line_two" + vo.getTrackNumber()); + final Object infoBeanOne = Constant.warnMap.get("line_one" + vo.getTrackNumber()); + if (vo.getFllowType() == 1) { + if (infoBeanTwo == null && infoBeanOne != null) { + ControllerFllowThread.dbAlarmInfoDaoImpl.saveWarn(warnInfoBean); + } + else { + warnInfoBean.setRtsp(vo.getRtsp()); + ControllerFllowThread.dbAlarmInfoDaoImpl.saveWarnRecord(warnInfoBean); + } + } + else if (vo.getFllowType() == 2 || vo.getFllowType() == 4) { + if (StringUtil.notBlank(vo.getComposeRtsp())) { + if (infoBeanTwo == null && infoBeanOne != null) { + wvo2.setFalse_alarm_rtsp(String.valueOf(vo.getComposeRtsp()) + "-yl"); + } + else { + wvo2.setRtsp(vo.getComposeRtsp()); + wvo2.setFtp(vo.getComposeFtp()); + if (vo.getMode() == 1) { + warnInfoBean.setAlarm_status("4"); + warnInfoBean.setRtsp(vo.getComposeRtsp()); + warnInfoBean.setUntreated_alarm_count(WarnAlarmCountEhcache.get()); + Constant.sendClient(warnInfoBean); + warnInfoBean.setSign("1"); + HttpUtils.sendWarnToRongKe(warnInfoBean); + } + ControllerFllowThread.log.info("-> \u8ddf\u8e2a\u5408\u6210\u5f55\u50cf\u6587\u4ef6\u7684\u544a\u8b66\u5730\u70b9\u7c7b\u578b\u662f\uff1a" + vo.getWarnSiteType() + "\uff0c\u76ee\u6807\u7f16\u53f7\u662f\uff1a" + vo.getTrackNumber()); + } + ControllerFllowThread.dbAlarmInfoDaoImpl.andComposeVideo(wvo2); + warnInfoBean.setBegintime(warnInfoBean.getEndtime()); + TrackAlarmEhcache.put(warnInfoBean); + } + } + else if (vo.getFllowType() == 3 && StringUtil.notBlank(vo.getComposeRtsp())) { + wvo2.setFalse_alarm_rtsp(vo.getComposeRtsp()); + ControllerFllowThread.dbAlarmInfoDaoImpl.saveWarn(warnInfoBean); + ControllerFllowThread.dbAlarmInfoDaoImpl.andComposeVideo(wvo2); + warnInfoBean.setBegintime(warnInfoBean.getEndtime()); + TrackAlarmEhcache.put(warnInfoBean); + } + } + } + + public WarnInfoBean covertWarnInfoBean(final ZCHXFllow.SpotVo vo) { + final WarnInfoBean info = WarnInfoBean.getClone(); + final String time = String.valueOf(vo.getWarnTime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 10) ? date : (date / 1000L); + info.setId(DateUtil.getCurMillion()); + info.setBegintime(begintime); + info.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + info.setCamera_id(String.valueOf(vo.getCameraId())); + info.setCreate_time(Timestamp.valueOf(DateUtil.format.format(begintime * 1000L))); + info.setObject_id(String.valueOf(vo.getTrackNumber())); + info.setRtsp(vo.getRtsp()); + info.setObject_type("3"); + info.setX(vo.getWarnLon()); + info.setY(vo.getWarnLat()); + info.setAlarm_type("1"); + info.setAlarm_level("3"); + info.setAlarm_site("\u4e00\u7ea7\u73af\u5c9b\u7ebf"); + info.setAlarm_source("1"); + info.setWarnSiteType(vo.getWarnSiteType()); + info.setHandle_status(vo.getWarnSite().contains("\u4e8c\u7ea7") ? 3 : 2); + return info; + } + + public static int isOpenNigModel(final String start, final String end) { + final String cur = DateUtil.format(DateUtil.now(), "HHmm"); + final int start2 = Integer.parseInt(start.replaceAll(":", "")); + final int cur2 = Integer.parseInt(cur.replaceAll(":", "")); + final int end2 = Integer.parseInt(end.replaceAll(":", "")); + if ((start2 >= cur2 && end2 <= cur2) || (start2 >= cur2 && end2 <= cur2) || (start2 <= cur2 && end2 <= cur2 && start2 <= end2) || (start2 >= cur2 && end2 >= cur2 && start2 <= end2) || (start2 >= cur2 && end2 >= cur2 && start2 >= end2)) { + return 1; + } + return 2; + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/FllowBrokerServerThread.java b/src/main/java/com/zhichenhaixin/thread/FllowBrokerServerThread.java new file mode 100644 index 0000000..1e6f104 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/FllowBrokerServerThread.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zeromq.ZMQ; + +public class FllowBrokerServerThread extends Thread +{ + private Log log; + private static final int ROUTER_PORT; + private static final int DEALER_PORT; + private String addr_dealer; + private String addr_router; + ZMQ.Socket router; + ZMQ.Socket dealer; + ZMQ.Poller items; + + static { + ROUTER_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("fllow.router.server.port")); + DEALER_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("fllow.dealer.server.port")); + } + + public FllowBrokerServerThread() { + this.log = LogFactory.getLog(FllowBrokerServerThread.class); + this.addr_dealer = "tcp://" + GlobalVariable.IP + ":" + FllowBrokerServerThread.DEALER_PORT; + this.addr_router = "tcp://" + GlobalVariable.IP + ":" + FllowBrokerServerThread.ROUTER_PORT; + } + + public void initZMQServerDy() { + this.router = GlobalVariable.context.socket(6); + this.dealer = GlobalVariable.context.socket(5); + this.router.bind(this.addr_router); + this.dealer.bind(this.addr_dealer); + this.log.info("launch and connect broker."); + (this.items = new ZMQ.Poller(2)).register(this.router, 1); + this.items.register(this.dealer, 1); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + this.initZMQServerDy(); + boolean more = false; + while (!Thread.currentThread().isInterrupted()) { + this.items.poll(); + if (this.items.pollin(0)) { + while (!Thread.currentThread().isInterrupted()) { + final byte[] message = this.router.recv(0); + more = this.router.hasReceiveMore(); + this.dealer.send(message, more ? 2 : 0); + if (!more) { + break; + } + } + } + if (this.items.pollin(1)) { + while (!Thread.currentThread().isInterrupted()) { + final byte[] message = this.dealer.recv(0); + more = this.dealer.hasReceiveMore(); + this.router.send(message, more ? 2 : 0); + if (!more) { + break; + } + } + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/FllowSocket.java b/src/main/java/com/zhichenhaixin/thread/FllowSocket.java new file mode 100644 index 0000000..f27d020 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/FllowSocket.java @@ -0,0 +1,501 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.*; +import com.zhichenhaixin.cache.util.*; +import com.zhichenhaixin.control.model.ReqPacket; +import com.zhichenhaixin.control.model.ResPacket; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.stopcamera.StopCameraService; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import com.zhichenhaixin.sys.model.CameraModel; +import com.zhichenhaixin.sys.model.NightModeVo; +import com.zhichenhaixin.sys.model.WarnComposeVideoVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import com.zhichenhaixin.zmq.model.RadarInfoUtil; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.sql.Timestamp; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TimerTask; +import java.util.concurrent.ConcurrentHashMap; + +public class FllowSocket +{ + private static Log log; + private static String ctrl_fllow_host; + private static int ctrl_fllow_port; + private static String clientTopic; + private static CamInfoDaoImpl mdao; + private static DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + private static Map ctrlVos; + private static Socket socket; + + static { + FllowSocket.log = LogFactory.getLog(FllowSocket.class); + FllowSocket.ctrl_fllow_host = ResourceUtil.getCtrlFllowHost(); + FllowSocket.ctrl_fllow_port = ResourceUtil.getCtrlFllowPort(); + FllowSocket.clientTopic = ResourceUtil.getClientTopic(); + FllowSocket.mdao = (CamInfoDaoImpl)SpringBeanUtil.getBean("camInfoDaoImpl"); + FllowSocket.dbAlarmInfoDaoImpl = (DbAlarmInfoDaoImpl)SpringBeanUtil.getBean("dbAlarmInfoDaoImpl"); + FllowSocket.ctrlVos = new ConcurrentHashMap(); + FllowSocket.socket = new Socket(); + } + + public FllowSocket() { + Constant.timer.schedule(new MyTask(), 3000L, 5000L); + } + + public synchronized void start() { + if (FllowSocket.socket.isConnected()) { + if (!FllowSocket.socket.isClosed()) { + return; + } + } + try { + (FllowSocket.socket = new Socket()).connect(new InetSocketAddress(FllowSocket.ctrl_fllow_host, FllowSocket.ctrl_fllow_port), 1000); + final childSocket ch = new childSocket(); + ch.start(); + this.sendCamForCtrl(); + } + catch (Exception e2) { + FllowSocket.log.error("-> \u63a7\u5236\u670d\u52a1\u5668\u672a\u5f00\u542f\u6216\u8005\u662f[ip: " + FllowSocket.ctrl_fllow_host + " port: " + FllowSocket.ctrl_fllow_port + "]\u9519\u8bef\uff01"); + final Set set = FllowSocket.ctrlVos.keySet(); + for (final Integer ints : set) { + final ZCHXFllow.CtrlVo.Builder builder = FllowSocket.ctrlVos.get(ints); + builder.setStatus(2); + ZMQServerDyData.getZMQPUB().sendData(FllowSocket.clientTopic, String.valueOf(System.currentTimeMillis()), builder.build().toByteArray()); + FllowSocket.ctrlVos.remove(ints); + try { + Thread.sleep(100L); + } + catch (InterruptedException e1) { + FllowSocket.log.error("\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e1.fillInStackTrace()); + } + } + } + } + + public void sendCamForCtrl() { + try { + final List list = FllowSocket.mdao.queryAllCamera(); + final ZCHXFllow.ReqFllowVoForCtrl.Builder req = ZCHXFllow.ReqFllowVoForCtrl.newBuilder(); + for (int size = list.size(), i = 0; i < size; ++i) { + final CameraModel vo = list.get(i); + final ZCHXFllow.CameraInfoForCtrl.Builder info = ZCHXFllow.CameraInfoForCtrl.newBuilder(); + info.setCameraId(vo.getId()); + info.setCameraName(vo.getName()); + info.setCameraColor((vo.getCamera_color() == 0) ? 1 : vo.getCamera_color()); + info.setControlIp(vo.getIp()); + info.setControlPort(Integer.parseInt(vo.getPort())); + info.setCameraUid(vo.getUsername()); + info.setCameraPwd(vo.getPassword()); + info.setDome(vo.getDome()); + double big = vo.getLon(); + info.setLon((big == 0.0) ? 0.0 : big); + big = vo.getLat(); + info.setLat((big == 0.0) ? 0.0 : big); + info.setRtsp((vo.getVdeo_fllow_rtsp_url() == null) ? " " : vo.getVdeo_fllow_rtsp_url()); + info.setDestLon(0.0); + info.setDestLat(0.0); + info.setNorthAngle((float)((vo.getNorthangle() == 0.0) ? 0.0 : vo.getNorthangle())); + info.setCamHeight((float)((vo.getCamheight() == 0.0) ? 0.0 : vo.getCamheight())); + info.setMaxCamCentDist((float)((vo.getMaxcamcentdist() == 0.0) ? 0.0 : vo.getMaxcamcentdist())); + info.setTargitW((float)((vo.getTargitw() == 0.0) ? 0.0 : vo.getTargitw())); + info.setZoomNearFac((float)((vo.getZoomnearfac() == 0.0) ? 0.0 : vo.getZoomnearfac())); + info.setZoomFarFac((float)((vo.getZoomfarfac() == 0.0) ? 0.0 : vo.getZoomfarfac())); + info.setMaxRange((vo.getMaxrange() == 0.0) ? 0.0 : vo.getMaxrange()); + info.setCameraType((vo.getCamera_type() == 0) ? 0 : vo.getCamera_type()); + info.setCameraStatus(Integer.valueOf(StringUtil.notBlank(vo.getStatus()) ? vo.getStatus() : "0")); + req.addCameraList(info); + } + final byte[] bytes = req.build().toByteArray(); + final ReqPacket packet = new ReqPacket(); + packet.setByte_content(bytes); + final OutputStream out = FllowSocket.socket.getOutputStream(); + out.write(packet.getByteStream()); + out.flush(); + FllowSocket.log.info("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u521d\u59cb\u5316\u76f8\u673a\u5217\u8868\u7684\u957f\u5ea6\uff1a" + bytes.length); + } + catch (Exception e) { + try { + if (FllowSocket.socket != null) { + FllowSocket.socket.close(); + } + } + catch (Exception e2) { + FllowSocket.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u521d\u59cb\u5316\u76f8\u673a\u5217\u8868\u5173\u95ed\u6d41\u65f6\u9519\u8bef\uff01"); + } + FllowSocket.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u521d\u59cb\u5316\u76f8\u673a\u5217\u8868\u5931\u8d25\uff01"); + } + } + + public static void sendCamStatusForCtrl(final ZCHXFllow.CamerastatusListInfo camerastatusListInfo) { + try { + if (FllowSocket.socket.isConnected()) { + final ZCHXFllow.ReqFllowVoForCtrl.Builder req = ZCHXFllow.ReqFllowVoForCtrl.newBuilder(); + for (int size = camerastatusListInfo.getListCount(), i = 0; i < size; ++i) { + final ZCHXFllow.CameraInfoForCtrl.Builder info = ZCHXFllow.CameraInfoForCtrl.newBuilder(); + info.setCameraId(camerastatusListInfo.getList(i).getCameraId()); + info.setCameraName(""); + info.setCameraColor(1); + info.setControlIp(""); + info.setControlPort(0); + info.setCameraUid(""); + info.setCameraPwd(""); + info.setDome(1); + info.setLon(0.0); + info.setLat(0.0); + info.setRtsp(""); + info.setDestLon(0.0); + info.setDestLat(0.0); + info.setNorthAngle(0.0f); + info.setCamHeight(0.0f); + info.setMaxCamCentDist(0.0f); + info.setTargitW(0.0f); + info.setZoomNearFac(0.0f); + info.setZoomFarFac(0.0f); + info.setMaxRange(0.0); + info.setCameraType(0); + info.setCameraStatus(camerastatusListInfo.getList(i).getStatus()); + req.addCameraList(info); + } + final byte[] bytes = req.build().toByteArray(); + final ReqPacket packet = new ReqPacket(); + packet.setByte_content(bytes); + final OutputStream out = FllowSocket.socket.getOutputStream(); + out.write(packet.getByteStream()); + out.flush(); + FllowSocket.log.info("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u76f8\u673a\u72b6\u6001\u53d1\u751f\u53d8\u5316\u7684\u76f8\u673a\u5217\u8868\u7684\u957f\u5ea6\uff1a" + bytes.length); + } + } + catch (Exception e) { + try { + if (FllowSocket.socket != null) { + FllowSocket.socket.close(); + } + } + catch (Exception e2) { + FllowSocket.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u76f8\u673a\u72b6\u6001\u53d1\u751f\u53d8\u5316\u7684\u76f8\u673a\u5217\u8868\u5173\u95ed\u6d41\u65f6\u9519\u8bef\uff01"); + } + FllowSocket.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u76f8\u673a\u72b6\u6001\u53d1\u751f\u53d8\u5316\u7684\u76f8\u673a\u5217\u8868\u5931\u8d25\uff01"); + } + } + + public static void sendMsg(final RadarTrackVo point) { + try { + if (FllowSocket.socket.isConnected() && !RadarInfoUtil.falseAlarm(point)) { + final ZCHXFllow.ReqFllowVoForCtrl.Builder req = ZCHXFllow.ReqFllowVoForCtrl.newBuilder(); + final ZCHXFllow.FllowVo.Builder fv = ZCHXFllow.FllowVo.newBuilder(); + fv.setFllow(point.getFllow()); + fv.setMode(point.getMode()); + fv.setTrackNumber(point.getTrackNumber()); + fv.setWgs84PosLat(point.getWgs84PosLat()); + fv.setWgs84PosLong(point.getWgs84PosLon()); + fv.setUtc(point.getUtc()); + fv.setRtsp(StringUtil.isBlank(point.getRtsp()) ? "" : point.getRtsp()); + fv.setCameraId(point.getCameraId()); + fv.setWarnSiteType(StringUtil.isBlank(point.getWarnSiteType()) ? "not" : point.getWarnSiteType()); + fv.setCog(point.getCog()); + fv.setSog(point.getSog()); + final List list = NightModeEhcache.getAll(); + final NightModeVo nig = (list == null || list.size() <= 0) ? null : list.get(0); + int cameraColor = 1; + if (nig != null && nig.getIs_open() == 1) { + cameraColor = isOpenNigModel(nig.getStart_time(), nig.getEnd_time()); + } + fv.setCameraColor(cameraColor); + req.setFllowVo(fv); + final ReqPacket packet = new ReqPacket(); + packet.setByte_content(req.build().toByteArray()); + final OutputStream out = FllowSocket.socket.getOutputStream(); + out.write(packet.getByteStream()); + out.flush(); + FllowSocket.log.info("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u8ddf\u8e2a\u4fe1\u606f\u7684\u6a21\u5f0f\u4e3a \uff1a" + fv.getMode() + "\uff0c\u76ee\u6807\u7f16\u53f7\u4e3a\uff1a" + fv.getTrackNumber() + "\uff0c\u65f6\u95f4\u4e3a\uff1a" + fv.getUtc() + "MS"); + } + } + catch (Exception e) { + try { + if (FllowSocket.socket != null) { + FllowSocket.socket.close(); + } + } + catch (Exception e2) { + FllowSocket.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u6570\u636e\u5173\u95ed\u6d41\u65f6\u9519\u8bef\uff01"); + } + FllowSocket.log.error("-> \u7ed9\u63a7\u5236\u5668\u53d1\u9001\u6570\u636e\u5931\u8d25\uff01"); + } + } + + private byte[] readMessage(final Socket socket) { + InputStream in = null; + try { + in = socket.getInputStream(); + final byte[] bytes = new byte[5242880]; + final int length = in.read(bytes); + final byte[] blenth = new byte[length]; + if (length <= 0) { + return null; + } + System.arraycopy(bytes, 0, blenth, 0, length); + return blenth; + } + catch (Exception e) { + Thread.currentThread().interrupt(); + FllowSocket.log.error("-> \u8bfb\u53d6\u63a7\u5236\u5668\u6570\u636e\u9519\u8bef\uff01"); + try { + if (in != null) { + in.close(); + } + if (socket != null) { + socket.close(); + } + } + catch (Exception e2) { + FllowSocket.log.error("-> \u8bfb\u53d6\u63a7\u5236\u5668\u6570\u636e\u5173\u95ed\u6d41\u65f6\u9519\u8bef"); + } + return null; + } + } + + public void handleWarn(final ZCHXFllow.SpotVo vo) { + WarnInfoBean warnInfoBean = TrackAlarmEhcache.get(String.valueOf(vo.getWarnSiteType()) + String.valueOf(vo.getTrackNumber())); + if (vo.getMode() == 0) { + if (warnInfoBean == null && vo.getFllowType() == 1) { + warnInfoBean = this.covertWarnInfoBean(vo); + FllowSocket.dbAlarmInfoDaoImpl.saveWarnRecord(warnInfoBean); + TrackAlarmEhcache.put(warnInfoBean); + } + else if (warnInfoBean != null && (vo.getFllowType() == 2 || vo.getFllowType() == 4)) { + final WarnComposeVideoVo wvo = WarnComposeVideoVo.getClone(); + wvo.setAlarm_id(warnInfoBean.getId()); + wvo.setBegintime(warnInfoBean.getBegintime()); + warnInfoBean.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + wvo.setEndtime(warnInfoBean.getEndtime()); + wvo.setCamera_name(vo.getCameraName()); + wvo.setRtsp(vo.getComposeRtsp()); + wvo.setFtp(vo.getComposeFtp()); + FllowSocket.log.info("-> \uff08\u670d\u52a1\u5668\u68c0\u6d4b\u7684\u76ee\u6807\uff09\u8ddf\u8e2a\u5408\u6210\u5f55\u50cf\u6587\u4ef6\u7684\u544a\u8b66\u5730\u70b9\u7c7b\u578b\u662f\uff1a" + vo.getWarnSiteType() + "\uff0c\u76ee\u6807\u7f16\u53f7\u662f\uff1a" + String.valueOf(vo.getTrackNumber())); + FllowSocket.dbAlarmInfoDaoImpl.andComposeVideo(wvo); + warnInfoBean.setAlarm_status("4"); + warnInfoBean.setRtsp(vo.getComposeRtsp()); + warnInfoBean.setUntreated_alarm_count(WarnAlarmCountEhcache.get()); + Constant.sendClient(warnInfoBean); + warnInfoBean.setSign("1"); + HttpUtils.sendWarnToRongKe(warnInfoBean); + warnInfoBean.setBegintime(warnInfoBean.getEndtime()); + TrackAlarmEhcache.put(warnInfoBean); + } + } + else { + if (warnInfoBean == null) { + return; + } + warnInfoBean.setCamera_id(String.valueOf(vo.getCameraId())); + final WarnComposeVideoVo wvo = WarnComposeVideoVo.getClone(); + wvo.setAlarm_id(warnInfoBean.getId()); + wvo.setBegintime(warnInfoBean.getBegintime()); + warnInfoBean.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + wvo.setEndtime(warnInfoBean.getEndtime()); + wvo.setCamera_name(vo.getCameraName()); + final Object infoBeanTwo = Constant.warnMap.get("line_two" + String.valueOf(vo.getTrackNumber())); + final Object infoBeanOne = Constant.warnMap.get("line_one" + String.valueOf(vo.getTrackNumber())); + if (vo.getFllowType() == 1) { + if (infoBeanTwo == null && infoBeanOne != null) { + FllowSocket.dbAlarmInfoDaoImpl.saveWarn(warnInfoBean); + } + else { + warnInfoBean.setRtsp(vo.getRtsp()); + FllowSocket.dbAlarmInfoDaoImpl.saveWarnRecord(warnInfoBean); + } + } + else if (vo.getFllowType() == 2 || vo.getFllowType() == 4) { + if (StringUtil.notBlank(vo.getComposeRtsp())) { + if (infoBeanTwo == null && infoBeanOne != null) { + wvo.setFalse_alarm_rtsp(String.valueOf(vo.getComposeRtsp()) + "-yl"); + } + else { + wvo.setRtsp(vo.getComposeRtsp()); + wvo.setFtp(vo.getComposeFtp()); + FllowSocket.log.info("-> \u8ddf\u8e2a\u5408\u6210\u5f55\u50cf\u6587\u4ef6\u7684\u544a\u8b66\u5730\u70b9\u7c7b\u578b\u662f\uff1a" + vo.getWarnSiteType() + "\uff0c\u76ee\u6807\u7f16\u53f7\u662f\uff1a" + String.valueOf(vo.getTrackNumber())); + } + FllowSocket.dbAlarmInfoDaoImpl.andComposeVideo(wvo); + if (vo.getMode() == 1) { + warnInfoBean.setAlarm_status("4"); + warnInfoBean.setRtsp(vo.getComposeRtsp()); + warnInfoBean.setUntreated_alarm_count(WarnAlarmCountEhcache.get()); + Constant.sendClient(warnInfoBean); + warnInfoBean.setSign("1"); + HttpUtils.sendWarnToRongKe(warnInfoBean); + } + warnInfoBean.setBegintime(warnInfoBean.getEndtime()); + TrackAlarmEhcache.put(warnInfoBean); + } + } + else if (vo.getFllowType() == 3 && StringUtil.notBlank(vo.getComposeRtsp())) { + wvo.setFalse_alarm_rtsp(vo.getComposeRtsp()); + FllowSocket.dbAlarmInfoDaoImpl.saveWarn(warnInfoBean); + FllowSocket.dbAlarmInfoDaoImpl.andComposeVideo(wvo); + warnInfoBean.setBegintime(warnInfoBean.getEndtime()); + TrackAlarmEhcache.put(warnInfoBean); + } + } + } + + public WarnInfoBean covertWarnInfoBean(final ZCHXFllow.SpotVo vo) { + final WarnInfoBean info = WarnInfoBean.getClone(); + final String time = String.valueOf(vo.getWarnTime()); + final long date = Long.valueOf(time); + final long begintime = (time.length() == 10) ? date : (date / 1000L); + info.setId(DateUtil.getCurMillion()); + info.setBegintime(begintime); + info.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + info.setCamera_id(String.valueOf(vo.getCameraId())); + info.setCreate_time(Timestamp.valueOf(DateUtil.format.format(begintime * 1000L))); + info.setObject_id(String.valueOf(vo.getTrackNumber())); + info.setRtsp(vo.getRtsp()); + info.setObject_type("3"); + info.setX(vo.getWarnLon()); + info.setY(vo.getWarnLat()); + info.setAlarm_type(String.valueOf(vo.getWarnType())); + info.setAlarm_level(String.valueOf(vo.getWarnLevel())); + info.setAlarm_site(vo.getWarnSite()); + info.setAlarm_source(String.valueOf(vo.getWarnSource())); + info.setWarnSiteType(vo.getWarnSiteType()); + info.setHandle_status(vo.getWarnSite().contains("\u4e8c\u7ea7") ? 3 : 2); + return info; + } + + public static int isOpenNigModel(final String start, final String end) { + final String cur = DateUtil.format(DateUtil.now(), "HHmm"); + final int start2 = Integer.parseInt(start.replaceAll(":", "")); + final int cur2 = Integer.parseInt(cur.replaceAll(":", "")); + final int end2 = Integer.parseInt(end.replaceAll(":", "")); + if ((start2 >= cur2 && end2 <= cur2) || (start2 >= cur2 && end2 <= cur2) || (start2 <= cur2 && end2 <= cur2 && start2 <= end2) || (start2 >= cur2 && end2 >= cur2 && start2 <= end2) || (start2 >= cur2 && end2 >= cur2 && start2 >= end2)) { + return 1; + } + return 2; + } + + class MyTask extends TimerTask + { + @Override + public void run() { + FllowSocket.this.start(); + } + } + + class childSocket extends Thread + { + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + childSocket.this.handle(); + } + }; + Constant.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("FllowSocket-" + FllowSocket.ctrl_fllow_host); + while (!Thread.currentThread().isInterrupted()) { + try { + byte[] bytes = FllowSocket.this.readMessage(FllowSocket.socket); + if (bytes == null || bytes.length <= 0) { + continue; + } + final ResPacket respacket = ResPacket.getClone(); + respacket.setAll_pack_bytes(bytes); + if ("dddddddd".equals(respacket.getMark())) { + bytes = respacket.getContentBytes(); + final ZCHXFllow.SpotVo vo = ZCHXFllow.SpotVo.parseFrom(bytes); + FllowSocket.log.info("-> \u63a5\u6536\u5230\u63a7\u5236\u5668\u8fd4\u56de\u6765\u7684\u6d88\u606f\uff0c\u5982\u4e0b\uff1a\n" + vo); + final CameraModel model = FllowSocket.mdao.getCameraById(vo.getCameraId()); + if (model == null || "512".equals(model.getStatus())) { + continue; + } + String trackby = ""; + if (vo.getFllowType() == 1) { + trackby = "1"; + } + if (vo.getFllowType() == 1 || vo.getFllowType() == 2 || vo.getFllowType() == 4) { + final ZCHXFllow.CtrlVo.Builder ctrvo = ZCHXFllow.CtrlVo.newBuilder(); + ctrvo.setRtsp(vo.getRtsp()); + if (vo.getFllowType() == 4) { + ctrvo.setStatus(2); + } + else { + ctrvo.setStatus(vo.getFllowType()); + } + if (vo.getTrackNumber() > 0) { + ctrvo.setTrackNumber(vo.getTrackNumber()); + } + else { + ctrvo.setTrackNumber(1); + } + if (StringUtils.isNotBlank(vo.getCameraName())) { + ctrvo.setCameraName(vo.getCameraName()); + } + if (vo.getCameraId() != 0) { + ctrvo.setCameraId(vo.getCameraId()); + } + ctrvo.setLockStatus(vo.getLockStatus()); + if (vo.getMode() == 2) { + FllowSocket.ctrlVos.put(vo.getTrackNumber(), ctrvo); + CtrlVoEhcache.put(ctrvo.build()); + SendManualFllowDataThread.map.put(vo.getTrackNumber(), System.currentTimeMillis()); + if (vo.getFllowType() == 2 || vo.getFllowType() == 4) { + FllowSocket.ctrlVos.remove(vo.getTrackNumber()); + } + } + else { + ZMQServerDyData.getZMQPUB().sendData(FllowSocket.clientTopic, String.valueOf(System.currentTimeMillis()), ctrvo.build().toByteArray()); + if (vo.getFllowType() == 1) { + FllowSocket.ctrlVos.put(vo.getTrackNumber(), ctrvo); + } + if (vo.getFllowType() == 2 || vo.getFllowType() == 4) { + FllowSocket.ctrlVos.remove(vo.getTrackNumber()); + } + FllowSocket.log.info("-> \u81ea\u52a8\u8ddf\u8e2a\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u547d\u4ee4 \uff0c\u5982\u4e0b\uff1a\n" + ctrvo.build()); + } + } + FllowSocket.this.handleWarn(vo); + RadarInfoUtil.radarFalseAlarm(vo.getFllowType(), vo.getTrackNumber()); + final RadarTrackVo radar = AgilTrackEhcache.get(vo.getTrackNumber()); + if (radar != null) { + radar.setTrackby(trackby); + radar.setTargetType(vo.getObjectType()); + AgilTrackEhcache.put(radar); + } + if (vo.getTrackNumber() <= 0 || vo.getFllowType() != 1) { + continue; + } + StopCameraService.putTrackIncache(vo); + } + else { + FllowSocket.log.error("-> \u63a5\u6536\u63a7\u5236\u5668\u6570\u636e\u5f02\u5e38\uff01"); + } + } + catch (Exception e) { + FllowSocket.log.error("-> \u5904\u7406\u6570\u636e\u65f6\u51fa\u73b0\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/FllowThread.java b/src/main/java/com/zhichenhaixin/thread/FllowThread.java new file mode 100644 index 0000000..b243fed --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/FllowThread.java @@ -0,0 +1,81 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.util.ResourceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.AgilTrackEhcache; +import com.zhichenhaixin.serializer.RadarTrackVo; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class FllowThread extends Thread +{ + private Log log; + private static final int fllow_time_out; + private static long time; + private int executeTime; + public static Map map; + + static { + fllow_time_out = Integer.parseInt(SpringPropertyUtil.getProperty("fllow_time_out")); + FllowThread.time = FllowThread.fllow_time_out * 60 * 1000; + FllowThread.map = new ConcurrentHashMap(); + } + + public FllowThread() { + this.log = LogFactory.getLog(FllowThread.class); + this.executeTime = ResourceUtil.getPushFllowTime(); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + for (final Map.Entry entry : FllowThread.map.entrySet()) { + final String trackNum = entry.getKey(); + if (FllowThread.map != null && FllowThread.map.containsKey(trackNum)) { + final long old_time = FllowThread.map.get(trackNum); + final long new_time = System.currentTimeMillis(); + if (new_time - old_time >= FllowThread.time) { + FllowThread.map.remove(trackNum); + this.log.error("\u76ee\u6807\u7f16\u53f7\u4e3a\uff1a" + trackNum + "\uff0c[" + FllowThread.fllow_time_out + "]\u5206\u949f\u8d85\u65f6\uff01"); + } + else { + final RadarTrackVo vo = AgilTrackEhcache.get(Integer.parseInt(trackNum)); + if (vo != null) { + final RadarTrackVo point = new RadarTrackVo(); + point.setTrackNumber(vo.getTrackNumber()); + point.setWgs84PosLon(vo.getWgs84PosLon()); + point.setWgs84PosLat(vo.getWgs84PosLat()); + point.setFllow(2); + point.setMode(2); + point.setWarnSiteType(""); + point.setCog(vo.getCog()); + point.setSog(vo.getSog()); + point.setUtc(old_time); + ControllerFllowThread.sendMsg(point); + FllowSocket.sendMsg(point); + } + Thread.sleep(500L); + } + } + } + Thread.sleep(this.executeTime); + } + catch (Exception e) { + this.log.error("\u624b\u52a8\u8ddf\u8e2a\u6301\u7eed\u53d1\u9001\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/FllowTimeOutThread.java b/src/main/java/com/zhichenhaixin/thread/FllowTimeOutThread.java new file mode 100644 index 0000000..87fcbec --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/FllowTimeOutThread.java @@ -0,0 +1,75 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.util.ResourceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.proto.ZCHXFllow; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class FllowTimeOutThread extends Thread +{ + private Log log; + private static String clientTopic; + private static final int fllow_time_out; + private static long time; + public static Map ctrlVos; + public static Map timeout; + + static { + FllowTimeOutThread.clientTopic = ResourceUtil.getClientTopic(); + fllow_time_out = Integer.parseInt(SpringPropertyUtil.getProperty("fllow_time_out")); + FllowTimeOutThread.time = FllowTimeOutThread.fllow_time_out * 60 * 1000; + FllowTimeOutThread.ctrlVos = new ConcurrentHashMap(); + FllowTimeOutThread.timeout = new ConcurrentHashMap(); + } + + public FllowTimeOutThread() { + this.log = LogFactory.getLog(FllowTimeOutThread.class); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + for (final Map.Entry entry : FllowTimeOutThread.timeout.entrySet()) { + final Integer trackNum = entry.getKey(); + if (FllowTimeOutThread.timeout != null && FllowTimeOutThread.timeout.containsKey(trackNum) && FllowTimeOutThread.ctrlVos != null && FllowTimeOutThread.ctrlVos.containsKey(trackNum)) { + final long old_time = FllowTimeOutThread.timeout.get(trackNum); + final long new_time = System.currentTimeMillis(); + if (new_time - old_time < FllowTimeOutThread.time) { + continue; + } + final ZCHXFllow.CtrlVo.Builder builder = FllowTimeOutThread.ctrlVos.get(trackNum); + builder.setStatus(2); + ZMQServerDyData.getZMQPUB().sendData(FllowTimeOutThread.clientTopic, String.valueOf(System.currentTimeMillis()), builder.build().toByteArray()); + this.log.error("\u63a8\u9001\u76ee\u6807\u7f16\u53f7\u4e3a\uff1a" + trackNum + "\uff0c[" + FllowTimeOutThread.fllow_time_out + "]\u5206\u949f\u8d85\u65f6\u5173\u95ed\u8ddf\u8e2a\u4fe1\u606f\uff01"); + FllowTimeOutThread.timeout.remove(trackNum); + FllowTimeOutThread.ctrlVos.remove(trackNum); + try { + Thread.sleep(500L); + } + catch (InterruptedException e1) { + this.log.error("\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e1.fillInStackTrace()); + } + } + } + Thread.sleep(FllowTimeOutThread.time); + } + catch (Exception e2) { + this.log.error("\u63a8\u9001\u8d85\u65f6\u8ddf\u8e2a\u4fe1\u606f\u5f02\u5e38\uff01", e2.fillInStackTrace()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/FllowWorkerServerThread.java b/src/main/java/com/zhichenhaixin/thread/FllowWorkerServerThread.java new file mode 100644 index 0000000..c966aa8 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/FllowWorkerServerThread.java @@ -0,0 +1,122 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.CtrlVoEhcache; +import com.zhichenhaixin.proto.ZCHXFllow; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hbase.util.Bytes; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Arrays; +import java.util.Iterator; + +public class FllowWorkerServerThread extends Thread +{ + private Log log; + private static final int PORT; + private static final int fllow_time; + private static final String fllow_topic; + private String addr; + ZMQ.Socket socket; + String head; + int trackNumber; + int num; + byte[] rev; + + static { + PORT = Integer.parseInt(SpringPropertyUtil.getProperty("fllow.dealer.server.port")); + fllow_time = Integer.parseInt(SpringPropertyUtil.getProperty("fllow_time")); + fllow_topic = SpringPropertyUtil.getProperty("fllow.topic"); + } + + public FllowWorkerServerThread() { + this.log = LogFactory.getLog(FllowWorkerServerThread.class); + this.addr = "tcp://" + GlobalVariable.IP + ":" + FllowWorkerServerThread.PORT; + this.head = null; + this.num = 1; + this.rev = null; + } + + public void initZMQServerDy() { + (this.socket = GlobalVariable.context.socket(4)).connect(this.addr); + } + + @Override + public synchronized void start() { + super.start(); + } + + public void init() { + this.head = null; + this.num = 1; + this.rev = null; + } + + @Override + public void run() { + this.initZMQServerDy(); + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head == null || !this.head.equals(FllowWorkerServerThread.fllow_topic)) { + continue; + } + this.trackNumber = Integer.valueOf(Bytes.toString(this.rev)); + if (this.trackNumber == 0) { + this.trackNumber = 1; + } + Thread.sleep(FllowWorkerServerThread.fllow_time); + final ZCHXFllow.CtrlVo ctrlVo = CtrlVoEhcache.get(this.trackNumber); + if (ctrlVo != null) { + this.sendData(this.head, ctrlVo.toByteArray()); + if (GlobalVariable.MODEL_TYPE == 3) { + this.log.info("-> \u81ea\u52a8\u6a21\u5f0f\u4e0b\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u5f00\u59cb\u547d\u4ee4 \uff0c\u5982\u4e0b\uff1a\n" + ctrlVo); + } + else { + this.log.info("-> \u624b\u52a8\u6a21\u5f0f\u4e0b\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u5f00\u59cb\u547d\u4ee4\uff0c\u5982\u4e0b\uff1a\n" + ctrlVo); + } + } + CtrlVoEhcache.remove(this.trackNumber); + } + catch (Exception e2) { + FllowThread.map.remove(String.valueOf(this.trackNumber)); + if (GlobalVariable.MODEL_TYPE == 3) { + this.log.error("-> \u81ea\u52a8\u6a21\u5f0f\u4e0b\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\uff0c\u672a\u6536\u5230\u63a7\u5236\u5668\u8fd4\u56de\u7684\u8ddf\u8e2a\u4fe1\u606f\uff01"); + } + else { + this.log.error("-> \u624b\u52a8\u6a21\u5f0f\u4e0b\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\uff0c\u672a\u6536\u5230\u63a7\u5236\u5668\u8fd4\u56de\u7684\u8ddf\u8e2a\u4fe1\u606f\uff01"); + } + try { + this.sendData(FllowWorkerServerThread.fllow_topic, "error:\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u6a21\u5f0f\u4e0b\uff0c\u672a\u6536\u5230\u63a7\u5236\u5668\u8fd4\u56de\u7684\u8ddf\u8e2a\u4fe1\u606f\uff01".getBytes("UTF-8")); + } + catch (Exception e1) { + this.log.error("\u7f16\u7801\u8f6c\u6362\u5f02\u5e38\uff01", e1.fillInStackTrace()); + } + } + } + } + + public synchronized void sendData(final String topic, final byte[] data) { + this.socket.send(topic.getBytes(), 2); + this.socket.send(String.valueOf(System.currentTimeMillis()).getBytes(), 2); + this.socket.send(data, 0); + this.log.info("array.tostring:"+ Arrays.toString(data)); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/GpsOnlineUpdateTime.java b/src/main/java/com/zhichenhaixin/thread/GpsOnlineUpdateTime.java new file mode 100644 index 0000000..888854b --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/GpsOnlineUpdateTime.java @@ -0,0 +1,106 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.util.DateUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.cache.util.GpsVoEhcache; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXGPS; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class GpsOnlineUpdateTime extends Thread +{ + private Log log; + private static final long time; + private static final long timeout; + private SimpleDateFormat sdf; + private Map map; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + + static { + time = Long.parseLong(SpringPropertyUtil.getProperty("gps.push.time")); + timeout = Long.parseLong(SpringPropertyUtil.getProperty("gps.timeout")); + } + + public GpsOnlineUpdateTime(final DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl) { + this.log = LogFactory.getLog(GpsOnlineUpdateTime.class); + this.sdf = new SimpleDateFormat("HHmmss"); + this.map = new ConcurrentHashMap(); + this.dbAlarmInfoDaoImpl = dbAlarmInfoDaoImpl; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final List list = GpsVoEhcache.getAll(); + for (final ZCHXGPS.GPSData vo : list) { + final String time = vo.getSysDate().substring(6); + final long oldTime = this.sdf.parse(time).getTime() + GpsOnlineUpdateTime.timeout; + final String cur = DateUtil.format(DateUtil.now(), "HHmmss"); + final long nowTime = this.sdf.parse(cur).getTime(); + if (nowTime > oldTime) { + final ZCHXGPS.GPSData gvo = GpsVoEhcache.get(vo.getImei()); + if (gvo == null) { + continue; + } + this.covert(gvo.toBuilder()); + } + else { + if (!this.map.containsKey(vo.getImei())) { + continue; + } + this.map.remove(vo.getImei()); + } + } + Thread.sleep(GpsOnlineUpdateTime.time); + } + catch (Exception e) { + this.log.error("\u5904\u7406\u8d85\u65f6gps\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + this.map.clear(); + } + } + } + + public void covert(final ZCHXGPS.GPSData.Builder gvo) { + gvo.setOnlineStatus(2); + GpsVoEhcache.put(gvo.build()); + if (!this.map.containsKey(gvo.getImei())) { + final WarnInfoBean warnInfoVo = WarnInfoBean.getClone(); + warnInfoVo.setId(DateUtil.getCurMillion()); + warnInfoVo.setBegintime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + warnInfoVo.setAlarm_level("5"); + warnInfoVo.setAlarm_site(StringUtil.isBlank(gvo.getDeviceName()) ? "\u672a\u77e5" : gvo.getDeviceName()); + warnInfoVo.setAlarm_site_no(null); + warnInfoVo.setAlarm_status("2"); + warnInfoVo.setCreate_time(new Timestamp(System.currentTimeMillis())); + warnInfoVo.setAlarm_type("15"); + warnInfoVo.setAlarm_source("6"); + warnInfoVo.setObject_id(gvo.getImei()); + warnInfoVo.setObject_type("4"); + warnInfoVo.setX(gvo.getLon()); + warnInfoVo.setY(gvo.getLat()); + warnInfoVo.setMark(null); + warnInfoVo.setEndtime(Long.parseLong(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + this.dbAlarmInfoDaoImpl.saveWarnRecord(warnInfoVo); + this.map.put(gvo.getImei(), warnInfoVo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/GpsPushThread.java b/src/main/java/com/zhichenhaixin/thread/GpsPushThread.java new file mode 100644 index 0000000..c374588 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/GpsPushThread.java @@ -0,0 +1,57 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.GpsVoEhcache; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXGPS; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.List; + +public class GpsPushThread extends Thread +{ + private Log log; + private static final String GPS_TOPIC; + private static final long push_time; + + static { + GPS_TOPIC = SpringPropertyUtil.getProperty("gps.info.topic"); + push_time = Long.parseLong(SpringPropertyUtil.getProperty("gps.push.time")); + } + + public GpsPushThread() { + this.log = LogFactory.getLog(GpsPushThread.class); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final List list = GpsVoEhcache.getAll(); + if (list != null && list.size() > 0) { + final ZCHXGPS.GPSDataList.Builder gpsList = ZCHXGPS.GPSDataList.newBuilder(); + gpsList.setUTC(System.currentTimeMillis()); + gpsList.setLength(list.size()); + gpsList.addAllGpsDataList(list); + WarnGPSDyDataThread.getZMQPUB().sendData(GpsPushThread.GPS_TOPIC, gpsList.build().toByteArray()); + HBaseClient.getInstance().saveGpsTraceByTime(String.valueOf(gpsList.getUTC()), gpsList.build().toByteArray()); + this.log.info("\u63a8\u9001GPS\u957f\u5ea6\uff1a" + list.size()); + } + Thread.sleep(GpsPushThread.push_time); + } + catch (Exception e) { + this.log.error("\u63a8\u9001gps\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/GpsTcpServerThread.java b/src/main/java/com/zhichenhaixin/thread/GpsTcpServerThread.java new file mode 100644 index 0000000..da244a3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/GpsTcpServerThread.java @@ -0,0 +1,282 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.*; +import com.zhichenhaixin.cache.util.GpsVoEhcache; +import com.zhichenhaixin.fusedata.MongoUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXGPS; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; + +public class GpsTcpServerThread extends Thread +{ + private Log log; + private static final int PORT; + private static final double dis; + private boolean is_timeout; + static Integer minuteNum; + static long time_ms; + + static { + PORT = Integer.parseInt(SpringPropertyUtil.getProperty("gps.tcp.port")); + dis = Double.parseDouble(SpringPropertyUtil.getProperty("gps.distance")); + GpsTcpServerThread.minuteNum = Integer.valueOf(SpringPropertyUtil.getProperty("minuteNum")); + GpsTcpServerThread.time_ms = GpsTcpServerThread.minuteNum * 60 * 1000; + } + + public GpsTcpServerThread() { + this.log = LogFactory.getLog(GpsTcpServerThread.class); + this.is_timeout = false; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + try { + final ServerSocket serverSocket = new ServerSocket(); + serverSocket.bind(new InetSocketAddress(GlobalVariable.IP, GpsTcpServerThread.PORT)); + while (!Thread.currentThread().isInterrupted()) { + final Socket socket = serverSocket.accept(); + final SocketThread sth = new SocketThread(socket); + sth.start(); + this.log.info("IP: " + socket.getInetAddress().getHostAddress() + " PORT: " + socket.getPort() + " [come in]"); + } + } + catch (Exception e) { + this.log.error("\u521b\u5efasocket\u6216accept()\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + static /* synthetic */ void access$1(final GpsTcpServerThread gpsTcpServerThread, final boolean is_timeout) { + gpsTcpServerThread.is_timeout = is_timeout; + } + + class SocketThread extends Thread + { + private Socket socket; + + public SocketThread(final Socket socket) { + this.socket = socket; + } + + @Override + public synchronized void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SocketThread.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("GpsTcpServerThread-" + this.socket.getInetAddress().getHostAddress() + "-" + this.socket.getPort()); + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] bytes = this.readMessage(); + if (bytes == null || bytes.length <= 0) { + continue; + } + final String content = CharacterUtil.getStrByBytes(bytes); + if (!content.endsWith(";!") || !content.startsWith("$")) { + continue; + } + this.parseData(content); + } + catch (Exception e) { + GpsTcpServerThread.this.log.error("\u89e3\u6790gps\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public byte[] readMessage() { + InputStream in = null; + try { + in = this.socket.getInputStream(); + final byte[] bytes = new byte[5242880]; + final int length = in.read(bytes); + if (length <= 0) { + return null; + } + final byte[] blenth = new byte[length]; + System.arraycopy(bytes, 0, blenth, 0, length); + return blenth; + } + catch (Exception e2) { + Thread.currentThread().interrupt(); + GpsTcpServerThread.this.log.error("\u8bfb\u53d6\u6570\u636e\u65f6\u3010" + this.socket.getInetAddress().getHostAddress() + ":" + this.socket.getPort() + "\u3011GPS\u65ad\u5f00\uff01"); + try { + if (in != null) { + in.close(); + } + if (this.socket != null) { + this.socket.close(); + } + } + catch (IOException e1) { + GpsTcpServerThread.this.log.error("\u8bfb\u53d6\u6570\u636e\u65f6\u5173\u95ed\u6d41\u65f6\u5f02\u5e38\uff01", e1.fillInStackTrace()); + } + return null; + } + } + + public void parseData(final String content) { + ZCHXGPS.GPSData.Builder vo = null; + try { + final String[] cons = content.split(","); + vo = ZCHXGPS.GPSData.newBuilder(); + vo.setImei(cons[1]); + vo.setDeviceName(cons[2]); + vo.setDataType(cons[3]); + vo.setSysDate(String.valueOf(DateUtil.andHour(cons[4], cons[5]).substring(0, 6)) + DateUtil.andHour(cons[4], cons[5]).substring(6)); + vo.setSiteState(cons[6]); + vo.setLatType(cons[8]); + if (!"release".equals(SpringPropertyUtil.getProperty("release.type"))) { + vo.setLat(LonLatUtil.xypase(cons[7], cons[8])); + vo.setLon(LonLatUtil.xypase(cons[9], cons[10])); + } + else { + vo.setLat(Double.parseDouble(cons[7].replaceAll(",", "."))); + vo.setLon(Double.parseDouble(cons[9].replaceAll(",", "."))); + } + vo.setLonType(cons[10]); + vo.setSiteBeiDouPlateNum(Integer.parseInt(StringUtil.isBlank(cons[11]) ? "0" : cons[11])); + vo.setSiteGpsPlateNum(Integer.parseInt(StringUtil.isBlank(cons[12]) ? "0" : cons[12])); + vo.setSiteGlonassPlateNum(Integer.parseInt(StringUtil.isBlank(cons[13]) ? "0" : cons[13])); + vo.setHorizontalSiteprecision(Double.parseDouble(StringUtil.isBlank(cons[14]) ? "0" : cons[14])); + vo.setSpeed(Double.parseDouble(StringUtil.isBlank(cons[15]) ? "0" : cons[15])); + vo.setCourse(Double.parseDouble(StringUtil.isBlank(cons[16]) ? "0" : cons[16])); + vo.setAboveSeaLevel(Double.parseDouble(StringUtil.isBlank(cons[17]) ? "0" : cons[17])); + vo.setMileage(Double.parseDouble(StringUtil.isBlank(cons[18]) ? "0" : cons[18])); + vo.setMcc(cons[19]); + vo.setMnc(cons[20]); + vo.setLac(cons[21]); + vo.setCellID(cons[22]); + vo.setGsm(Integer.parseInt(StringUtil.isBlank(cons[23]) ? "0" : cons[23])); + vo.setOutDeviceState(Integer.parseInt(StringUtil.isBlank(cons[32]) ? "0" : cons[32])); + vo.setElectricQuantity(Integer.parseInt(StringUtil.isBlank(cons[33]) ? "100" : cons[33])); + vo.setOnlineStatus(1); + final ZCHXGPS.GPSData data = GpsVoEhcache.get(cons[1]); + if (data != null) { + if (data.getLat() != vo.getLat() || data.getLon() != vo.getLon()) { + HBaseClient.getInstance().saveGpsTraceByImeiAndTime(vo.getImei(), vo.build().toByteArray()); + } + } + else { + HBaseClient.getInstance().saveGpsTraceByImeiAndTime(vo.getImei(), vo.build().toByteArray()); + } + this.gpsHistoryTrackHandle(vo, DateUtil.parseTime(vo.getSysDate())); + } + catch (Exception e) { + GpsTcpServerThread.this.log.error("\u89e3\u6790gps\u6570\u636e\u5f02\u5e38\uff01" + content); + vo = null; + } + } + + public void gpsHistoryTrackHandle(final ZCHXGPS.GPSData.Builder vo, final long theTime) { + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("gps_Track", vo.getImei()); + ZCHXGPS.GPSHistoryTracks.Builder tracks = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + tracks = ZCHXGPS.GPSHistoryTracks.parseFrom(trackData).toBuilder(); + final ZCHXGPS.GPSHistoryTrack tracklast = tracks.getTracks(tracks.getTracksCount() - 1); + final ZCHXGPS.GPSHistoryTrack trackfrist = tracks.getTracks(0); + String sysDate = tracklast.getSysDate(); + long time = DateUtil.parseTime(sysDate); + if (time + GpsTcpServerThread.time_ms < theTime) { + GpsTcpServerThread.access$1(GpsTcpServerThread.this, true); + } + else { + sysDate = trackfrist.getSysDate(); + time = DateUtil.parseTime(sysDate); + if (time + GpsTcpServerThread.time_ms > theTime) { + vo.setTracks(tracks); + } + else { + for (int i = 0; i < tracks.getTracksCount(); ++i) { + final ZCHXGPS.GPSHistoryTrack temp = tracks.getTracks(i); + sysDate = temp.getSysDate(); + time = DateUtil.parseTime(sysDate); + if (time > theTime - GpsTcpServerThread.time_ms) { + break; + } + tracks.removeTracks(i); + } + vo.setTracks(tracks); + } + } + } + catch (InvalidProtocolBufferException e) { + GpsTcpServerThread.this.log.error("GPS protocol\u89e3\u6790\u5931\u8d25\uff01", e.fillInStackTrace()); + } + } + this.saveTrackToMongoDB("gps_Track", vo, tracks, GpsTcpServerThread.this.is_timeout, theTime); + GpsVoEhcache.put(vo.build()); + } + + public void saveTrackToMongoDB(final String name, final ZCHXGPS.GPSData.Builder vo, ZCHXGPS.GPSHistoryTracks.Builder tracks, final boolean is_ok, final long theTime) { + final ZCHXGPS.GPSHistoryTrack.Builder track = ZCHXGPS.GPSHistoryTrack.newBuilder(); + track.setImei(vo.getImei()); + track.setLon(vo.getLon()); + track.setLonType(vo.getLonType()); + track.setLat(vo.getLat()); + track.setLatType(vo.getLatType()); + track.setSysDate(vo.getSysDate()); + track.setAboveSeaLevel(vo.getAboveSeaLevel()); + track.setCellID(vo.getCellID()); + track.setCourse(vo.getCourse()); + track.setDataType(vo.getDataType()); + track.setDeviceName(vo.getDeviceName()); + track.setGsm(vo.getGsm()); + track.setHorizontalSiteprecision(vo.getHorizontalSiteprecision()); + track.setLac(vo.getLac()); + track.setMcc(vo.getMcc()); + track.setMileage(vo.getMileage()); + track.setMnc(vo.getMnc()); + track.setSiteBeiDouPlateNum(vo.getSiteBeiDouPlateNum()); + track.setSiteGlonassPlateNum(vo.getSiteGlonassPlateNum()); + track.setSiteGpsPlateNum(vo.getSiteGpsPlateNum()); + track.setSpeed(vo.getSpeed()); + if (tracks == null || is_ok) { + tracks = ZCHXGPS.GPSHistoryTracks.newBuilder(); + } + if (tracks.getTracksCount() > 0) { + final ZCHXGPS.GPSHistoryTrack trackfrist = tracks.getTracks(0); + if (trackfrist != null && (trackfrist.getLat() != track.getLat() || trackfrist.getLon() != track.getLon())) { + final double dist = DistanceUtil.lantitudeLongitudeDist(track.getLon(), track.getLat(), trackfrist.getLon(), trackfrist.getLat()); + if (dist > GpsTcpServerThread.dis) { + tracks.addTracks(track); + } + } + } + else { + tracks.addTracks(track); + } + final BasicDBObject document = new BasicDBObject(); + document.put("_id", vo.getImei()); + document.put("data", tracks.build().toByteArray()); + document.put("time", System.currentTimeMillis()); + MongoUtil.getInstance().saveGPSInfo(document); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/HttpServerThread.java b/src/main/java/com/zhichenhaixin/thread/HttpServerThread.java new file mode 100644 index 0000000..9e7d6e0 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/HttpServerThread.java @@ -0,0 +1,272 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.alibaba.fastjson.JSON; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.sys.model.CameraInfoVo; +import com.zhichenhaixin.sys.model.CameraStatusInfoVo; +import com.zhichenhaixin.sys.model.UserVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import com.zhichenhaixin.sys.service.impl.CLURDICServiceImpl; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.*; +import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.List; + +public class HttpServerThread extends Thread +{ + private Log log; + private static final String CAMERA_LIST_URL; + private static final String CAMERA_STATUS_URL; + private static final String USER_INFO_URL; + private static final String WARN_STATUS_URL; + private static final int HTTP_PORT; + private CLURDICServiceImpl clurdicServiceImpl; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + HttpServer httpserver; + + static { + CAMERA_LIST_URL = SpringPropertyUtil.getProperty("http.querycameralist.url"); + CAMERA_STATUS_URL = SpringPropertyUtil.getProperty("http.querycamerastatus.url"); + USER_INFO_URL = SpringPropertyUtil.getProperty("http.userinfo.url"); + WARN_STATUS_URL = SpringPropertyUtil.getProperty("http.warnstatus.url"); + HTTP_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("http.server.port")); + } + + public HttpServerThread(final CLURDICServiceImpl clurdicServiceImpl, final DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl) { + this.log = LogFactory.getLog(HttpServerThread.class); + this.httpserver = null; + this.clurdicServiceImpl = clurdicServiceImpl; + this.dbAlarmInfoDaoImpl = dbAlarmInfoDaoImpl; + try { + this.httpserver = HttpServer.create(new InetSocketAddress(HttpServerThread.HTTP_PORT), 100); + } + catch (Exception e) { + this.log.error("HTTP\u670d\u52a1\u521d\u59cb\u5316\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + this.httpserverService(); + } + + public void httpserverService() { + try { + this.httpserver.createContext(HttpServerThread.CAMERA_LIST_URL, new CameraListHttpHandler()); + this.httpserver.createContext(HttpServerThread.CAMERA_STATUS_URL, new CameraStatusHttpHandler()); + this.httpserver.createContext(HttpServerThread.USER_INFO_URL, new UserInfoHttpHandler()); + this.httpserver.createContext(HttpServerThread.WARN_STATUS_URL, new WarnStatusHttpHandler()); + this.httpserver.setExecutor(null); + this.httpserver.start(); + this.log.info("-> http server started"); + } + catch (Exception e) { + this.httpserver.removeContext(HttpServerThread.CAMERA_LIST_URL); + this.httpserver.removeContext(HttpServerThread.CAMERA_STATUS_URL); + this.httpserver.removeContext(HttpServerThread.USER_INFO_URL); + this.httpserver.removeContext(HttpServerThread.WARN_STATUS_URL); + } + } + + class CameraListHttpHandler implements HttpHandler + { + @Override + public void handle(final HttpExchange httpExchange) throws IOException { + final List cameraList = HttpServerThread.this.clurdicServiceImpl.queryCameraList(); + final String responseMsg = JSON.toJSONString(cameraList); + httpExchange.sendResponseHeaders(200, responseMsg.getBytes("UTF-8").length); + final OutputStream out = httpExchange.getResponseBody(); + out.write(responseMsg.getBytes("UTF-8"), 0, responseMsg.getBytes("UTF-8").length); + out.flush(); + out.close(); + httpExchange.close(); + } + } + + class CameraStatusHttpHandler implements HttpHandler + { + @Override + public void handle(final HttpExchange httpExchange) throws IOException { + final List cameraList = HttpServerThread.this.clurdicServiceImpl.queryCameraList(); + final List cameraStatusList = new ArrayList(); + for (final CameraInfoVo cameraInfoVo : cameraList) { + final CameraStatusInfoVo vo = new CameraStatusInfoVo(); + vo.setId(cameraInfoVo.getId()); + vo.setName(cameraInfoVo.getName()); + vo.setIp(cameraInfoVo.getIp()); + vo.setPort(cameraInfoVo.getPort()); + vo.setScreenIp(cameraInfoVo.getScreenIp()); + vo.setScreenPort(cameraInfoVo.getScreenPort()); + vo.setStatus(cameraInfoVo.getStatus()); + cameraStatusList.add(vo); + } + final String responseMsg = JSON.toJSONString(cameraStatusList); + httpExchange.sendResponseHeaders(200, responseMsg.getBytes("UTF-8").length); + final OutputStream out = httpExchange.getResponseBody(); + out.write(responseMsg.getBytes("UTF-8"), 0, responseMsg.getBytes("UTF-8").length); + out.flush(); + out.close(); + httpExchange.close(); + } + } + + class UserInfoHttpHandler implements HttpHandler + { + @Override + public void handle(final HttpExchange httpExchange) throws IOException { + InputStream in = null; + BufferedReader bfr = null; + try { + in = httpExchange.getRequestBody(); + final StringBuffer sbf = new StringBuffer(); + bfr = new BufferedReader(new InputStreamReader(in, "UTF-8")); + String line = ""; + while ((line = bfr.readLine()) != null) { + sbf.append(line); + } + final String str = sbf.toString(); + HttpServerThread.this.log.info("-> \u8363\u79d1\u8fd4\u56de\u7684\u53c2\u6570\uff1a " + str); + final String[] split = str.split("/"); + final UserVo vo = new UserVo(); + vo.setUser_account(split[1]); + vo.setUser_passwd(split[2]); + vo.setUser_name(split[3]); + vo.setRole_id(1); + final UserVo userVo = HttpServerThread.this.clurdicServiceImpl.queryUserByAccount(vo); + if (userVo != null) { + vo.setUser_id(userVo.getUser_id()); + vo.setRole_id(userVo.getRole_id()); + } + if ("1".equals(split[4]) || "2".equals(split[4])) { + HttpServerThread.this.clurdicServiceImpl.saveEditUser(vo); + } + else if ("3".equals(split[4])) { + HttpServerThread.this.clurdicServiceImpl.deleteUserMsg(vo); + } + } + catch (Exception e) { + HttpServerThread.this.log.error("\u7528\u6237\u4fe1\u606f\u540c\u6b65\u5f02\u5e38\uff01", e.fillInStackTrace()); + return; + } + finally { + if (bfr != null) { + bfr.close(); + } + if (in != null) { + in.close(); + } + if (httpExchange != null) { + httpExchange.close(); + } + } + if (bfr != null) { + bfr.close(); + } + if (in != null) { + in.close(); + } + if (httpExchange != null) { + httpExchange.close(); + } + } + } + + class WarnStatusHttpHandler implements HttpHandler + { + @Override + public void handle(final HttpExchange httpExchange) throws IOException { + InputStream in = null; + BufferedReader bfr = null; + try { + in = httpExchange.getRequestBody(); + final StringBuffer sbf = new StringBuffer(); + bfr = new BufferedReader(new InputStreamReader(in, "UTF-8")); + String line = ""; + while ((line = bfr.readLine()) != null) { + sbf.append(line); + } + final String str = sbf.toString(); + HttpServerThread.this.log.info("\u8363\u79d1\u8fd4\u56de\u7684\u53c2\u6570\uff1a--------> " + str); + final String[] split = str.split("/"); + final String id = split[1]; + final String handle_status = split[2]; + final String mark = split[3]; + final String handler = split[4]; + final String handle_result = split[5]; + final String handle_time = split[6]; + final WarnInfoBean bean = HttpServerThread.this.dbAlarmInfoDaoImpl.queryWarnId(id); + if (bean != null) { + bean.setAlarm_status(handle_status); + bean.setMark(mark); + bean.setHandle_result(Integer.parseInt(handle_result)); + bean.setHandler(handler); + bean.setHandle_time(handle_time); + bean.setHandle_status(this.getHandleStatus(Integer.parseInt(handle_status))); + HttpServerThread.this.dbAlarmInfoDaoImpl.updateWarnStatus(bean); + } + } + catch (Exception e) { + HttpServerThread.this.log.error("\u8b66\u60c5\u72b6\u6001\u540c\u6b65\u5f02\u5e38\uff01", e.fillInStackTrace()); + return; + } + finally { + if (bfr != null) { + bfr.close(); + } + if (in != null) { + in.close(); + } + if (httpExchange != null) { + httpExchange.close(); + } + } + if (bfr != null) { + bfr.close(); + } + if (in != null) { + in.close(); + } + if (httpExchange != null) { + httpExchange.close(); + } + } + + private int getHandleStatus(int type) { + switch (type) { + case 4: { + type = 3; + break; + } + case 5: { + type = 4; + break; + } + case 6: { + type = 1; + break; + } + default: { + type = 2; + break; + } + } + return type; + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/ManualFllowServerThread.java b/src/main/java/com/zhichenhaixin/thread/ManualFllowServerThread.java new file mode 100644 index 0000000..e7252a4 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ManualFllowServerThread.java @@ -0,0 +1,86 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zeromq.ZMQ; + +public class ManualFllowServerThread extends Thread +{ + private Log log; + private static final String fllow_topic; + private static int port; + private String addr; + ZMQ.Socket socket; + int trackNumber; + String head; + + static { + fllow_topic = SpringPropertyUtil.getProperty("fllow.topic"); + ManualFllowServerThread.port = Integer.valueOf(SpringPropertyUtil.getProperty("fllow.port")); + } + + public ManualFllowServerThread() { + this.log = LogFactory.getLog(ManualFllowServerThread.class); + this.addr = "tcp://" + GlobalVariable.IP + ":" + ManualFllowServerThread.port; + this.head = null; + (this.socket = GlobalVariable.context.socket(4)).bind(this.addr); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] request = this.socket.recv(); + this.splitUrl(new String(request)); + if (ManualFllowServerThread.fllow_topic.equals(this.head)) { + if (this.trackNumber == 0) { + this.trackNumber = 1; + } + this.getFllowData(this.head, this.trackNumber); + } + else { + this.socket.send("error_head".getBytes()); + } + } + catch (Exception e) { + this.log.error("\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9URL\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void getFllowData(final String head, final int trackNumber) { + final String port = PortManageUtils.getRandom("87"); + final String url_pair = "tcp://" + GlobalVariable.IP + ":" + port; + this.socket.send(url_pair.getBytes()); + new SendManualFllowDataThread(url_pair, port, head, trackNumber).start(); + } + + public void splitUrl(final String url) { + this.head = null; + this.trackNumber = 0; + final String[] str = url.split("\\?"); + if (str.length == 2) { + final String[] thehead = str[0].split("/"); + if (thehead.length == 3) { + this.head = thehead[2]; + } + final String theparam = str[1]; + final String[] param = theparam.split("="); + if (param.length > 1 && "trackNumber".equals(param[0])) { + this.trackNumber = Integer.valueOf(param[1]); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/RadarAcceptSocket.java b/src/main/java/com/zhichenhaixin/thread/RadarAcceptSocket.java new file mode 100644 index 0000000..aed96cd --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/RadarAcceptSocket.java @@ -0,0 +1,512 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.zhichenhaixin.gui.RadarHelperFrame; +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.tcp.model.*; +import com.zhichenhaixin.util.BitConverter; +import com.zhichenhaixin.util.ByteIntUtil; +import com.zhichenhaixin.util.EndianUtil; +import com.zhichenhaixin.util.RadarTransformUtil; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.DataInputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.net.InetAddress; +import java.net.Socket; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.List; + +public class RadarAcceptSocket extends Thread { + private Log log; + public static int PACKAGE_MAX_LENGTH; + public static int PACKET_HEAD_LENGTH; + private DataInputStream dataInput; + private OutputStream output; + public String address; + private volatile byte[] data; + private volatile boolean flag; + private Socket socket; + private static int CONS_ZERO; + private int len; + private int clientType; + private int radar_data_package_head_len; + private int radar_data_max_buffer_limit; + private byte[] byte_buffer; + + static { + RadarAcceptSocket.PACKAGE_MAX_LENGTH = 4096; + RadarAcceptSocket.PACKET_HEAD_LENGTH = 2; + RadarAcceptSocket.CONS_ZERO = 0; + } + + public RadarAcceptSocket(final Socket socket) { + this.log = LogFactory.getLog(RadarAcceptSocket.class); + this.dataInput = null; + this.output = null; + this.address = null; + this.data = null; + this.flag = true; + this.socket = null; + this.len = RadarAcceptSocket.CONS_ZERO; + this.clientType = 0; + this.radar_data_package_head_len = 16; + this.radar_data_max_buffer_limit = 1024000; + this.byte_buffer = null; + this.socket = socket; + final InetAddress inetAddress = socket.getInetAddress(); + this.address = inetAddress.getHostAddress(); + final String res = "\u96f7\u8fbe\u6570\u636e\u4e0a\u62a5\u5ba2\u6237\u7aef\u8fde\u63a5\u4e0a: " + this.address; + this.log.info(res); + RadarHelperFrame.textlog.append(String.valueOf(res) + "\r\n"); + } + + @Override + public void run() { + try { + this.dataInput = new DataInputStream(this.socket.getInputStream()); + this.output = this.socket.getOutputStream(); + while (this.flag) { + final byte[] theData = new byte[RadarAcceptSocket.PACKAGE_MAX_LENGTH]; + this.len = this.dataInput.read(theData); + if (this.len < RadarAcceptSocket.CONS_ZERO) { + this.nowClose(); + } else { + if (this.len < RadarAcceptSocket.PACKET_HEAD_LENGTH) { + continue; + } + this.data = new byte[this.len]; + System.arraycopy(theData, RadarAcceptSocket.CONS_ZERO, this.data, RadarAcceptSocket.CONS_ZERO, this.len); + this.dealProcess(this.data); + this.data = null; + } + } + } catch (IOException e) { + if (this.isclientClose(this.socket)) { + this.nowClose(); + } else { + this.log.error(e.getMessage(), e); + } + } + } + + private void dealProcess(final byte[] bytes) { + RadarHelperFrame.writeLog(Arrays.toString(bytes)); + if (this.byte_buffer == null) { + this.byte_buffer = bytes; + } else if (this.byte_buffer.length > this.radar_data_max_buffer_limit) { + this.byte_buffer = bytes; + } else { + this.byte_buffer = ByteIntUtil.byteMerger(this.byte_buffer, bytes); + } + final int byte_buffer_len = this.byte_buffer.length; + if (byte_buffer_len < this.radar_data_package_head_len) { + // 数据包头不完整,没有达到16字节长度 + RadarHelperFrame.writeLog("\u6570\u636e\u5305\u5934\u4e0d\u5b8c\u6574\uff0c\u6ca1\u6709\u8fbe\u523016\u5b57\u8282\u957f\u5ea6"); + return; + } + final RadarRESPackageModel radarPackage = new RadarRESPackageModel(this.byte_buffer); + final int mark = radarPackage.getMark(); + final int dataType = radarPackage.getDataType(); + final int dataLength = radarPackage.getDataLength(); + final int dataNum = radarPackage.getDataNum(); + // 包头标识 + RadarHelperFrame.writeLog("\u5305\u5934\u6807\u8bc6\uff1a " + mark); + // 数据类型 + RadarHelperFrame.writeLog("\u6570\u636e\u7c7b\u578b\uff1a " + dataType); + // 整包数据的长度 + RadarHelperFrame.writeLog("\u6574\u5305\u6570\u636e\u7684\u957f\u5ea6\uff1a " + dataLength); + // 数据数量 + RadarHelperFrame.writeLog("\u6570\u636e\u6570\u91cf\uff1a " + dataNum); + if (!radarPackage.isIntegrated()) { + // 数据包没有发送完整,等待继续接收 + RadarHelperFrame.textlog.append("\u6570\u636e\u5305\u6ca1\u6709\u53d1\u9001\u5b8c\u6574\uff0c\u7b49\u5f85\u7ee7\u7eed\u63a5\u6536\r\n"); + return; + } + final byte[] radardata = radarPackage.getData(); + this.handleRadarData(mark, dataType, dataLength, dataNum, radardata); + final byte[] remainbytes = radarPackage.getRemain(); + if (remainbytes != null) { + this.byte_buffer = remainbytes; + } else { + this.byte_buffer = null; + } + } + + // todo : 处理雷达数据 + private void handleRadarData(final int mark, final int dataType, final int dataLength, final int dataNum, final byte[] radardata) { + switch (dataType) { + case 1: { + final byte[] resultdata1 = this.handleRadarState(dataNum, radardata); + break; + } + case 2: { + this.handleRadarTarget(dataNum, radardata); + break; + } + case 3: { + // todo : 发送String类型的数据 + final byte[] resultdata2 = this.handleRadarTrack(dataNum, radardata);//在zmq测试中会出现乱码 + final String normal_resultdata2 = this.handleRadarTrack2String2(dataNum, radardata);//在zmq中不会乱码的数据 + if (RadarHelperFrame.zmqPubServer != null) { + RadarHelperFrame.zmqPubServer.sendData(RadarHelperFrame.topic_string, String.valueOf(System.currentTimeMillis()), resultdata2);//在zmq测试中会出现乱码 但接收正常 + RadarHelperFrame.zmqPubServer.sendData("RadarTrack", String.valueOf(System.currentTimeMillis()), normal_resultdata2);//将不乱码的数据发送出去 + break; + } + break; + } + case 4: { + // todo : 新增了一个发送String类型的data数据 + //final byte[] resultdata3 = this.handleNyGuideCamPosModel(dataNum, radardata); + final String resultdata3 = this.handleNyGuideCamPosModel2String(dataNum, radardata); + if (RadarHelperFrame.zmqPubServer != null) { + RadarHelperFrame.zmqPubServer.sendData("NyGuideCamPos", String.valueOf(System.currentTimeMillis()), resultdata3); + //RadarHelperFrame.zmqPubServer.sendData("NyGuideCamPos", String.valueOf(System.currentTimeMillis()), resultdata3.getBytes()); + break; + } + break; + } + } + } + + private byte[] handleRadarState(final int dataNum, final byte[] radardata) { + int offset = 0; + byte[] result = null; + for (int i = 0; i < dataNum; ++i) { + final int radarId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final long timestamp = EndianUtil.bytes2LongSmallEndian(radardata, offset); + offset += 8; + final char workState = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final char sendState = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final float temperature = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float longitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float latitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float altitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final RadarStateModel radarState = new RadarStateModel(radarId, timestamp, workState, sendState, temperature, longitude, latitude, altitude); + final String stateString = JSON.toJSONString(radarState); + result = stateString.getBytes(); + RadarHelperFrame.writeLog("\u96f7\u8fbe\u72b6\u6001\u6570\u636e\uff1a " + stateString); + // todo : 打印 雷达状态数据 handleRadarState + this.log.info("-------------1:RadarState 雷达状态数据---------------"); + this.log.info(stateString); + } + return result; + } + + private byte[] handleRadarTarget(final int dataNum, final byte[] radardata) { + int offset = 0; + for (int i = 0; i < dataNum; ++i) { + // 接收的数据进行转码 + final int radarId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final long timestamp = EndianUtil.bytes2LongSmallEndian(radardata, offset); + offset += 8; + final int dis = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final float azimuth = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float longitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float latitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float altitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final RadarTargetModel radarTarget = new RadarTargetModel(radarId, timestamp, dis, azimuth, longitude, latitude, altitude); + RadarHelperFrame.writeLog("\u96f7\u8fbe\u70b9\u8ff9\u6570\u636e\uff1a " + JSON.toJSONString(radarTarget)); + // todo 打印 雷达点迹数据 handleRadarTarget + this.log.info("-------------2:RadarTarget 雷达点迹数据---------------"); + this.log.info(JSON.toJSONString(radarTarget)); + } + return null; + } + + // todo : 多了一个关电位置 + private byte[] handleNyGuideCamPosModel(final int dataNum, final byte[] radardata) { + int offset = 0; + byte[] result = null; + for (int i = 0; i < dataNum; ++i) { + // todo : 增加字段 + final int dis = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final float azimuth = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + + final NyGuideCamPosModel nyGuideCamPosModel = new NyGuideCamPosModel(dis, azimuth); + RadarHelperFrame.writeLog("光电位置: " + JSON.toJSONString(nyGuideCamPosModel)); + // todo 打印光电位置数据 nyGuideCamPosModel + this.log.info("-------------4:光电位置---------------"); + final String nyGuideCamPosModelString = JSON.toJSONString(nyGuideCamPosModel); + result = nyGuideCamPosModelString.getBytes(); + this.log.info(nyGuideCamPosModelString); + } + return result; + } + + + private byte[] handleRadarTrack(final int dataNum, final byte[] radardata) { + if (dataNum == 0) { + return null; + } + final ZCHXRadar.RadarSurfaceTrack.Builder rst = ZCHXRadar.RadarSurfaceTrack.newBuilder(); + rst.setFlag(1); + rst.setSourceId("AgilTrack_cat010bsz"); + rst.setUTC(System.currentTimeMillis()); + rst.setLength(dataNum); + int offset = 0; + for (int i = 0; i < dataNum; ++i) { + // 接收的数据进行转码 + final int radarId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final long timestamp = EndianUtil.bytes2LongSmallEndian(radardata, offset); + offset += 8; + final int trackId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final char trackState = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final int dis = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final float azimuth = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float speed = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float course = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float longitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float latitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float altitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final char type = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final RadarTrackModel radarTrack = new RadarTrackModel(radarId, timestamp, trackId, trackState, dis, azimuth, speed, course, longitude, latitude, altitude, type); + RadarHelperFrame.writeLog("\u96f7\u8fbe\u822a\u8ff9\u6570\u636e\uff1a " + JSON.toJSONString(radarTrack)); + // todo 打印雷达航迹数据 handleRadarTarck + this.log.info("-------------3:RadarTrack 雷达航迹数据---------------"); + String radarTrackJsonString = JSON.toJSONString(radarTrack); + this.log.info(radarTrackJsonString); + + final ZCHXRadar.TrackPoint buildmodel = RadarTransformUtil.modelToProtobuf(radarTrack); + rst.addTrackPoints(buildmodel); + } + return rst.build().toByteArray(); + } + + + + // todo : string类型的数据 + private String handleRadarTrack2String(final int dataNum, final byte[] radardata) { + if (dataNum == 0) { + return null; + } + final ZCHXRadar.RadarSurfaceTrack.Builder rst = ZCHXRadar.RadarSurfaceTrack.newBuilder(); + rst.setFlag(1); + rst.setSourceId("AgilTrack_cat010bsz"); + rst.setUTC(System.currentTimeMillis()); + rst.setLength(dataNum); + + //todo : 手动拼接数据 + JSONObject jsonObject = new JSONObject(); + jsonObject.put("flag",1); + jsonObject.put("sourceId","AgilTrack_cat010bsz"); + jsonObject.put("utc",System.currentTimeMillis()); + jsonObject.put("length",dataNum); + + int offset = 0; + final List jsonObjectList=new ArrayList<>(); + for (int i = 0; i < dataNum; ++i) { + // 接收的数据进行转码 + final int radarId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final long timestamp = EndianUtil.bytes2LongSmallEndian(radardata, offset); + offset += 8; + final int trackId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final char trackState = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final int dis = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final float azimuth = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float speed = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float course = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float longitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float latitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float altitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final char type = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final RadarTrackModel radarTrack = new RadarTrackModel(radarId, timestamp, trackId, trackState, dis, azimuth, speed, course, longitude, latitude, altitude, type); + RadarHelperFrame.writeLog("\u96f7\u8fbe\u822a\u8ff9\u6570\u636e\uff1a " + JSON.toJSONString(radarTrack)); + // todo 打印雷达航迹数据 handleRadarTarck + this.log.info("-------------3:RadarTrack 雷达航迹数据---------------"); + this.log.info(JSON.toJSONString(radarTrack)); + + //final ZCHXRadar.TrackPoint buildmodel = RadarTransformUtil.modelToProtobuf(radarTrack); + + String radarTrackJsonString = JSON.toJSONString(radarTrack); //返回结果 + // todo : 手动组装数据 + jsonObject.put("radarTrack",radarTrackJsonString); + } + return JSON.toJSONString(jsonObject); + } + + + private String handleRadarTrack2String2(final int dataNum, final byte[] radardata) { + if (dataNum == 0) { + return null; + } + //todo : 手动拼接数据 + JSONObject jsonObject = new JSONObject(); + jsonObject.put("flag",1); + jsonObject.put("sourceId","AgilTrack_cat010bsz"); + jsonObject.put("utc",System.currentTimeMillis()); + jsonObject.put("length",dataNum); + + int offset = 0; + final List radarTracks=new ArrayList<>(); + for (int i = 0; i < dataNum; ++i) { + // 接收的数据进行转码 + final int radarId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final long timestamp = EndianUtil.bytes2LongSmallEndian(radardata, offset); + offset += 8; + final int trackId = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final char trackState = EndianUtil.byte2Char(radardata[offset]); + ++offset; + final int dis = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final float azimuth = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float speed = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float course = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float longitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float latitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final float altitude = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + final char type = EndianUtil.byte2Char(radardata[offset]); + ++offset; + + + //todo : 雷达没有发送 新增的字段deviceOwnerId 和 counter 和 timeoutToNext + int deviceOwnerId=0; + int counter=0; + int timeoutToNext=0; + final RadarTrackModel radarTrack = new RadarTrackModel(radarId, timestamp, trackId, trackState, dis, azimuth, speed, course, longitude, latitude, altitude, type,deviceOwnerId,counter,timeoutToNext); + //final RadarTrackModel radarTrack = new RadarTrackModel(radarId, timestamp, trackId, trackState, dis, azimuth, speed, course, longitude, latitude, altitude, type); + + RadarHelperFrame.writeLog("\u96f7\u8fbe\u822a\u8ff9\u6570\u636e\uff1a " + JSON.toJSONString(radarTrack)); + // todo 打印雷达航迹数据 handleRadarTarck + //this.log.info("-------------3:RadarTrack 雷达航迹数据---------------"); + //this.log.info(JSON.toJSONString(radarTrack)); + + //final ZCHXRadar.TrackPoint buildmodel = RadarTransformUtil.modelToProtobuf(radarTrack); + //String radarTrackJsonString = JSON.toJSONString(radarTrack); //返回结果 + radarTracks.add(radarTrack); + } + this.log.info(JSON.toJSONString(jsonObject)); + // todo : 手动组装数据 + jsonObject.put("radarTracks",JSON.toJSONString(radarTracks)); + return JSON.toJSONString(jsonObject); + } + + public static void main(String[] args) { + List radarTrackModels = new ArrayList<>(); + for (int i = 0; i < 5; i++) { + RadarTrackModel radarTrackModel = new RadarTrackModel(i, System.currentTimeMillis(), i + 10, '0', i * 1000, i * 50, i * 100, i * 101, i * 100, i * 10, i * 5, '1'); + radarTrackModels.add(radarTrackModel); + } + JSONObject jsonObject = new JSONObject(); + jsonObject.put("radarTrackModels",JSON.toJSONString(radarTrackModels)); + System.out.println(jsonObject.get("radarTrackModels")); + } + + // todo : 将data转为字符串返回 + private String handleNyGuideCamPosModel2String(final int dataNum, final byte[] radardata) { + int offset = 0; + byte[] result = null; + String nyGuideCamPosModelString=null; + for (int i = 0; i < dataNum; ++i) { + // todo : 数据进行处理 + final int dis = BitConverter.bytes2IntSmallEndian(radardata, offset); + offset += 4; + final float azimuth = EndianUtil.byte2floatSmallEndian(radardata, offset); + offset += 4; + + final NyGuideCamPosModel nyGuideCamPosModel = new NyGuideCamPosModel(dis, azimuth); + RadarHelperFrame.writeLog("目标信息: " + JSON.toJSONString(nyGuideCamPosModel)); + // todo 打印光电位置数据 nyGuideCamPosModel + this.log.info("-------------4:目标信息---------------"); + nyGuideCamPosModelString = JSON.toJSONString(nyGuideCamPosModel); + result = nyGuideCamPosModelString.getBytes(); + this.log.info(nyGuideCamPosModelString); + } + return nyGuideCamPosModelString; + } + + + public boolean send(final byte[] data) { + boolean sendflag = false; + if (this.socket != null && this.socket.isConnected() && !this.socket.isClosed()) { + try { + this.output.write(data); + sendflag = true; + } catch (IOException e) { + this.nowClose(); + } + } + return sendflag; + } + + private boolean isclientClose(final Socket socket) { + try { + socket.sendUrgentData(255); + return false; + } catch (Exception se) { + return true; + } + } + + public void nowClose() { + this.flag = false; + // 雷达数据上报客户端断开了 + final String res = "\u96f7\u8fbe\u6570\u636e\u4e0a\u62a5\u5ba2\u6237\u7aef\u65ad\u5f00\u4e86: " + this.address; + RadarHelperFrame.textlog.append(String.valueOf(res) + "\r\n"); + IOUtils.closeQuietly(this.dataInput); + IOUtils.closeQuietly(this.output); + IOUtils.closeQuietly(this.socket); + this.dataInput = null; + this.output = null; + this.socket = null; + RadarServer.socketHandles.remove(this); + this.log.info(res); + // 雷达数据上报客户端当前连接数 + this.log.info("\u96f7\u8fbe\u6570\u636e\u4e0a\u62a5\u5ba2\u6237\u7aef\u5f53\u524d\u8fde\u63a5\u6570: " + RadarServer.socketHandles.size()); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/RadarServer.java b/src/main/java/com/zhichenhaixin/thread/RadarServer.java new file mode 100644 index 0000000..cd58569 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/RadarServer.java @@ -0,0 +1,76 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.gui.RadarHelperFrame; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.Iterator; +import java.util.concurrent.CopyOnWriteArrayList; + +public class RadarServer extends Thread +{ + private static final Log log; + public static CopyOnWriteArrayList socketHandles; + private String ip; + private int port; + private boolean flag; + private ServerSocket server; + + static { + log = LogFactory.getLog(RadarServer.class); + RadarServer.socketHandles = new CopyOnWriteArrayList(); + } + + public RadarServer(final String ip, final int port) { + this.flag = true; + this.server = null; + this.ip = ip; + this.port = port; + } + + @Override + public void run() { + try { + RadarServer.log.info("雷达服务启动..............."); + + (this.server = new ServerSocket()).bind(new InetSocketAddress(this.ip, this.port)); + RadarHelperFrame.textlog.append("\u96f7\u8fbe\u670d\u52a1\u542f\u52a8\u6210\u529f \r\n"); + while (this.flag) { + // todo 等待连接的到来 + final Socket socket = this.server.accept(); + final RadarAcceptSocket socketHandle = new RadarAcceptSocket(socket); + socketHandle.start(); + RadarServer.socketHandles.add(socketHandle); + } + IOUtils.closeQuietly(this.server); + } + catch (Exception e) { + RadarServer.socketHandles.clear(); + RadarServer.log.error(e.getMessage(), e); + } + } + + public void close() { + this.flag = false; + Socket testSocket = null; + try { + testSocket = new Socket(); + testSocket.connect(new InetSocketAddress(this.ip, this.port)); + } + catch (Exception ex) {} + IOUtils.closeQuietly(testSocket); + final Iterator it = RadarServer.socketHandles.iterator(); + while (it.hasNext()) { + it.next().nowClose(); + } + RadarServer.socketHandles.clear(); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/ReceiveCamStatusThread.java b/src/main/java/com/zhichenhaixin/thread/ReceiveCamStatusThread.java new file mode 100644 index 0000000..7e9beac --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ReceiveCamStatusThread.java @@ -0,0 +1,104 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringBeanUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Iterator; + +public class ReceiveCamStatusThread extends Thread +{ + Logger log; + CamInfoDaoImpl camInfoDaoImpl; + static String address; + static Integer port; + private String addr; + ZMQ.Socket socket; + ZCHXFllow.CamerastatusListInfo cameras; + String head; + String time; + int num; + byte[] rev; + + static { + ReceiveCamStatusThread.address = SpringPropertyUtil.getProperty("address.camera"); + ReceiveCamStatusThread.port = Integer.valueOf(SpringPropertyUtil.getProperty("sub.port.camera")); + } + + public ReceiveCamStatusThread() { + this.log = Logger.getLogger(ReceiveCamStatusThread.class); + this.camInfoDaoImpl = (CamInfoDaoImpl)SpringBeanUtil.getBean("camInfoDaoImpl"); + this.addr = "tcp://" + ReceiveCamStatusThread.address + ":" + ReceiveCamStatusThread.port; + this.cameras = null; + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + } + + public void init() { + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + } + + public void initReceiveCamThread() { + ZMQServerPubCam.getZMQPUB().initZMQServerDy(); + (this.socket = GlobalVariable.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + this.initReceiveCamThread(); + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head == null || !this.head.equals(SpringPropertyUtil.getProperty("cameraStatus.topic"))) { + continue; + } + this.cameras = ZCHXFllow.CamerastatusListInfo.parseFrom(this.rev); + for (int i = 0; i < this.cameras.getListCount(); ++i) { + this.camInfoDaoImpl.zmq_ChangCameraStatus(this.cameras.getList(i)); + } + if (this.cameras.getListCount() <= 0) { + continue; + } + this.log.info("\u76f8\u673a\u72b6\u6001\u53d8\u66f4\u4e2a\u6570\uff1a" + this.cameras.getListCount()); + ZMQServerPubCam.getZMQPUB().sendData(this.head, String.valueOf(System.currentTimeMillis()), this.rev); + ControllerFllowThread.sendCamStatusForCtrl(this.cameras); + FllowSocket.sendCamStatusForCtrl(this.cameras); + } + catch (InvalidProtocolBufferException e) { + this.log.error("\u76f8\u673a\u72b6\u6001\u53d8\u66f4\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/ReceiveComposeVideoThread.java b/src/main/java/com/zhichenhaixin/thread/ReceiveComposeVideoThread.java new file mode 100644 index 0000000..fc244a5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ReceiveComposeVideoThread.java @@ -0,0 +1,142 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.TrackCameraEhcache; +import com.zhichenhaixin.cache.util.WarnAlarmCountEhcache; +import com.zhichenhaixin.control.model.VideoWarnInfoHandle; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import com.zhichenhaixin.sys.model.WarnComposeVideoVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hbase.util.Bytes; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Iterator; + +public class ReceiveComposeVideoThread extends Thread +{ + private Log log; + private static final String HOST; + private static final int COMPOSE_VIDEO_PORT; + private static final String WARN_TOPIC; + private static final String COMPOSE_VIDEO_TOPIC; + private String addr; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + ZMQ.Socket socket; + String head; + int num; + byte[] rev; + + static { + HOST = SpringPropertyUtil.getProperty("compose_video_host"); + COMPOSE_VIDEO_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("compose_video_port")); + WARN_TOPIC = SpringPropertyUtil.getProperty("video.alarm.info.topic"); + COMPOSE_VIDEO_TOPIC = SpringPropertyUtil.getProperty("video.alarm.compose.topic"); + } + + public void init() { + this.head = null; + this.num = 1; + this.rev = null; + } + + public ReceiveComposeVideoThread(final DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl) { + this.log = LogFactory.getLog(ReceiveComposeVideoThread.class); + this.addr = "tcp://" + ReceiveComposeVideoThread.HOST + ":" + ReceiveComposeVideoThread.COMPOSE_VIDEO_PORT; + this.head = null; + this.num = 1; + this.rev = null; + this.dbAlarmInfoDaoImpl = dbAlarmInfoDaoImpl; + (this.socket = Constant.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head == null || !this.head.equals(ReceiveComposeVideoThread.COMPOSE_VIDEO_TOPIC)) { + continue; + } + final ZCHXVideoWarn.ComposeVideoWarnInfo composeVideoInfo = ZCHXVideoWarn.ComposeVideoWarnInfo.parseFrom(this.rev); + this.log.info("-> \u63a5\u6536\u5e0c\u5fb7\u5a01\u544a\u8b66\u76ee\u6807\u5408\u6210\u5f55\u50cf\u89c6\u9891\u4fe1\u606f\uff1a\n" + composeVideoInfo); + final ZCHXVideoWarn.VideoWarnInfo.Builder info = this.composeVideoInfo(composeVideoInfo); + if (info == null) { + continue; + } + info.setUntreatedAlarmCount(WarnAlarmCountEhcache.get()); + WarnGPSDyDataThread.getZMQPUB().sendData(ReceiveComposeVideoThread.WARN_TOPIC, info.build().toByteArray()); + Constant.parseParmSendWarnToRongKe(info.build()); + this.log.info("-> \u63a5\u6536\u544a\u8b66\u76ee\u6807\u5408\u6210\u5f55\u50cf\u89c6\u9891\u4fe1\u606f\u7684\u76f8\u673aid\uff1a" + info.getCameraId()); + } + catch (Exception e) { + this.log.error("-> \u63a5\u6536\u544a\u8b66\u76ee\u6807\u5408\u6210\u5f55\u50cf\u89c6\u9891\u4fe1\u606f\u89e3\u6790\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public ZCHXVideoWarn.VideoWarnInfo.Builder composeVideoInfo(final ZCHXVideoWarn.ComposeVideoWarnInfo composeVideoInfo) throws InvalidProtocolBufferException { + if (composeVideoInfo.getComposeStatus() != 0) { + this.log.info("\u5e0c\u5fb7\u5a01\u878d\u5408\u89c6\u9891\u5931\u8d25"); + return null; + } + final String id = composeVideoInfo.getTransactionId(); + ZCHXVideoWarn.VideoWarnInfo.Builder videoWarnInfo = VideoWarnInfoHandle.getVideoWarnInfos(id); + if (videoWarnInfo != null) { + videoWarnInfo = VideoWarnInfoHandle.getVideoWarnInfo(videoWarnInfo.getTargetId()); + if (videoWarnInfo != null) { + videoWarnInfo.setAlarmFtp(composeVideoInfo.getComposeFtp()); + videoWarnInfo.setAlarmRtsp(composeVideoInfo.getComposeRtsp()); + videoWarnInfo.setAlarmStatus(4); + WarnGPSDyDataThread.getZMQPUB().sendData(ReceiveComposeVideoThread.COMPOSE_VIDEO_TOPIC, videoWarnInfo.build().toByteArray()); + final ZCHXVideoWarn.VideoWarnTargetInfo.Builder targetInfo = VideoWarnInfoHandle.getVideoWarnTargetInfo(videoWarnInfo.getTargetId()); + if (targetInfo != null) { + targetInfo.setTransactionId(videoWarnInfo.getTransactionId()); + final WarnInfoBean dinfo = VideoWarnInfoHandle.covertWarnInfoBean(targetInfo.build()); + dinfo.setId(videoWarnInfo.getAlarmId()); + this.dbAlarmInfoDaoImpl.updateWarnParam(dinfo); + final WarnComposeVideoVo vo = WarnComposeVideoVo.getClone(); + vo.setAlarm_id(videoWarnInfo.getAlarmId()); + vo.setBegintime(Integer.valueOf(String.valueOf(videoWarnInfo.getAlarmTime()).substring(0, 10))); + vo.setEndtime(Integer.valueOf(String.valueOf(targetInfo.getAlarmTime()).substring(0, 10))); + vo.setRtsp(composeVideoInfo.getComposeRtsp()); + vo.setFtp(composeVideoInfo.getComposeFtp()); + vo.setCamera_name(videoWarnInfo.getAlarmPlace()); + this.dbAlarmInfoDaoImpl.andComposeVideo(vo); + VideoWarnInfoHandle.deleteVideoWarnInfo(targetInfo.getTargetId()); + VideoWarnInfoHandle.deleteVideoWarnInfos(targetInfo.getTransactionId()); + VideoWarnInfoHandle.deleteVideoWarnTargetInfo(targetInfo.getTargetId()); + Constant.mapComposeVideoAfter.remove(targetInfo.getTargetId()); + TrackCameraEhcache.remove(targetInfo.getTargetId()); + } + return videoWarnInfo; + } + } + return null; + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/ReceiveXideweiVideoWarnInfoThread.java b/src/main/java/com/zhichenhaixin/thread/ReceiveXideweiVideoWarnInfoThread.java new file mode 100644 index 0000000..a02428e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ReceiveXideweiVideoWarnInfoThread.java @@ -0,0 +1,180 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.ArithmeticUtil; +import com.zhichenhaixin.base.util.DateUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.TrackCameraEhcache; +import com.zhichenhaixin.cache.util.WarnAlarmCountEhcache; +import com.zhichenhaixin.control.model.VideoWarnInfoHandle; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXFllow; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import com.zhichenhaixin.sys.model.TrackCameraVo; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hbase.util.Bytes; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Iterator; + +public class ReceiveXideweiVideoWarnInfoThread extends Thread +{ + private final Log log; + private static final String HOST; + private static final int WARN_PORT; + private static final String WARN_TOPIC; + private static final String TARGET_TOPIC; + private static final String CAMERA_TOPIC; + private static final String CAMERA_STATUS_TOPIC; + private String addr; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + private CamInfoDaoImpl camInfoDaoImpl; + private static final int source_type = 0; + private int codeNumber; + ZMQ.Socket socket; + String head; + int num; + byte[] rev; + + static { + HOST = SpringPropertyUtil.getProperty("video.alarm.host"); + WARN_PORT = Integer.parseInt(SpringPropertyUtil.getProperty("video.alarm.port")); + WARN_TOPIC = SpringPropertyUtil.getProperty("video.alarm.info.topic"); + TARGET_TOPIC = SpringPropertyUtil.getProperty("video.alarm.target.topic"); + CAMERA_TOPIC = SpringPropertyUtil.getProperty("video.alarm.camera.topic"); + CAMERA_STATUS_TOPIC = SpringPropertyUtil.getProperty("cameraStatus.topic"); + } + + public void init() { + this.head = null; + this.num = 1; + this.rev = null; + } + + public ReceiveXideweiVideoWarnInfoThread(final DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl, final CamInfoDaoImpl camInfoDaoImpl) { + this.log = LogFactory.getLog(ReceiveXideweiVideoWarnInfoThread.class); + this.addr = "tcp://" + ReceiveXideweiVideoWarnInfoThread.HOST + ":" + ReceiveXideweiVideoWarnInfoThread.WARN_PORT; + this.codeNumber = 0; + this.head = null; + this.num = 1; + this.rev = null; + this.dbAlarmInfoDaoImpl = dbAlarmInfoDaoImpl; + this.camInfoDaoImpl = camInfoDaoImpl; + (this.socket = Constant.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head != null && this.head.equals(ReceiveXideweiVideoWarnInfoThread.WARN_TOPIC)) { + final ZCHXVideoWarn.VideoWarnInfo videoWarnInfo = ZCHXVideoWarn.VideoWarnInfo.parseFrom(this.rev); + this.sendVideoWarnInfo(videoWarnInfo.toBuilder()); + this.log.info("-> \u5e0c\u5fb7\u5a01\u89c6\u9891\u544a\u8b66\u4fe1\u606f\u7684\u76f8\u673aid\uff1a " + videoWarnInfo.getCameraId()); + } + else if (this.head != null && this.head.equals(ReceiveXideweiVideoWarnInfoThread.TARGET_TOPIC)) { + WarnGPSDyDataThread.getZMQPUB().sendData(ReceiveXideweiVideoWarnInfoThread.TARGET_TOPIC, this.rev); + final ZCHXVideoWarn.VideoWarnTargetInfo videoWarnTargetInfo = ZCHXVideoWarn.VideoWarnTargetInfo.parseFrom(this.rev); + if (videoWarnTargetInfo.getAlarmSource() == 0) { + this.warnHandle(videoWarnTargetInfo); + } + if (videoWarnTargetInfo.getAlarmType() != 0) { + VideoWarnInfoHandle.saveVideoWarnTargetInfo(videoWarnTargetInfo.toBuilder()); + Constant.mapComposeVideoBefore.put(videoWarnTargetInfo.getTargetId(), System.currentTimeMillis()); + } + this.log.info("-> \u5e0c\u5fb7\u5a01\u89c6\u9891\u544a\u8b66\u76ee\u6807\u4fe1\u606f\u7684\u76f8\u673aid\uff1a " + videoWarnTargetInfo.getCameraId()); + } + else { + if (this.head == null || !this.head.equals(ReceiveXideweiVideoWarnInfoThread.CAMERA_TOPIC)) { + continue; + } + final ZCHXVideoWarn.CameraWarnInfo cameraWarnInfo = ZCHXVideoWarn.CameraWarnInfo.parseFrom(this.rev); + final ZCHXFllow.CameraStatusInfo.Builder info = ZCHXFllow.CameraStatusInfo.newBuilder(); + info.setCameraId(cameraWarnInfo.getCameraId()); + info.setStatus(cameraWarnInfo.getAlarmType()); + final ZCHXFllow.CamerastatusListInfo.Builder camerastatusListInfo = ZCHXFllow.CamerastatusListInfo.newBuilder(); + camerastatusListInfo.addList(info); + for (int i = 0; i < camerastatusListInfo.getListCount(); ++i) { + this.camInfoDaoImpl.zmq_ChangCameraStatus(camerastatusListInfo.getList(i)); + } + if (camerastatusListInfo.getListCount() > 0) { + ZMQServerPubCam.getZMQPUB().sendData(ReceiveXideweiVideoWarnInfoThread.CAMERA_STATUS_TOPIC, String.valueOf(System.currentTimeMillis()), camerastatusListInfo.build().toByteArray()); + ControllerFllowThread.sendCamStatusForCtrl(camerastatusListInfo.build()); + FllowSocket.sendCamStatusForCtrl(camerastatusListInfo.build()); + } + this.log.info("-> \u76f8\u673a\u544a\u8b66\u4fe1\u606f\u7684\u76f8\u673aid\uff1a " + cameraWarnInfo.getCameraId()); + } + } + catch (Exception e) { + this.log.error("-> \u63a5\u6536\u5e0c\u5fb7\u5a01\u544a\u8b66\u4fe1\u606f\u89e3\u6790\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void sendVideoWarnInfo(final ZCHXVideoWarn.VideoWarnInfo.Builder videoWarnInfo) { + videoWarnInfo.setAlarmId(DateUtil.getCurMillion()); + videoWarnInfo.setAlarmLevel(1); + videoWarnInfo.setUntreatedAlarmCount(WarnAlarmCountEhcache.get() + 1); + WarnGPSDyDataThread.getZMQPUB().sendData(ReceiveXideweiVideoWarnInfoThread.WARN_TOPIC, videoWarnInfo.build().toByteArray()); + if (videoWarnInfo.getAlarmType() == 0) { + return; + } + Constant.parseParmSendWarnToRongKe(videoWarnInfo.build()); + final WarnInfoBean dinfo = VideoWarnInfoHandle.covertWarnInfoBean(videoWarnInfo.build()); + this.dbAlarmInfoDaoImpl.saveWarn(dinfo); + Constant.mapVideoWarnInfo.put(videoWarnInfo.getTargetId(), videoWarnInfo); + VideoWarnInfoHandle.saveVideoWarnInfo(videoWarnInfo); + VideoWarnInfoHandle.saveVideoWarnInfos(videoWarnInfo); + } + + public void warnHandle(final ZCHXVideoWarn.VideoWarnTargetInfo info) { + TrackCameraVo cameraVo = TrackCameraEhcache.get(info.getTargetId()); + if (cameraVo == null) { + cameraVo = new TrackCameraVo(); + cameraVo.setTargetId(info.getTargetId()); + cameraVo.setObjectID(String.valueOf(90000 + this.codeNumber)); + ++this.codeNumber; + if (this.codeNumber > 9999) { + this.codeNumber = 0; + } + } + cameraVo.setCameraID(info.getCameraId()); + cameraVo.setWarn_color("0XFF0000"); + cameraVo.setObjectType(info.getTargetType()); + cameraVo.setAlarmType(info.getAlarmType()); + cameraVo.setTimeStamp(String.valueOf(info.getAlarmTime())); + cameraVo.setObjectMapPosX(info.getAlarmLon()); + cameraVo.setObjectMapPosY(info.getAlarmLat()); + cameraVo.setObjectSpeed(info.getTargetSpeed()); + cameraVo.setAlertAreaName(info.getAlarmPlace()); + cameraVo.setDistance(info.getTargetDistance()); + final double node = ArithmeticUtil.getInstance().getSpeedHlByVXY(cameraVo.getObjectSpeed()); + cameraVo.setNode_num(node); + TrackCameraEhcache.put(cameraVo); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/SendCarPersonShipThread.java b/src/main/java/com/zhichenhaixin/thread/SendCarPersonShipThread.java new file mode 100644 index 0000000..8be31f9 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/SendCarPersonShipThread.java @@ -0,0 +1,109 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.TrackCameraEhcache; +import com.zhichenhaixin.proto.ZCHXCameraVideoWarn; +import com.zhichenhaixin.sys.model.TrackCameraVo; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.Arrays; +import java.util.List; + +public class SendCarPersonShipThread extends Thread +{ + private Logger log; + private static final String TOPIC; + private static int port; + private String addr; + ZMQ.Socket socket; + + static { + TOPIC = SpringPropertyUtil.getProperty("video.alarm.carpersonship.topic"); + SendCarPersonShipThread.port = Integer.valueOf(SpringPropertyUtil.getProperty("video.alarm.carpersonship.port")); + } + + public SendCarPersonShipThread() { + this.log = Logger.getLogger(SendCarPersonShipThread.class); + this.addr = "tcp://" + Constant.IP + ":" + SendCarPersonShipThread.port; + (this.socket = Constant.context.socket(1)).bind(this.addr); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final List list = TrackCameraEhcache.getAll(); + final ZCHXCameraVideoWarn.CameraVideoWarnListVo.Builder warnList = ZCHXCameraVideoWarn.CameraVideoWarnListVo.newBuilder(); + int personNumber = 0; + int carNumber = 0; + int shipNumber = 0; + int unNumber = 0; + for (final TrackCameraVo trackCameraVo : list) { + final ZCHXCameraVideoWarn.CameraVideoWarn.Builder info = ZCHXCameraVideoWarn.CameraVideoWarn.newBuilder(); + info.setCameraId(trackCameraVo.getCameraID()); + info.setObjectID(trackCameraVo.getObjectID()); + info.setAlarmType(trackCameraVo.getAlarmType()); + info.setAlertAreaName((trackCameraVo.getAlertAreaName() == null) ? "" : trackCameraVo.getAlertAreaName()); + info.setIsSmuggle(trackCameraVo.getIsSmuggle()); + info.setNodeNum(trackCameraVo.getNode_num()); + info.setObjectMapPosX(trackCameraVo.getObjectMapPosX()); + info.setObjectMapPosY(trackCameraVo.getObjectMapPosY()); + info.setObjectSpeed(trackCameraVo.getObjectSpeed()); + info.setObjectState(trackCameraVo.getObjectState()); + info.setObjectType(trackCameraVo.getObjectType()); + info.setTimeStamp(trackCameraVo.getTimeStamp()); + info.setWarnColor(trackCameraVo.getWarn_color()); + switch (info.getObjectType()) { + case 0: { + ++personNumber; + break; + } + case 1: { + ++carNumber; + break; + } + case 2: { + ++shipNumber; + break; + } + case 4: { + ++unNumber; + break; + } + } + warnList.addVideoWarnList(info); + } + if (list != null && list.size() > 0) { + warnList.setCarNumber(carNumber); + warnList.setPersonNumber(personNumber); + warnList.setShipNumber(shipNumber); + warnList.setUnNumber(unNumber); + final byte[] msg = warnList.build().toByteArray(); + this.sendData(SendCarPersonShipThread.TOPIC, msg); + } + Thread.sleep(1000L); + } + catch (Exception e) { + this.log.error("-> \u53d1\u9001\u4eba\u8f66\u8239\u4fe1\u606f\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public synchronized void sendData(final String topic, final byte[] data) { + this.socket.send(topic.getBytes(), 2); + this.socket.send(new StringBuilder(String.valueOf(System.currentTimeMillis())).toString().getBytes(), 2); + this.socket.send(data, 0); + this.log.info("array.tostring:"+ Arrays.toString(data)); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/SendComposeVideoThread.java b/src/main/java/com/zhichenhaixin/thread/SendComposeVideoThread.java new file mode 100644 index 0000000..0ff52de --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/SendComposeVideoThread.java @@ -0,0 +1,114 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.TrackCameraEhcache; +import com.zhichenhaixin.control.model.VideoWarnInfoHandle; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Set; + +public class SendComposeVideoThread extends Thread +{ + private Log log; + private static final int timeout; + private static final String WARN_TOPIC; + private static final String PREPAIR_VIDEO_TOPIC; + private static final String COMPOSE_VIDEO_TOPIC; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + + static { + timeout = Integer.parseInt(SpringPropertyUtil.getProperty("video.alarm.target.timeout")); + WARN_TOPIC = SpringPropertyUtil.getProperty("video.alarm.info.topic"); + PREPAIR_VIDEO_TOPIC = SpringPropertyUtil.getProperty("video.alarm.prepair.topic"); + COMPOSE_VIDEO_TOPIC = SpringPropertyUtil.getProperty("video.alarm.compose.topic"); + } + + public SendComposeVideoThread(final DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl) { + this.log = LogFactory.getLog(SendComposeVideoThread.class); + this.dbAlarmInfoDaoImpl = dbAlarmInfoDaoImpl; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.sendVideoWarn(); + this.sendComposeVideo(); + Thread.sleep(300L); + } + catch (Exception e) { + this.log.error("-> \u53d1\u9001\u9700\u8981\u5408\u6210\u89c6\u9891\u7684\u76ee\u6807\u4fe1\u606f\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void sendComposeVideo() throws InvalidProtocolBufferException, InterruptedException { + final Set set = GlobalVariable.mapComposeVideoBefore.keySet(); + for (final String string : set) { + final Long time = GlobalVariable.mapComposeVideoBefore.get(string); + final long systime = System.currentTimeMillis(); + if (systime - time > SendComposeVideoThread.timeout) { + final ZCHXVideoWarn.VideoWarnInfo.Builder warnInfo = VideoWarnInfoHandle.getVideoWarnInfo(string); + if (warnInfo != null) { + final ZCHXVideoWarn.VideoWarnTargetInfo.Builder targetInfo = VideoWarnInfoHandle.getVideoWarnTargetInfo(string); + if (targetInfo != null) { + final ZCHXVideoWarn.ComposeVideoWarnInfo.Builder ifo = ZCHXVideoWarn.ComposeVideoWarnInfo.newBuilder(); + ifo.setTransactionId(warnInfo.getTransactionId()); + ifo.setTargetId(warnInfo.getTargetId()); + ifo.setCameraId(warnInfo.getCameraId()); + ifo.setStartTime(warnInfo.getAlarmTime()); + ifo.setEndTime(targetInfo.getAlarmTime()); + ifo.setMediaServerIp(warnInfo.getMediaServerIp()); + ifo.setComposeRtsp(""); + ifo.setComposeFtp(""); + ifo.setComposeStatus(0); + final byte[] array = ifo.build().toByteArray(); + WarnGPSDyDataThread.getZMQPUB().sendData(SendComposeVideoThread.PREPAIR_VIDEO_TOPIC, array); + GlobalVariable.mapComposeVideoAfter.put(string, warnInfo); + GlobalVariable.mapComposeVideoBefore.remove(string); + this.log.info("-> \u53d1\u9001\u544a\u8b66\u76ee\u6807\u5408\u6210\u5f55\u50cf\u89c6\u9891\u4fe1\u606f\u7684\u76f8\u673aid\uff1a" + ifo.getCameraId()); + } + else { + warnInfo.setAlarmStatus(5); + WarnGPSDyDataThread.getZMQPUB().sendData(SendComposeVideoThread.COMPOSE_VIDEO_TOPIC, warnInfo.build().toByteArray()); + WarnGPSDyDataThread.getZMQPUB().sendData(SendComposeVideoThread.WARN_TOPIC, warnInfo.build().toByteArray()); + final WarnInfoBean bean = WarnInfoBean.getClone(); + bean.setId(warnInfo.getAlarmId()); + bean.setEndtime(Integer.valueOf(String.valueOf(System.currentTimeMillis()).substring(0, 10))); + this.dbAlarmInfoDaoImpl.updateWarnParam(bean); + GlobalVariable.mapComposeVideoBefore.remove(string); + TrackCameraEhcache.remove(string); + this.log.info("-> \u76f8\u673aid\u4e3a" + warnInfo.getCameraId() + "\u65e0\u5f55\u50cf"); + } + } + } + Thread.sleep(300L); + } + } + + public void sendVideoWarn() throws InvalidProtocolBufferException, InterruptedException { + final Set set = GlobalVariable.mapVideoWarnInfo.keySet(); + for (final String string : set) { + final ZCHXVideoWarn.VideoWarnInfo.Builder warnInfo = GlobalVariable.mapVideoWarnInfo.get(string); + warnInfo.setAlarmStatus(3); + WarnGPSDyDataThread.getZMQPUB().sendData(SendComposeVideoThread.WARN_TOPIC, warnInfo.build().toByteArray()); + GlobalVariable.mapVideoWarnInfo.remove(string); + Thread.sleep(300L); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/SendComposeVideoTimeOutThread.java b/src/main/java/com/zhichenhaixin/thread/SendComposeVideoTimeOutThread.java new file mode 100644 index 0000000..ce9bfb1 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/SendComposeVideoTimeOutThread.java @@ -0,0 +1,83 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.TrackCameraEhcache; +import com.zhichenhaixin.cache.util.WarnAlarmCountEhcache; +import com.zhichenhaixin.control.model.VideoWarnInfoHandle; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.proto.ZCHXVideoWarn; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Set; + +public class SendComposeVideoTimeOutThread extends Thread +{ + private Log log; + private static final String COMPOSE_VIDEO_TOPIC; + private static final String WARN_TOPIC; + private static final int TIMEOUT; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + + static { + COMPOSE_VIDEO_TOPIC = SpringPropertyUtil.getProperty("video.alarm.compose.topic"); + WARN_TOPIC = SpringPropertyUtil.getProperty("video.alarm.info.topic"); + TIMEOUT = Integer.parseInt(SpringPropertyUtil.getProperty("compose.video.timeout")); + } + + public SendComposeVideoTimeOutThread(final DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl) { + this.log = LogFactory.getLog(SendComposeVideoTimeOutThread.class); + this.dbAlarmInfoDaoImpl = dbAlarmInfoDaoImpl; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + this.sendComposeVideoTimeOut(); + Thread.sleep(SendComposeVideoTimeOutThread.TIMEOUT); + } + catch (Exception e) { + this.log.error("-> \u53d1\u9001\u8d85\u65f6\u9700\u8981\u5408\u6210\u89c6\u9891\u7684\u76ee\u6807\u4fe1\u606f\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void sendComposeVideoTimeOut() throws InvalidProtocolBufferException, InterruptedException { + final Set set = Constant.mapComposeVideoAfter.keySet(); + for (final String string : set) { + final ZCHXVideoWarn.VideoWarnInfo.Builder info = Constant.mapComposeVideoAfter.get(string); + if (info == null) { + return; + } + info.setAlarmStatus(5); + info.setUntreatedAlarmCount(WarnAlarmCountEhcache.get()); + WarnGPSDyDataThread.getZMQPUB().sendData(SendComposeVideoTimeOutThread.WARN_TOPIC, info.build().toByteArray()); + WarnGPSDyDataThread.getZMQPUB().sendData(SendComposeVideoTimeOutThread.COMPOSE_VIDEO_TOPIC, info.build().toByteArray()); + final ZCHXVideoWarn.VideoWarnTargetInfo.Builder targetInfo = VideoWarnInfoHandle.getVideoWarnTargetInfo(info.getTargetId()); + if (targetInfo != null) { + final WarnInfoBean infoBean = VideoWarnInfoHandle.covertWarnInfoBean(targetInfo.build()); + infoBean.setId(info.getAlarmId()); + this.dbAlarmInfoDaoImpl.updateWarnParam(infoBean); + } + Constant.mapComposeVideoAfter.remove(string); + TrackCameraEhcache.remove(string); + VideoWarnInfoHandle.deleteVideoWarnInfo(info.getTargetId()); + VideoWarnInfoHandle.deleteVideoWarnTargetInfo(info.getTargetId()); + this.log.info("-> \u76f8\u673aid\u4e3a" + info.getCameraId() + "\u65e0\u5f55\u50cf"); + Thread.sleep(500L); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/SendManualFllowDataThread.java b/src/main/java/com/zhichenhaixin/thread/SendManualFllowDataThread.java new file mode 100644 index 0000000..87be995 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/SendManualFllowDataThread.java @@ -0,0 +1,113 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.CtrlVoEhcache; +import com.zhichenhaixin.proto.ZCHXFllow; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zeromq.ZMQ; + +import java.util.Arrays; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class SendManualFllowDataThread extends Thread +{ + private Log log; + private static final int fllow_time_out; + private static long time; + public static Map map; + ZMQ.Socket socket; + int trackNumber; + String head; + String url; + String port; + + static { + fllow_time_out = Integer.parseInt(SpringPropertyUtil.getProperty("fllow_time_out")); + SendManualFllowDataThread.time = SendManualFllowDataThread.fllow_time_out * 60 * 1000; + SendManualFllowDataThread.map = new ConcurrentHashMap(); + } + + public SendManualFllowDataThread(final String url, final String port, final String head, final int trackNumber) { + this.log = LogFactory.getLog(SendManualFllowDataThread.class); + this.head = null; + this.url = null; + this.port = null; + this.url = url; + this.port = port; + this.head = head; + this.trackNumber = trackNumber; + (this.socket = GlobalVariable.context.socket(0)).bind(url); + this.socket.setSendTimeOut(1000); + } + + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SendManualFllowDataThread.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("SendManualFllowDataThread-" + this.port); + while (!Thread.currentThread().isInterrupted()) { + try { + final ZCHXFllow.CtrlVo ctrlVo = CtrlVoEhcache.get(this.trackNumber); + if (ctrlVo != null) { + this.sendData(ctrlVo.toByteArray()); + if (GlobalVariable.MODEL_TYPE == 3) { + this.log.info("-> \u81ea\u52a8\u6a21\u5f0f\u4e0b\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u547d\u4ee4\uff0c\u5982\u4e0b\uff1a \n" + ctrlVo); + } + else { + this.log.info("-> \u624b\u52a8\u6a21\u5f0f\u4e0b\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u547d\u4ee4\uff0c\u5982\u4e0b\uff1a \n" + ctrlVo); + } + CtrlVoEhcache.remove(this.trackNumber); + } + if (SendManualFllowDataThread.map == null || !SendManualFllowDataThread.map.containsKey(this.trackNumber)) { + continue; + } + final long old_time = SendManualFllowDataThread.map.get(this.trackNumber); + final long new_time = System.currentTimeMillis(); + if (new_time - old_time >= SendManualFllowDataThread.time) { + FllowThread.map.remove(String.valueOf(this.trackNumber)); + this.closePairPort(); + this.log.info("\u76ee\u6807\u7f16\u53f7\u4e3a" + this.trackNumber + "\uff0c\u624b\u52a8\u8ddf\u8e2a[" + SendManualFllowDataThread.fllow_time_out + "]\u5206\u949f\u540e\u5173\u95edPAIR\u901a\u9053\uff01"); + break; + } + continue; + } + catch (Exception e) { + this.log.error("\u624b\u52a8\u8ddf\u8e2a\u6216\u70ed\u70b9\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u547d\u4ee4\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public synchronized void sendData(final byte[] data) { + try { + this.socket.send(this.head.getBytes(), 2); + this.socket.send(String.valueOf(System.currentTimeMillis()).getBytes(), 2); + this.socket.send(data); + this.log.info(Arrays.toString(data)); + } + catch (Exception e) { + this.log.error("\u53d1\u9001\u6570\u636e\u5f02\u5e38\uff01"); + } + } + + public void closePairPort() { + PortManageUtils.searchDelete(this.port); + Thread.currentThread().interrupt(); + this.socket.close(); + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/UserLoginThread.java b/src/main/java/com/zhichenhaixin/thread/UserLoginThread.java new file mode 100644 index 0000000..494a004 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/UserLoginThread.java @@ -0,0 +1,186 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.alibaba.fastjson.JSON; +import com.zhichenhaixin.base.constant.Constant; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.list.model.ResMsg; +import com.zhichenhaixin.sys.model.UserVo; +import com.zhichenhaixin.sys.service.impl.CLURDICServiceImpl; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; + +public class UserLoginThread extends Thread +{ + private Log log; + private static final int PORT; + private CLURDICServiceImpl clurdicServiceImpl; + + static { + PORT = Integer.parseInt(SpringPropertyUtil.getProperty("login.server.port")); + } + + public UserLoginThread(final CLURDICServiceImpl clurdicServiceImpl) { + this.log = LogFactory.getLog(UserLoginThread.class); + this.clurdicServiceImpl = clurdicServiceImpl; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + try { + final ServerSocket serverSocket = new ServerSocket(); + serverSocket.bind(new InetSocketAddress(Constant.IP, UserLoginThread.PORT)); + this.log.info("login launch and connect socket. "); + while (!Thread.currentThread().isInterrupted()) { + final Socket socket = serverSocket.accept(); + final SocketThread stThread = new SocketThread(socket); + Constant.cachedThreadPool.execute(stThread); + } + } + catch (Exception e) { + this.log.error("\u521b\u5efasocket\u6216accept()\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + class SocketThread extends Thread + { + OutputStream os; + InputStream is; + boolean flag; + Socket socket; + UserVo vo; + + public SocketThread(final Socket socket) throws Exception { + this.os = null; + this.is = null; + this.flag = true; + (this.socket = socket).setKeepAlive(true); + socket.setOOBInline(true); + this.is = socket.getInputStream(); + this.os = socket.getOutputStream(); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + Thread.currentThread().setName("UserLogin-" + this.socket.getInetAddress().getHostAddress() + "-" + this.socket.getPort()); + while (this.flag) { + try { + final UserVo vo = this.readMsg(); + if (vo == null) { + continue; + } + final ResMsg resMsg = UserLoginThread.this.clurdicServiceImpl.login(vo); + this.writeMsg(JSON.toJSONString(resMsg).getBytes("UTF-8")); + if (resMsg.getCode() == 0) { + UserLoginThread.this.log.info("\u7528\u6237\u3010" + vo.getUser_account() + "\u3011\u767b\u5f55\u6210\u529f\uff01"); + } + if (resMsg.getCode() != 6) { + if (resMsg.getCode() != 7) { + continue; + } + } + try { + this.flag = false; + if (this.is != null) { + this.is.close(); + this.is = null; + } + if (this.os != null) { + this.os.close(); + this.os = null; + } + if (this.socket == null) { + continue; + } + this.socket.close(); + this.socket = null; + } + catch (IOException e) { + UserLoginThread.this.log.error("\u7528\u6237\u5df2\u767b\u5f55\u6216\u7528\u6237\u540d\u5bc6\u7801\u9519\u8bef\u65f6\u5173\u95ed\u6d41\u5f02\u5e38\uff01"); + } + } + catch (Exception e2) { + UserLoginThread.this.log.error("\u7528\u6237\u767b\u5f55\u5f02\u5e38"); + } + } + } + + public UserVo readMsg() { + try { + final byte[] bytes = new byte[5120]; + final int length = this.is.read(bytes); + if (length <= 0) { + this.close(); + UserLoginThread.this.log.info("\u4e0e\u5ba2\u6237\u7aef\u94fe\u63a5\u5df2\u4e2d\u65ad"); + return null; + } + final byte[] bytesMsg = new byte[length]; + System.arraycopy(bytes, 0, bytesMsg, 0, length); + final String msg = new String(bytesMsg, "UTF-8"); + if ("\r\n".equals(msg) || msg.contains("\r\n")) { + this.socket.setSoTimeout(10000); + this.writeMsg("\r\n".getBytes("UTF-8")); + return null; + } + return this.vo = JSON.parseObject(msg, UserVo.class); + } + catch (Exception e) { + this.close(); + return null; + } + } + + public void writeMsg(final byte[] bytes) { + try { + this.os.write(bytes); + this.os.flush(); + } + catch (Exception e) { + this.close(); + } + } + + private void close() { + this.flag = false; + Constant.loginMap.remove(this.vo.getUser_account()); + UserLoginThread.this.log.info("\u7528\u6237\u3010" + this.vo.getUser_account() + "\u3011\u9000\u51fa\uff01"); + try { + if (this.is != null) { + this.is.close(); + this.is = null; + } + if (this.os != null) { + this.os.close(); + this.os = null; + } + if (this.socket != null) { + this.socket.close(); + this.socket = null; + } + } + catch (IOException e1) { + UserLoginThread.this.log.error("\u5173\u95ed\u6d41\u65f6\u5f02\u5e38\uff01"); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/WarnGPSDyDataThread.java b/src/main/java/com/zhichenhaixin/thread/WarnGPSDyDataThread.java new file mode 100644 index 0000000..d283f9d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/WarnGPSDyDataThread.java @@ -0,0 +1,87 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.ResourceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.Arrays; + +public class WarnGPSDyDataThread +{ + static Logger log; + private static int ctrl_port; + private static int port; + private static int CameraListPort; + private String addr; + private String addrCamera; + private String addrCtrl; + ZMQ.Socket socket; + ZMQ.Socket socketCamera; + ZMQ.Socket socketCtrl; + private static WarnGPSDyDataThread zmq_pub; + + static { + WarnGPSDyDataThread.log = Logger.getLogger(WarnGPSDyDataThread.class); + WarnGPSDyDataThread.ctrl_port = ResourceUtil.getCtrlFllowPort(); + WarnGPSDyDataThread.port = Integer.parseInt(SpringPropertyUtil.getProperty("alarm.gps.info.port")); + WarnGPSDyDataThread.CameraListPort = Integer.parseInt(SpringPropertyUtil.getProperty("camera_list_port")); + WarnGPSDyDataThread.zmq_pub = new WarnGPSDyDataThread(); + } + + public WarnGPSDyDataThread() { + this.addr = "tcp://" + GlobalVariable.IP + ":" + WarnGPSDyDataThread.port; + this.addrCamera = "tcp://" + GlobalVariable.IP + ":" + WarnGPSDyDataThread.CameraListPort; + this.addrCtrl = "tcp://" + GlobalVariable.IP + ":" + WarnGPSDyDataThread.ctrl_port; + } + + public static WarnGPSDyDataThread getZMQPUB() { + return WarnGPSDyDataThread.zmq_pub; + } + + public void initZMQServerDy() { + (this.socket = GlobalVariable.context.socket(1)).bind(this.addr); + (this.socketCamera = GlobalVariable.context.socket(8)).bind(this.addrCamera); + this.socketCamera.setSendTimeOut(1000); + (this.socketCtrl = GlobalVariable.context.socket(1)).bind(this.addrCtrl); + } + + public synchronized void sendData(final String topic, final byte[] data) { + try { + this.socket.send(topic.getBytes(), 2); + this.socket.send(String.valueOf(System.currentTimeMillis()).getBytes(), 2); + this.socket.send(data); + this.log.info(Arrays.toString(data)); + } + catch (Exception e) { + WarnGPSDyDataThread.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } + + public synchronized void sendDataCamera(final String topic, final byte[] data) { + try { + this.socketCamera.send(topic.getBytes(), 2); + this.socketCamera.send(String.valueOf(System.currentTimeMillis()).getBytes(), 2); + this.socketCamera.send(data); + } + catch (Exception e) { + WarnGPSDyDataThread.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } + + public synchronized void sendDataCtrl(final String topic, final byte[] data) { + try { + this.socketCtrl.send(topic.getBytes(), 2); + this.socketCtrl.send(String.valueOf(System.currentTimeMillis()).getBytes(), 2); + this.socketCtrl.send(data); + } + catch (Exception e) { + WarnGPSDyDataThread.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/WarnGPSThread.java b/src/main/java/com/zhichenhaixin/thread/WarnGPSThread.java new file mode 100644 index 0000000..1e918c5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/WarnGPSThread.java @@ -0,0 +1,48 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.util.SpringBeanUtil; +import com.zhichenhaixin.list.dao.impl.DbAlarmInfoDaoImpl; +import com.zhichenhaixin.sys.dao.impl.CamInfoDaoImpl; +import org.apache.log4j.Logger; + +public class WarnGPSThread extends Thread +{ + private Logger log; + private DbAlarmInfoDaoImpl dbAlarmInfoDaoImpl; + private CamInfoDaoImpl camInfoDaoImpl; + + public WarnGPSThread() { + this.log = Logger.getLogger(WarnGPSThread.class); + this.dbAlarmInfoDaoImpl = (DbAlarmInfoDaoImpl)SpringBeanUtil.getBean("dbAlarmInfoDaoImpl"); + this.camInfoDaoImpl = (CamInfoDaoImpl)SpringBeanUtil.getBean("camInfoDaoImpl"); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + try { + WarnGPSDyDataThread.getZMQPUB().initZMQServerDy(); + new ReceiveXideweiVideoWarnInfoThread(this.dbAlarmInfoDaoImpl, this.camInfoDaoImpl).start(); + new SendComposeVideoThread(this.dbAlarmInfoDaoImpl).start(); + new SendCarPersonShipThread().start(); + new ReceiveComposeVideoThread(this.dbAlarmInfoDaoImpl).start(); + new SendComposeVideoTimeOutThread(this.dbAlarmInfoDaoImpl).start(); + new GpsTcpServerThread().start(); + new GpsPushThread().start(); + new GpsOnlineUpdateTime(this.dbAlarmInfoDaoImpl).start(); + this.log.info("-> warn or gps running is ok ..."); + } + catch (Exception e) { + e.printStackTrace(); + this.log.error("\u521d\u59cb\u5316\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/WorkerServerThread.java b/src/main/java/com/zhichenhaixin/thread/WorkerServerThread.java new file mode 100644 index 0000000..32cec89 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/WorkerServerThread.java @@ -0,0 +1 @@ +package com.zhichenhaixin.thread; \ No newline at end of file diff --git a/src/main/java/com/zhichenhaixin/thread/ZMQPubServer.java b/src/main/java/com/zhichenhaixin/thread/ZMQPubServer.java new file mode 100644 index 0000000..56b0e96 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ZMQPubServer.java @@ -0,0 +1,97 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.alibaba.fastjson.JSON; +import com.zhichenhaixin.gui.RadarHelperFrame; +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.tcp.model.RadarTrackModel; +import com.zhichenhaixin.util.BitConverter; +import com.zhichenhaixin.util.EndianUtil; +import com.zhichenhaixin.util.RadarTransformUtil; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.Arrays; +import java.util.List; + +public class ZMQPubServer +{ + private Logger log; + private String addr; + private ZMQ.Context context; + private ZMQ.Socket socket; + + public ZMQPubServer(final String address, final int port) { + this.log = Logger.getLogger(ZMQPubServer.class); + this.addr = null; + this.context = null; + this.socket = null; + this.addr = "tcp://" + address + ":" + port; + } + + public void initZMQServerDy() { + final ZMQ.Context context = ZMQ.context(1); + (this.socket = context.socket(1)).bind(this.addr); + RadarHelperFrame.textlog.append("\u96f7\u8fbe\u6570\u636e\u53d1\u5e03\u670d\u52a1\u542f\u52a8\u6210\u529f \r\n"); + } + + + public synchronized void sendData(final String sign, final String time, final byte[] data) { + try { + if (this.socket != null) { + this.socket.send(sign.getBytes(), 2); + this.socket.send(time.getBytes(), 2); + // todo:对data进行处理 + // todo:暂时不发这个乱码数据 + this.socket.send(data); + + //雷达数据发布 + this.log.info("ZMQ\u96f7\u8fbe\u6570\u636e\u53d1\u5e03"); + } + } + catch (Exception e) { + //数据发送异常! + this.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } + + public static void main(String[] args) { + // + } + public synchronized void sendData(final String sign, final String time, final String data) { + try { + if (this.socket != null) { + this.socket.send(sign.getBytes(), 2); + //this.socket.send(time.getBytes(), 2); + // todo:对data进行处理 + this.socket.send(data.getBytes()); + this.log.info("发送的数据sign:"+sign); + this.log.info("发送的数据data:"+data); + this.log.info("发送的数据sign转为string:"+new String(sign.getBytes())); + this.log.info("发送的数据data转为string:"+new String(data.getBytes())); + //雷达数据发布 + this.log.info("ZMQ\u96f7\u8fbe\u6570\u636e\u53d1\u5e03"); + } + } + catch (Exception e) { + //数据发送异常! + this.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } + + + public void close() { + if (this.socket != null) { + this.socket.close(); + this.socket = null; + } + if (this.context != null) { + this.context.close(); + this.context = null; + } + } + +} diff --git a/src/main/java/com/zhichenhaixin/thread/ZMQServerDyData.java b/src/main/java/com/zhichenhaixin/thread/ZMQServerDyData.java new file mode 100644 index 0000000..a318dcf --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ZMQServerDyData.java @@ -0,0 +1,53 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.Arrays; + +public class ZMQServerDyData +{ + static String address; + static Integer port; + private static ZMQServerDyData zmq_pub; + Logger log; + private String addr; + ZMQ.Socket socket; + + static { + ZMQServerDyData.address = SpringPropertyUtil.getProperty("address.ip"); + ZMQServerDyData.port = Integer.valueOf(SpringPropertyUtil.getProperty("pub.port")); + ZMQServerDyData.zmq_pub = new ZMQServerDyData(); + } + + public ZMQServerDyData() { + this.log = Logger.getLogger(ZMQServerDyData.class); + this.addr = "tcp://" + ZMQServerDyData.address + ":" + ZMQServerDyData.port; + } + + public static ZMQServerDyData getZMQPUB() { + return ZMQServerDyData.zmq_pub; + } + + public void initZMQServerDy() { + (this.socket = GlobalVariable.context.socket(1)).bind(this.addr); + } + + public synchronized void sendData(final String sign, final String time, final byte[] data) { + try { + this.socket.send(sign.getBytes(), 2); + this.socket.send(time.getBytes(), 2); + this.socket.send(data); + this.log.info(Arrays.toString(data)); + } + catch (Exception e) { + this.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/thread/ZMQServerPubCam.java b/src/main/java/com/zhichenhaixin/thread/ZMQServerPubCam.java new file mode 100644 index 0000000..9bd400d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/thread/ZMQServerPubCam.java @@ -0,0 +1,53 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.thread; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.Arrays; + +public class ZMQServerPubCam +{ + static String address; + static Integer port; + private static ZMQServerPubCam zmq_pub; + Logger log; + private String addr; + ZMQ.Socket socket; + + static { + ZMQServerPubCam.address = SpringPropertyUtil.getProperty("address.ip"); + ZMQServerPubCam.port = Integer.valueOf(SpringPropertyUtil.getProperty("pub.port.camera")); + ZMQServerPubCam.zmq_pub = new ZMQServerPubCam(); + } + + public ZMQServerPubCam() { + this.log = Logger.getLogger(ZMQServerPubCam.class); + this.addr = "tcp://" + ZMQServerPubCam.address + ":" + ZMQServerPubCam.port; + } + + public static ZMQServerPubCam getZMQPUB() { + return ZMQServerPubCam.zmq_pub; + } + + public void initZMQServerDy() { + (this.socket = GlobalVariable.context.socket(1)).bind(this.addr); + } + + public synchronized void sendData(final String sign, final String time, final byte[] data) { + try { + this.socket.send(sign.getBytes(), 2); + this.socket.send(time.getBytes(), 2); + this.socket.send(data); + this.log.info(Arrays.toString(data)); + } + catch (Exception e) { + this.log.error("\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01"); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/uav/AirPlaneEhcache.java b/src/main/java/com/zhichenhaixin/uav/AirPlaneEhcache.java new file mode 100644 index 0000000..39ff194 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/uav/AirPlaneEhcache.java @@ -0,0 +1,48 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.uav; + +import net.sf.ehcache.Cache; +import net.sf.ehcache.CacheManager; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class AirPlaneEhcache +{ + public static final String CACHE_NAME = "airPlaneVoCache"; + + public static void put(final WrjVo wrjVo) { + final Cache cache = CacheManager.getInstance().getCache("airPlaneVoCache"); + cache.put(new Element(wrjVo.getDeviceId(), wrjVo)); + } + + public static List getAll() { + final Cache cache = CacheManager.getInstance().getCache("airPlaneVoCache"); + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((WrjVo)element.getValue()); + } + } + return result; + } + + public static WrjVo get(final int deviceId) { + final Element element = CacheManager.getInstance().getCache("airPlaneVoCache").get(deviceId); + if (element == null) { + return null; + } + return (WrjVo)element.getValue(); + } + + public static void clear() { + CacheManager.getInstance().getCache("airPlaneVoCache").removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/uav/UAVByteReaderUtils.java b/src/main/java/com/zhichenhaixin/uav/UAVByteReaderUtils.java new file mode 100644 index 0000000..75c609d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/uav/UAVByteReaderUtils.java @@ -0,0 +1,72 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.uav; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.net.Socket; + +public class UAVByteReaderUtils +{ + private String fileName; + private byte[] containers; + + public byte[] getContainers() { + return this.containers; + } + + public void setContainers(final byte[] containers) { + this.containers = containers; + } + + public String getFileName() { + return this.fileName; + } + + public void setFileName(final String fileName) { + this.fileName = fileName; + } + + private void readUAVFile() throws Exception { + final File file = new File(this.fileName); + final int length = (int)file.length(); + this.containers = new byte[length]; + final InputStream in = new FileInputStream(file); + int data = 0; + int count = 0; + while ((data = in.read()) != -1) { + this.containers[count++] = (byte)data; + } + in.close(); + } + + public UAVByteReaderUtils() { + } + + public UAVByteReaderUtils(final String fileName) throws Exception { + this.fileName = fileName; + this.readUAVFile(); + } + + public UAVByteReaderUtils(final String ip, final int port) throws Exception { + final Socket s = new Socket(ip, port); + final byte[] bytes = new byte[1024]; + while (true) { + final InputStream in = s.getInputStream(); + final int length = in.read(bytes); + System.out.println(length); + final String data = new String(bytes, 0, length); + this.containers = data.getBytes(); + } + } + + public byte[] getUAVByteInfoByOffset(final byte[] bytes, final int offset) throws Exception { + for (int i = 0; i < bytes.length; ++i) { + bytes[i] = this.containers[i + offset]; + } + return bytes; + } +} diff --git a/src/main/java/com/zhichenhaixin/uav/UAVDataTypeParseUtils.java b/src/main/java/com/zhichenhaixin/uav/UAVDataTypeParseUtils.java new file mode 100644 index 0000000..3dee9d7 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/uav/UAVDataTypeParseUtils.java @@ -0,0 +1,121 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.uav; + +public class UAVDataTypeParseUtils +{ + private byte[] containers; + private UAVByteReaderUtils byteReaderUtils; + + public byte[] getContainers() { + return this.containers; + } + + public void setContainers(final byte[] containers) { + this.containers = containers; + } + + public UAVDataTypeParseUtils(final String ip, final Integer port) { + this.containers = new byte[UAVIndexVO.getStpInfoLength()]; + new UAVFeed(ip, port); + } + + public UAVDataTypeParseUtils(final String fileName) throws Exception { + this.containers = new byte[UAVIndexVO.getStpInfoLength()]; + this.byteReaderUtils = new UAVByteReaderUtils(fileName); + } + + public void getPrimaryDataFromByteReaderUtils() throws Exception { + this.containers = this.byteReaderUtils.getUAVByteInfoByOffset(this.containers, 0); + } + + public static Integer binary2Integer(final String str) { + if (str.matches("^[0-1]+$")) { + final int strLength = str.length(); + final Integer[] oldIntegers = new Integer[strLength]; + for (int i = 0; i < strLength; ++i) { + oldIntegers[i] = Integer.parseInt(str.substring(i, i + 1)); + } + Integer newInteger = 0; + for (int length = oldIntegers.length, j = 0; j < length; ++j) { + newInteger += oldIntegers[j] << length - j - 1; + } + return newInteger; + } + return null; + } + + public static Float binary2Float(final String str) { + final Integer i = binary2Integer(str); + if (i != null) { + final float f = Float.parseFloat(new StringBuilder().append(i).toString()); + return f; + } + return null; + } + + private static float byte2Float(final byte[] bytes, final int index) { + int i = bytes[index]; + i &= 0xFF; + i = (int)((long)i | (long)bytes[index + 1] << 8); + i &= 0xFFFF; + i = (int)((long)i | (long)bytes[index + 2] << 16); + i &= 0xFFFFFF; + i = (int)((long)i | (long)bytes[index + 3] << 24); + return Float.intBitsToFloat(i); + } + + private static int byte2Int(final byte[] bytes, final int index) { + return bytes[index]; + } + + private boolean checkHeader(final byte[] bytes) { + final byte[] headerBytes = new byte[4]; + for (int i = 0; i < headerBytes.length; ++i) { + headerBytes[i] = bytes[i]; + } + final String headerInfo = new String(headerBytes, 0, headerBytes.length); + return headerInfo.equals("$STP"); + } + + private void prepareParseData(final byte[] bytes, final WrjVo wrjVo) { + wrjVo.setDeviceId(1001); + wrjVo.setDeviceName("\u65e0\u4eba\u673a1"); + wrjVo.setLat(byte2Float(bytes, UAVIndexVO.getStpLat())); + wrjVo.setLon(byte2Float(bytes, UAVIndexVO.getStpLon())); + wrjVo.setGpsHeight(byte2Float(bytes, UAVIndexVO.getStpHeight())); + wrjVo.setSpeed(byte2Float(bytes, UAVIndexVO.getStpSpeed())); + wrjVo.setHeading(byte2Float(bytes, UAVIndexVO.getStpHeading())); + wrjVo.setStarNumber(byte2Int(bytes, UAVIndexVO.getStpStarnumber())); + final String year = String.valueOf(byte2Int(bytes, UAVIndexVO.getStpYear())); + final String mouth = String.valueOf(byte2Int(bytes, UAVIndexVO.getStpMonth())); + final String day = String.valueOf(byte2Int(bytes, UAVIndexVO.getStpDay())); + final String hour = String.valueOf(byte2Int(bytes, UAVIndexVO.getStpHour())); + final String minute = String.valueOf(byte2Int(bytes, UAVIndexVO.getStpMinute())); + final String second = String.valueOf(byte2Int(bytes, UAVIndexVO.getStpSecond())); + final String dateTime = String.valueOf(year) + "-" + mouth + "-" + day + " " + hour + ":" + minute + ":" + second; + wrjVo.setDateTime(dateTime); + final Float value = byte2Float(bytes, UAVIndexVO.getStpAirpressheight()); + if (value.equals(Float.NaN)) { + wrjVo.setAirPressHeight(0.0f); + } + else { + wrjVo.setAirPressHeight(value); + } + wrjVo.setElectricPressValue(byte2Float(bytes, UAVIndexVO.getStpElectricpressvalue())); + } + + public boolean startParseData(final UAVIndexVO uavIndexVO) { + if (this.checkHeader(this.containers)) { + final WrjVo wrjVo = new WrjVo(); + this.prepareParseData(this.containers, wrjVo); + uavIndexVO.getWrjvos().add(wrjVo); + AirPlaneEhcache.put(wrjVo); + return true; + } + System.out.println("\u5934\u4fe1\u606f\u5339\u914d\u5931\u8d25\uff0c\u4e0d\u80fd\u89e3\u6790\u6570\u636e"); + return false; + } +} diff --git a/src/main/java/com/zhichenhaixin/uav/UAVFeed.java b/src/main/java/com/zhichenhaixin/uav/UAVFeed.java new file mode 100644 index 0000000..ff59119 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/uav/UAVFeed.java @@ -0,0 +1,119 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.uav; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.PrintWriter; +import java.net.Socket; + +public class UAVFeed extends Thread +{ + private String ip; + private Integer port; + private Socket s; + private boolean isClose; + private byte[] containers; + + public UAVFeed() { + this.s = null; + this.isClose = false; + } + + public UAVFeed(final String ip, final Integer port) { + this.s = null; + this.isClose = false; + this.ip = ip; + this.port = port; + } + + public String getIp() { + return this.ip; + } + + public void setIp(final String ip) { + this.ip = ip; + } + + public Integer getPort() { + return this.port; + } + + public void setPort(final Integer port) { + this.port = port; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + if (!(this.isClose = this.isServerClose(this.s))) { + this.containers = this.readMessage(this.s); + if (this.containers != null) { + final UAVDataTypeParseUtils dataTypeParseUtils = new UAVDataTypeParseUtils(this.getIp(), this.getPort()); + dataTypeParseUtils.setContainers(this.containers); + final UAVIndexVO stpIndexVO = new UAVIndexVO(); + dataTypeParseUtils.startParseData(stpIndexVO); + } + } + while (this.isClose) { + try { + (this.s = new Socket(this.ip, this.port)).setKeepAlive(true); + this.isClose = !this.sendJudgeMessage(this.s, "hello server ... "); + } + catch (Exception e) { + this.isClose = true; + } + } + } + } + + private Boolean sendJudgeMessage(final Socket ss, final String message) { + try { + final PrintWriter out = new PrintWriter(ss.getOutputStream(), true); + out.println(message); + return true; + } + catch (Exception e) { + return false; + } + } + + private Boolean isServerClose(final Socket ss) { + try { + ss.sendUrgentData(0); + return false; + } + catch (Exception e) { + return true; + } + } + + private byte[] readMessage(final Socket ss) { + try { + final ByteArrayOutputStream trsStream = new ByteArrayOutputStream(); + final InputStream in = ss.getInputStream(); + final byte[] bytes = new byte[200]; + int length = 0; + while ((length = in.read(bytes, 0, 100)) != -1) { + trsStream.write(bytes, 0, length); + if (length != 100) { + break; + } + } + final byte[] data = trsStream.toByteArray(); + trsStream.close(); + in.close(); + return data; + } + catch (Exception e) { + return null; + } + } +} diff --git a/src/main/java/com/zhichenhaixin/uav/UAVIndexVO.java b/src/main/java/com/zhichenhaixin/uav/UAVIndexVO.java new file mode 100644 index 0000000..b43d471 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/uav/UAVIndexVO.java @@ -0,0 +1,124 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.uav; + +import java.util.ArrayList; + +public class UAVIndexVO +{ + private static final String STP_HEADER = "$STP"; + private static final int STP_LAT = 4; + private static final int STP_LON = 8; + private static final int STP_HEIGHT = 12; + private static final int STP_SPEED = 16; + private static final int STP_HEADING = 20; + private static final int STP_STARNUMBER = 24; + private static final int STP_YEAR = 25; + private static final int STP_MONTH = 26; + private static final int STP_DAY = 27; + private static final int STP_HOUR = 28; + private static final int STP_MINUTE = 29; + private static final int STP_SECOND = 30; + private static final int STP_AIRPRESSHEIGHT = 48; + private static final int STP_ELECTRICPRESSVALUE = 70; + private static final int STP_INFO_LENGTH = 99; + private ArrayList wrjvos; + + public ArrayList getWrjvos() { + return this.wrjvos; + } + + public void setWrjvos(final ArrayList wrjvos) { + this.wrjvos = wrjvos; + } + + public void printSTPVOInfo() { + System.out.println("\u65e0\u4eba\u673a\u63a5\u53e3\u534f\u8bae\u6570\u636e\u4fe1\u606f\u957f\u5ea6\uff1a" + this.wrjvos.size()); + for (final WrjVo wrjvo : this.wrjvos) { + System.out.println(wrjvo); + } + } + + public ArrayList getStpvos() { + return this.wrjvos; + } + + public void setStpvos(final ArrayList wrjvos) { + this.wrjvos = wrjvos; + } + + public static String getStpHeader() { + return "$STP"; + } + + public static int getStpLon() { + return 8; + } + + public static int getStpLat() { + return 4; + } + + public static int getStpHeight() { + return 12; + } + + public static int getStpSpeed() { + return 16; + } + + public static int getStpHeading() { + return 20; + } + + public static int getStpStarnumber() { + return 24; + } + + public static int getStpYear() { + return 25; + } + + public static int getStpMonth() { + return 26; + } + + public static int getStpDay() { + return 27; + } + + public static int getStpHour() { + return 28; + } + + public static int getStpMinute() { + return 29; + } + + public static int getStpSecond() { + return 30; + } + + public static int getStpAirpressheight() { + return 48; + } + + public static int getStpElectricpressvalue() { + return 70; + } + + public static int getStpInfoLength() { + return 99; + } + + public UAVIndexVO() { + this.wrjvos = new ArrayList(); + } + + @Override + public String toString() { + return "UAVIndexVO []"; + } +} diff --git a/src/main/java/com/zhichenhaixin/uav/WrjVo.java b/src/main/java/com/zhichenhaixin/uav/WrjVo.java new file mode 100644 index 0000000..3fd41fe --- /dev/null +++ b/src/main/java/com/zhichenhaixin/uav/WrjVo.java @@ -0,0 +1,111 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.uav; + +import java.io.Serializable; + +public class WrjVo implements Serializable +{ + private static final long serialVersionUID = 1L; + private int deviceId; + private String deviceName; + private float lon; + private float lat; + private float gpsHeight; + private float speed; + private float heading; + private int starNumber; + private String dateTime; + private float airPressHeight; + private float electricPressValue; + + public float getSpeed() { + return this.speed; + } + + public void setSpeed(final float speed) { + this.speed = speed; + } + + public float getHeading() { + return this.heading; + } + + public void setHeading(final float heading) { + this.heading = heading; + } + + public Integer getStarNumber() { + return this.starNumber; + } + + public void setStarNumber(final Integer starNumber) { + this.starNumber = starNumber; + } + + public String getDateTime() { + return this.dateTime; + } + + public void setDateTime(final String dateTime) { + this.dateTime = dateTime; + } + + public float getAirPressHeight() { + return this.airPressHeight; + } + + public void setAirPressHeight(final float airPressHeight) { + this.airPressHeight = airPressHeight; + } + + public float getElectricPressValue() { + return this.electricPressValue; + } + + public void setElectricPressValue(final float electricPressValue) { + this.electricPressValue = electricPressValue; + } + + public float getLon() { + return this.lon; + } + + public void setLon(final float lon) { + this.lon = lon; + } + + public float getLat() { + return this.lat; + } + + public void setLat(final float lat) { + this.lat = lat; + } + + public float getGpsHeight() { + return this.gpsHeight; + } + + public void setGpsHeight(final float gpsHeight) { + this.gpsHeight = gpsHeight; + } + + public Integer getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(final Integer deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(final String deviceName) { + this.deviceName = deviceName; + } +} diff --git a/src/main/java/com/zhichenhaixin/util/AgilTrackEhcache.java b/src/main/java/com/zhichenhaixin/util/AgilTrackEhcache.java new file mode 100644 index 0000000..7c59a6a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/AgilTrackEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.serializer.RadarTrackVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class AgilTrackEhcache +{ + public static final String CACHE_NAME = "agilTrackVoCache"; + + public static void put(final RadarTrackVo radarTrackVo) { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return; + } + cache.put(new Element(radarTrackVo.getTrackNumber(), radarTrackVo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((RadarTrackVo)element.getValue()); + } + } + return result; + } + + public static RadarTrackVo get(final int trackNum) { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNum); + if (element == null) { + return null; + } + return (RadarTrackVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int trackNum) { + final Cache cache = CacheUtil.getECache("agilTrackVoCache"); + if (cache == null) { + return; + } + cache.remove(trackNum); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/BitConverter.java b/src/main/java/com/zhichenhaixin/util/BitConverter.java new file mode 100644 index 0000000..f279c99 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/BitConverter.java @@ -0,0 +1,132 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +public class BitConverter +{ + public static short ToInt16(final byte[] bytes, final int offset) { + short result = (short)(bytes[offset] & 0xFF); + result |= (short)((bytes[offset + 1] & 0xFF) << 8); + return (short)(result & 0xFFFF); + } + + public static int ToUInt16(final byte[] bytes, final int offset) { + int result = bytes[offset + 1] & 0xFF; + result |= (bytes[offset] & 0xFF) << 8; + return result & 0xFFFF; + } + + public static int ToInt32(final byte[] bytes, final int offset) { + final int byte3 = bytes[offset + 3] & 0xFF; + final int byte4 = (bytes[offset + 2] & 0xFF) << 8; + final int byte5 = (bytes[offset + 1] & 0xFF) << 16; + final int byte6 = (bytes[offset] & 0xFF) << 24; + return byte6 | byte5 | byte4 | byte3; + } + + public static int bytes2IntSmallEndian(final byte[] bytes, final int offset) { + return (bytes[offset + 3] & 0xFF) << 24 | (bytes[offset + 2] & 0xFF) << 16 | (bytes[offset + 1] & 0xFF) << 8 | (bytes[offset] & 0xFF); + } + + public static long ToUInt32(final byte[] bytes, final int offset) { + long result = bytes[offset] & 0xFF; + result |= (bytes[offset + 1] & 0xFF) << 8; + result |= (bytes[offset + 2] & 0xFF) << 16; + result |= (bytes[offset + 3] & 0xFF) << 24; + return result & 0xFFFFFFFFL; + } + + public static long ToInt64(final byte[] buffer, final int offset) { + long values = 0L; + for (int i = 0; i < 8; ++i) { + values <<= 8; + values |= (buffer[offset + i] & 0xFF); + } + return values; + } + + public static long ToUInt64(final byte[] bytes, int offset) { + long result = 0L; + for (int i = 0; i <= 56; i += 8) { + result |= (bytes[offset++] & 0xFF) << i; + } + return result; + } + + public static float ToFloat(final byte[] bs, final int index) { + return Float.intBitsToFloat(ToInt32(bs, index)); + } + + public static double ToDouble(final byte[] arr, final int offset) { + return Double.longBitsToDouble(ToUInt64(arr, offset)); + } + + public static boolean ToBoolean(final byte[] bytes, final int offset) { + return bytes[offset] != 0; + } + + public static byte[] GetBytes(final short value) { + final byte[] bytes = { (byte)(value & 0xFF), (byte)((value & 0xFF00) >> 8) }; + return bytes; + } + + public static byte[] GetBytes(final int value) { + final byte[] bytes = { (byte)(value & 0xFF), (byte)(value >> 8 & 0xFF), (byte)(value >> 16 & 0xFF), (byte)(value >>> 24) }; + return bytes; + } + + public static byte[] GetBytes(final long values) { + final byte[] buffer = new byte[8]; + for (int i = 0; i < 8; ++i) { + final int offset = 64 - (i + 1) * 8; + buffer[i] = (byte)(values >> offset & 0xFFL); + } + return buffer; + } + + public static byte[] GetBytes(final float value) { + return GetBytes(Float.floatToIntBits(value)); + } + + public static byte[] GetBytes(final double val) { + final long value = Double.doubleToLongBits(val); + return GetBytes(value); + } + + public static byte[] GetBytes(final boolean value) { + return new byte[] { (byte)(value ? 1 : 0) }; + } + + public static byte IntToByte(final int x) { + return (byte)x; + } + + public static int ByteToInt(final byte b) { + return b & 0xFF; + } + + public static char ToChar(final byte[] bs, final int offset) { + return (char)((bs[offset] & 0xFF) << 8 | (bs[offset + 1] & 0xFF)); + } + + public static byte[] GetBytes(final char value) { + final byte[] b = { (byte)((value & '\uff00') >> 8), (byte)(value & '\u00ff') }; + return b; + } + + public static byte[] Concat(final byte[]... bs) { + int len = 0; + int idx = 0; + for (final byte[] b : bs) { + len += b.length; + } + final byte[] buffer = new byte[len]; + for (final byte[] b2 : bs) { + System.arraycopy(b2, 0, buffer, idx, b2.length); + idx += b2.length; + } + return buffer; + } +} diff --git a/src/main/java/com/zhichenhaixin/util/ByteIntUtil.java b/src/main/java/com/zhichenhaixin/util/ByteIntUtil.java new file mode 100644 index 0000000..ec9da4f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/ByteIntUtil.java @@ -0,0 +1,58 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +public class ByteIntUtil +{ + public static byte[] i2b(final int i) { + return new byte[] { (byte)(i >> 24 & 0xFF), (byte)(i >> 16 & 0xFF), (byte)(i >> 8 & 0xFF), (byte)(i & 0xFF) }; + } + + public static int b2i(final byte[] b) { + int value = 0; + for (int i = 0; i < 4; ++i) { + final int shift = (3 - i) * 8; + value += (b[i] & 0xFF) << shift; + } + return value; + } + + public static byte[] byteMerger(final byte[] byte_1, final byte[] byte_2) { + final byte[] byte_3 = new byte[byte_1.length + byte_2.length]; + System.arraycopy(byte_1, 0, byte_3, 0, byte_1.length); + System.arraycopy(byte_2, 0, byte_3, byte_1.length, byte_2.length); + return byte_3; + } + + public static byte[] byteToBit(byte b) { + final byte[] array = new byte[8]; + for (int i = 7; i >= 0; --i) { + array[i] = (byte)(b & 0x1); + b >>= 1; + } + return array; + } + + public static String byteToBitStr(final byte b) { + return new StringBuilder().append((byte)(b >> 7 & 0x1)).append((byte)(b >> 6 & 0x1)).append((byte)(b >> 5 & 0x1)).append((byte)(b >> 4 & 0x1)).append((byte)(b >> 3 & 0x1)).append((byte)(b >> 2 & 0x1)).append((byte)(b >> 1 & 0x1)).append((byte)(b >> 0 & 0x1)).toString(); + } + + public static int charToAscii(final char ch) { + return ch; + } + + public static String asciiToStr(final int ascii) { + final char ch = (char)ascii; + return String.valueOf(ch); + } + + public static byte[] changeLittleEndianBytes(final byte[] a) { + final byte[] b = new byte[a.length]; + for (int i = 0; i < b.length; ++i) { + b[i] = a[b.length - i - 1]; + } + return b; + } +} diff --git a/src/main/java/com/zhichenhaixin/util/CtrlVoEhcache.java b/src/main/java/com/zhichenhaixin/util/CtrlVoEhcache.java new file mode 100644 index 0000000..bcd03f0 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/CtrlVoEhcache.java @@ -0,0 +1,76 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXFllow; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class CtrlVoEhcache +{ + public static final String CACHE_NAME = "ctrlVoCache"; + List list; + + public CtrlVoEhcache() { + this.list = new ArrayList(); + } + + public static void put(final ZCHXFllow.CtrlVo vo) { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getTrackNumber(), vo)); + } + + public static void remove(final int trackNumber) { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return; + } + cache.remove(trackNumber); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXFllow.CtrlVo)element.getValue()); + } + } + return result; + } + + public static ZCHXFllow.CtrlVo get(final int trackNumber) { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNumber); + if (element == null) { + return null; + } + return (ZCHXFllow.CtrlVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("ctrlVoCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/CustomFeatureEhcache.java b/src/main/java/com/zhichenhaixin/util/CustomFeatureEhcache.java new file mode 100644 index 0000000..4cb1582 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/CustomFeatureEhcache.java @@ -0,0 +1,101 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.Point; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKTReader; +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.CustomDefence; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFeatureEhcache +{ + public static final String CACHE_NAME = "customFeatureEhcache"; + + public static void put(final CustomDefence customLayer) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(customLayer.getDefence_id(), customLayer)); + } + + public static CustomDefence isContainArea(final Point point) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + for (int size = keys.size(), i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + final CustomDefence customLayer = (CustomDefence)element.getValue(); + if (customLayer.getDefence_type() != 1) { + try { + final Geometry defence = new WKTReader().read(customLayer.getLon_lat()); + if (defence.contains(point)) { + return customLayer; + } + } + catch (ParseException e) { + System.out.println(e.getMessage()); + } + } + } + } + return null; + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((CustomDefence)element.getValue()); + } + } + return result; + } + + public static CustomDefence get(final int defence_id) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(defence_id); + if (element == null) { + return null; + } + return (CustomDefence)element.getValue(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("customFeatureEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/DefenceCacheUtil.java b/src/main/java/com/zhichenhaixin/util/DefenceCacheUtil.java new file mode 100644 index 0000000..09c103e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/DefenceCacheUtil.java @@ -0,0 +1,141 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.DateUtil; +import com.zhichenhaixin.sys.model.CustomDefence; +import com.zhichenhaixin.sys.model.TimeSpanVo; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +public class DefenceCacheUtil +{ + public static void saveDefenceCache(final List list) { + CustomFeatureEhcache.clear(); + for (final CustomDefence cus2 : list) { + CustomFeatureEhcache.put(cus2); + } + } + + public static boolean isSetDefence(final List list) { + if (list == null) { + return false; + } + for (final TimeSpanVo time : list) { + final String start = time.getStarttime(); + final String cur = DateUtil.format(DateUtil.now(), "HH:mm"); + final String end = time.getEndtime(); + final int start2 = Integer.parseInt(start.replaceAll(":", "")); + final int cur2 = Integer.parseInt(cur.replaceAll(":", "")); + final int end2 = Integer.parseInt(end.replaceAll(":", "")); + if (start2 <= cur2 && cur2 <= end2) { + return true; + } + } + return false; + } + + public static boolean judgeSetDefence(final List list) { + if (list != null) { + final Calendar calendar = Calendar.getInstance(); + final Date date = new Date(); + calendar.setTime(date); + final int dayOfWeek = calendar.get(7); + for (final TimeSpanVo time : list) { + if (switchTimeCycle(time, dayOfWeek, date)) { + return true; + } + } + } + return false; + } + + public static boolean switchTimeCycle(final TimeSpanVo time, final int dayOfWeek, final Date date) { + final int timeCicle = time.getTime_cycle(); + boolean result = false; + switch (timeCicle) { + case 1: { + if (dayOfWeek == 2) { + result = judgeTime(time, date); + break; + } + break; + } + case 2: { + if (dayOfWeek == 3) { + result = judgeTime(time, date); + break; + } + break; + } + case 3: { + if (dayOfWeek == 4) { + result = judgeTime(time, date); + break; + } + break; + } + case 4: { + if (dayOfWeek == 5) { + result = judgeTime(time, date); + break; + } + break; + } + case 5: { + if (dayOfWeek == 6) { + result = judgeTime(time, date); + break; + } + break; + } + case 6: { + if (dayOfWeek == 7) { + result = judgeTime(time, date); + break; + } + break; + } + case 7: { + if (dayOfWeek == 1) { + result = judgeTime(time, date); + break; + } + break; + } + case 8: { + if (dayOfWeek > 1 && dayOfWeek < 7) { + result = judgeTime(time, date); + break; + } + break; + } + case 9: { + if (dayOfWeek == 1 || dayOfWeek == 7) { + result = judgeTime(time, date); + break; + } + break; + } + case 10: { + result = judgeTime(time, date); + break; + } + } + return result; + } + + public static boolean judgeTime(final TimeSpanVo timeSpanVo, final Date date) { + final String start = timeSpanVo.getStarttime(); + final String cur = DateUtil.format(date, "HH:mm"); + final String end = timeSpanVo.getEndtime(); + final int start2 = Integer.parseInt(start.replaceAll(":", "")); + final int cur2 = Integer.parseInt(cur.replaceAll(":", "")); + final int end2 = Integer.parseInt(end.replaceAll(":", "")); + return start2 <= cur2 && cur2 <= end2; + } +} diff --git a/src/main/java/com/zhichenhaixin/util/EndianUtil.java b/src/main/java/com/zhichenhaixin/util/EndianUtil.java new file mode 100644 index 0000000..f8f7b31 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/EndianUtil.java @@ -0,0 +1,133 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +public class EndianUtil +{ + public static byte[] short2LittleEndianBytes(final short val) { + return short2Bytes(short2LittleEndian(val)); + } + + public static byte[] int2LittleEndianBytes(final int val) { + return int2Bytes(int2LittleEndian(val)); + } + + public static byte[] long2LittleEndianBytes(final long val) { + return long2Bytes(long2LittleEndian(val)); + } + + public static short short2LittleEndian(final short val) { + return (short)(((val & 0xFF00) >>> 8) + ((val & 0xFF) << 8)); + } + + public static int int2LittleEndian(final int val) { + return ((val & 0xFF000000) >>> 24) + ((val & 0xFF0000) >>> 16 << 8) + ((val & 0xFF00) >>> 8 << 16) + ((val & 0xFF) << 24); + } + + public static long long2LittleEndian(final long val) { + return ((val & 0xFF00000000000000L) >>> 56) + ((val & 0xFF000000000000L) >>> 48 << 8) + ((val & 0xFF0000000000L) >>> 40 << 16) + ((val & 0xFF00000000L) >>> 32 << 24) + ((val & 0xFF000000L) >>> 24 << 32) + ((val & 0xFF0000L) >>> 16 << 40) + ((val & 0xFF00L) >>> 8 << 48) + ((val & 0xFFL) << 56); + } + + public static int intFromLittleEndian(final int val) { + return int2LittleEndian(val); + } + + public static short shortFromLittleEndian(final short val) { + return short2LittleEndian(val); + } + + public static long longFromLittleEndian(final long val) { + return long2LittleEndian(val); + } + + public static byte[] long2Bytes(final long a) { + return new byte[] { (byte)(a >> 56 & 0xFFL), (byte)(a >> 48 & 0xFFL), (byte)(a >> 40 & 0xFFL), (byte)(a >> 32 & 0xFFL), (byte)(a >> 24 & 0xFFL), (byte)(a >> 16 & 0xFFL), (byte)(a >> 8 & 0xFFL), (byte)(a & 0xFFL) }; + } + + public static byte[] int2Bytes(final int a) { + return new byte[] { (byte)(a >> 24 & 0xFF), (byte)(a >> 16 & 0xFF), (byte)(a >> 8 & 0xFF), (byte)(a & 0xFF) }; + } + + public static byte[] short2Bytes(final short a) { + return new byte[] { (byte)(a >> 8 & 0xFF), (byte)(a & 0xFF) }; + } + + public static long bytes2Long(final byte[] bytes, final int offset) { + return (0xFFL & (long)bytes[offset + 7]) | (0xFF00L & (long)bytes[offset + 6] << 8) | (0xFF0000L & (long)bytes[offset + 5] << 16) | (0xFF000000L & (long)bytes[offset + 4] << 24) | (0xFF00000000L & (long)bytes[offset + 3] << 32) | (0xFF0000000000L & (long)bytes[offset + 2] << 40) | (0xFF000000000000L & (long)bytes[offset + 1] << 48) | (0xFF00000000000000L & (long)bytes[offset] << 56); + } + + public static long bytes2LongSmallEndian(final byte[] bytes, final int offset) { + return (0xFFL & (long)bytes[offset]) | (0xFF00L & (long)bytes[offset + 1] << 8) | (0xFF0000L & (long)bytes[offset + 2] << 16) | (0xFF000000L & (long)bytes[offset + 3] << 24) | (0xFF00000000L & (long)bytes[offset + 4] << 32) | (0xFF0000000000L & (long)bytes[offset + 5] << 40) | (0xFF000000000000L & (long)bytes[offset + 6] << 48) | (0xFF00000000000000L & (long)bytes[offset + 7] << 56); + } + + public static int bytes2Int(final byte[] bytes, final int offset) { + return (bytes[offset] & 0xFF) << 24 | (bytes[offset + 1] & 0xFF) << 16 | (bytes[offset + 2] & 0xFF) << 8 | (bytes[offset + 3] & 0xFF); + } + + public static int bytes2IntSmallEndian(final byte[] bytes, final int offset) { + return (bytes[offset + 3] & 0xFF) << 24 | (bytes[offset + 2] & 0xFF) << 16 | (bytes[offset + 1] & 0xFF) << 8 | (bytes[offset] & 0xFF); + } + + public static char bytes2Char(final byte[] bytes, final int offset) { + if (bytes.length < 2) { + return '\uffff'; + } + int iRst = bytes[offset] & 0xFF; + iRst |= (bytes[offset + 1] & 0xFF) << 8; + return (char)iRst; + } + + public static char bytes2CharSmallEndian(final byte[] bytes, final int offset) { + if (bytes.length < 2) { + return '\uffff'; + } + int iRst = bytes[offset] << 8 & 0xFF; + iRst |= (bytes[offset + 1] & 0xFF); + return (char)iRst; + } + + public static char byte2Char(final byte bytedata) { + if (bytedata > 32 && bytedata < 127) { + return (char)bytedata; + } + return '0'; + } + + public static short bytes2Short(final byte[] bytes, final int offset) { + return (short)((bytes[offset] & 0xFF) << 8 | (bytes[offset + 1] & 0xFF)); + } + + public static short bytes2ShortSmallEndian(final byte[] bytes, final int offset) { + return (short)((bytes[offset + 1] & 0xFF) << 8 | (bytes[offset] & 0xFF)); + } + + public static float byte2float(final byte[] bytes, final int offset) { + final int FF = 255; + final int b0 = bytes[offset] & FF; + final int b2 = bytes[offset + 1] & FF; + final int b3 = bytes[offset + 2] & FF; + final int b4 = bytes[offset + 3] & FF; + final int h0 = b0 << 24; + final int h2 = b2 << 16; + final int h3 = b3 << 8; + final int h4 = b4; + final int h5 = h0 | h2 | h3 | h4; + return Float.intBitsToFloat(h5); + } + + public static float byte2floatSmallEndian(final byte[] bytes, final int offset) { + final int FF = 255; + final int b0 = bytes[offset + 3] & FF; + final int b2 = bytes[offset + 2] & FF; + final int b3 = bytes[offset + 1] & FF; + final int b4 = bytes[offset] & FF; + final int h0 = b0 << 24; + final int h2 = b2 << 16; + final int h3 = b3 << 8; + final int h4 = b4; + final int h5 = h0 | h2 | h3 | h4; + return Float.intBitsToFloat(h5); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/GpsVoEhcache.java b/src/main/java/com/zhichenhaixin/util/GpsVoEhcache.java new file mode 100644 index 0000000..5201d93 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/GpsVoEhcache.java @@ -0,0 +1,89 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXGPS; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class GpsVoEhcache +{ + public static final String CACHE_NAME = "gpsVoCache"; + + public static void put(final ZCHXGPS.GPSData vo) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getImei(), vo)); + } + + public static void remove(final String imei) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return; + } + cache.remove(imei); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXGPS.GPSData)element.getValue()); + } + } + return result; + } + + public static ZCHXGPS.GPSData get(final String imei) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(imei); + if (element == null) { + return null; + } + return (ZCHXGPS.GPSData)element.getValue(); + } + + public static boolean get(final ZCHXGPS.GPSData vo) { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return false; + } + final List keys = (List)cache.getKeys(); + for (int size = keys.size(), i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + final ZCHXGPS.GPSData gvo = (ZCHXGPS.GPSData)element.getValue(); + if (gvo.getImei().equals(vo.getImei()) && gvo.getLon() == vo.getLon() && gvo.getLat() == vo.getLat()) { + return true; + } + } + } + return false; + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("gpsVoCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/IPUtil.java b/src/main/java/com/zhichenhaixin/util/IPUtil.java new file mode 100644 index 0000000..58036c3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/IPUtil.java @@ -0,0 +1,50 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; + +public class IPUtil +{ + private static final Log log; + + static { + log = LogFactory.getLog(IPUtil.class); + } + + public static List getLocalIPList() { + final List ipList = new ArrayList(); + try { + final Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); + while (networkInterfaces.hasMoreElements()) { + final NetworkInterface networkInterface = networkInterfaces.nextElement(); + final Enumeration inetAddresses = networkInterface.getInetAddresses(); + while (inetAddresses.hasMoreElements()) { + final InetAddress inetAddress = inetAddresses.nextElement(); + if (inetAddress != null && inetAddress instanceof Inet4Address) { + final String ip = inetAddress.getHostAddress(); + if (ip.startsWith("127")) { + continue; + } + ipList.add(ip); + } + } + } + } + catch (SocketException e) { + IPUtil.log.error(e.getMessage(), e); + } + return ipList; + } +} diff --git a/src/main/java/com/zhichenhaixin/util/NightModeEhcache.java b/src/main/java/com/zhichenhaixin/util/NightModeEhcache.java new file mode 100644 index 0000000..400b653 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/NightModeEhcache.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.NightModeVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class NightModeEhcache +{ + public static final String CACHE_NAME = "nightModeCache"; + + public static void put(final NightModeVo vo) { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getId(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((NightModeVo)element.getValue()); + } + } + return result; + } + + public static NightModeVo get(final int id) { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(id); + if (element == null) { + return null; + } + return (NightModeVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("nightModeCache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void saveNightModeVoCache(final List list) { + clear(); + for (final NightModeVo vo : list) { + put(vo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/util/RadarFalseAlarmEhcache.java b/src/main/java/com/zhichenhaixin/util/RadarFalseAlarmEhcache.java new file mode 100644 index 0000000..f87cb89 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/RadarFalseAlarmEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXRadar; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class RadarFalseAlarmEhcache +{ + public static final String CACHE_NAME = "radarFalseAlarmEhcache"; + + public static void put(final ZCHXRadar.RadarHistoryTrack vo) { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getTrackNumber(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXRadar.RadarHistoryTrack)element.getValue()); + } + } + return result; + } + + public static ZCHXRadar.RadarHistoryTrack get(final int trackNum) { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNum); + if (element == null) { + return null; + } + return (ZCHXRadar.RadarHistoryTrack)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int trackNum) { + final Cache cache = CacheUtil.getECache("radarFalseAlarmEhcache"); + if (cache == null) { + return; + } + cache.remove(trackNum); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/RadarTransformUtil.java b/src/main/java/com/zhichenhaixin/util/RadarTransformUtil.java new file mode 100644 index 0000000..857f50f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/RadarTransformUtil.java @@ -0,0 +1,37 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.tcp.model.NyGuideCamPosModel; +import com.zhichenhaixin.tcp.model.RadarTrackModel; + +import java.util.Calendar; + +public class RadarTransformUtil +{ + public static ZCHXRadar.TrackPoint modelToProtobuf(final RadarTrackModel radarTrack) { + final ZCHXRadar.TrackPoint.Builder point = ZCHXRadar.TrackPoint.newBuilder(); + point.setSystemAreaCode(1); + point.setSystemIdentificationCode(1); + point.setMessageType(ZCHXRadar.MSGTYP.TARGET_REPORT); + point.setTrackNumber(radarTrack.getTrackId()); + point.setCartesianPosX(1.0f); + point.setCartesianPosY(1.0f); + point.setWgs84PosLong(radarTrack.getLongitude()); + point.setWgs84PosLat(radarTrack.getLatitude()); + final Calendar cal = Calendar.getInstance(); + point.setTimeOfDay((float)cal.getTimeInMillis()); + point.setTrackType(ZCHXRadar.CNF.CONFIRMED_TRACK); + point.setTrackLastReport(false); + point.setCartesianTrkVelVx(1.0); + point.setCartesianTrkVelVy(1.0); + point.setCog(radarTrack.getCourse()); + point.setSog(radarTrack.getSpeed()); + point.setStatus(1); + return point.build(); + } + +} diff --git a/src/main/java/com/zhichenhaixin/util/SmuggleEhcache.java b/src/main/java/com/zhichenhaixin/util/SmuggleEhcache.java new file mode 100644 index 0000000..f4997e8 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/SmuggleEhcache.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.SmuggleVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class SmuggleEhcache +{ + public static final String CACHE_NAME = "smuggleCache"; + + public static void put(final SmuggleVo vo) { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getId(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((SmuggleVo)element.getValue()); + } + } + return result; + } + + public static SmuggleVo get(final int id) { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(id); + if (element == null) { + return null; + } + return (SmuggleVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("smuggleCache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void saveSmuggleVoCache(final List list) { + clear(); + for (final SmuggleVo vo : list) { + put(vo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/util/SurLineDataEhcache.java b/src/main/java/com/zhichenhaixin/util/SurLineDataEhcache.java new file mode 100644 index 0000000..e7f2ac5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/SurLineDataEhcache.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.SurLineInfo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class SurLineDataEhcache +{ + public static final String CACHE_NAME = "surLineDataCache"; + + public static void put(final SurLineInfo vo) { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return; + } + cache.put(new Element(vo.getId(), vo)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((SurLineInfo)element.getValue()); + } + } + return result; + } + + public static SurLineInfo get(final int id) { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return null; + } + final Element element = cache.get(id); + if (element == null) { + return null; + } + return (SurLineInfo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int id) { + final Cache cache = CacheUtil.getECache("surLineDataCache"); + if (cache == null) { + return; + } + cache.remove(id); + } + + public static void saveSurLineDataCache(final List list) { + clear(); + for (final SurLineInfo vo : list) { + put(vo); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/util/TrackAlarmEhcache.java b/src/main/java/com/zhichenhaixin/util/TrackAlarmEhcache.java new file mode 100644 index 0000000..e65190c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/TrackAlarmEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.WarnInfoBean; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class TrackAlarmEhcache +{ + public static final String CACHE_NAME = "trackAlarmEhcache"; + + public static void put(final WarnInfoBean warnInfoBean) { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(String.valueOf(warnInfoBean.getWarnSiteType()) + warnInfoBean.getObject_id(), warnInfoBean)); + } + + public static void remove(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return; + } + cache.remove(ObjectID); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((WarnInfoBean)element.getValue()); + } + } + return result; + } + + public static WarnInfoBean get(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(ObjectID); + if (element == null) { + return null; + } + return (WarnInfoBean)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("trackAlarmEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/TrackCameraEhcache.java b/src/main/java/com/zhichenhaixin/util/TrackCameraEhcache.java new file mode 100644 index 0000000..311907d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/TrackCameraEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.sys.model.TrackCameraVo; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class TrackCameraEhcache +{ + public static final String CACHE_NAME = "trackCameraEhcache"; + + public static void put(final TrackCameraVo trackCameraVo) { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(trackCameraVo.getTargetId(), trackCameraVo)); + } + + public static void remove(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return; + } + cache.remove(ObjectID); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((TrackCameraVo)element.getValue()); + } + } + return result; + } + + public static TrackCameraVo get(final String ObjectID) { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(ObjectID); + if (element == null) { + return null; + } + return (TrackCameraVo)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("trackCameraEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/TrackPointEhcache.java b/src/main/java/com/zhichenhaixin/util/TrackPointEhcache.java new file mode 100644 index 0000000..9815c5a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/TrackPointEhcache.java @@ -0,0 +1,71 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import com.zhichenhaixin.proto.ZCHXRadar; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +import java.util.ArrayList; +import java.util.List; + +public class TrackPointEhcache +{ + public static final String CACHE_NAME = "trackPointEhcache"; + + public static void put(final ZCHXRadar.TrackPoint point) { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return; + } + cache.put(new Element(point.getTrackNumber(), point)); + } + + public static List getAll() { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return null; + } + final List keys = (List)cache.getKeys(); + final int size = keys.size(); + final List result = new ArrayList(size); + for (int i = 0; i < size; ++i) { + final Element element = cache.get(keys.get(i)); + if (element != null) { + result.add((ZCHXRadar.TrackPoint)element.getValue()); + } + } + return result; + } + + public static ZCHXRadar.TrackPoint get(final int trackNum) { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return null; + } + final Element element = cache.get(trackNum); + if (element == null) { + return null; + } + return (ZCHXRadar.TrackPoint)element.getValue(); + } + + public static void clear() { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return; + } + cache.removeAll(); + } + + public static void remove(final int trackNum) { + final Cache cache = CacheUtil.getECache("trackPointEhcache"); + if (cache == null) { + return; + } + cache.remove(trackNum); + } +} diff --git a/src/main/java/com/zhichenhaixin/util/WarnAlarmCountEhcache.java b/src/main/java/com/zhichenhaixin/util/WarnAlarmCountEhcache.java new file mode 100644 index 0000000..373d675 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/util/WarnAlarmCountEhcache.java @@ -0,0 +1,42 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.util; + +import com.zhichenhaixin.base.util.CacheUtil; +import net.sf.ehcache.Cache; +import net.sf.ehcache.Element; + +public class WarnAlarmCountEhcache +{ + public static final String CACHE_NAME = "warnAlarmCountCache"; + + public static void put(final int count) { + final Cache cache = CacheUtil.getECache("warnAlarmCountCache"); + if (cache == null) { + return; + } + cache.put(new Element("warn_alarm_count", count)); + } + + public static int get() { + final Cache cache = CacheUtil.getECache("warnAlarmCountCache"); + if (cache == null) { + return 0; + } + final Element element = cache.get("warn_alarm_count"); + if (element == null) { + return 0; + } + return (int)element.getValue(); + } + + public static void remove() { + final Cache cache = CacheUtil.getECache("warnAlarmCountCache"); + if (cache == null) { + return; + } + cache.remove("warn_alarm_count"); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/RadarAisThread.java b/src/main/java/com/zhichenhaixin/zmq/RadarAisThread.java new file mode 100644 index 0000000..42fc4a7 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/RadarAisThread.java @@ -0,0 +1,45 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq; + +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.thread.ZMQServerDyData; +import com.zhichenhaixin.zmq.clean.CleanData; +import com.zhichenhaixin.zmq.receive.ReceiveAISHandle; +import com.zhichenhaixin.zmq.receive.ReceiveRadarHandle; +import com.zhichenhaixin.zmq.searh.ZMQServerYd; +import com.zhichenhaixin.zmq.send.SendRadarRealTimeData; +import org.apache.log4j.Logger; + +public class RadarAisThread extends Thread +{ + private static Logger log; + + static { + RadarAisThread.log = Logger.getLogger(RadarAisThread.class); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + try { + HBaseClient.getInstance().initHBase(); + ZMQServerDyData.getZMQPUB().initZMQServerDy(); + new ReceiveAISHandle().start(); + new ReceiveRadarHandle().start(); + new SendRadarRealTimeData().start(); + new ZMQServerYd().start(); + new CleanData().start(); + RadarAisThread.log.info("-> radar or ais running is ok ..."); + } + catch (Exception e) { + RadarAisThread.log.error("\u521d\u59cb\u5316\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/clean/CleanData.java b/src/main/java/com/zhichenhaixin/zmq/clean/CleanData.java new file mode 100644 index 0000000..2875dc3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/clean/CleanData.java @@ -0,0 +1,96 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.clean; + +import com.mongodb.DBObject; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.fusedata.MongoUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import org.apache.log4j.Logger; + +import java.util.List; + +public class CleanData extends Thread +{ + Logger log; + static Integer minuteClean; + static long time_ms; + + static { + CleanData.minuteClean = Integer.valueOf(SpringPropertyUtil.getProperty("minuteClean")); + CleanData.time_ms = CleanData.minuteClean * 60 * 1000; + } + + public CleanData() { + this.log = Logger.getLogger(CleanData.class); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + final long nowTime = System.currentTimeMillis(); + this.cleanAISTracks("AIS_Track", nowTime); + this.cleanRadarTracks("Radar_Track", nowTime); + this.cleanVideoWarnTracks("VideoWarn_Track", nowTime); + this.cleanGPSTracks("gps_Track", nowTime); + Thread.sleep(CleanData.time_ms); + } + catch (Exception e) { + this.log.error("\u5b9a\u65f6\u6e05\u7406\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void cleanAISTracks(final String name, final long nowTime) { + final List dbList = MongoUtil.getInstance().selectAllByField(name, "_id", "time"); + for (final DBObject db : dbList) { + final Long theTime = (Long)db.get("time"); + if (theTime != null && nowTime - CleanData.time_ms > theTime) { + final String id = (String)db.get("_id"); + MongoUtil.getInstance().deleteByPrimaryKey(name, id); + } + } + } + + public void cleanRadarTracks(final String name, final long nowTime) { + final List dbList = MongoUtil.getInstance().selectAllByField(name, "_id", "time"); + for (final DBObject db : dbList) { + final Long theTime = (Long)db.get("time"); + if (theTime != null && nowTime - CleanData.time_ms > theTime) { + final String id = (String)db.get("_id"); + MongoUtil.getInstance().deleteByPrimaryKey(name, id); + HBaseClient.getInstance().deleteRadarById(id); + } + } + } + + public void cleanVideoWarnTracks(final String name, final long nowTime) { + final List dbList = MongoUtil.getInstance().selectAllByField(name, "_id", "time"); + for (final DBObject db : dbList) { + final Long theTime = (Long)db.get("time"); + if (theTime != null && nowTime - CleanData.time_ms > theTime) { + final String id = (String)db.get("_id"); + MongoUtil.getInstance().deleteByPrimaryKey(name, id); + } + } + } + + public void cleanGPSTracks(final String name, final long nowTime) { + final List dbList = MongoUtil.getInstance().selectAllByField(name, "_id", "time"); + for (final DBObject db : dbList) { + final Long theTime = (Long)db.get("time"); + if (theTime != null && nowTime - CleanData.time_ms > theTime) { + final String id = (String)db.get("_id"); + MongoUtil.getInstance().deleteByPrimaryKey(name, id); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/model/AISData.java b/src/main/java/com/zhichenhaixin/zmq/model/AISData.java new file mode 100644 index 0000000..531dc7a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/model/AISData.java @@ -0,0 +1,491 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class AISData implements Serializable +{ + private static final long serialVersionUID = 5364964513609202710L; + private int id; + private int mmsi; + private String shiptype; + private String navStatus; + private double rot; + private double sog; + private double lon; + private double lat; + private double cog; + private double heading; + private int imo; + private String callSign; + private String shipName; + private String cargoType; + private String country; + private int shipLength; + private int shipWidth; + private int toBow; + private int toStern; + private int toPort; + private int toStarboard; + private String eta; + private double draught; + private String dest; + private long utc; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AISData)) { + return false; + } + final AISData other = (AISData)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getId() != other.getId()) { + return false; + } + if (this.getMmsi() != other.getMmsi()) { + return false; + } + final Object this$shiptype = this.getShiptype(); + final Object other$shiptype = other.getShiptype(); + Label_0091: { + if (this$shiptype == null) { + if (other$shiptype == null) { + break Label_0091; + } + } + else if (this$shiptype.equals(other$shiptype)) { + break Label_0091; + } + return false; + } + final Object this$navStatus = this.getNavStatus(); + final Object other$navStatus = other.getNavStatus(); + Label_0128: { + if (this$navStatus == null) { + if (other$navStatus == null) { + break Label_0128; + } + } + else if (this$navStatus.equals(other$navStatus)) { + break Label_0128; + } + return false; + } + if (Double.compare(this.getRot(), other.getRot()) != 0) { + return false; + } + if (Double.compare(this.getSog(), other.getSog()) != 0) { + return false; + } + if (Double.compare(this.getLon(), other.getLon()) != 0) { + return false; + } + if (Double.compare(this.getLat(), other.getLat()) != 0) { + return false; + } + if (Double.compare(this.getCog(), other.getCog()) != 0) { + return false; + } + if (Double.compare(this.getHeading(), other.getHeading()) != 0) { + return false; + } + if (this.getImo() != other.getImo()) { + return false; + } + final Object this$callSign = this.getCallSign(); + final Object other$callSign = other.getCallSign(); + Label_0274: { + if (this$callSign == null) { + if (other$callSign == null) { + break Label_0274; + } + } + else if (this$callSign.equals(other$callSign)) { + break Label_0274; + } + return false; + } + final Object this$shipName = this.getShipName(); + final Object other$shipName = other.getShipName(); + Label_0311: { + if (this$shipName == null) { + if (other$shipName == null) { + break Label_0311; + } + } + else if (this$shipName.equals(other$shipName)) { + break Label_0311; + } + return false; + } + final Object this$cargoType = this.getCargoType(); + final Object other$cargoType = other.getCargoType(); + Label_0348: { + if (this$cargoType == null) { + if (other$cargoType == null) { + break Label_0348; + } + } + else if (this$cargoType.equals(other$cargoType)) { + break Label_0348; + } + return false; + } + final Object this$country = this.getCountry(); + final Object other$country = other.getCountry(); + Label_0385: { + if (this$country == null) { + if (other$country == null) { + break Label_0385; + } + } + else if (this$country.equals(other$country)) { + break Label_0385; + } + return false; + } + if (this.getShipLength() != other.getShipLength()) { + return false; + } + if (this.getShipWidth() != other.getShipWidth()) { + return false; + } + if (this.getToBow() != other.getToBow()) { + return false; + } + if (this.getToStern() != other.getToStern()) { + return false; + } + if (this.getToPort() != other.getToPort()) { + return false; + } + if (this.getToStarboard() != other.getToStarboard()) { + return false; + } + final Object this$eta = this.getEta(); + final Object other$eta = other.getEta(); + Label_0500: { + if (this$eta == null) { + if (other$eta == null) { + break Label_0500; + } + } + else if (this$eta.equals(other$eta)) { + break Label_0500; + } + return false; + } + if (Double.compare(this.getDraught(), other.getDraught()) != 0) { + return false; + } + final Object this$dest = this.getDest(); + final Object other$dest = other.getDest(); + if (this$dest == null) { + if (other$dest == null) { + return this.getUtc() == other.getUtc(); + } + } + else if (this$dest.equals(other$dest)) { + return this.getUtc() == other.getUtc(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof AISData; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getId(); + result = result * 59 + this.getMmsi(); + final Object $shiptype = this.getShiptype(); + result = result * 59 + (($shiptype == null) ? 43 : $shiptype.hashCode()); + final Object $navStatus = this.getNavStatus(); + result = result * 59 + (($navStatus == null) ? 43 : $navStatus.hashCode()); + final long $rot = Double.doubleToLongBits(this.getRot()); + result = result * 59 + (int)($rot ^ $rot >>> 32); + final long $sog = Double.doubleToLongBits(this.getSog()); + result = result * 59 + (int)($sog ^ $sog >>> 32); + final long $lon = Double.doubleToLongBits(this.getLon()); + result = result * 59 + (int)($lon ^ $lon >>> 32); + final long $lat = Double.doubleToLongBits(this.getLat()); + result = result * 59 + (int)($lat ^ $lat >>> 32); + final long $cog = Double.doubleToLongBits(this.getCog()); + result = result * 59 + (int)($cog ^ $cog >>> 32); + final long $heading = Double.doubleToLongBits(this.getHeading()); + result = result * 59 + (int)($heading ^ $heading >>> 32); + result = result * 59 + this.getImo(); + final Object $callSign = this.getCallSign(); + result = result * 59 + (($callSign == null) ? 43 : $callSign.hashCode()); + final Object $shipName = this.getShipName(); + result = result * 59 + (($shipName == null) ? 43 : $shipName.hashCode()); + final Object $cargoType = this.getCargoType(); + result = result * 59 + (($cargoType == null) ? 43 : $cargoType.hashCode()); + final Object $country = this.getCountry(); + result = result * 59 + (($country == null) ? 43 : $country.hashCode()); + result = result * 59 + this.getShipLength(); + result = result * 59 + this.getShipWidth(); + result = result * 59 + this.getToBow(); + result = result * 59 + this.getToStern(); + result = result * 59 + this.getToPort(); + result = result * 59 + this.getToStarboard(); + final Object $eta = this.getEta(); + result = result * 59 + (($eta == null) ? 43 : $eta.hashCode()); + final long $draught = Double.doubleToLongBits(this.getDraught()); + result = result * 59 + (int)($draught ^ $draught >>> 32); + final Object $dest = this.getDest(); + result = result * 59 + (($dest == null) ? 43 : $dest.hashCode()); + final long $utc = this.getUtc(); + result = result * 59 + (int)($utc ^ $utc >>> 32); + return result; + } + + @Override + public String toString() { + return "AISData(id=" + this.getId() + ", mmsi=" + this.getMmsi() + ", shiptype=" + this.getShiptype() + ", navStatus=" + this.getNavStatus() + ", rot=" + this.getRot() + ", sog=" + this.getSog() + ", lon=" + this.getLon() + ", lat=" + this.getLat() + ", cog=" + this.getCog() + ", heading=" + this.getHeading() + ", imo=" + this.getImo() + ", callSign=" + this.getCallSign() + ", shipName=" + this.getShipName() + ", cargoType=" + this.getCargoType() + ", country=" + this.getCountry() + ", shipLength=" + this.getShipLength() + ", shipWidth=" + this.getShipWidth() + ", toBow=" + this.getToBow() + ", toStern=" + this.getToStern() + ", toPort=" + this.getToPort() + ", toStarboard=" + this.getToStarboard() + ", eta=" + this.getEta() + ", draught=" + this.getDraught() + ", dest=" + this.getDest() + ", utc=" + this.getUtc() + ")"; + } + + public void setId(final int id) { + this.id = id; + } + + public void setMmsi(final int mmsi) { + this.mmsi = mmsi; + } + + public void setShiptype(final String shiptype) { + this.shiptype = shiptype; + } + + public void setNavStatus(final String navStatus) { + this.navStatus = navStatus; + } + + public void setRot(final double rot) { + this.rot = rot; + } + + public void setSog(final double sog) { + this.sog = sog; + } + + public void setLon(final double lon) { + this.lon = lon; + } + + public void setLat(final double lat) { + this.lat = lat; + } + + public void setCog(final double cog) { + this.cog = cog; + } + + public void setHeading(final double heading) { + this.heading = heading; + } + + public void setImo(final int imo) { + this.imo = imo; + } + + public void setCallSign(final String callSign) { + this.callSign = callSign; + } + + public void setShipName(final String shipName) { + this.shipName = shipName; + } + + public void setCargoType(final String cargoType) { + this.cargoType = cargoType; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setShipLength(final int shipLength) { + this.shipLength = shipLength; + } + + public void setShipWidth(final int shipWidth) { + this.shipWidth = shipWidth; + } + + public void setToBow(final int toBow) { + this.toBow = toBow; + } + + public void setToStern(final int toStern) { + this.toStern = toStern; + } + + public void setToPort(final int toPort) { + this.toPort = toPort; + } + + public void setToStarboard(final int toStarboard) { + this.toStarboard = toStarboard; + } + + public void setEta(final String eta) { + this.eta = eta; + } + + public void setDraught(final double draught) { + this.draught = draught; + } + + public void setDest(final String dest) { + this.dest = dest; + } + + public void setUtc(final long utc) { + this.utc = utc; + } + + public int getId() { + return this.id; + } + + public int getMmsi() { + return this.mmsi; + } + + public String getShiptype() { + return this.shiptype; + } + + public String getNavStatus() { + return this.navStatus; + } + + public double getRot() { + return this.rot; + } + + public double getSog() { + return this.sog; + } + + public double getLon() { + return this.lon; + } + + public double getLat() { + return this.lat; + } + + public double getCog() { + return this.cog; + } + + public double getHeading() { + return this.heading; + } + + public int getImo() { + return this.imo; + } + + public String getCallSign() { + return this.callSign; + } + + public String getShipName() { + return this.shipName; + } + + public String getCargoType() { + return this.cargoType; + } + + public String getCountry() { + return this.country; + } + + public int getShipLength() { + return this.shipLength; + } + + public int getShipWidth() { + return this.shipWidth; + } + + public int getToBow() { + return this.toBow; + } + + public int getToStern() { + return this.toStern; + } + + public int getToPort() { + return this.toPort; + } + + public int getToStarboard() { + return this.toStarboard; + } + + public String getEta() { + return this.eta; + } + + public double getDraught() { + return this.draught; + } + + public String getDest() { + return this.dest; + } + + public long getUtc() { + return this.utc; + } + + @ConstructorProperties({ "id", "mmsi", "shiptype", "navStatus", "rot", "sog", "lon", "lat", "cog", "heading", "imo", "callSign", "shipName", "cargoType", "country", "shipLength", "shipWidth", "toBow", "toStern", "toPort", "toStarboard", "eta", "draught", "dest", "utc" }) + public AISData(final int id, final int mmsi, final String shiptype, final String navStatus, final double rot, final double sog, final double lon, final double lat, final double cog, final double heading, final int imo, final String callSign, final String shipName, final String cargoType, final String country, final int shipLength, final int shipWidth, final int toBow, final int toStern, final int toPort, final int toStarboard, final String eta, final double draught, final String dest, final long utc) { + this.id = id; + this.mmsi = mmsi; + this.shiptype = shiptype; + this.navStatus = navStatus; + this.rot = rot; + this.sog = sog; + this.lon = lon; + this.lat = lat; + this.cog = cog; + this.heading = heading; + this.imo = imo; + this.callSign = callSign; + this.shipName = shipName; + this.cargoType = cargoType; + this.country = country; + this.shipLength = shipLength; + this.shipWidth = shipWidth; + this.toBow = toBow; + this.toStern = toStern; + this.toPort = toPort; + this.toStarboard = toStarboard; + this.eta = eta; + this.draught = draught; + this.dest = dest; + this.utc = utc; + } + + public AISData() { + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/model/RadarHeadInfo.java b/src/main/java/com/zhichenhaixin/zmq/model/RadarHeadInfo.java new file mode 100644 index 0000000..a1efec3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/model/RadarHeadInfo.java @@ -0,0 +1,61 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.model; + +public class RadarHeadInfo +{ + public static RadarHeadInfo radarHead; + public int flag; + public String sourceId; + public long utc; + public int length; + + static { + RadarHeadInfo.radarHead = new RadarHeadInfo(); + } + + public RadarHeadInfo() { + this.flag = 0; + this.sourceId = null; + this.utc = 0L; + this.length = 0; + } + + public static RadarHeadInfo getRadarHead() { + return RadarHeadInfo.radarHead; + } + + public int getFlag() { + return this.flag; + } + + public void setFlag(final int flag) { + this.flag = flag; + } + + public String getSourceId() { + return this.sourceId; + } + + public void setSourceId(final String sourceId) { + this.sourceId = sourceId; + } + + public long getUtc() { + return this.utc; + } + + public void setUtc(final long utc) { + this.utc = utc; + } + + public int getLength() { + return this.length; + } + + public void setLength(final int length) { + this.length = length; + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/model/RadarInfo.java b/src/main/java/com/zhichenhaixin/zmq/model/RadarInfo.java new file mode 100644 index 0000000..5dbf451 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/model/RadarInfo.java @@ -0,0 +1,469 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.model; + +import java.beans.ConstructorProperties; +import java.io.Serializable; + +public class RadarInfo implements Serializable +{ + private static final long serialVersionUID = 3066223389819963233L; + private int sysAreaCode; + private int sysId; + private int messageType; + private int trackNumber; + private double cartesianPosx; + private double cartesianPosy; + private double wgs84PosLon; + private double wgs84PosLat; + private double timeofDay; + private int trackType; + private boolean trackLastReport; + private int extraPolation; + private int trackPosCode; + private double sigmaX; + private double sigmaY; + private double sigmaXY; + private double ampofPriplot; + private double cartesianTrkvelVx; + private double cartesianTrkvelVy; + private double cog; + private double sog; + private int status; + private int isSmuggle; + private double distance; + private String warnColor; + private int targetType; + private double nodeNum; + private double course; + private int isWarn; + + @Override + public boolean equals(final Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RadarInfo)) { + return false; + } + final RadarInfo other = (RadarInfo)o; + if (!other.canEqual(this)) { + return false; + } + if (this.getSysAreaCode() != other.getSysAreaCode()) { + return false; + } + if (this.getSysId() != other.getSysId()) { + return false; + } + if (this.getMessageType() != other.getMessageType()) { + return false; + } + if (this.getTrackNumber() != other.getTrackNumber()) { + return false; + } + if (Double.compare(this.getCartesianPosx(), other.getCartesianPosx()) != 0) { + return false; + } + if (Double.compare(this.getCartesianPosy(), other.getCartesianPosy()) != 0) { + return false; + } + if (Double.compare(this.getWgs84PosLon(), other.getWgs84PosLon()) != 0) { + return false; + } + if (Double.compare(this.getWgs84PosLat(), other.getWgs84PosLat()) != 0) { + return false; + } + if (Double.compare(this.getTimeofDay(), other.getTimeofDay()) != 0) { + return false; + } + if (this.getTrackType() != other.getTrackType()) { + return false; + } + if (this.isTrackLastReport() != other.isTrackLastReport()) { + return false; + } + if (this.getExtraPolation() != other.getExtraPolation()) { + return false; + } + if (this.getTrackPosCode() != other.getTrackPosCode()) { + return false; + } + if (Double.compare(this.getSigmaX(), other.getSigmaX()) != 0) { + return false; + } + if (Double.compare(this.getSigmaY(), other.getSigmaY()) != 0) { + return false; + } + if (Double.compare(this.getSigmaXY(), other.getSigmaXY()) != 0) { + return false; + } + if (Double.compare(this.getAmpofPriplot(), other.getAmpofPriplot()) != 0) { + return false; + } + if (Double.compare(this.getCartesianTrkvelVx(), other.getCartesianTrkvelVx()) != 0) { + return false; + } + if (Double.compare(this.getCartesianTrkvelVy(), other.getCartesianTrkvelVy()) != 0) { + return false; + } + if (Double.compare(this.getCog(), other.getCog()) != 0) { + return false; + } + if (Double.compare(this.getSog(), other.getSog()) != 0) { + return false; + } + if (this.getStatus() != other.getStatus()) { + return false; + } + if (this.getIsSmuggle() != other.getIsSmuggle()) { + return false; + } + if (Double.compare(this.getDistance(), other.getDistance()) != 0) { + return false; + } + final Object this$warnColor = this.getWarnColor(); + final Object other$warnColor = other.getWarnColor(); + if (this$warnColor == null) { + if (other$warnColor == null) { + return this.getTargetType() == other.getTargetType() && Double.compare(this.getNodeNum(), other.getNodeNum()) == 0 && Double.compare(this.getCourse(), other.getCourse()) == 0 && this.getIsWarn() == other.getIsWarn(); + } + } + else if (this$warnColor.equals(other$warnColor)) { + return this.getTargetType() == other.getTargetType() && Double.compare(this.getNodeNum(), other.getNodeNum()) == 0 && Double.compare(this.getCourse(), other.getCourse()) == 0 && this.getIsWarn() == other.getIsWarn(); + } + return false; + } + + protected boolean canEqual(final Object other) { + return other instanceof RadarInfo; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * 59 + this.getSysAreaCode(); + result = result * 59 + this.getSysId(); + result = result * 59 + this.getMessageType(); + result = result * 59 + this.getTrackNumber(); + final long $cartesianPosx = Double.doubleToLongBits(this.getCartesianPosx()); + result = result * 59 + (int)($cartesianPosx ^ $cartesianPosx >>> 32); + final long $cartesianPosy = Double.doubleToLongBits(this.getCartesianPosy()); + result = result * 59 + (int)($cartesianPosy ^ $cartesianPosy >>> 32); + final long $wgs84PosLon = Double.doubleToLongBits(this.getWgs84PosLon()); + result = result * 59 + (int)($wgs84PosLon ^ $wgs84PosLon >>> 32); + final long $wgs84PosLat = Double.doubleToLongBits(this.getWgs84PosLat()); + result = result * 59 + (int)($wgs84PosLat ^ $wgs84PosLat >>> 32); + final long $timeofDay = Double.doubleToLongBits(this.getTimeofDay()); + result = result * 59 + (int)($timeofDay ^ $timeofDay >>> 32); + result = result * 59 + this.getTrackType(); + result = result * 59 + (this.isTrackLastReport() ? 79 : 97); + result = result * 59 + this.getExtraPolation(); + result = result * 59 + this.getTrackPosCode(); + final long $sigmaX = Double.doubleToLongBits(this.getSigmaX()); + result = result * 59 + (int)($sigmaX ^ $sigmaX >>> 32); + final long $sigmaY = Double.doubleToLongBits(this.getSigmaY()); + result = result * 59 + (int)($sigmaY ^ $sigmaY >>> 32); + final long $sigmaXY = Double.doubleToLongBits(this.getSigmaXY()); + result = result * 59 + (int)($sigmaXY ^ $sigmaXY >>> 32); + final long $ampofPriplot = Double.doubleToLongBits(this.getAmpofPriplot()); + result = result * 59 + (int)($ampofPriplot ^ $ampofPriplot >>> 32); + final long $cartesianTrkvelVx = Double.doubleToLongBits(this.getCartesianTrkvelVx()); + result = result * 59 + (int)($cartesianTrkvelVx ^ $cartesianTrkvelVx >>> 32); + final long $cartesianTrkvelVy = Double.doubleToLongBits(this.getCartesianTrkvelVy()); + result = result * 59 + (int)($cartesianTrkvelVy ^ $cartesianTrkvelVy >>> 32); + final long $cog = Double.doubleToLongBits(this.getCog()); + result = result * 59 + (int)($cog ^ $cog >>> 32); + final long $sog = Double.doubleToLongBits(this.getSog()); + result = result * 59 + (int)($sog ^ $sog >>> 32); + result = result * 59 + this.getStatus(); + result = result * 59 + this.getIsSmuggle(); + final long $distance = Double.doubleToLongBits(this.getDistance()); + result = result * 59 + (int)($distance ^ $distance >>> 32); + final Object $warnColor = this.getWarnColor(); + result = result * 59 + (($warnColor == null) ? 43 : $warnColor.hashCode()); + result = result * 59 + this.getTargetType(); + final long $nodeNum = Double.doubleToLongBits(this.getNodeNum()); + result = result * 59 + (int)($nodeNum ^ $nodeNum >>> 32); + final long $course = Double.doubleToLongBits(this.getCourse()); + result = result * 59 + (int)($course ^ $course >>> 32); + result = result * 59 + this.getIsWarn(); + return result; + } + + @Override + public String toString() { + return "RadarInfo(sysAreaCode=" + this.getSysAreaCode() + ", sysId=" + this.getSysId() + ", messageType=" + this.getMessageType() + ", trackNumber=" + this.getTrackNumber() + ", cartesianPosx=" + this.getCartesianPosx() + ", cartesianPosy=" + this.getCartesianPosy() + ", wgs84PosLon=" + this.getWgs84PosLon() + ", wgs84PosLat=" + this.getWgs84PosLat() + ", timeofDay=" + this.getTimeofDay() + ", trackType=" + this.getTrackType() + ", trackLastReport=" + this.isTrackLastReport() + ", extraPolation=" + this.getExtraPolation() + ", trackPosCode=" + this.getTrackPosCode() + ", sigmaX=" + this.getSigmaX() + ", sigmaY=" + this.getSigmaY() + ", sigmaXY=" + this.getSigmaXY() + ", ampofPriplot=" + this.getAmpofPriplot() + ", cartesianTrkvelVx=" + this.getCartesianTrkvelVx() + ", cartesianTrkvelVy=" + this.getCartesianTrkvelVy() + ", cog=" + this.getCog() + ", sog=" + this.getSog() + ", status=" + this.getStatus() + ", isSmuggle=" + this.getIsSmuggle() + ", distance=" + this.getDistance() + ", warnColor=" + this.getWarnColor() + ", targetType=" + this.getTargetType() + ", nodeNum=" + this.getNodeNum() + ", course=" + this.getCourse() + ", isWarn=" + this.getIsWarn() + ")"; + } + + public void setSysAreaCode(final int sysAreaCode) { + this.sysAreaCode = sysAreaCode; + } + + public void setSysId(final int sysId) { + this.sysId = sysId; + } + + public void setMessageType(final int messageType) { + this.messageType = messageType; + } + + public void setTrackNumber(final int trackNumber) { + this.trackNumber = trackNumber; + } + + public void setCartesianPosx(final double cartesianPosx) { + this.cartesianPosx = cartesianPosx; + } + + public void setCartesianPosy(final double cartesianPosy) { + this.cartesianPosy = cartesianPosy; + } + + public void setWgs84PosLon(final double wgs84PosLon) { + this.wgs84PosLon = wgs84PosLon; + } + + public void setWgs84PosLat(final double wgs84PosLat) { + this.wgs84PosLat = wgs84PosLat; + } + + public void setTimeofDay(final double timeofDay) { + this.timeofDay = timeofDay; + } + + public void setTrackType(final int trackType) { + this.trackType = trackType; + } + + public void setTrackLastReport(final boolean trackLastReport) { + this.trackLastReport = trackLastReport; + } + + public void setExtraPolation(final int extraPolation) { + this.extraPolation = extraPolation; + } + + public void setTrackPosCode(final int trackPosCode) { + this.trackPosCode = trackPosCode; + } + + public void setSigmaX(final double sigmaX) { + this.sigmaX = sigmaX; + } + + public void setSigmaY(final double sigmaY) { + this.sigmaY = sigmaY; + } + + public void setSigmaXY(final double sigmaXY) { + this.sigmaXY = sigmaXY; + } + + public void setAmpofPriplot(final double ampofPriplot) { + this.ampofPriplot = ampofPriplot; + } + + public void setCartesianTrkvelVx(final double cartesianTrkvelVx) { + this.cartesianTrkvelVx = cartesianTrkvelVx; + } + + public void setCartesianTrkvelVy(final double cartesianTrkvelVy) { + this.cartesianTrkvelVy = cartesianTrkvelVy; + } + + public void setCog(final double cog) { + this.cog = cog; + } + + public void setSog(final double sog) { + this.sog = sog; + } + + public void setStatus(final int status) { + this.status = status; + } + + public void setIsSmuggle(final int isSmuggle) { + this.isSmuggle = isSmuggle; + } + + public void setDistance(final double distance) { + this.distance = distance; + } + + public void setWarnColor(final String warnColor) { + this.warnColor = warnColor; + } + + public void setTargetType(final int targetType) { + this.targetType = targetType; + } + + public void setNodeNum(final double nodeNum) { + this.nodeNum = nodeNum; + } + + public void setCourse(final double course) { + this.course = course; + } + + public void setIsWarn(final int isWarn) { + this.isWarn = isWarn; + } + + public int getSysAreaCode() { + return this.sysAreaCode; + } + + public int getSysId() { + return this.sysId; + } + + public int getMessageType() { + return this.messageType; + } + + public int getTrackNumber() { + return this.trackNumber; + } + + public double getCartesianPosx() { + return this.cartesianPosx; + } + + public double getCartesianPosy() { + return this.cartesianPosy; + } + + public double getWgs84PosLon() { + return this.wgs84PosLon; + } + + public double getWgs84PosLat() { + return this.wgs84PosLat; + } + + public double getTimeofDay() { + return this.timeofDay; + } + + public int getTrackType() { + return this.trackType; + } + + public boolean isTrackLastReport() { + return this.trackLastReport; + } + + public int getExtraPolation() { + return this.extraPolation; + } + + public int getTrackPosCode() { + return this.trackPosCode; + } + + public double getSigmaX() { + return this.sigmaX; + } + + public double getSigmaY() { + return this.sigmaY; + } + + public double getSigmaXY() { + return this.sigmaXY; + } + + public double getAmpofPriplot() { + return this.ampofPriplot; + } + + public double getCartesianTrkvelVx() { + return this.cartesianTrkvelVx; + } + + public double getCartesianTrkvelVy() { + return this.cartesianTrkvelVy; + } + + public double getCog() { + return this.cog; + } + + public double getSog() { + return this.sog; + } + + public int getStatus() { + return this.status; + } + + public int getIsSmuggle() { + return this.isSmuggle; + } + + public double getDistance() { + return this.distance; + } + + public String getWarnColor() { + return this.warnColor; + } + + public int getTargetType() { + return this.targetType; + } + + public double getNodeNum() { + return this.nodeNum; + } + + public double getCourse() { + return this.course; + } + + public int getIsWarn() { + return this.isWarn; + } + + @ConstructorProperties({ "sysAreaCode", "sysId", "messageType", "trackNumber", "cartesianPosx", "cartesianPosy", "wgs84PosLon", "wgs84PosLat", "timeofDay", "trackType", "trackLastReport", "extraPolation", "trackPosCode", "sigmaX", "sigmaY", "sigmaXY", "ampofPriplot", "cartesianTrkvelVx", "cartesianTrkvelVy", "cog", "sog", "status", "isSmuggle", "distance", "warnColor", "targetType", "nodeNum", "course", "isWarn" }) + public RadarInfo(final int sysAreaCode, final int sysId, final int messageType, final int trackNumber, final double cartesianPosx, final double cartesianPosy, final double wgs84PosLon, final double wgs84PosLat, final double timeofDay, final int trackType, final boolean trackLastReport, final int extraPolation, final int trackPosCode, final double sigmaX, final double sigmaY, final double sigmaXY, final double ampofPriplot, final double cartesianTrkvelVx, final double cartesianTrkvelVy, final double cog, final double sog, final int status, final int isSmuggle, final double distance, final String warnColor, final int targetType, final double nodeNum, final double course, final int isWarn) { + this.sysAreaCode = sysAreaCode; + this.sysId = sysId; + this.messageType = messageType; + this.trackNumber = trackNumber; + this.cartesianPosx = cartesianPosx; + this.cartesianPosy = cartesianPosy; + this.wgs84PosLon = wgs84PosLon; + this.wgs84PosLat = wgs84PosLat; + this.timeofDay = timeofDay; + this.trackType = trackType; + this.trackLastReport = trackLastReport; + this.extraPolation = extraPolation; + this.trackPosCode = trackPosCode; + this.sigmaX = sigmaX; + this.sigmaY = sigmaY; + this.sigmaXY = sigmaXY; + this.ampofPriplot = ampofPriplot; + this.cartesianTrkvelVx = cartesianTrkvelVx; + this.cartesianTrkvelVy = cartesianTrkvelVy; + this.cog = cog; + this.sog = sog; + this.status = status; + this.isSmuggle = isSmuggle; + this.distance = distance; + this.warnColor = warnColor; + this.targetType = targetType; + this.nodeNum = nodeNum; + this.course = course; + this.isWarn = isWarn; + } + + public RadarInfo() { + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/model/RadarInfoUtil.java b/src/main/java/com/zhichenhaixin/zmq/model/RadarInfoUtil.java new file mode 100644 index 0000000..e8a097a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/model/RadarInfoUtil.java @@ -0,0 +1,212 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.model; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.mongodb.DBObject; +import com.zhichenhaixin.base.util.DistanceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.cache.util.RadarFalseAlarmEhcache; +import com.zhichenhaixin.cache.util.TrackPointEhcache; +import com.zhichenhaixin.fusedata.MongoUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.zmq.receive.ReceiveRadarHandle; +import org.apache.log4j.Logger; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class RadarInfoUtil +{ + public static String second; + private static Logger log; + public static Map falseAlarmCount; + public static Map radarWarnCount; + public static Map reMsg; + static Integer radarFalseAlarmDistance; + static Integer minSpeed; + static Integer oneLineSpeed; + static Integer warnTimes; + + static { + RadarInfoUtil.second = SpringPropertyUtil.getProperty("radar.sendSecond"); + RadarInfoUtil.log = Logger.getLogger(RadarInfoUtil.class); + RadarInfoUtil.falseAlarmCount = new ConcurrentHashMap(); + RadarInfoUtil.radarWarnCount = new ConcurrentHashMap(); + RadarInfoUtil.reMsg = new ConcurrentHashMap(); + RadarInfoUtil.radarFalseAlarmDistance = Integer.valueOf(SpringPropertyUtil.getProperty("radarFalseAlarmDistance")); + RadarInfoUtil.minSpeed = Integer.valueOf(SpringPropertyUtil.getProperty("minSpeed")); + RadarInfoUtil.oneLineSpeed = Integer.valueOf(SpringPropertyUtil.getProperty("oneLineSpeed")); + RadarInfoUtil.warnTimes = Integer.valueOf(SpringPropertyUtil.getProperty("warnTimes")); + } + + public static RadarInfo covert(final ZCHXRadar.TrackPoint point) { + final RadarInfo radarInfo = new RadarInfo(); + radarInfo.setSysAreaCode(point.getSystemAreaCode()); + radarInfo.setSysId(point.getSystemIdentificationCode()); + radarInfo.setMessageType(point.getMessageType().getNumber()); + radarInfo.setTrackNumber(point.getTrackNumber()); + radarInfo.setCartesianPosx(point.getCartesianPosX()); + radarInfo.setCartesianPosy(point.getCartesianPosY()); + radarInfo.setWgs84PosLon(point.getWgs84PosLong()); + radarInfo.setWgs84PosLat(point.getWgs84PosLat()); + radarInfo.setTimeofDay(point.getTimeOfDay()); + radarInfo.setTrackType(point.getTrackType().getNumber()); + radarInfo.setTrackLastReport(point.getTrackLastReport()); + radarInfo.setExtraPolation(point.getExtrapolation().getNumber()); + radarInfo.setTrackPosCode(point.getTrackPositionCode().getNumber()); + radarInfo.setSigmaX(point.getSigmaX()); + radarInfo.setSigmaY(point.getSigmaY()); + radarInfo.setSigmaXY(point.getSigmaXY()); + radarInfo.setAmpofPriplot(point.getAmpOfPriPlot()); + radarInfo.setCartesianTrkvelVx(point.getCartesianTrkVelVx()); + radarInfo.setCartesianTrkvelVy(point.getCartesianTrkVelVy()); + radarInfo.setCog(point.getCog()); + radarInfo.setSog(point.getSog()); + return radarInfo; + } + + public static RadarTrackVo covertPointToVo(final ZCHXRadar.TrackPoint point) { + final RadarTrackVo radarTrack = new RadarTrackVo(); + radarTrack.setSysAreaCode(point.getSystemAreaCode()); + radarTrack.setSysId(point.getSystemIdentificationCode()); + radarTrack.setMessageType(point.getMessageType().getNumber()); + radarTrack.setTrackNumber(point.getTrackNumber()); + radarTrack.setCartesianPosx(point.getCartesianPosX()); + radarTrack.setCartesianPosy(point.getCartesianPosY()); + radarTrack.setWgs84PosLon(point.getWgs84PosLong()); + radarTrack.setWgs84PosLat(point.getWgs84PosLat()); + radarTrack.setTimeofDay(point.getTimeOfDay()); + radarTrack.setTrackType(point.getTrackType().getNumber()); + radarTrack.setTrackLastReport(point.getTrackLastReport()); + radarTrack.setExtraPolation(point.getExtrapolation().getNumber()); + radarTrack.setTrackPosCode(point.getTrackPositionCode().getNumber()); + radarTrack.setSigmaX(point.getSigmaX()); + radarTrack.setSigmaY(point.getSigmaY()); + radarTrack.setSigmaXY(point.getSigmaXY()); + radarTrack.setAmpofPriplot(point.getAmpOfPriPlot()); + radarTrack.setCartesianTrkvelVx(point.getCartesianTrkVelVx()); + radarTrack.setCartesianTrkvelVy(point.getCartesianTrkVelVy()); + radarTrack.setCog(point.getCog()); + radarTrack.setSog(point.getSog()); + return radarTrack; + } + + public static ZCHXRadar.TrackPoint radarParesProto(final RadarTrackVo radarTrackVo) { + final ZCHXRadar.TrackPoint.Builder point = ZCHXRadar.TrackPoint.newBuilder(); + point.setSystemAreaCode(radarTrackVo.getSysAreaCode()); + point.setSystemIdentificationCode(radarTrackVo.getSysId()); + point.setMessageType(ZCHXRadar.MSGTYP.valueOf(String.valueOf(radarTrackVo.getMessageType()))); + point.setTrackNumber(radarTrackVo.getTrackNumber()); + point.setCartesianPosX(radarTrackVo.getCartesianPosx()); + point.setCartesianPosY(radarTrackVo.getCartesianPosy()); + point.setWgs84PosLong(radarTrackVo.getWgs84PosLon()); + point.setWgs84PosLat(radarTrackVo.getWgs84PosLat()); + point.setTimeOfDay(radarTrackVo.getTimeofDay()); + point.setTrackType(ZCHXRadar.CNF.valueOf(String.valueOf(radarTrackVo.getTrackType()))); + point.setTrackLastReport(radarTrackVo.getTrackLastReport()); + point.setExtrapolation(ZCHXRadar.CST.valueOf(String.valueOf(radarTrackVo.getExtraPolation()))); + point.setTrackPositionCode(ZCHXRadar.STH.valueOf(String.valueOf(radarTrackVo.getTrackPosCode()))); + point.setSigmaX(radarTrackVo.getSigmaX()); + point.setSigmaY(radarTrackVo.getSigmaY()); + point.setSigmaXY(radarTrackVo.getSigmaXY()); + point.setAmpOfPriPlot(radarTrackVo.getAmpofPriplot()); + point.setCartesianTrkVelVx(radarTrackVo.getCartesianTrkvelVx()); + point.setCartesianTrkVelVy(radarTrackVo.getCartesianTrkvelVy()); + point.setCog(radarTrackVo.getCog()); + point.setSog(radarTrackVo.getSog()); + point.setStatus(radarTrackVo.getStatus()); + point.setTimeStamp(radarTrackVo.getTimeStamp()); + point.setIsSmuggle(radarTrackVo.getIsSmuggle()); + point.setDistance(radarTrackVo.getDistance()); + point.setWarnColor(radarTrackVo.getWarn_color()); + point.setTargetType(radarTrackVo.getTargetType()); + point.setSignWindow(radarTrackVo.getSign_window()); + point.setIsWarn(radarTrackVo.getIs_warn()); + point.setRtsp((radarTrackVo.getRtsp() == null) ? "" : radarTrackVo.getRtsp()); + point.setFllow(radarTrackVo.getFllow()); + point.setMode(radarTrackVo.getMode()); + point.setTrackby((radarTrackVo.getTrackby() == null) ? "" : radarTrackVo.getTrackby()); + point.setCameraId(radarTrackVo.getCameraId()); + return point.build(); + } + + public static void radarFalseAlarm(final int type, final int number) { + if (type == 3) { + final Integer count = RadarInfoUtil.falseAlarmCount.get(number); + if (count == null) { + RadarInfoUtil.falseAlarmCount.put(number, 1); + } + else if (count < 2) { + RadarInfoUtil.falseAlarmCount.put(number, count + 1); + } + else { + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("Radar_Track", String.valueOf(number)); + ZCHXRadar.RadarHistoryTracks tracks = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + tracks = ZCHXRadar.RadarHistoryTracks.parseFrom(trackData); + } + catch (InvalidProtocolBufferException e) { + System.out.println(e.getMessage()); + } + if (tracks != null && tracks.getTracksCount() > 0) { + final int num = tracks.getTracksCount() - 1; + final ZCHXRadar.RadarHistoryTrack t = tracks.getTracks(num); + RadarFalseAlarmEhcache.put(t); + RadarInfoUtil.log.info("\u76ee\u6807\u865a\u8b66\uff1a" + number); + } + } + } + } + } + + public static boolean falseAlarm(final RadarTrackVo radarTrackVo) { + if (radarTrackVo.getMode() == 2) { + return false; + } + if (radarTrackVo.getFllow() == 3) { + return false; + } + final int num = RadarInfoUtil.radarWarnCount.get(radarTrackVo.getTrackNumber()); + if (num < RadarInfoUtil.warnTimes) { + return true; + } + final ZCHXRadar.RadarHistoryTrack vo = RadarFalseAlarmEhcache.get(radarTrackVo.getTrackNumber()); + if (vo == null) { + return ("line_one".equals(radarTrackVo.getWarnSiteType()) && radarTrackVo.getSog() > RadarInfoUtil.oneLineSpeed) || radarTrackVo.getSog() < RadarInfoUtil.minSpeed; + } + final double d = DistanceUtil.getDistance(vo.getWgs84PosLat(), vo.getWgs84PosLong(), radarTrackVo.getWgs84PosLat(), radarTrackVo.getWgs84PosLon()); + if (d > RadarInfoUtil.radarFalseAlarmDistance) { + RadarInfoUtil.falseAlarmCount.remove(radarTrackVo.getTrackNumber()); + RadarFalseAlarmEhcache.remove(radarTrackVo.getTrackNumber()); + return false; + } + return true; + } + + public static void warnCount(final Integer trackNumber) { + final Integer num = RadarInfoUtil.radarWarnCount.get(trackNumber); + if (num != null) { + RadarInfoUtil.radarWarnCount.put(trackNumber, num + 1); + } + else { + RadarInfoUtil.radarWarnCount.put(trackNumber, 1); + } + } + + public static void targetLose(final Integer trackNumber) { + RadarInfoUtil.radarWarnCount.remove(trackNumber); + RadarInfoUtil.falseAlarmCount.remove(trackNumber); + TrackPointEhcache.remove(trackNumber); + MongoUtil.getInstance().deleteByPrimaryKey("Radar_Track", String.valueOf(trackNumber)); + ReceiveRadarHandle.mapcode.remove(trackNumber); + HBaseClient.getInstance().deleteRadarById(String.valueOf(trackNumber)); + RadarInfoUtil.log.info("\u6e05\u7406\u6570\u636e\uff01"); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/model/ResultData.java b/src/main/java/com/zhichenhaixin/zmq/model/ResultData.java new file mode 100644 index 0000000..1cae0d5 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/model/ResultData.java @@ -0,0 +1,27 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.model; + +public class ResultData +{ + private long time; + private byte[] data; + + public long getTime() { + return this.time; + } + + public void setTime(final long time) { + this.time = time; + } + + public byte[] getData() { + return this.data; + } + + public void setData(final byte[] data) { + this.data = data; + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/receive/Ad.java b/src/main/java/com/zhichenhaixin/zmq/receive/Ad.java new file mode 100644 index 0000000..5af8a5d --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/receive/Ad.java @@ -0,0 +1,60 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.receive; + +import java.util.Comparator; + +class Ad implements Comparator +{ + private int id; + private double distance; + private double[] latLon; + + public Ad() { + } + + public Ad(final int id, final double distance, final double[] latLon) { + this.id = id; + this.distance = distance; + this.latLon = latLon; + } + + public int getId() { + return this.id; + } + + public void setId(final int id) { + this.id = id; + } + + public double getDistance() { + return this.distance; + } + + public void setDistance(final double distance) { + this.distance = distance; + } + + public double[] getLatLon() { + return this.latLon; + } + + public void setLatLon(final double[] latLon) { + this.latLon = latLon; + } + + @Override + public int compare(final Object o1, final Object o2) { + final Ad n1 = (Ad)o1; + final Ad n2 = (Ad)o2; + if (n1.distance > n2.distance) { + return 1; + } + if (n1.distance == n2.distance) { + return 0; + } + return -1; + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveAISHandle.java b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveAISHandle.java new file mode 100644 index 0000000..e32c1ef --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveAISHandle.java @@ -0,0 +1,240 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.receive; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.ConvertUtils; +import com.zhichenhaixin.base.util.DistanceUtil; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.fusedata.MongoUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXAISVessel; +import com.zhichenhaixin.thread.ZMQServerDyData; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Iterator; + +public class ReceiveAISHandle extends Thread +{ + private boolean is_timeout; + static String address; + static Integer port; + static Integer minuteNum; + static String reportTopic; + private static final double dis; + static long time_ms; + ZMQ.Socket socket; + Logger log; + private String addr; + String head; + String time; + String idString; + int num; + byte[] rev; + + static { + ReceiveAISHandle.address = SpringPropertyUtil.getProperty("address.ais"); + ReceiveAISHandle.port = Integer.valueOf(SpringPropertyUtil.getProperty("sub.port.ais")); + ReceiveAISHandle.minuteNum = Integer.valueOf(SpringPropertyUtil.getProperty("minuteNum")); + ReceiveAISHandle.reportTopic = SpringPropertyUtil.getProperty("AidtoNavigationReport.topic"); + dis = Double.parseDouble(SpringPropertyUtil.getProperty("radar.ais.distance")); + ReceiveAISHandle.time_ms = ReceiveAISHandle.minuteNum * 60 * 1000; + } + + public void init() { + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + this.idString = null; + this.is_timeout = false; + } + + public ReceiveAISHandle() { + this.is_timeout = false; + this.log = Logger.getLogger(ReceiveAISHandle.class); + this.addr = "tcp://" + ReceiveAISHandle.address + ":" + ReceiveAISHandle.port; + this.head = null; + this.time = null; + this.idString = null; + this.num = 1; + this.rev = null; + (this.socket = GlobalVariable.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head != null && this.head.equals(SpringPropertyUtil.getProperty("ais.topic"))) { + try { + final ZCHXAISVessel.AISList aisList = ZCHXAISVessel.AISList.parseFrom(this.rev); + if (aisList == null || aisList.getAisList() == null) { + continue; + } + final ZCHXAISVessel.AISVesselDataList.Builder aisDataList = this.aisHandle(aisList); + if (aisDataList.getAisDataCount() <= 0) { + continue; + } + final byte[] sendAISData = aisDataList.build().toByteArray(); + ZMQServerDyData.getZMQPUB().sendData(this.head, String.valueOf(aisList.getUTC()), sendAISData); + HBaseClient.getInstance().saveAISData(String.valueOf(aisList.getUTC()), sendAISData); + } + catch (Exception e) { + this.log.error("AIS\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + } + + public ZCHXAISVessel.AISVesselDataList.Builder aisHandle(final ZCHXAISVessel.AISList aisList) { + final ZCHXAISVessel.AISVesselDataList.Builder aisDataList = ZCHXAISVessel.AISVesselDataList.newBuilder(); + try { + for (final ZCHXAISVessel.AIS ais : aisList.getAisList()) { + this.is_timeout = false; + final ZCHXAISVessel.AidtoNavigationReport report = ais.getAidtoNavigationReport(); + if (report != null && report.getUTC() != 0L) { + ZMQServerDyData.getZMQPUB().sendData(ReceiveAISHandle.reportTopic, String.valueOf(report.getUTC()), report.toByteArray()); + } + this.time = null; + this.idString = null; + final ZCHXAISVessel.AISVesselData.Builder aisData = ZCHXAISVessel.AISVesselData.newBuilder(); + ZCHXAISVessel.VesselInfo vesselInfo = null; + final ZCHXAISVessel.VesselTrack vesselTrack = ais.getVesselTrack(); + if (ais.getVesselInfo().getId() != null && !"".equals(ais.getVesselInfo().getId())) { + vesselInfo = ais.getVesselInfo(); + this.saveInfoToMongoDB("AIS_Info", vesselInfo); + if (vesselTrack.getId() == null) { + continue; + } + if ("".equals(vesselTrack.getId())) { + continue; + } + } + if (vesselTrack.getId() != null && !"".equals(vesselTrack.getId())) { + this.time = String.valueOf(vesselTrack.getUTC()); + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("AIS_Track", vesselTrack.getId()); + final DBObject dbInfo = MongoUtil.getInstance().selectByPrimaryKey("AIS_Info", vesselTrack.getId()); + if (dbInfo != null) { + final byte[] vess = (byte[])dbInfo.get("data"); + vesselInfo = ZCHXAISVessel.VesselInfo.parseFrom(vess); + this.idString = vesselInfo.getId(); + ConvertUtils.convertVesselInfoProto(vesselInfo, aisData); + ConvertUtils.convertVesselTrackProto(vesselTrack, aisData); + } + ZCHXAISVessel.AISHistoryTracks.Builder tracks = null; + if (dbTrack != null) { + final byte[] trackdata = (byte[])dbTrack.get("data"); + tracks = ZCHXAISVessel.AISHistoryTracks.parseFrom(trackdata).toBuilder(); + final ZCHXAISVessel.AISHistoryTrack tracklast = tracks.getTracks(tracks.getTracksCount() - 1); + final ZCHXAISVessel.AISHistoryTrack trackfrist = tracks.getTracks(0); + if (tracklast.getUTC() + ReceiveAISHandle.time_ms < vesselTrack.getUTC()) { + this.is_timeout = true; + } + else { + final long theTime = vesselTrack.getUTC(); + if (trackfrist.getUTC() + ReceiveAISHandle.time_ms > theTime) { + aisData.setTracks(tracks); + } + else { + for (int i = 0; i < tracks.getTracksCount(); ++i) { + final ZCHXAISVessel.AISHistoryTrack temp = tracks.getTracks(i); + if (temp.getUTC() > theTime - ReceiveAISHandle.time_ms) { + break; + } + tracks.removeTracks(i); + } + aisData.setTracks(tracks); + } + } + } + this.saveTrackToMongoDB("AIS_Track", vesselTrack, tracks, this.is_timeout); + if (dbInfo == null) { + continue; + } + if (this.time != null) { + final byte[] theData = aisData.build().toByteArray(); + this.chooseMethod(this.idString, this.head, this.time, theData); + } + if (aisData.getId() == null || "".equals(aisData.getId())) { + continue; + } + aisDataList.addAisData(aisData); + } + } + } + catch (InvalidProtocolBufferException e) { + this.log.error("AIS\u89e3\u6790\u5931\u8d25\uff01", e.fillInStackTrace()); + } + return aisDataList; + } + + public void saveInfoToMongoDB(final String name, final ZCHXAISVessel.VesselInfo vesselInfo) { + final BasicDBObject document = new BasicDBObject(); + document.put("_id", vesselInfo.getId()); + document.put("data", vesselInfo.toByteArray()); + MongoUtil.getInstance().save_ais_Info(document); + } + + public void saveTrackToMongoDB(final String name, final ZCHXAISVessel.VesselTrack vesselTrack, ZCHXAISVessel.AISHistoryTracks.Builder tracks, final boolean is_ok) { + final ZCHXAISVessel.AISHistoryTrack.Builder track = ZCHXAISVessel.AISHistoryTrack.newBuilder(); + track.setSog(vesselTrack.getSog()); + track.setLon(vesselTrack.getLon()); + track.setLat(vesselTrack.getLat()); + track.setCog(vesselTrack.getCog()); + track.setHeading(vesselTrack.getHeading()); + track.setNavStatus(vesselTrack.getNavStatus()); + track.setRot(vesselTrack.getRot()); + track.setUTC(vesselTrack.getUTC()); + if (tracks == null || is_ok) { + tracks = ZCHXAISVessel.AISHistoryTracks.newBuilder(); + } + if (tracks.getTracksCount() > 0) { + final ZCHXAISVessel.AISHistoryTrack trackfrist = tracks.getTracks(0); + if (trackfrist != null && (trackfrist.getLat() != track.getLat() || trackfrist.getLon() != track.getLon())) { + final double dist = DistanceUtil.lantitudeLongitudeDist(track.getLon(), track.getLat(), trackfrist.getLon(), trackfrist.getLat()); + if (dist > ReceiveAISHandle.dis) { + tracks.addTracks(track); + } + } + } + else { + tracks.addTracks(track); + } + final BasicDBObject document = new BasicDBObject(); + document.put("_id", vesselTrack.getId()); + document.put("data", tracks.build().toByteArray()); + document.put("time", System.currentTimeMillis()); + MongoUtil.getInstance().save_ais_track(document); + } + + public void chooseMethod(final String id, final String sign, final String time, final byte[] receive) { + if (id != null) { + HBaseClient.getInstance().saveAISDataById(id, time, receive); + } + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveEcho.java b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveEcho.java new file mode 100644 index 0000000..26bf4d3 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveEcho.java @@ -0,0 +1,99 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.receive; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.base.util.ZLibUtils; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXRadar; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.Iterator; + +public class ReceiveEcho extends Thread +{ + static String address; + static Integer port; + private String addr; + Logger log; + ZMQ.Socket socket; + String head; + String time; + int num; + byte[] rev; + + static { + ReceiveEcho.address = SpringPropertyUtil.getProperty("address.echo"); + ReceiveEcho.port = Integer.valueOf(SpringPropertyUtil.getProperty("sub.port.echo")); + } + + public void init() { + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + } + + public ReceiveEcho() { + this.addr = "tcp://" + ReceiveEcho.address + ":" + ReceiveEcho.port; + this.log = Logger.getLogger(ReceiveEcho.class); + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + (this.socket = GlobalVariable.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head != null && this.head.equals(SpringPropertyUtil.getProperty("echo.topic"))) { + try { + this.log.debug("\u6536\u5230\u4e8c\u8fdb\u5236\u6d41\u957f\u5ea6:" + this.rev.length); + final byte[] data = ZLibUtils.unjzlib(this.rev); + this.log.debug("\u89e3\u538b\u4e8c\u8fdb\u5236\u6d41\u957f\u5ea6:" + data.length); + final ZCHXRadar.RadarVideo video = ZCHXRadar.RadarVideo.parseFrom(data); + this.log.debug(video.getFlag()); + this.log.debug(video.getSourceId()); + this.log.debug(video.getUTC()); + this.log.debug(video.getLength()); + this.time = String.valueOf(video.getUTC()); + } + catch (Exception e) { + this.log.error("\u96f7\u8fbe\u56de\u6ce2\u6570\u636e\u89e3\u6790\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + if (this.time == null) { + continue; + } + this.chooseMethod(this.head, this.time, this.rev); + } + } + } + + public void chooseMethod(final String sign, final String time, final byte[] data) { + HBaseClient.getInstance().saveRadarEchoData(time, data); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveNyGuideCamPos.java b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveNyGuideCamPos.java new file mode 100644 index 0000000..b217dcd --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveNyGuideCamPos.java @@ -0,0 +1,229 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.receive; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.base.util.ZLibUtils; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXRadar; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.io.UnsupportedEncodingException; +import java.text.ParseException; +import java.util.Iterator; + +public class ReceiveNyGuideCamPos extends Thread +{ + static String address; + static Integer port; + private String addr; + Logger log; + ZMQ.Socket socket; + String head; + String time; + int num; + byte[] rev; + + static { + ReceiveNyGuideCamPos.address = SpringPropertyUtil.getProperty("address.nyGuideCamPos"); + ReceiveNyGuideCamPos.port = Integer.valueOf(SpringPropertyUtil.getProperty("sub.port.nyGuideCamPos")); + } + + public void init() { + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + } + + public ReceiveNyGuideCamPos() { + this.addr = "tcp://" + ReceiveNyGuideCamPos.address + ":" + ReceiveNyGuideCamPos.port; + this.log = Logger.getLogger(ReceiveNyGuideCamPos.class); + this.head = null; + this.time = null; + this.num = 1; + this.rev = null; + (this.socket = GlobalVariable.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head != null && this.head.equals(SpringPropertyUtil.getProperty("nyGuideCamPos.topic"))) { + try { + // todo : debug -> info + this.log.info("\u6536\u5230\u4e8c\u8fdb\u5236\u6d41\u957f\u5ea6:" + this.rev.length); + final byte[] data = ZLibUtils.unjzlib(this.rev); + this.log.info("\u89e3\u538b\u4e8c\u8fdb\u5236\u6d41\u957f\u5ea6:" + data.length); +/* final ZCHXRadar.RadarVideo video = ZCHXRadar.RadarVideo.parseFrom(data); + this.log.debug(video.getFlag()); + this.log.debug(video.getSourceId()); + this.log.debug(video.getUTC()); + this.log.debug(video.getLength()); + this.time = String.valueOf(video.getUTC());*/ + // todo : 原始数据打印 + this.log.info("原始数据byte[] data="+data); + this.log.info("String data="+new String(data)); + + // todo : 处理数据 + // dealWithData(data); + } + catch (Exception e) { + this.log.error("\u96f7\u8fbe\u56de\u6ce2\u6570\u636e\u89e3\u6790\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + if (this.time == null) { + continue; + } + this.chooseMethod(this.head, this.time, this.rev); + } + } + } + + public void chooseMethod(final String sign, final String time, final byte[] data) { + HBaseClient.getInstance().saveRadarEchoData(time, data); + } + + /*public void dealWithData(byte[] data) throws ParseException { + log.info(Thread.currentThread().getName() + "接收到数据:" + new String(data)); + JSONObject jsonObject = JSON.parseObject(new String(data)); + + int msgType = jsonObject.getIntValue("msgType"); + JSONArray dataList = jsonObject.getJSONArray("data"); + + + for (int i = 0; i < dataList.size(); i++) { + //根据雷达Id查询雷达 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("device_type", DeviceType.RADAR.getValue())//设备类型1-雷达 + .eq("device_num", 1)//雷达设备编号 + .eq("state", 1);//1-启用 + //雷达信息 + MsDeviceInfo deviceInfo = msDeviceInfoService.getOne(queryWrapper); + if (deviceInfo == null) { + log.info("查询不到相关设备"); + return; + } + //根据数据类型作不同处理 + switch (msgType) { + // todo 引导光电位置 + // 接收的参数: + // 距离 dis + // 方位 azimuth + // 雷达经纬度 + // 经度:113.455074 + // 纬度:22.122197 + //光电位置数据 + case 4: + //雷达初始方位角 + double initAzimuth = deviceInfo.getInitAzimuth(); + //相对方位角 + //double relativeAzimuth = dataList.getJSONObject(i).getDoubleValue("targetAngle"); + double relativeAzimuth = dataList.getJSONObject(i).getDoubleValue("azimuth"); + //目标距离 + double distance = dataList.getJSONObject(i).getDoubleValue("dis"); + //判断该设备是否有关联光电,有则查询光电信息 + MsDeviceInfo cameraInfo = null; + if (deviceInfo.getRelateType() == 2) { + //根据关联id查询光电信息 + cameraInfo = msDeviceInfoService.getById(deviceInfo.getRelateId()); + if (cameraInfo == null) { + log.info("查询不到关联的监控设备"); + } + } + //1、若设备关联光电,则进行联动定位 + if (cameraInfo != null) { + try { + //判断该目标是否已经定位过,若否则进行定位 + if (!redisUtil.sHasKey(cameraInfo.getIp() + "_radarTrackPathID", dataList.getJSONObject(i).getIntValue("trackPathID"))) { + + //计算目标经纬度 通过雷达经度(113.455074)+雷达纬度(22.122197)+目标方位角+目标距离 + GEOIntersectPointUtils.LatLon targetLatLon = GEOUtils.getLocationByLocationAndAngleAndDistance(deviceInfo.getLon(), deviceInfo.getLat(), relativeAzimuth, distance); + Double targetLat = targetLatLon.getLat();//目标经度 + Double targetLon = targetLatLon.getLon();//目标纬度 + + //光电绝对方位角 + double cameraAzimuth = cameraInfo.getInitAzimuth() + Double.parseDouble(redisUtil.hget("PTZStatus", "pan").toString()); + //计算目标绝对方位角 通过雷达经纬度+目标经纬度 + double targetAzimuth = GEOUtils.getAzimuth( + deviceInfo.getLon(), //雷达经度 113.455074 + deviceInfo.getLat(), //雷达纬度 22.122197 + targetLat, + targetLon + ); + + // todo : 1.计算水平偏转角 + double differAzimuth = targetAzimuth - cameraAzimuth; + double horAngle = Double.parseDouble(redisUtil.hget("PTZStatus", "pan").toString()) + differAzimuth; + horAngle = horAngle >= 0 ? horAngle : (360 + horAngle); + + // todo : 2.计算俯仰角 + Double height = cameraInfo.getHeight();//光电高度 + Double initPitch = cameraInfo.getInitPitch();//光电初始俯仰角 + double verAngle = Math.toDegrees(Math.asin(height / distance)); + verAngle = verAngle + initPitch; + + TcpClient tcpClient = ThreadManager.getTcpClientMap().get(cameraInfo.getIp()); + //根据目标位置进行定位(角度实际上送值:100倍整数值) + tcpClient.send( + HPDataParser.send( + HPReqParamEnc.ptzControl(String.valueOf(redisUtil.get(tcpClient.getIp())), //token + 0, 51, null, + null, null, 45, + (int) (horAngle * 100), (int) (verAngle * 100), null) + ) + ); + // todo : 3.计算视场角 + //目标高度 + double h = Double.parseDouble(redisUtil.hget("alarm_settings", "targetHeight").toString());//高度取目标物体的平均高度 + //目标距离 + double d = distance; + //计算视场角,100为分辨率/像素 + double fov = Math.toDegrees(Math.atan(h / d)) * 2 * 100; // todo : 视场角 2w = 2 * arctan(h/2d) + + // todo : 4.控制云台 + tcpClient.send( + HPDataParser.send( + HPReqParamEnc.ptzControl(String.valueOf(redisUtil.get(tcpClient.getIp())), + 0, 42, null, + null, null, null, + null, null, (int) (fov * 100)) + ) + ); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + break; + default: + throw new IllegalStateException("Topic:NyGuideCamPos,Unexpected value:" + msgType); + } + } + }*/ +} diff --git a/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveRadarHandle.java b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveRadarHandle.java new file mode 100644 index 0000000..6ba62ab --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/receive/ReceiveRadarHandle.java @@ -0,0 +1,527 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.receive; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.google.protobuf.InvalidProtocolBufferException; +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.*; +import com.zhichenhaixin.cache.util.AgilTrackEhcache; +import com.zhichenhaixin.cache.util.TrackPointEhcache; +import com.zhichenhaixin.fusedata.FuseDataUtil; +import com.zhichenhaixin.fusedata.MongoUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.serializer.RadarTrackVo; +import com.zhichenhaixin.sys.service.RadarService; +import com.zhichenhaixin.tcp.model.RadarTrackModel; +import com.zhichenhaixin.zmq.model.RadarHeadInfo; +import com.zhichenhaixin.zmq.model.RadarInfoUtil; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.log4j.Logger; +import org.springframework.beans.BeanUtils; +import org.zeromq.ZFrame; +import org.zeromq.ZMQ; +import org.zeromq.ZMsg; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +public class ReceiveRadarHandle extends Thread +{ + private final RadarService radarService; + static String address; + static Integer port; + public static Map mapcode; + static Map radarResource; + static Map radarNum; + static Integer prepushRadarNum; + static Integer prepushTrackNum; + private static double distance; + private static double cog; + private static double sog; + private boolean is_timeout; + static Integer minuteNum; + private static final double dis; + static long time_ms; + Logger log; + private String addr; + ZMQ.Socket socket; + String head; + int num; + byte[] rev; + + static { + ReceiveRadarHandle.address = SpringPropertyUtil.getProperty("address.radar"); + ReceiveRadarHandle.port = Integer.valueOf(SpringPropertyUtil.getProperty("sub.port.radar")); + ReceiveRadarHandle.mapcode = new HashMap(); + ReceiveRadarHandle.radarResource = new ConcurrentHashMap(); + ReceiveRadarHandle.radarNum = new ConcurrentHashMap(); + ReceiveRadarHandle.prepushRadarNum = Integer.valueOf(SpringPropertyUtil.getProperty("prepush_radarNum")); + ReceiveRadarHandle.prepushTrackNum = Integer.valueOf(SpringPropertyUtil.getProperty("prepush_trackNum")); + ReceiveRadarHandle.distance = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.distance")); + ReceiveRadarHandle.cog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.cog")); + ReceiveRadarHandle.sog = Double.parseDouble(SpringPropertyUtil.getProperty("fuse.sog")); + ReceiveRadarHandle.minuteNum = Integer.valueOf(SpringPropertyUtil.getProperty("minuteNum")); + dis = Double.parseDouble(SpringPropertyUtil.getProperty("radar.ais.distance")); + ReceiveRadarHandle.time_ms = ReceiveRadarHandle.minuteNum * 60 * 1000; + } + + public void init() { + this.head = null; + this.num = 1; + this.rev = null; + this.is_timeout = false; + } + + public ReceiveRadarHandle() { + this.radarService = (RadarService)SpringBeanUtil.getBean("radarServiceImpl"); + this.is_timeout = false; + this.log = Logger.getLogger(ReceiveRadarHandle.class); + this.addr = "tcp://" + ReceiveRadarHandle.address + ":" + ReceiveRadarHandle.port; + this.head = null; + this.num = 1; + this.rev = null; + (this.socket = GlobalVariable.context.socket(2)).connect(this.addr); + this.socket.subscribe("".getBytes()); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + while (!Thread.currentThread().isInterrupted()) { + this.init(); + final ZMsg msg = ZMsg.recvMsg(this.socket); + final Iterator frame = msg.iterator(); + while (frame.hasNext()) { + this.rev = frame.next().getData(); + if (this.num == 1) { + this.head = Bytes.toString(this.rev); + } + ++this.num; + } + if (this.head != null && this.head.equals(SpringPropertyUtil.getProperty("radar.topic"))) { + this.handleRadar(this.rev); + } + } + } + + public static void main(String[] args) { + //todo : 手动拼接数据 + JSONObject jsonObject = new JSONObject(); + jsonObject.put("flag",1); + jsonObject.put("sourceId","AgilTrack_cat010bsz"); + jsonObject.put("utc",System.currentTimeMillis()); + jsonObject.put("length",100); + jsonObject.put("radarTrack","radarTrackJsonString"); + + + } + + + public void handleRadar(final byte[] rev) { + final long time_start = System.currentTimeMillis(); + try { + final ZCHXRadar.RadarSurfaceTrack.Builder rf = ZCHXRadar.RadarSurfaceTrack.parseFrom(rev).toBuilder(); + this.setRadarHead(rf); + final Integer radarCode = Integer.parseInt(SpringPropertyUtil.getProperty(rf.getSourceId())); + this.radarDenoising(radarCode, rf); + final List list = rf.getTrackPointsList(); + long time_num = 0L; + for (final ZCHXRadar.TrackPoint point : list) { + final RadarTrackVo radarTrackVo = RadarInfoUtil.covertPointToVo(point); + radarTrackVo.setTrackNumber(radarTrackVo.getTrackNumber() + radarCode); + final long time_1 = System.currentTimeMillis(); + final RadarTrackVo radarPrepushSea = this.radarPrepushSea(radarTrackVo); + time_num += System.currentTimeMillis() - time_1; + final RadarTrackVo trackEhcache = this.handleRadarTrack(radarPrepushSea); + final ZCHXRadar.TrackPoint trackPoint = RadarInfoUtil.radarParesProto(trackEhcache); + this.radarHistoryTrackHandle(trackPoint.toBuilder(), rf.getUTC()); + ReceiveRadarHandle.radarResource.put(trackPoint.getTrackNumber(), rf.getSourceId()); + } + final long time_end = System.currentTimeMillis(); + this.log.info("-> \u5904\u7406\u65f6\u95f4\uff1a" + (time_end - time_start) + "MS\uff0c\u6279\u6b21\u53f7\uff1a" + rf.getSourceId() + "\uff0c\u76ee\u6807\u4e2a\u6570\uff1a" + list.size()); + } + catch (Exception e) { + this.log.error("-> ReceiveRadar\u6570\u636e\u89e3\u6790\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + + public ZCHXRadar.TrackPoint.Builder radarHistoryTrackHandle(final ZCHXRadar.TrackPoint.Builder trackPoint, final long theTime) { + this.is_timeout = false; + String code = ReceiveRadarHandle.mapcode.get(trackPoint.getTrackNumber()); + if (code == null) { + code = String.valueOf(String.valueOf(System.currentTimeMillis()).hashCode()); + ReceiveRadarHandle.mapcode.put(trackPoint.getTrackNumber(), code); + } + if (trackPoint.getStatus() != 0) { + HBaseClient.getInstance().saveRadarWarnData(String.valueOf(System.currentTimeMillis()), trackPoint.build().toByteArray()); + } + HBaseClient.getInstance().saveRadarDataByIdCopy(String.valueOf(trackPoint.getTrackNumber()), code, String.valueOf(theTime), trackPoint.build().toByteArray()); + HBaseClient.getInstance().saveRadarDataById(String.valueOf(trackPoint.getTrackNumber()), String.valueOf(theTime), trackPoint.build().toByteArray()); + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("Radar_Track", String.valueOf(trackPoint.getTrackNumber())); + ZCHXRadar.RadarHistoryTracks.Builder tracks = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + tracks = ZCHXRadar.RadarHistoryTracks.parseFrom(trackData).toBuilder(); + final ZCHXRadar.RadarHistoryTrack tracklast = tracks.getTracks(tracks.getTracksCount() - 1); + final ZCHXRadar.RadarHistoryTrack trackfrist = tracks.getTracks(0); + if (tracklast.getUTC() + ReceiveRadarHandle.time_ms < theTime) { + this.is_timeout = true; + } + else if (trackfrist.getUTC() + ReceiveRadarHandle.time_ms > theTime) { + trackPoint.setTracks(tracks); + } + else { + for (int i = 0; i < tracks.getTracksCount(); ++i) { + final ZCHXRadar.RadarHistoryTrack temp = tracks.getTracks(i); + if (temp.getUTC() > theTime - ReceiveRadarHandle.time_ms) { + break; + } + tracks.removeTracks(i); + } + trackPoint.setTracks(tracks); + } + } + catch (InvalidProtocolBufferException e) { + this.log.error("Radar protocol\u89e3\u6790\u5931\u8d25\uff01", e.fillInStackTrace()); + } + } + this.saveTrackToMongoDB("Radar_Track", trackPoint, tracks, this.is_timeout, theTime); + TrackPointEhcache.put(trackPoint.build()); + return trackPoint; + } + + public void saveTrackToMongoDB(final String name, final ZCHXRadar.TrackPoint.Builder trackPoint, ZCHXRadar.RadarHistoryTracks.Builder tracks, final boolean is_ok, final long theTime) { + final ZCHXRadar.RadarHistoryTrack.Builder track = ZCHXRadar.RadarHistoryTrack.newBuilder(); + track.setTrackNumber(trackPoint.getTrackNumber()); + track.setWgs84PosLong(trackPoint.getWgs84PosLong()); + track.setWgs84PosLat(trackPoint.getWgs84PosLat()); + track.setTimeOfDay(trackPoint.getTimeOfDay()); + track.setTrackType(trackPoint.getTrackType()); + track.setTrackLastReport(trackPoint.getTrackLastReport()); + track.setExtrapolation(trackPoint.getExtrapolation()); + track.setTrackPositionCode(trackPoint.getTrackPositionCode()); + track.setCog(trackPoint.getCog()); + track.setSog(trackPoint.getSog()); + track.setUTC(theTime); + if (tracks == null || is_ok) { + tracks = ZCHXRadar.RadarHistoryTracks.newBuilder(); + } + if (tracks.getTracksCount() > 0) { + final ZCHXRadar.RadarHistoryTrack trackfrist = tracks.getTracks(0); + if (trackfrist != null && (trackfrist.getWgs84PosLat() != track.getWgs84PosLat() || trackfrist.getWgs84PosLong() != track.getWgs84PosLong())) { + final double dist = DistanceUtil.lantitudeLongitudeDist(track.getWgs84PosLong(), track.getWgs84PosLat(), trackfrist.getWgs84PosLong(), trackfrist.getWgs84PosLat()); + if (dist > ReceiveRadarHandle.dis) { + tracks.addTracks(track); + } + } + } + else { + tracks.addTracks(track); + } + final BasicDBObject document = new BasicDBObject(); + document.put("_id", String.valueOf(trackPoint.getTrackNumber())); + document.put("data", tracks.build().toByteArray()); + document.put("time", System.currentTimeMillis()); + MongoUtil.getInstance().save_radar_track(document); + } + + public void setRadarHead(final ZCHXRadar.RadarSurfaceTrack.Builder rf) { + RadarHeadInfo.getRadarHead().setFlag(rf.getFlag()); + RadarHeadInfo.getRadarHead().setSourceId(rf.getSourceId()); + RadarHeadInfo.getRadarHead().setUtc(rf.getUTC()); + RadarHeadInfo.getRadarHead().setLength(rf.getLength()); + } + + public RadarTrackVo handleRadarTrack(final RadarTrackVo radarTrackVo) { + RadarTrackVo trackEhcache = AgilTrackEhcache.get(radarTrackVo.getTrackNumber()); + boolean lastReport = false; + if (trackEhcache == null) { + trackEhcache = radarTrackVo; + } + else { + lastReport = trackEhcache.getTrackLastReport(); + } + trackEhcache.setWgs84PosLon(radarTrackVo.getWgs84PosLon()); + trackEhcache.setWgs84PosLat(radarTrackVo.getWgs84PosLat()); + trackEhcache.setTrackLastReport(radarTrackVo.getTrackLastReport()); + trackEhcache.setStatus(0); + final boolean result = this.radarService.judgeCloseCamera(trackEhcache, lastReport); + final ZCHXRadar.TrackPoint trackPoint = TrackPointEhcache.get(radarTrackVo.getTrackNumber()); + if (!result && trackPoint != null) { + trackEhcache = this.radarService.judgeWarn(trackEhcache); + } + trackEhcache.setCartesianTrkvelVx(radarTrackVo.getCartesianTrkvelVx()); + trackEhcache.setCartesianTrkvelVy(radarTrackVo.getCartesianTrkvelVy()); + trackEhcache.setCog(radarTrackVo.getCog()); + trackEhcache.setSog(radarTrackVo.getSog()); + AgilTrackEhcache.put(trackEhcache); + return trackEhcache; + } + + public double[] cogAndSog(double averageCog, double averageSog, final Integer number) { + final int count = ReceiveRadarHandle.prepushTrackNum; + int times = 0; + final DBObject dbTrack = MongoUtil.getInstance().selectByPrimaryKey("Radar_Track", String.valueOf(number)); + ZCHXRadar.RadarHistoryTracks tracks = null; + if (dbTrack != null) { + final byte[] trackData = (byte[])dbTrack.get("data"); + try { + tracks = ZCHXRadar.RadarHistoryTracks.parseFrom(trackData); + } + catch (InvalidProtocolBufferException e) { + this.log.error("Radar protocol\u89e3\u6790\u5931\u8d25\uff01", e.fillInStackTrace()); + } + if (tracks != null && tracks.getTracksCount() > 0) { + averageCog = 0.0; + averageSog = 0.0; + if (tracks.getTracksCount() > count) { + times = tracks.getTracksCount() - count; + } + for (int i = tracks.getTracksCount() - 1; i >= times; --i) { + averageCog += tracks.getTracks(i).getCog(); + averageSog += tracks.getTracks(i).getSog(); + } + averageCog /= count; + averageSog /= count; + } + } + final double[] data = { averageCog, averageSog }; + return data; + } + + public void radarPrepush(final Integer radarCode, final ZCHXRadar.RadarSurfaceTrack.Builder rf) { + final Map tempMap = new HashMap(); + final List tempMap2 = new ArrayList(); + if (ReceiveRadarHandle.radarResource != null && ReceiveRadarHandle.radarResource.size() > 0) { + final Set ids = ReceiveRadarHandle.radarResource.keySet(); + for (final Integer id : ids) { + if (ReceiveRadarHandle.radarResource.get(id).equals(rf.getSourceId())) { + tempMap.put(id, rf.getSourceId()); + } + } + } + for (final ZCHXRadar.TrackPoint point : rf.getTrackPointsList()) { + final Integer trackNumber = point.getTrackNumber() + radarCode; + if (tempMap.get(trackNumber) != null) { + tempMap.remove(trackNumber); + } + else { + tempMap2.add(point); + } + } + if (tempMap.keySet().size() > 0) { + for (final int number : tempMap.keySet()) { + final ZCHXRadar.TrackPoint tpt = TrackPointEhcache.get(number); + boolean b = true; + if (tpt != null) { + final ZCHXRadar.TrackPoint.Builder tp = tpt.toBuilder(); + final Integer num = ReceiveRadarHandle.radarNum.get(number); + if (num != null) { + ReceiveRadarHandle.radarNum.put(number, num + 1); + if (num >= ReceiveRadarHandle.prepushRadarNum) { + ReceiveRadarHandle.radarNum.remove(number); + ReceiveRadarHandle.radarResource.remove(number); + RadarInfoUtil.targetLose(number); + this.radarService.judgeCloseCamera(number); + break; + } + } + else { + ReceiveRadarHandle.radarNum.put(number, 1); + } + final double[] cogSog = this.cogAndSog(tp.getCog(), tp.getSog(), number); + final double averageCog = cogSog[0]; + final double averageSog = cogSog[1]; + final double[] data = GaussUtil.moveLocation(tp.getWgs84PosLong(), tp.getWgs84PosLat(), averageSog * 1.03, averageCog); + tp.setTrackNumber(tp.getTrackNumber() - radarCode); + tp.setWgs84PosLat(data[0]); + tp.setWgs84PosLong(data[1]); + tp.setSog(averageSog); + tp.setCog(averageCog); + ZCHXRadar.TrackPoint.Builder tp2 = null; + for (int i = 0; i < tempMap2.size(); ++i) { + tp2 = tempMap2.get(i).toBuilder(); + final double shipDistance = FuseDataUtil.getDistance(tp.getWgs84PosLong(), tp.getWgs84PosLat(), tp2.getWgs84PosLong(), tp2.getWgs84PosLat()); + final double gapCog = Math.abs(tp.getCog() - tp2.getCog()); + final double gapSog = Math.abs(tp.getSog() - tp2.getSog()); + if (shipDistance < ReceiveRadarHandle.distance && gapSog < ReceiveRadarHandle.sog && gapCog < ReceiveRadarHandle.cog) { + this.log.info("\u65e7\u76ee\u6807\uff1a" + number + "\uff0c\u65b0\u76ee\u6807\uff1a" + (tp2.getTrackNumber() + radarCode) + "\u4e3a\u540c\u4e00\u76ee\u6807"); + b = false; + ReceiveRadarHandle.radarResource.remove(tp.getTrackNumber()); + ReceiveRadarHandle.radarNum.remove(number); + for (int j = 0; j < rf.getTrackPointsCount(); ++j) { + if (rf.getTrackPoints(j).getTrackNumber() == tp.getTrackNumber() - radarCode) { + tp2.setTrackNumber(number - radarCode); + rf.setTrackPoints(j, tp2); + } + } + break; + } + } + if (!b || tp == null) { + continue; + } + rf.addTrackPoints(tp); + } + else { + ReceiveRadarHandle.radarResource.remove(number); + } + } + } + tempMap.clear(); + tempMap2.clear(); + } + + public void radarDenoising(final Integer radarCode, final ZCHXRadar.RadarSurfaceTrack.Builder rf) { + final Map tempMap = new HashMap(); + final List tempMap2 = new ArrayList(); + if (ReceiveRadarHandle.radarResource != null && ReceiveRadarHandle.radarResource.size() > 0) { + final Set ids = ReceiveRadarHandle.radarResource.keySet(); + for (final Integer id : ids) { + if (ReceiveRadarHandle.radarResource.get(id).equals(rf.getSourceId())) { + tempMap.put(id, rf.getSourceId()); + } + } + } + for (int i = 0; i < rf.getTrackPointsCount(); ++i) { + final ZCHXRadar.TrackPoint point = rf.getTrackPoints(i); + final Integer trackNumber = point.getTrackNumber() + radarCode; + if (tempMap.get(trackNumber) != null) { + final ZCHXRadar.TrackPoint point_1 = TrackPointEhcache.get(trackNumber); + if (point_1 != null) { + final double d = DistanceUtil.getDistanceFromXtoY(point_1.getWgs84PosLat(), point_1.getWgs84PosLong(), point.getWgs84PosLat(), point.getWgs84PosLong()); + if (d > ReceiveRadarHandle.distance) { + final double[] cogSog = this.cogAndSog(point_1.getCog(), point_1.getSog(), trackNumber); + final double averageCog = cogSog[0]; + final double averageSog = cogSog[1]; + final double[] data = GaussUtil.moveLocation(point_1.getWgs84PosLong(), point_1.getWgs84PosLat(), averageSog * 2.0, averageCog); + final ZCHXRadar.TrackPoint.Builder point_2 = point.toBuilder(); + point_2.setWgs84PosLat(data[0]); + point_2.setWgs84PosLong(data[1]); + rf.setTrackPoints(i, point_2); + } + } + tempMap.remove(trackNumber); + } + else { + tempMap2.add(point); + } + } + if (tempMap.keySet().size() > 0) { + for (final int number : tempMap.keySet()) { + final ZCHXRadar.TrackPoint tpt = TrackPointEhcache.get(number); + if (tpt != null) { + final ZCHXRadar.TrackPoint.Builder tp = tpt.toBuilder(); + ZCHXRadar.TrackPoint.Builder tp2 = null; + for (int j = 0; j < tempMap2.size(); ++j) { + tp2 = tempMap2.get(j).toBuilder(); + final double shipDistance = DistanceUtil.getDistanceFromXtoY(tp.getWgs84PosLat(), tp.getWgs84PosLong(), tp2.getWgs84PosLat(), tp2.getWgs84PosLong()); + final double gapSog = Math.abs(tp.getSog() - tp2.getSog()); + if (shipDistance < ReceiveRadarHandle.distance && gapSog < ReceiveRadarHandle.sog) { + this.log.info("\u65e7\u76ee\u6807\uff1a" + number + "\uff0c\u65b0\u76ee\u6807\uff1a" + (tp2.getTrackNumber() + radarCode) + "\u4e3a\u540c\u4e00\u76ee\u6807\uff0c\u4fdd\u7559" + number); + ReceiveRadarHandle.radarResource.remove(tp.getTrackNumber()); + for (int k = 0; k < rf.getTrackPointsCount(); ++k) { + if (rf.getTrackPoints(k).getTrackNumber() == tp.getTrackNumber() - radarCode) { + tp2.setTrackNumber(number - radarCode); + rf.setTrackPoints(k, tp2); + } + } + break; + } + } + } + else { + ReceiveRadarHandle.radarResource.remove(number); + } + } + } + } + + public RadarTrackVo radarPrepushSea(final RadarTrackVo radarTrackVo) throws Exception { + final String lon_lats = this.radarService.getPolygon(radarTrackVo); + if (lon_lats == null) { + return radarTrackVo; + } + final String[] split = lon_lats.substring(lon_lats.indexOf("(") + 1, lon_lats.lastIndexOf(")")).split(","); + final List list1 = new ArrayList(); + final List list2 = new ArrayList(); + for (int i = 0; i < split.length - 1; ++i) { + final String[] split2 = split[i].split(" "); + final Double[] d = { Double.parseDouble(split2[0]), Double.parseDouble(split2[1]) }; + list1.add(d); + final double distance = DistanceUtil.lantitudeLongitudeDist(radarTrackVo.getWgs84PosLon(), radarTrackVo.getWgs84PosLat(), Double.parseDouble(split2[0]), Double.parseDouble(split2[1])); + list2.add(new Ad(i, distance, new double[] { Double.parseDouble(split2[0]), Double.parseDouble(split2[1]) })); + } + final Ad t = new Ad(); + Collections.sort(list2, t); + final int id = list2.get(0).getId(); + final double posLon2 = list1.get(id)[0]; + final double posLat2 = list1.get(id)[1]; + double posLon3; + double posLon4; + double posLat3; + double posLat4; + if (id == 0) { + posLon3 = list1.get(list2.size() - 1)[0]; + posLon4 = list1.get(id + 1)[0]; + posLat3 = list1.get(list2.size() - 1)[1]; + posLat4 = list1.get(id + 1)[1]; + } + else if (id == list2.size() - 1) { + posLon3 = list1.get(id - 1)[0]; + posLon4 = list1.get(0)[0]; + posLat3 = list1.get(id - 1)[1]; + posLat4 = list1.get(0)[1]; + } + else { + posLon3 = list1.get(id - 1)[0]; + posLon4 = list1.get(id + 1)[0]; + posLat3 = list1.get(id - 1)[1]; + posLat4 = list1.get(id + 1)[1]; + } + this.log.info("-> \u9646\u5730\u7684\u76ee\u6807\u7f16\u53f7\uff1a" + radarTrackVo.getTrackNumber() + "\uff0c\u7ecf\u7eac\u5ea6\uff1a" + radarTrackVo.getWgs84PosLon() + " \uff1a" + radarTrackVo.getWgs84PosLat()); + final double diso1 = DistanceUtil.lantitudeLongitudeDist(radarTrackVo.getWgs84PosLon(), radarTrackVo.getWgs84PosLat(), posLon3, posLat3); + final double diso2 = list2.get(0).getDistance(); + final double diso3 = DistanceUtil.lantitudeLongitudeDist(radarTrackVo.getWgs84PosLon(), radarTrackVo.getWgs84PosLat(), posLon4, posLat4); + final double dis12 = DistanceUtil.lantitudeLongitudeDist(posLon3, posLat3, posLon2, posLat2); + final double dis13 = DistanceUtil.lantitudeLongitudeDist(posLon4, posLat4, posLon2, posLat2); + if (dis12 * dis12 + diso1 * diso1 >= diso2 * diso2 && dis12 * dis12 + diso2 * diso2 >= diso1 * diso1) { + final double disC1 = (dis12 * dis12 - diso2 * diso2 + diso1 * diso1) / (2.0 * dis12); + final double disC2 = dis12 - disC1; + final double r = disC1 / disC2; + final double lat = (posLat3 + r * posLat2) / (r + 1.0); + final double lon = (posLon3 + r * posLon2) / (r + 1.0); + radarTrackVo.setWgs84PosLat(Double.isNaN(lat) ? radarTrackVo.getWgs84PosLat() : lat); + radarTrackVo.setWgs84PosLon(Double.isNaN(lon) ? radarTrackVo.getWgs84PosLon() : lon); + this.log.info("\u9510\u89d22\uff1a-> \u5916\u63a8\u5230\u96f6\u7ebf\u7684\u4f4d\u7f6e\u7684\u76ee\u6807\u7f16\u53f7\uff1a" + radarTrackVo.getTrackNumber() + "\uff0c\u7ecf\u7eac\u5ea6\uff1a" + radarTrackVo.getWgs84PosLon() + " \uff1a" + radarTrackVo.getWgs84PosLat()); + return radarTrackVo; + } + if (diso2 * diso2 + dis13 * dis13 < diso3 * diso3 || diso3 * diso3 + dis13 * dis13 < diso2 * diso2) { + radarTrackVo.setWgs84PosLat(Double.isNaN(posLat2) ? radarTrackVo.getWgs84PosLat() : posLat2); + radarTrackVo.setWgs84PosLon(Double.isNaN(posLon2) ? radarTrackVo.getWgs84PosLon() : posLon2); + this.log.info("\u4e24\u4e2a\u949d\u89d2\uff1a-> \u5916\u63a8\u5230\u96f6\u7ebf\u7684\u4f4d\u7f6e\u7684\u76ee\u6807\u7f16\u53f7\uff1a" + radarTrackVo.getTrackNumber() + "\uff0c\u7ecf\u7eac\u5ea6\uff1a" + radarTrackVo.getWgs84PosLon() + " \uff1a" + radarTrackVo.getWgs84PosLat()); + return radarTrackVo; + } + final double disC1 = (dis13 * dis13 - diso3 * diso3 + diso2 * diso2) / (2.0 * dis13); + final double disC2 = dis13 - disC1; + final double r = disC1 / disC2; + final double lat = (posLat2 + r * posLat4) / (r + 1.0); + final double lon = (posLon2 + r * posLon4) / (r + 1.0); + radarTrackVo.setWgs84PosLat(Double.isNaN(lat) ? radarTrackVo.getWgs84PosLat() : lat); + radarTrackVo.setWgs84PosLon(Double.isNaN(lon) ? radarTrackVo.getWgs84PosLon() : lon); + this.log.info("\u9510\u89d21\uff1a-> \u5916\u63a8\u5230\u96f6\u7ebf\u7684\u4f4d\u7f6e\u7684\u76ee\u6807\u7f16\u53f7\uff1a" + radarTrackVo.getTrackNumber() + "\uff0c\u7ecf\u7eac\u5ea6\uff1a" + radarTrackVo.getWgs84PosLon() + " \uff1a" + radarTrackVo.getWgs84PosLat()); + return radarTrackVo; + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/searh/ZMQServerYd.java b/src/main/java/com/zhichenhaixin/zmq/searh/ZMQServerYd.java new file mode 100644 index 0000000..ddf0861 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/searh/ZMQServerYd.java @@ -0,0 +1,240 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.searh; + +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.zmq.model.ResultData; +import com.zhichenhaixin.zmq.send.*; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.List; + +public class ZMQServerYd extends Thread +{ + Logger log; + static String address; + static Integer port; + String url; + String head; + String starttime; + String endtime; + String idString; + ZMQ.Context context; + ZMQ.Socket socket; + + static { + ZMQServerYd.address = SpringPropertyUtil.getProperty("address.ip"); + ZMQServerYd.port = Integer.valueOf(SpringPropertyUtil.getProperty("respond.port")); + } + + public ZMQServerYd() { + this.log = Logger.getLogger(ZMQServerYd.class); + this.url = "tcp://" + ZMQServerYd.address + ":" + ZMQServerYd.port; + this.head = null; + this.starttime = null; + this.endtime = null; + this.idString = null; + this.context = ZMQ.context(1); + (this.socket = this.context.socket(4)).bind(this.url); + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + this.zmq_init(); + } + + public void zmq_init() { + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] request = this.socket.recv(); + this.splitUrl(new String(request)); + if (SpringPropertyUtil.getProperty("ais.topic").equals(this.head)) { + if (this.starttime != null && this.endtime != null) { + if (this.idString != null) { + this.getAISData(this.idString, this.starttime, this.endtime); + } + else { + this.getAISData(null, this.starttime, this.endtime); + } + } + else { + this.socket.send("error_param".getBytes()); + } + } + else if (SpringPropertyUtil.getProperty("radar.topic").equals(this.head)) { + if (this.starttime != null && this.endtime != null) { + if (this.idString != null) { + this.getRadarData(this.idString, this.starttime, this.endtime); + } + else { + this.getRadarData(null, this.starttime, this.endtime); + } + } + else { + this.socket.send("error_param".getBytes()); + } + } + else if (SpringPropertyUtil.getProperty("radar_warn_topic").equals(this.head)) { + if (this.starttime != null && this.endtime != null) { + if (this.idString != null) { + this.getRadarWarnData(this.idString, this.starttime, this.endtime); + } + else { + this.getRadarWarnData(null, this.starttime, this.endtime); + } + } + else { + this.socket.send("error_param".getBytes()); + } + } + else if (SpringPropertyUtil.getProperty("zmq_uav_topic").equals(this.head)) { + if (this.starttime != null && this.endtime != null) { + if (this.idString != null) { + this.getUAVData(this.idString, this.starttime, this.endtime); + } + } + else { + this.socket.send("error_param".getBytes()); + } + } + else if (SpringPropertyUtil.getProperty("gps.info.topic").equals(this.head)) { + if (this.starttime != null && this.endtime != null) { + this.getGPSData(this.idString, this.starttime, this.endtime); + } + else { + this.socket.send("error_param".getBytes()); + } + } + else { + this.socket.send("error_head".getBytes()); + } + this.log.debug("receive : " + new String(request)); + } + catch (Exception e) { + this.log.error("\u5386\u53f2\u6570\u636eURL\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void getAISData(final String idString, final String starttime, final String endtime) { + final String port = PortManageUtils.getRandom("50"); + final String url_pair = "tcp://" + ZMQServerYd.address + ":" + port; + this.socket.send(url_pair.getBytes()); + this.log.debug(url_pair); + new SendAISHistoricalData(url_pair, port, idString, starttime, endtime).start(); + } + + public void getRadarData(final String idString, final String starttime, final String endtime) { + final String port = PortManageUtils.getRandom("49"); + final String url_pair = "tcp://" + ZMQServerYd.address + ":" + port; + this.socket.send(url_pair.getBytes()); + this.log.debug(url_pair); + new SendRadarHistoricalData(url_pair, port, idString, starttime, endtime).start(); + } + + public void getUAVData(final String idString, final String starttime, final String endtime) { + final String port = PortManageUtils.getRandom("48"); + final String url_pair = "tcp://" + ZMQServerYd.address + ":" + port; + this.socket.send(url_pair.getBytes()); + this.log.debug(url_pair); + new SendUAVHistoricalData(url_pair, port, idString, starttime, endtime).start(); + } + + public void getGPSData(final String idString, final String starttime, final String endtime) { + final String port = PortManageUtils.getRandom("47"); + final String url_pair = "tcp://" + ZMQServerYd.address + ":" + port; + this.socket.send(url_pair.getBytes()); + this.log.debug(url_pair); + new SendGPSHistoricalData(url_pair, port, idString, starttime, endtime).start(); + } + + public void getRadarWarnData(final String idString, final String starttime, final String endtime) { + final String port = PortManageUtils.getRandom("46"); + final String url_pair = "tcp://" + ZMQServerYd.address + ":" + port; + this.socket.send(url_pair.getBytes()); + this.log.debug(url_pair); + new SendRadarWarnHistoricalData(url_pair, port, idString, starttime, endtime).start(); + } + + public void splitUrl(final String url) { + this.head = null; + this.starttime = null; + this.endtime = null; + this.idString = null; + final String[] str = url.split("\\?"); + if (str.length == 2) { + final String[] thehead = str[0].split("/"); + if (thehead.length == 3) { + this.head = thehead[2]; + } + final String[] theparam = str[1].split("&"); + if (theparam.length > 1) { + for (int i = 0; i < theparam.length; ++i) { + final String[] param = theparam[i].split("="); + if (param.length > 1) { + if ("startdate".equals(param[0])) { + if (param[1].length() == 10) { + this.starttime = String.valueOf(param[1]) + "000"; + } + else { + this.starttime = param[1]; + } + } + else if ("enddate".equals(param[0])) { + if (param[1].length() == 10) { + this.endtime = String.valueOf(param[1]) + "000"; + } + else { + this.endtime = param[1]; + } + } + else if ("id".equals(param[0])) { + this.idString = param[1]; + } + } + } + } + } + this.log.debug(String.valueOf(this.head) + ":" + this.starttime + ":" + this.endtime); + } + + public void test1() { + final long time1 = System.currentTimeMillis(); + final List dbList = HBaseClient.getInstance().scanAISData("1464165180350", "1464165893857"); + for (final ResultData data : dbList) { + this.log.info(data.getTime()); + } + final long time2 = System.currentTimeMillis(); + this.log.info(time2 - time1); + } + + public void test2() { + final long time1 = System.currentTimeMillis(); + final List dbList = HBaseClient.getInstance().scanRadarData("1464165893857", "1466392455053"); + for (final ResultData data : dbList) { + this.log.info(data.getTime()); + } + final long time2 = System.currentTimeMillis(); + this.log.info(time2 - time1); + } + + public void test3() { + final long time1 = System.currentTimeMillis(); + final List dbList = HBaseClient.getInstance().scanRadarEchoData("1466646510522", "1466646639543"); + for (final ResultData data : dbList) { + this.log.info(data.getTime()); + } + final long time2 = System.currentTimeMillis(); + this.log.info(time2 - time1); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/send/SendAISHistoricalData.java b/src/main/java/com/zhichenhaixin/zmq/send/SendAISHistoricalData.java new file mode 100644 index 0000000..f7f2d7e --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/send/SendAISHistoricalData.java @@ -0,0 +1,143 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.send; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.zmq.model.ResultData; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.List; + +public class SendAISHistoricalData extends Thread +{ + Logger log; + static Integer split_time; + String url; + String port; + String idString; + String starttime; + String endtime; + ZMQ.Socket socket; + boolean is_stop; + List dbList; + + static { + SendAISHistoricalData.split_time = Integer.valueOf(SpringPropertyUtil.getProperty("split_time_AIS")); + } + + public SendAISHistoricalData(final String url, final String port, final String idString, final String starttime, final String endtime) { + this.log = Logger.getLogger(SendAISHistoricalData.class); + this.url = null; + this.port = null; + this.idString = null; + this.starttime = null; + this.endtime = null; + this.is_stop = false; + this.dbList = null; + this.url = url; + this.port = port; + this.idString = idString; + this.starttime = starttime; + this.endtime = endtime; + (this.socket = GlobalVariable.context.socket(0)).bind(url); + this.is_stop = false; + this.socket.setSendTimeOut(1000); + } + + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SendAISHistoricalData.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("SendAIS-" + this.port); + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] start = this.socket.recv(); + final String str1 = new String(start); + this.log.debug("sign:" + str1); + if (SpringPropertyUtil.getProperty("send_start_sign").equals(str1)) { + this.getHbaseData(Long.valueOf(this.starttime), Long.valueOf(this.endtime), this.idString); + if (this.is_stop) { + continue; + } + this.socket.send(SpringPropertyUtil.getProperty("send_finish_sign").getBytes()); + } + else { + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str1)) { + this.revFinished(); + break; + } + continue; + } + } + catch (Exception e) { + this.log.error("AIS\u5386\u53f2\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void revFinished() { + this.log.info("end"); + Thread.currentThread().interrupt(); + PortManageUtils.searchDelete(this.port); + this.socket.close(); + this.dbList = null; + } + + public void getHbaseData(long starttime, final long endtime, final String id) { + boolean is_ok = true; + long tempTime = 0L; + int num = 1; + do { + tempTime = starttime + SendAISHistoricalData.split_time * 60 * 1000; + if (tempTime > endtime) { + is_ok = false; + tempTime = endtime; + } + if (id != null) { + this.dbList = HBaseClient.getInstance().scanAISDataById(id, String.valueOf(starttime), String.valueOf(tempTime)); + } + else { + this.dbList = HBaseClient.getInstance().scanAISData(String.valueOf(starttime), String.valueOf(tempTime)); + } + starttime = tempTime; + for (int i = 0; i < this.dbList.size(); ++i) { + final byte[] rev = this.socket.recv(1); + if (rev != null) { + final String str2 = new String(rev); + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str2)) { + is_ok = false; + this.is_stop = true; + this.revFinished(); + this.log.debug("sign:" + str2); + break; + } + } + this.socket.send(String.valueOf(this.dbList.get(i).getTime()).getBytes(), 2); + this.socket.send(this.dbList.get(i).getData()); + this.log.debug("\u5df2\u53d1\u9001AIS\uff1a" + num + "\u6761"); + ++num; + try { + Thread.sleep(20L); + } + catch (InterruptedException e) { + this.log.error("\u53d1\u9001AIS\u5386\u53f2\u6570\u636e\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + this.dbList = null; + } while (is_ok); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/send/SendGPSHistoricalData.java b/src/main/java/com/zhichenhaixin/zmq/send/SendGPSHistoricalData.java new file mode 100644 index 0000000..3cb9733 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/send/SendGPSHistoricalData.java @@ -0,0 +1,133 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.send; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.zmq.model.ResultData; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.List; + +public class SendGPSHistoricalData extends Thread +{ + Logger log; + String url; + String port; + String imei; + String starttime; + String endtime; + ZMQ.Socket socket; + boolean is_stop; + List dbList; + + public SendGPSHistoricalData(final String url, final String port, final String imei, final String starttime, final String endtime) { + this.log = Logger.getLogger(SendGPSHistoricalData.class); + this.url = null; + this.port = null; + this.imei = null; + this.starttime = null; + this.endtime = null; + this.is_stop = false; + this.dbList = null; + this.url = url; + this.port = port; + this.imei = imei; + this.starttime = starttime; + this.endtime = endtime; + (this.socket = GlobalVariable.context.socket(0)).bind(url); + this.is_stop = false; + this.socket.setSendTimeOut(1000); + } + + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SendGPSHistoricalData.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("SendGPSTrack-" + this.port); + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] start = this.socket.recv(); + final String str1 = new String(start); + this.log.debug("sign:" + str1); + if (SpringPropertyUtil.getProperty("send_start_sign").equals(str1)) { + this.getHbaseData(Long.valueOf(this.starttime), Long.valueOf(this.endtime), this.imei); + if (this.is_stop) { + continue; + } + this.socket.send(SpringPropertyUtil.getProperty("send_finish_sign").getBytes()); + } + else { + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str1)) { + this.revFinished(); + break; + } + continue; + } + } + catch (Exception e) { + this.log.error("GPS\u5386\u53f2\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void revFinished() { + this.log.info("end"); + Thread.currentThread().interrupt(); + PortManageUtils.searchDelete(this.port); + this.socket.close(); + this.dbList = null; + } + + public void getHbaseData(long starttime, final long endtime, final String imei) { + boolean is_ok = true; + long tempTime = 0L; + int num = 1; + do { + tempTime = starttime + 3600000L; + if (tempTime > endtime) { + is_ok = false; + tempTime = endtime; + } + this.dbList = HBaseClient.getInstance().queryGpsTrace(imei, String.valueOf(starttime), String.valueOf(tempTime)); + starttime = tempTime; + for (int i = 0; i < this.dbList.size(); ++i) { + final byte[] rev = this.socket.recv(1); + if (rev != null) { + final String str2 = new String(rev); + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str2)) { + is_ok = false; + this.is_stop = true; + this.revFinished(); + this.log.debug("sign:" + str2); + break; + } + } + this.socket.send(String.valueOf(this.dbList.get(i).getTime()).getBytes(), 2); + this.socket.send(this.dbList.get(i).getData()); + this.log.debug("\u5df2\u53d1\u9001GPS\uff1a" + num + "\u6761"); + ++num; + try { + Thread.sleep(200L); + } + catch (InterruptedException e) { + this.log.error("\u53d1\u9001GPS\u5386\u53f2\u6570\u636e\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + this.dbList = null; + } while (is_ok); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/send/SendRadarHistoricalData.java b/src/main/java/com/zhichenhaixin/zmq/send/SendRadarHistoricalData.java new file mode 100644 index 0000000..5b15e0a --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/send/SendRadarHistoricalData.java @@ -0,0 +1,144 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.send; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.zmq.model.ResultData; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.List; + +public class SendRadarHistoricalData extends Thread +{ + static Integer split_time; + Logger log; + String url; + String port; + String idString; + String starttime; + String endtime; + ZMQ.Socket socket; + boolean is_stop; + List dbList; + + static { + SendRadarHistoricalData.split_time = Integer.valueOf(SpringPropertyUtil.getProperty("split_time_Radar")); + } + + public SendRadarHistoricalData(final String url, final String port, final String idString, final String starttime, final String endtime) { + this.log = Logger.getLogger(SendRadarHistoricalData.class); + this.url = null; + this.port = null; + this.idString = null; + this.starttime = null; + this.endtime = null; + this.is_stop = false; + this.dbList = null; + this.url = url; + this.port = port; + this.idString = idString; + this.starttime = starttime; + this.endtime = endtime; + (this.socket = GlobalVariable.context.socket(0)).bind(url); + this.is_stop = false; + this.socket.setSendTimeOut(1000); + } + + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SendRadarHistoricalData.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("SendRadar-" + this.port); + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] start = this.socket.recv(); + final String str1 = new String(start); + this.log.debug("sign:" + str1); + if (SpringPropertyUtil.getProperty("send_start_sign").equals(str1)) { + this.getHbaseData(Long.valueOf(this.starttime), Long.valueOf(this.endtime), this.idString); + if (this.is_stop) { + continue; + } + this.socket.send(SpringPropertyUtil.getProperty("send_finish_sign").getBytes()); + } + else { + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str1)) { + this.revFinished(); + break; + } + continue; + } + } + catch (Exception e) { + e.printStackTrace(); + this.log.error("Radar\u5386\u53f2\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void revFinished() { + this.log.info("end"); + Thread.currentThread().interrupt(); + PortManageUtils.searchDelete(this.port); + this.socket.close(); + this.dbList = null; + } + + public void getHbaseData(long starttime, final long endtime, final String id) { + boolean is_ok = true; + long tempTime = 0L; + int num = 1; + do { + tempTime = starttime + SendRadarHistoricalData.split_time * 60 * 1000; + if (tempTime > endtime) { + is_ok = false; + tempTime = endtime; + } + if (id != null) { + this.dbList = HBaseClient.getInstance().scanRadarDataById(id, String.valueOf(starttime), String.valueOf(tempTime)); + } + else { + this.dbList = HBaseClient.getInstance().scanRadarData(String.valueOf(starttime), String.valueOf(tempTime)); + } + starttime = tempTime; + for (int i = 0; i < this.dbList.size(); ++i) { + final byte[] rev = this.socket.recv(1); + if (rev != null) { + final String str2 = new String(rev); + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str2)) { + is_ok = false; + this.is_stop = true; + this.revFinished(); + this.log.debug("sign:" + str2); + break; + } + } + this.socket.send(String.valueOf(this.dbList.get(i).getTime()).getBytes(), 2); + this.socket.send(this.dbList.get(i).getData()); + this.log.debug("\u5df2\u53d1\u9001Radar\uff1a" + num + "\u6761"); + ++num; + try { + Thread.sleep(20L); + } + catch (InterruptedException e) { + this.log.error("\u53d1\u9001radar\u5386\u53f2\u6570\u636e\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + this.dbList = null; + } while (is_ok); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/send/SendRadarRealTimeData.java b/src/main/java/com/zhichenhaixin/zmq/send/SendRadarRealTimeData.java new file mode 100644 index 0000000..5cfe2bb --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/send/SendRadarRealTimeData.java @@ -0,0 +1,65 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.send; + +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.cache.util.TrackPointEhcache; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXRadar; +import com.zhichenhaixin.thread.ZMQServerDyData; +import com.zhichenhaixin.zmq.model.RadarHeadInfo; +import com.zhichenhaixin.zmq.model.RadarInfoUtil; +import org.apache.log4j.Logger; + +import java.util.List; + +public class SendRadarRealTimeData extends Thread +{ + Logger log; + private String time; + + public SendRadarRealTimeData() { + this.log = Logger.getLogger(SendRadarRealTimeData.class); + this.time = "0"; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + int num = 2000; + if (StringUtil.notBlank(RadarInfoUtil.second)) { + final int temp = Integer.valueOf(RadarInfoUtil.second); + if (temp > 2) { + num = temp * 1000; + } + } + while (!Thread.currentThread().isInterrupted()) { + try { + final List pointList = TrackPointEhcache.getAll(); + if (pointList != null && pointList.size() > 0 && StringUtil.notBlank(RadarHeadInfo.getRadarHead().getSourceId())) { + final ZCHXRadar.RadarSurfaceTrack.Builder builder = ZCHXRadar.RadarSurfaceTrack.newBuilder(); + builder.setFlag(RadarHeadInfo.getRadarHead().getFlag()); + builder.setSourceId(RadarHeadInfo.getRadarHead().getSourceId()); + builder.setUTC(RadarHeadInfo.getRadarHead().getUtc()); + builder.setLength(RadarHeadInfo.getRadarHead().getLength()); + this.time = String.valueOf(RadarHeadInfo.getRadarHead().getUtc()); + builder.addAllTrackPoints(pointList); + final byte[] data = builder.build().toByteArray(); + ZMQServerDyData.getZMQPUB().sendData(SpringPropertyUtil.getProperty("radar.topic"), this.time, data); + HBaseClient.getInstance().saveRadarData(String.valueOf(this.time), data); + } + Thread.sleep(num); + } + catch (Exception e) { + this.log.error("\u63a8\u9001radar\u6570\u636e\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/send/SendRadarWarnHistoricalData.java b/src/main/java/com/zhichenhaixin/zmq/send/SendRadarWarnHistoricalData.java new file mode 100644 index 0000000..5bfb450 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/send/SendRadarWarnHistoricalData.java @@ -0,0 +1,138 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.send; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.zmq.model.ResultData; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.List; + +public class SendRadarWarnHistoricalData extends Thread +{ + static Integer split_time; + Logger log; + String url; + String port; + String idString; + String starttime; + String endtime; + ZMQ.Socket socket; + boolean is_stop; + List dbList; + + static { + SendRadarWarnHistoricalData.split_time = Integer.valueOf(SpringPropertyUtil.getProperty("split_time_RadarWarn")); + } + + public SendRadarWarnHistoricalData(final String url, final String port, final String idString, final String starttime, final String endtime) { + this.log = Logger.getLogger(SendRadarWarnHistoricalData.class); + this.url = null; + this.port = null; + this.idString = null; + this.starttime = null; + this.endtime = null; + this.is_stop = false; + this.dbList = null; + this.url = url; + this.port = port; + this.idString = idString; + this.starttime = starttime; + this.endtime = endtime; + (this.socket = GlobalVariable.context.socket(0)).bind(url); + this.is_stop = false; + this.socket.setSendTimeOut(1000); + } + + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SendRadarWarnHistoricalData.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("SendRadarWarn-" + this.port); + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] start = this.socket.recv(); + final String str1 = new String(start); + this.log.debug("sign:" + str1); + if (SpringPropertyUtil.getProperty("send_start_sign").equals(str1)) { + this.getHbaseData(Long.valueOf(this.starttime), Long.valueOf(this.endtime), this.idString); + if (this.is_stop) { + continue; + } + this.socket.send(SpringPropertyUtil.getProperty("send_finish_sign").getBytes()); + } + else { + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str1)) { + this.revFinished(); + break; + } + continue; + } + } + catch (Exception e) { + this.log.error("Radar\u9884\u8b66\u5386\u53f2\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void revFinished() { + this.log.info("end"); + Thread.currentThread().interrupt(); + PortManageUtils.searchDelete(this.port); + this.socket.close(); + this.dbList = null; + } + + public void getHbaseData(long starttime, final long endtime, final String id) { + boolean is_ok = true; + long tempTime = 0L; + int num = 1; + do { + tempTime = starttime + SendRadarWarnHistoricalData.split_time * 60 * 1000; + if (tempTime > endtime) { + is_ok = false; + tempTime = endtime; + } + this.dbList = HBaseClient.getInstance().scanRadarWarnData(String.valueOf(starttime), String.valueOf(tempTime)); + starttime = tempTime; + for (int i = 0; i < this.dbList.size(); ++i) { + final byte[] rev = this.socket.recv(1); + if (rev != null) { + final String str2 = new String(rev); + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str2)) { + is_ok = false; + this.is_stop = true; + this.revFinished(); + this.log.debug("sign:" + str2); + break; + } + } + this.socket.send(String.valueOf(this.dbList.get(i).getTime()).getBytes(), 2); + this.socket.send(this.dbList.get(i).getData()); + this.log.debug("\u5df2\u53d1\u9001RdarWarn\uff1a" + num + "\u6761"); + ++num; + try { + Thread.sleep(20L); + } + catch (InterruptedException e) { + this.log.error("\u53d1\u9001radar\u9884\u8b66\u5386\u53f2\u6570\u636e\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + this.dbList = null; + } while (is_ok); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/send/SendUAVHistoricalData.java b/src/main/java/com/zhichenhaixin/zmq/send/SendUAVHistoricalData.java new file mode 100644 index 0000000..62eff0f --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/send/SendUAVHistoricalData.java @@ -0,0 +1,133 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.send; + +import com.zhichenhaixin.base.constant.GlobalVariable; +import com.zhichenhaixin.base.util.PortManageUtils; +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.zmq.model.ResultData; +import org.apache.log4j.Logger; +import org.zeromq.ZMQ; + +import java.util.List; + +public class SendUAVHistoricalData extends Thread +{ + Logger log; + String url; + String port; + String idString; + String starttime; + String endtime; + ZMQ.Socket socket; + boolean is_stop; + List dbList; + + public SendUAVHistoricalData(final String url, final String port, final String idString, final String starttime, final String endtime) { + this.log = Logger.getLogger(SendUAVHistoricalData.class); + this.url = null; + this.port = null; + this.idString = null; + this.starttime = null; + this.endtime = null; + this.is_stop = false; + this.dbList = null; + this.url = url; + this.port = port; + this.idString = idString; + this.starttime = starttime; + this.endtime = endtime; + (this.socket = GlobalVariable.context.socket(0)).bind(url); + this.is_stop = false; + this.socket.setSendTimeOut(1000); + } + + @Override + public void start() { + final Runnable runnable = new Runnable() { + @Override + public void run() { + SendUAVHistoricalData.this.handle(); + } + }; + GlobalVariable.cachedThreadPool.execute(runnable); + } + + public void handle() { + Thread.currentThread().setName("SendUAVTrack-" + this.port); + while (!Thread.currentThread().isInterrupted()) { + try { + final byte[] start = this.socket.recv(); + final String str1 = new String(start); + this.log.debug("sign:" + str1); + if (SpringPropertyUtil.getProperty("send_start_sign").equals(str1)) { + this.getHbaseData(Long.valueOf(this.starttime), Long.valueOf(this.endtime), this.idString); + if (this.is_stop) { + continue; + } + this.socket.send(SpringPropertyUtil.getProperty("send_finish_sign").getBytes()); + } + else { + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str1)) { + this.revFinished(); + break; + } + continue; + } + } + catch (Exception e) { + this.log.error("\u65e0\u4eba\u673a\u5386\u53f2\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } + + public void revFinished() { + this.log.info("end"); + Thread.currentThread().interrupt(); + PortManageUtils.searchDelete(this.port); + this.socket.close(); + this.dbList = null; + } + + public void getHbaseData(long starttime, final long endtime, final String id) { + boolean is_ok = true; + long tempTime = 0L; + int num = 1; + do { + tempTime = starttime + 3600000L; + if (tempTime > endtime) { + is_ok = false; + tempTime = endtime; + } + this.dbList = HBaseClient.getInstance().scanUAVData(id, String.valueOf(starttime), String.valueOf(tempTime)); + starttime = tempTime; + for (int i = 0; i < this.dbList.size(); ++i) { + final byte[] rev = this.socket.recv(1); + if (rev != null) { + final String str2 = new String(rev); + if (SpringPropertyUtil.getProperty("receive_finish_sign").equals(str2)) { + is_ok = false; + this.is_stop = true; + this.revFinished(); + this.log.debug("sign:" + str2); + break; + } + } + this.socket.send(String.valueOf(this.dbList.get(i).getTime()).getBytes(), 2); + this.socket.send(this.dbList.get(i).getData()); + this.log.debug("\u5df2\u53d1\u9001UAV\uff1a" + num + "\u6761"); + ++num; + try { + Thread.sleep(200L); + } + catch (InterruptedException e) { + this.log.error("\u53d1\u9001UAV\u5386\u53f2\u6570\u636e\u7ebf\u7a0b\u4f11\u7720\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + this.dbList = null; + } while (is_ok); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/uav/FloatJsonValueProcessor.java b/src/main/java/com/zhichenhaixin/zmq/uav/FloatJsonValueProcessor.java new file mode 100644 index 0000000..e80c05c --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/uav/FloatJsonValueProcessor.java @@ -0,0 +1,46 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.uav; + +import net.sf.json.JsonConfig; +import net.sf.json.processors.JsonValueProcessor; + +import java.math.RoundingMode; +import java.text.NumberFormat; +import java.util.Locale; + +class FloatJsonValueProcessor implements JsonValueProcessor +{ + public FloatJsonValueProcessor() { + } + + @Override + public Object processArrayValue(final Object value, final JsonConfig jsonConfig) { + if (value instanceof float[]) { + final String[] obj = new String[0]; + final float[] nums = (float[])value; + for (int i = 0; i < nums.length; ++i) { + obj[i] = this.roundHalfUp(nums[i], 8); + } + return obj; + } + return value; + } + + @Override + public Object processObjectValue(final String key, final Object value, final JsonConfig jsonConfig) { + if (value instanceof Float) { + return this.roundHalfUp((float)value, 8); + } + return value; + } + + public String roundHalfUp(final double number, final int frac) { + final NumberFormat fmt = NumberFormat.getInstance(Locale.CHINA); + fmt.setMaximumFractionDigits(frac); + fmt.setRoundingMode(RoundingMode.HALF_UP); + return fmt.format(number); + } +} diff --git a/src/main/java/com/zhichenhaixin/zmq/uav/UAVDataThread.java b/src/main/java/com/zhichenhaixin/zmq/uav/UAVDataThread.java new file mode 100644 index 0000000..9553a70 --- /dev/null +++ b/src/main/java/com/zhichenhaixin/zmq/uav/UAVDataThread.java @@ -0,0 +1,78 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.zhichenhaixin.zmq.uav; + +import com.zhichenhaixin.base.util.SpringPropertyUtil; +import com.zhichenhaixin.base.util.StringUtil; +import com.zhichenhaixin.hbase.HBaseClient; +import com.zhichenhaixin.proto.ZCHXUAV; +import com.zhichenhaixin.thread.ZMQServerDyData; +import com.zhichenhaixin.uav.AirPlaneEhcache; +import com.zhichenhaixin.uav.WrjVo; +import org.apache.log4j.Logger; + +import java.util.List; + +public class UAVDataThread extends Thread +{ + Logger log; + private String sign; + private String uav_time; + private String time; + + public UAVDataThread() { + this.log = Logger.getLogger(UAVDataThread.class); + this.sign = SpringPropertyUtil.getProperty("zmq_uav_topic"); + this.uav_time = SpringPropertyUtil.getProperty("uav.sendSecond"); + this.time = ""; + } + + @Override + public synchronized void start() { + super.start(); + } + + @Override + public void run() { + int num = 2000; + if (StringUtil.notBlank(this.uav_time)) { + final int temp = Integer.valueOf(this.uav_time); + if (temp > 2) { + num = temp * 1000; + } + } + while (!Thread.currentThread().isInterrupted()) { + try { + final List wrjList = AirPlaneEhcache.getAll(); + if (wrjList.size() > 0) { + final ZCHXUAV.UAVDataList.Builder uavList = ZCHXUAV.UAVDataList.newBuilder(); + final ZCHXUAV.UAVData.Builder uavData = ZCHXUAV.UAVData.newBuilder(); + for (final WrjVo uav : wrjList) { + uavData.setDeviceId(uav.getDeviceId()); + uavData.setDeviceName(uav.getDeviceName()); + uavData.setLon(uav.getLon()); + uavData.setLat(uav.getLat()); + uavData.setGpsHeight(uav.getGpsHeight()); + uavData.setSpeed(uav.getSpeed()); + uavData.setHeading(uav.getHeading()); + uavData.setStarNumber(uav.getStarNumber()); + uavData.setDateTime(uav.getDateTime()); + uavData.setAirPressHeight(uav.getAirPressHeight()); + uavData.setElectricPressValue(uav.getElectricPressValue()); + uavList.addUavDataList(uavData.build()); + HBaseClient.getInstance().saveUAVDataById(String.valueOf(uavData.getDeviceId()), String.valueOf(System.currentTimeMillis()), uavData.build().toByteArray()); + } + this.time = String.valueOf(System.currentTimeMillis()); + ZMQServerDyData.getZMQPUB().sendData(this.sign, this.time, uavList.build().toByteArray()); + HBaseClient.getInstance().saveUAVData(this.time, uavList.build().toByteArray()); + } + Thread.sleep(num); + } + catch (Exception e) { + this.log.error("\u65e0\u4eba\u673a\u6570\u636e\u53d1\u9001\u5f02\u5e38\uff01", e.fillInStackTrace()); + } + } + } +} diff --git a/src/main/resources/META-INF/maven/archetype.xml b/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000..9e3225b --- /dev/null +++ b/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,9 @@ + + radar-gui-v1.0 + + src/main/java/App.java + + + src/test/java/AppTest.java + + diff --git a/src/main/resources/application-cached.xml b/src/main/resources/application-cached.xml new file mode 100644 index 0000000..21a809b --- /dev/null +++ b/src/main/resources/application-cached.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..7c286f6 --- /dev/null +++ b/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,15 @@ + + 4.0.0 + $org.example + $radar-gui-v1.0 + $1.0-SNAPSHOT + + + junit + junit + 3.8.1 + test + + + diff --git a/src/main/resources/archetype-resources/src/main/java/App.java b/src/main/resources/archetype-resources/src/main/java/App.java new file mode 100644 index 0000000..1fa6a95 --- /dev/null +++ b/src/main/resources/archetype-resources/src/main/java/App.java @@ -0,0 +1,13 @@ +package $org.example; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/src/main/resources/archetype-resources/src/test/java/AppTest.java b/src/main/resources/archetype-resources/src/test/java/AppTest.java new file mode 100644 index 0000000..65be417 --- /dev/null +++ b/src/main/resources/archetype-resources/src/test/java/AppTest.java @@ -0,0 +1,38 @@ +package $org.example; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties new file mode 100644 index 0000000..94c95a0 --- /dev/null +++ b/src/main/resources/jdbc.properties @@ -0,0 +1,23 @@ +#postgresql 数据库的驱动 +postgres.driverClassName=org.postgresql.Driver + +#postgresql 数据库的地址 +postgres.url=jdbc:postgresql://192.168.20.31:5432/hiefs_db +#postgres.url=jdbc:postgresql://172.20.0.37:5432/HIEFS_SERVER + +#postgresql 数据库的用户名 +postgres.username=postgres + +#postgresql 数据库的密码 +#postgres.password=scmspostgres +postgres.password=postgres + +proxool.prototypeCount=2 +proxool.hourseKeepingSleepTime=20000 +proxool.maximumActiveTime=90000 +proxool.maximumConnectionLifetime=90000 +proxool.minimumConnectionCount=2 +proxool.maximumConnectionCount=150 +#proxool.alias=WMS +proxool.simultaneous-build-throttle=20 +proxool.houseKeepingTestSql=select CURRENT_DATE diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 0000000..af3b997 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,95 @@ +# rootLogger 调试(DEBUG)在INFO之前加DEBUG即可 +log4j.rootLogger=INFO, R, E, CONSOLE + +# CONSOLE 控制台 +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Target=System.out +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss.ms} [hq_server] %p [%t] %M(%F) - %m%n + +# R 正常信息 +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.maxFileSize=50MB +log4j.appender.R.maxBackupIndex=10 +log4j.appender.R.file=${catalina.base}/logs/catalina.out +log4j.appender.R.threshold=ALL +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss.ms} [hq_server] %p [%t] %M(%F) - %m%n +# log4j.appender.R.encoding=UTF-8 +# log4j.appender.R.encoding=gbk + +# E 错误信息单独保存 +log4j.appender.E=org.apache.log4j.RollingFileAppender +log4j.appender.E.maxFileSize=50MB +log4j.appender.E.maxBackupIndex=10 +log4j.appender.E.file=${catalina.base}/logs/catalina_error.out +log4j.appender.E.threshold=ERROR +log4j.appender.E.layout=org.apache.log4j.PatternLayout +log4j.appender.E.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss.ms} [hq_server] %p [%t] %M(%F) - %m%n + + +# dailyFile 定期回滚日志文件 +log4j.appender.dailyFile=org.apache.log4j.DailyRollingFileAppender +log4j.appender.dailyFile.Threshold=info +log4j.appender.dailyFile.ImmediateFlush=true +log4j.appender.dailyFile.Append=true +log4j.appender.dailyFile.File=${catalina.base}/logs/catalina.out +log4j.appender.dailyFile.DatePattern='.'yyyy-MM-dd-HH-mm +log4j.appender.dailyFile.layout=org.apache.log4j.PatternLayout +log4j.appender.dailyFile.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss.ms} [hq_server] %p [%t] %M(%F) - %m%n + + +# HTML +log4j.appender.HTML=org.apache.log4j.RollingFileAppender +log4j.appender.HTML.maxFileSize=50MB +log4j.appender.HTML.maxBackupIndex=10 +log4j.appender.HTML.file=${catalina.base}/logs/catalina.html +log4j.appender.HTML.layout=org.apache.log4j.HTMLLayout +log4j.appender.HTML.layout.Title=HTML Layout Example +log4j.appender.HTML.layout.LocationInfo=true + + + +#备注: +#说明: +# log4j.appender.appenderName.layout=className +# appenderName:自定义appderName,在log4j.rootLogger设置中使用 +# className:可设值如下: +# (1)org.apache.log4j.HTMLLayout(以HTML表格形式布局) +# (2)org.apache.log4j.PatternLayout(可以灵活地指定布局模式) +# (3)org.apache.log4j.SimpleLayout(包含日志信息的级别和信息字符串) +# (4)org.apache.log4j.TTCCLayout(包含日志产生的时间、线程、类别等等信息) +# (1)HTMLLayout选项: +# LocationInfo=true:输出java文件名称和行号,默认值是false。 +# Title=My Logging: 默认值是Log4J Log Messages。 +# (2)PatternLayout选项: +# ConversionPattern=%m%n:设定以怎样的格式显示消息。 +# Threshold=WARN:指定日志信息的最低输出级别,默认为DEBUG。 +# ImmediateFlush=true:表示所有消息都会被立即输出,设为false则不输出,默认值是true。 +# Append=false:true表示消息增加到指定文件中,false则将消息覆盖指定的文件内容,默认值是true。 +# File=${catalina.base}/logs/catalina.out:指定消息输出到catalina.out文件中。 +# MaxFileSize=100KB:后缀可以是KB, MB 或者GB。在日志文件到达该大小时,将会自动滚动,即将原来的内容移到logging.log4j.1文件中。 +# MaxBackupIndex=2:指定可以产生的滚动文件的最大数,例如,设为2则可以产生logging.log4j.1,logging.log4j.2两个滚动文件和一个logging.log4j文件。 +# %p:输出日志信息的优先级,即DEBUG,INFO,WARN,ERROR,FATAL。 +# %d:输出日志时间点的日期或时间,默认格式为ISO8601,也可以在其后指定格式,如:%d{yyyy/MM/dd HH:mm:ss.ms}。 +# %r:输出自应用程序启动到输出该log信息耗费的毫秒数。 +# %t:输出产生该日志事件的线程名。 +# %l:输出日志事件的发生位置,相当于%c.%M(%F:%L)的组合,包括类全名、方法、文件名以及在代码中的行数。例如:test.TestLog4j.main(TestLog4j.java:10)。 +# %c:输出日志信息所属的类目,通常就是所在类的全名。 +# %M:输出产生日志信息的方法名。 +# %F:输出日志消息产生时所在的文件名称。 +# %L:输出代码中的行号。 +# %m:输出代码中指定的具体日志信息。 +# %n:输出一个回车换行符,Windows平台为"rn",Unix平台为"n"。 +# %x:输出和当前线程相关联的NDC(嵌套诊断环境),尤其用到像java servlets这样的多客户多线程的应用中。 +# %%:输出一个"%"字符。 +# 另外,还可以在%与格式字符之间加上修饰符来控制其最小长度、最大长度、和文本的对齐方式。如: +# 1)c:指定输出category的名称,最小的长度是20,如果category的名称长度小于20的话,默认的情况下右对齐。 +# 2)%-20c:"-"号表示左对齐。 +# 3)%.30c:指定输出category的名称,最大的长度是30,如果category的名称长度大于30的话,就会将左边多出的字符截掉,但小于30的话也不会补空格。 +# '.'yyyy-MM:每月 +# '.'yyyy-ww:每周 +# '.'yyyy-MM-dd:每天 +# '.'yyyy-MM-dd-a:每天两次 +# '.'yyyy-MM-dd-HH:每小时 +# '.'yyyy-MM-dd-HH-mm:每分钟 diff --git a/src/main/resources/mongodb.properties b/src/main/resources/mongodb.properties new file mode 100644 index 0000000..5be87ff --- /dev/null +++ b/src/main/resources/mongodb.properties @@ -0,0 +1,36 @@ +#MongoDB 数据库的地址 +mongo.hostport=192.168.20.28:27017 + +#MongoDB 数据库的名称 (不需要手动创建) +mongo.dbname=hengqin + +#每个host允许链接的最大链接数,这些链接空闲时会放入池中,如果链接被耗尽,任何请求链接的操作会被阻塞等待链接可用,推荐配置10 +mongo.connectionsPerHost=10 + +#此参数与一个线程变量每个主机的连接数的机会是可用的最大拥塞的数量,超过的机会后,所有的线程数将及时获得例外。eg.connectionsperhost = 10和threadsallowedtoblockforconnectionmultiplier = 5,最多50个线程级链接,推荐配置为5 +mongo.threadsAllowedToBlockForConnectionMultiplier=5 + +#超时(MS)在套接字连接的建立(打开),默认0(无限) +mongo.connectTimeout=30000 + +#一个线程等待链接可用的最大等待毫秒数,0表示不等待,负数表示等待时间不确定,推荐配置120000 +mongo.maxWaitTime=120000 + +#true:假如链接不能建立时,驱动将重试相同的server,有最大的重试次数,默认为15次,这样可以避免一些server因为一些阻塞操作零时down而驱动抛出异常,这个对平滑过度到一个新的master,也是很有用的,注意:当集群为复制集时,驱动将在这段时间里,尝试链接到旧的master上,而不会马上链接到新master上 +#false: 当在进行socket读写时,不会阻止异常抛出,驱动已经有自动重建破坏链接和重试读操作. 推荐配置false +mongo.autoConnectRetry=false + +#该标志用于控制socket保持活动的功能,通过防火墙保持连接活着 +mongo.socketKeepAlive=true + +#表示socket I/O读写超时时间,推荐为不超时,即 0 +mongo.socketTimeout=0 + +#指示是否允许驱动程序从辅助节点或从属节点读取数据 。true表示读写分离 +mongo.slaveOk=true + +#如果设置的值,writeconcern的wtimeout连接设置为0。意味着安全 +mongo.wtimeout=0 + +#如果设置的值,writeconcern的fsync连接设置为true。意味着安全 +mongo.fsync=true diff --git a/src/main/resources/mybatis-config.xml b/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..6229fa0 --- /dev/null +++ b/src/main/resources/mybatis-config.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/resources.properties b/src/main/resources/resources.properties new file mode 100644 index 0000000..cfd8e92 --- /dev/null +++ b/src/main/resources/resources.properties @@ -0,0 +1,356 @@ +#----------------------------------------------------------------------- +# 本机的ip配置 +#----------------------------------------------------------------------- +#本机ip +address.ip=192.168.30.249 + +#----------------------------------------------------------------------- +# 用户登录的配置 +#----------------------------------------------------------------------- +#登录的端口 +login.server.port=5850 + +#----------------------------------------------------------------------- +# 特殊防区配置,告警地点是一级环岛线,告警级别是岸线警示 +#----------------------------------------------------------------------- +#特殊防区的id号,进入该值得目标会保存告警数据,但是没有告警视频 +defence_id=-1 + +#特殊防区的名称,只要包含了这个值,不会听到TTS语音 +defence_name=-1 + +#----------------------------------------------------------------------- +# 对数据库的基本操作配置 +#----------------------------------------------------------------------- +#基本操作的端口(外部使用--客户端使用) +zmq.router.server.port=5858 + +#基本操作的端口(内部使用--java后台自己使用) +zmq.dealer.server.port=5815 + +#----------------------------------------------------------------------- +# 无人机的配置 +#----------------------------------------------------------------------- +#无人机的ip +UAVip=192.168.8.251 + +#无人机的端口 +UAVPort=10000 + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +zmq_uav_topic=zmq_uav_topic + +#推送无人机数据的时间间隔,单位是:秒(s) +uav.sendSecond=2 + +#----------------------------------------------------------------------- +# 大屏的配置 +#----------------------------------------------------------------------- +#上大屏的ip +big.scr.host=172.20.0.250 + +#上大屏的端口 +big.scr.port=8910 + +#----------------------------------------------------------------------- +# 环岛线的配置(若surline.number=1,则是显示一级环岛线,并进入该条线的预警处理;若surline.number=2,则是显示一级和二级环岛线,并进入该两条线的预警处理;若surline.number=3,则是显示一级、二级、三级环岛线,并进入该三条线的预警处理,三级环岛线的警示级别也是接近提示) +#----------------------------------------------------------------------- +#surLine number(1/2/3) +surline.number=2 + +#----------------------------------------------------------------------- +# TTS语音播放配置 +#----------------------------------------------------------------------- +#TTS的ip +tts.host=172.20.200.105 + +#TTS的端口 +tts.port=5567 + +# 是否开启 1:是 2:否 +tts.status=2 + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +tts_report_topic=tts_report_topic + +#----------------------------------------------------------------------- +# 希德威告警的配置 +#----------------------------------------------------------------------- +#希德威代理服务器的ip +video.alarm.host=192.168.8.203 + +#希德威代理服务器的端口 +video.alarm.port=4649 + +#流媒体代理服务器的ip +compose_video_host=192.168.20.102 + +#流媒体代理服务器的端口 +compose_video_port=4645 + +#(ZMQ通讯时的唯一标识topic)接收希德威告警信息或推送至客户端 +video.alarm.info.topic=alarm_info_topic +video.alarm.target.topic=alarm_target_topic +video.alarm.camera.topic=alarm_camera_topic +video.alarm.prepair.topic=prepair_video_topic +video.alarm.compose.topic=compose_video_topic + +#推送希德威告警、gps至客户端的端口 +alarm.gps.info.port=5958 + +#目标告警的超时时间,单位是:毫秒(MS) +video.alarm.target.timeout=5000 + +#融合视频的超时时间,单位是:毫秒(MS) +compose.video.timeout=180000 + +#(ZMQ通讯时的唯一标识topic)推送人车船识别信息至客户端 +video.alarm.carpersonship.topic=carpersonship_topic + +#推送人车船识别至客户端的端口 +video.alarm.carpersonship.port=8523 + +#接收希德威代理服务器或控制器的topic的端口 +camera_recicve_port=9999 + +#推送相机、希德威配置信息给希德威代理服务器或推送相机列表给控制器的端口 +camera_list_port=9998 + +#----------------------------------------------------------------------- +# AIS、雷达以及雷达回波的配置 +#----------------------------------------------------------------------- +#雷达的编码 +AgilTrack_01_target=40000 +AgilTrack_cat010bsz=10000 +AgilTrack_cat010nbs=20000 +AgilTrack_cat010dtd=30000 + +#雷达的ip +address.radar=192.168.30.249 + +#雷达的端口 +sub.port.radar=4646 + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +radar.topic=radar_target + +#推送雷达数据的时间间隔,单位是:秒(s) +radar.sendSecond=2 + +#雷达回波的ip +address.echo=192.168.60.11 + +#雷达回波的端口 +sub.port.echo=4546 + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +echo.topic=radar_surface_track + +#AIS的ip +address.ais=192.168.60.11 + +#AIS的端口 +sub.port.ais=4545 + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +ais.topic=ais + + + +#(ZMQ通讯时的唯一标识topic)推送AIS助航设备报告数据至客户端 +AidtoNavigationReport.topic=AidtoNavigationReport + +#推送ais、雷达、无人机、TTS语音、手动跟踪、自动跟踪、热点至客户端 +pub.port=5555 + +#雷达或ais距离,上一个点和当前点的距离大于该数值才保存轨迹 +radar.ais.distance=1 + +#----------------------------------------------------------------------- +# 控制器的配置(手自动跟踪或热点的配置) +#----------------------------------------------------------------------- +#控制器的ip +ctrl_fllow_host=192.168.20.105 + +#控制器的端口 +ctrl_fllow_port=8888 + +#手动持续发送的时间间隔,单位是:毫秒(MS) +push.fllow.target.time=2000 + +#手动跟踪或热点的端口(外部使用--客户端使用)【不支持接力】 +fllow.router.server.port=9683 + +#手动跟踪或热点的端口(内部使用--java后台自己使用) +fllow.dealer.server.port=9684 + +#手动跟踪或热点超时时间,单位是:毫秒(MS) +fllow_time=1500 + +#(ZMQ通讯时的唯一标识topic)接收或推送跟踪信息至客户端或控制器 +fllow.topic=fllow_topic + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +client.track.topic=client_track_topic + +##手动跟踪或热点的端口(外部使用--客户端使用)【支持接力】 +fllow.port=6238 + +#相机跟踪的超时时间,单位是:分钟(M) +fllow_time_out=1 + +#接收控制器的topic或推送相机列表至控制器 +ctrl.cam.list.topic=cam_list_topic + +#视频分析服务器的同一台相机的告警时间间隔,单位:分钟(M) +cam.interval.time=5 + +#----------------------------------------------------------------------- +# 带有GPS的设备配置 +#----------------------------------------------------------------------- +#GPS的端口 +gps.tcp.port=8002 + +#时间制 12小时制和24小时制 +gps.hour=24 + +#当前时间的推算时间,若要加8小时,即8;若减8小时,即-8;不加不减,即0 +gps.time=0 + +#发布版本时的类型 +release.type=local + +#(ZMQ通讯时的唯一标识topic)推送至客户端 +gps.info.topic=gps_info_topic + +#推送至客户端的时间间隔,单位是:毫秒(MS) +gps.push.time=2000 + +#接收gps的超时时间,单位是:毫秒(MS) +gps.timeout=60000 + +#gps距离,上一个点和当前点的距离大于该数值才保存轨迹 +gps.distance=1 + +#----------------------------------------------------------------------- +# 有关相机检测服务器的配置 +#----------------------------------------------------------------------- +#相机检测的ip +address.camera=192.168.20.102 + +#相机检测的端口 +sub.port.camera=9999 + +#推送至客户端的端口 +pub.port.camera=6667 + +#todo nyGuideCamPos ip 端口 主题 +address.nyGuideCamPos=127.0.0.1 +sub.port.nyGuideCamPos=5151 +nyGuideCamPos.topic=NyGuideCamPos + +#相机检测的端口(外部使用--相机检测使用) +cam.router.server.port=9898 + +#相机检测的端口(内部使用--java后台自己使用) +cam.dealer.server.port=9899 + +#(ZMQ通讯时的唯一标识topic)接收相机检测服务器的信息或推送至客户端 +cameraStatus.topic=cam_status + +#(ZMQ通讯时的唯一标识topic)接收希德威代理器的topic或推送相机列表至希德威代理器或相机检测服务器 +cameraList.topic=cam_list + +#(ZMQ通讯时的唯一标识topic)推送至希德威代理器或相机检测服务器 +cameraConfigInfo.topic=configure_alarm_server_topic + +#----------------------------------------------------------------------- +# 荣科交互的配置(http服务) +#----------------------------------------------------------------------- +#HTTP path +http.querycameralist.url=/hq_server/interf$AnalyseInterfService/queryCameraList +http.querycamerastatus.url=/hq_server/interf$AnalyseInterfService/queryCameraStatus +http.userinfo.url=/hq_server/interf$AnalyseInterfService/sync +http.warnstatus.url=/hq_server/interf$AnalyseInterfService/handle + +#http rongke path +http.rongke.userinfo.url=http://172.20.0.39:8080/hq/webep$UserService$syncUser +http.rongke.warn.url=http://172.20.0.39:8080/hq/alarm$AlarmService$save + +#连接http服务超时时间,单位是:毫秒(MS) +http.rongke.timeout=1500 + +#http服务端口 +http.server.port=8999 + +#----------------------------------------------------------------------- +# 历史数据的配置(推送给客户端的topic和实时的一样) +#----------------------------------------------------------------------- +#客户端请求的端口 +respond.port=5656 + +#(ZMQ通讯时的唯一标识topic) +send_start_sign=Ready +send_finish_sign=send finished +receive_finish_sign=receive finished +radar_warn_topic=radar_warn + +#----------------------------------------------------------------------- +# 集群Hadoop的配置 +#----------------------------------------------------------------------- +#hbase config +hbase.zookeeper.clientPort=2181 +hbase.zookeeper.quorum=manager1,slave1,slave2 +hbase.master=manager1:9092,slave1:9092,slave2:9092 + +#----------------------------------------------------------------------- +# AIS和雷达的融合的配置 +#----------------------------------------------------------------------- +EARTH_RADIUS=6378137.0 +PI=3.14159265358979323846 +fuse.distance=150 +fuse.cog=50 +fuse.sog=5 +fuse.time=2000 +fuse.zmq.port=5353 +fuse.varaince_dis=169 +fuse.varaince_cog=81 +fuse.varaince_sog=0.64 +fuse.belongLimit=0.50 +fuse.aisWight=0.8 +FUSE_TIME_SPAN=180000 +fuse.topic=radar_fuse_topic + + +#----------------------------------------------------------------------- +# 多雷达的融合的配置 +#----------------------------------------------------------------------- +fuse.radar.distance=150 +fuse.radar.cog=30 +fuse.radar.sog=3 +fuse.radar.varaince_dis=174 +fuse.radar.varaince_cog=67 +fuse.radar.varaince_sog=0.64 +fuse.radar.belongLimit=0.35 +fuse.radar.time.span=60000 +fuse.radar.time=2000 + +#----------------------------------------------------------------------- +# 其他配置 +#----------------------------------------------------------------------- +#geom +qiuji.radius=0.8 +guangdianyi.radius=3 +split_time_Radar=1 +split_time_AIS=10 +split_time_RadarWarn=10 +# HistoryTracks valid time +minuteNum=15 +# cleanData valid time +minuteClean=30 +prepush_radarNum=5 +prepush_trackNum=20 +radarFalseAlarmDistance=150 +minSpeed=2 +oneLineSpeed=8 +warnTimes=3 diff --git a/src/main/resources/spring-mvc.xml b/src/main/resources/spring-mvc.xml new file mode 100644 index 0000000..d985c38 --- /dev/null +++ b/src/main/resources/spring-mvc.xml @@ -0,0 +1,66 @@ + + + + + + + + + classpath:resources.properties + classpath:jdbc.properties + classpath:mongodb.properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/spring-mybatis.xml b/src/main/resources/spring-mybatis.xml new file mode 100644 index 0000000..c168b4e --- /dev/null +++ b/src/main/resources/spring-mybatis.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/start-thread.xml b/src/main/resources/start-thread.xml new file mode 100644 index 0000000..f944282 --- /dev/null +++ b/src/main/resources/start-thread.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +