PacketHandler

@Singleton
class PacketHandler @Inject constructor(packetRepository: Lazy<PacketRepository>, serviceBroadcasts: MeshServiceBroadcasts, radioInterfaceService: RadioInterfaceService, meshLogRepository: Lazy<MeshLogRepository>, connectionStateHolder: MeshServiceConnectionStateHolder)(source)

Constructors

Link copied to clipboard
@Inject
constructor(packetRepository: Lazy<PacketRepository>, serviceBroadcasts: MeshServiceBroadcasts, radioInterfaceService: RadioInterfaceService, meshLogRepository: Lazy<MeshLogRepository>, connectionStateHolder: MeshServiceConnectionStateHolder)

Functions

Link copied to clipboard
fun handleQueueStatus(queueStatus: MeshProtos.QueueStatus)
Link copied to clipboard
fun removeResponse(dataRequestId: Int, complete: Boolean)
Link copied to clipboard
fun sendToRadio(packet: MeshProtos.MeshPacket)

Send a mesh packet to the radio, if the radio is not currently connected this function will throw NotConnectedException

fun sendToRadio(p: MeshProtos.ToRadio.Builder)

Send a command/packet to our radio. But cope with the possibility that we might start up before we are fully bound to the RadioInterfaceService

Link copied to clipboard