This commit is contained in:
narawat lamaiin
2024-10-11 16:38:18 +07:00
parent 13566a6da5
commit 4b73042e09

View File

@@ -611,6 +611,9 @@ julia> outgoingMsg = Dict(
julia> success, error, response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg)
```
# TODO
- [] update docs
# Signature
"""
function sendReceiveMqttMsg(outgoingMsg::Dict{Symbol, T};
@@ -649,6 +652,10 @@ function sendReceiveMqttMsg(mqttInstance::mqttClientInstance_v2, receivechannel:
timepass = nothing
attempts = 1
while attempts <= maxattempt
if attempts > 1
println("attempts $attempts ", @__FILE__, " ", @__LINE__)
end
sendMqttMsg(mqttInstance, outgoingMsg)
starttime = Dates.now()
@@ -673,7 +680,7 @@ function sendReceiveMqttMsg(mqttInstance::mqttClientInstance_v2, receivechannel:
end
sleep(1)
end
println("attempts $attempts ", @__FILE__, " ", @__LINE__)
attempts += 1
end