RuntimeError

sealed class RuntimeError

Represents error the sensor recorded while running.

The sensor keeps the last 20 errors, newest first. Most of them describe internal faults that are only meaningful to Efento, and those arrive as InternalRuntimeError with their rawData left for you to pass on. The handful that are worth acting on have their own subtypes.

Inheritors

Types

Link copied to clipboard
data class CoapDecodeFailed(val id: Int, val rawData: List<Long>, val status: RuntimeError.CoapDecodeFailed.Status?, val optionalData: Long) : RuntimeError

The sensor could not decode a CoAP message it received.

Link copied to clipboard
data class InternalRuntimeError(val id: Int, val rawData: List<Long>) : RuntimeError

Error the library does not break down further. Report id and rawData to Efento to have it interpreted.

Link copied to clipboard
data class ModemUpdateResult(val id: Int, val rawData: List<Long>, val updateResult: RuntimeError.ModemUpdateResult.UpdateResult?) : RuntimeError

A modem firmware update finished.

Link copied to clipboard
data class SensorSleepFailed(val id: Int, val rawData: List<Long>, val timestamp: Long, val channel: Channel) : RuntimeError

A sensor did not go to sleep when it was told to.

Link copied to clipboard
data class SensorSleepReturned(val id: Int, val rawData: List<Long>, val timestamp: Long, val channel: Channel) : RuntimeError

A sensor that had failed to sleep started sleeping again.

Link copied to clipboard
data class ServerResponseError(val id: Int, val rawData: List<Long>, val timestamp: Long, val coApCode: RuntimeError.ServerResponseError.CoapCode?) : RuntimeError

The server answered a transmission with an error.

Link copied to clipboard
data class SimNonZeroHplmnSearchPeriod(val id: Int, val rawData: List<Long>, val searchPeriod: Long) : RuntimeError

The SIM card asks the modem to search for its home network on a timer, which costs power. A period of zero switches the search off, so any other value is worth knowing about.

Link copied to clipboard
data class SupervisedEntityIsDead(val id: Int, val rawData: List<Long>, val entityId: Int) : RuntimeError

A supervised part of the sensor stopped responding.

Properties

Link copied to clipboard
open val id: Int

Id the device uses for this kind of error.

Link copied to clipboard
open val rawData: List<Long>

Values the device recorded alongside the error, in the order it stored them.