-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于isBlockingReadData是否阻塞式接收数据,和统一监听数据接口出现丢包情况 #24
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
大佬,我看文档说:统一监听数据接口与发送 Task 任务收到的回调数据是互斥关系(剔除了 Task 回调的数据),优先级低于 Task 任务回调。但在实际使用情况好像数据又会互串,下面是关于遇到问题的描述:

因为下位机每隔一秒会发送一条心跳包消息给上位机,所以app这边通过使用统一监听数据接口的方式对下位机心跳包数据的接收,这件监听是在activity基类去添加的,
当isBlockingReadData设置为true时,发现会出现心跳包数据不能正常接收到,可能是收据接收阻塞了(应用程序频繁做其它操作,比如频繁网络请求,然后进行文件读写),导致部分心跳包数据出现丢包情况,尝试将isBlockingReadData设置为false,这个时候心跳包数据是可以正常接收(一秒一条数据),但是上位机主动发送指令数据给下位机后,心跳包数据也可能会在主动发送的这条指令任务的OnDataReceiverListener这个数据回调里,由于心跳包指令码和主动发送的指令码不是同一指令码,这一条指令会出现数据解析异常的情况,麻烦帮忙解答一下是否是我这这边使用的方式不对。
The text was updated successfully, but these errors were encountered: