lora mesh 发送即收到
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package transport
|
||||
|
||||
import "time"
|
||||
|
||||
// Communicator 用于其他设备通信
|
||||
type Communicator interface {
|
||||
// Send 用于发送一条单向数据(不等待回信)
|
||||
@@ -12,6 +14,14 @@ type SendResult struct {
|
||||
// MessageID 是通信服务为此次发送分配的唯一标识符。
|
||||
// 调用方需要保存此 ID,以便后续关联 ACK 等事件。
|
||||
MessageID string
|
||||
|
||||
// AcknowledgedAt 记录设备确认收到下行消息的时间。
|
||||
// 并非所有发送实现都会同步返回收到时间
|
||||
AcknowledgedAt *time.Time
|
||||
|
||||
// ReceivedSuccess 表示设备是否成功接收到下行消息。
|
||||
// 并非所有发送实现都会同步返回是否送达
|
||||
ReceivedSuccess *bool
|
||||
}
|
||||
|
||||
// Listener 用于监听其他设备发送过来的数据
|
||||
|
||||
Reference in New Issue
Block a user