mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-02 04:08:54 +08:00
feat: quality 65535
This commit is contained in:
parent
b1a0c59b6b
commit
6a6041fd44
@ -391,7 +391,7 @@ get_write(ResponseData, SlaveId, FunCode, _DtuAddr, ProductId, Address, Acc) ->
|
||||
build_req_message(Req) when is_record(Req, rtu_req) ->
|
||||
% validate
|
||||
if
|
||||
(Req#rtu_req.slaveId < 0) or (Req#rtu_req.slaveId > 247) ->
|
||||
(Req#rtu_req.slaveId < 0) or (Req#rtu_req.slaveId > 255) ->
|
||||
throw({argumentError, Req#rtu_req.slaveId});
|
||||
true -> ok
|
||||
end,
|
||||
@ -406,7 +406,7 @@ build_req_message(Req) when is_record(Req, rtu_req) ->
|
||||
true -> ok
|
||||
end,
|
||||
if
|
||||
(Req#rtu_req.quality < 0) or (Req#rtu_req.quality > 2000) ->
|
||||
(Req#rtu_req.quality < 0) or (Req#rtu_req.quality > 65535) ->
|
||||
throw({argumentError, Req#rtu_req.quality});
|
||||
true -> ok
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user