| | |
| | | * 显示当前所有属性值 |
| | | */ |
| | | public void displayProperties() { |
| | | System.out.println("当前属性值:"); |
| | | System.out.println("mowerId: " + (mowerId != null ? mowerId : "未设置")); |
| | | System.out.println("cuttingWidth: " + (cuttingWidth != null ? cuttingWidth : "未设置")); |
| | | System.out.println("simCardNumber: " + (simCardNumber != null ? simCardNumber : "未设置")); |
| | | System.out.println("handheldMarkerId: " + (handheldMarkerId != null ? handheldMarkerId : "未设置")); |
| | | System.out.println("firmwareVersion: " + (firmwareVersion != null ? firmwareVersion : "未设置")); |
| | | System.out.println("appVersion: " + (appVersion != null ? appVersion : "未设置")); |
| | | System.out.println("idleTrailDurationSeconds: " + idleTrailDurationSeconds); |
| | | // 显示属性功能已禁用 |
| | | } |
| | | |
| | | /** |
| | | * 获取割草机编号 |
| | | * @return 割草机编号 |
| | | */ |
| | | public static String getMowerIdValue() { |
| | | return getPropertyValue("mowerId"); |
| | | } |
| | | |
| | | // 根据set.properties中的键名获取对应的值,没有或为-1时返回null |