DataPacket

@Serializable
data class DataPacket(var to: String? = ID_BROADCAST, val bytes: ByteArray?, val dataType: Int, var from: String? = ID_LOCAL, var time: Long = System.currentTimeMillis(), var id: Int = 0, var status: MessageStatus? = MessageStatus.UNKNOWN, var hopLimit: Int = 0, var channel: Int = 0, var wantAck: Boolean = true, var hopStart: Int = 0, var snr: Float = 0.0f, var rssi: Int = 0, var replyId: Int? = null) : Parcelable

A parcelable version of the protobuf MeshPacket + Data subpacket.

Constructors

Link copied to clipboard
constructor(to: String?, channel: Int, text: String, replyId: Int? = null)

Syntactic sugar to make it easy to create text messages

constructor(to: String?, channel: Int, waypoint: <Error class: unknown class>)
constructor(parcel: Parcel)
constructor(to: String? = ID_BROADCAST, bytes: ByteArray?, dataType: Int, from: String? = ID_LOCAL, time: Long = System.currentTimeMillis(), id: Int = 0, status: MessageStatus? = MessageStatus.UNKNOWN, hopLimit: Int = 0, channel: Int = 0, wantAck: Boolean = true, hopStart: Int = 0, snr: Float = 0.0f, rssi: Int = 0, replyId: Int? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If there was an error with this message, this string describes what was wrong.

Link copied to clipboard
var from: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var id: Int
Link copied to clipboard
var replyId: Int?
Link copied to clipboard
var rssi: Int
Link copied to clipboard
var snr: Float
Link copied to clipboard
Link copied to clipboard
val text: String?

If this is a text message, return the string, otherwise null

Link copied to clipboard
var time: Long
Link copied to clipboard
var to: String?
Link copied to clipboard
Link copied to clipboard
val waypoint: <Error class: unknown class>?

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun readFromParcel(parcel: Parcel)
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)