This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TM4C1294NCPDT:TCP 客户端:如何保持 RTOS tcphandler 任务运行?

Guru**** 2463330 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/659009/tm4c1294ncpdt-tcp-client-how-to-keep-rtos-tcphandler-task-running

器件型号:TM4C1294NCPDT

我已经根据 TN4C1294NCPDT 的 TCP 回显示例创建了 TCP 客户端,它创建了一个任务“tcpphandler”,用于向服务器发送数据。 当客户端与 TCP 服务器建立连接时、我的代码会创建 MQTT 数据包并将其发送到 TCP 服务器、而我的代码中的 TCP 服务器是 MQTT 服务器。 现在介绍了该设置、我可以在 MQTT 上发布一些数据、但此任务仅执行一次。 我希望重复运行此任务、以便它可以连续发布数据。 我尝试为它构建信标、但它不起作用...我可能将信标发布到了错误的位置。 如何使该任务永久运行或重复创建该任务?

谢谢你

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好 Prachi、

    为什么要退出任务? 您可以随附代码吗?

    Todd