我想将协调器设置为每一秒广播一次,这样终端设备就能大概一秒多一点接收到协调器广播来的信息 ,我设置了osal_start_timerEx()函数里面的参数为1000ms,结果我的终端设备收到的广播消息,在串口上显示,收到消息的速度非常快,远远小于1秒,大家帮我看看是为什么?谢谢了
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.
我想将协调器设置为每一秒广播一次,这样终端设备就能大概一秒多一点接收到协调器广播来的信息 ,我设置了osal_start_timerEx()函数里面的参数为1000ms,结果我的终端设备收到的广播消息,在串口上显示,收到消息的速度非常快,远远小于1秒,大家帮我看看是为什么?谢谢了
实现每1S发送一个消息的办法:时间一到你会触发一个事件,在处理这个事件的代码中可以再次定时1S后触发该事件,这样不就可以一直循环了吗!
回调函数设计到UART的相关设置,你可以屏蔽MT层,直接在app层自己进行串口配置
你应该有相关资料,一些例子,想什么组网,回调都是一个个功能进行讲解的
osal_start_timerEx( SampleApp_TaskID,
SAMPLEAPP_SEND_PERIODIC_MSG_EVT,
SAMPLEAPP_SEND_PERIODIC_MSG_TIMEOUT );我看这个函数网上的解释可以让协调器定时进行周期性的广播消息。
5.2 osal_start_timerEx( )
5.2.1 Description
This function is called to start a timer. When the timer expires, the given event bit will be set. The event will be
set for the task specified by taskID. This timer is a one shot timer, meaning that when the timer expires it isn’t
reloaded.
看官方的资料,这是OSAL API。