Showing
2 changed files
with
5 additions
and
1 deletions
... | ... | @@ -26,6 +26,7 @@ import org.thingsboard.server.common.data.id.DeviceProfileId; |
26 | 26 | import org.thingsboard.server.common.data.id.RuleChainId; |
27 | 27 | import org.thingsboard.server.common.data.id.TenantId; |
28 | 28 | import org.thingsboard.server.common.data.yunteng.common.DeleteGroup; |
29 | +import org.thingsboard.server.common.data.yunteng.core.exception.ThingsKitException; | |
29 | 30 | import org.thingsboard.server.common.data.yunteng.core.exception.TkDataValidationException; |
30 | 31 | import org.thingsboard.server.common.data.yunteng.core.message.ErrorMessage; |
31 | 32 | import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO; |
... | ... | @@ -224,7 +225,7 @@ public class TkDeviceScriptController extends BaseController { |
224 | 225 | @PostMapping("/modbus") |
225 | 226 | @ApiOperation("生成Modbus指令") |
226 | 227 | public ResponseEntity<String> modbus(@RequestBody TkDeviceRpcDTO inputParams) |
227 | - throws ThingsboardException { | |
228 | + throws ThingsKitException { | |
228 | 229 | return ResponseEntity.ok(scriptService.modbus(inputParams)); |
229 | 230 | } |
230 | 231 | ... | ... |
1 | 1 | package org.thingsboard.server.common.data.yunteng.enums; |
2 | 2 | |
3 | 3 | public enum TkModebusCheckType { |
4 | + TOTAL_AND_SUM(16,0xffff,0xA001,0,0xA001,true,true,true), | |
5 | + AND_TOTAL_XOR(16,0xffff,0xA001,0,0xA001,true,true,true), | |
6 | + CRC_8(16,0xffff,0xA001,0,0xA001,true,true,true), | |
4 | 7 | CRC_16_HIGH(16,0xffff,0xA001,0,0xA001,true,true,true), |
5 | 8 | CRC_16_LOWER(16,0xffff,0xA001,0,0xA001,true,true,false), |
6 | 9 | CRC_32_HIGH(32,0xffffffff,0x4c11db7,0,0x4c11db7,false,false,true), | ... | ... |