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