2020-05-13 14:47:55 -07:00
|
|
|
package com.geeksville.mesh
|
|
|
|
|
|
|
|
|
|
import android.os.Parcelable
|
2023-09-05 08:19:26 -03:00
|
|
|
import androidx.room.Entity
|
|
|
|
|
import androidx.room.PrimaryKey
|
|
|
|
|
import kotlinx.parcelize.Parcelize
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Room [Entity] and [PrimaryKey] annotations and imports can be removed when only using the API.
|
|
|
|
|
* For details check the AIDL interface in [com.geeksville.mesh.IMeshService]
|
|
|
|
|
*/
|
2020-05-13 14:47:55 -07:00
|
|
|
|
|
|
|
|
// MyNodeInfo sent via special protobuf from radio
|
2023-09-05 08:19:26 -03:00
|
|
|
@Parcelize
|
|
|
|
|
@Entity(tableName = "MyNodeInfo")
|
2020-05-13 14:47:55 -07:00
|
|
|
data class MyNodeInfo(
|
2023-09-05 08:19:26 -03:00
|
|
|
@PrimaryKey(autoGenerate = false)
|
2020-05-13 14:47:55 -07:00
|
|
|
val myNodeNum: Int,
|
|
|
|
|
val hasGPS: Boolean,
|
|
|
|
|
val model: String?,
|
|
|
|
|
val firmwareVersion: String?,
|
|
|
|
|
val couldUpdate: Boolean, // this application contains a software load we _could_ install if you want
|
2020-05-30 17:28:00 -07:00
|
|
|
val shouldUpdate: Boolean, // this device has old firmware
|
|
|
|
|
val currentPacketId: Long,
|
2020-06-03 16:16:51 -07:00
|
|
|
val messageTimeoutMsec: Int,
|
2021-03-02 22:12:42 +08:00
|
|
|
val minAppVersion: Int,
|
2022-01-26 22:26:35 -03:00
|
|
|
val maxChannels: Int,
|
2022-08-28 07:54:47 -03:00
|
|
|
val hasWifi: Boolean,
|
2022-01-26 22:26:35 -03:00
|
|
|
val channelUtilization: Float,
|
|
|
|
|
val airUtilTx: Float
|
2020-05-13 14:47:55 -07:00
|
|
|
) : Parcelable {
|
2020-05-13 17:00:23 -07:00
|
|
|
/** A human readable description of the software/hardware version */
|
2021-03-03 08:14:40 +08:00
|
|
|
val firmwareString: String get() = "$model $firmwareVersion"
|
2023-09-05 08:19:26 -03:00
|
|
|
}
|