Skip to content

Commit

Permalink
chore: add measure unit to temperature and luminosity
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Feb 15, 2023
1 parent 45d4592 commit 1a938af
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/kotlin/entities/environment/EnvironmentData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,30 @@ object EnvironmentData {
/**
* The temperature of the room.
* @param temperatureValue the temperature of the room.
* @param temperatureUnit the temperature unit.
*/
data class Temperature(val temperatureValue: Double)
data class Temperature(val temperatureValue: Double, val temperatureUnit: TemperatureUnit)

/**
* The luminosity of the room.
* @param luminosityValue the luminosity value of the room.
* @param luminosityUnit the luminosity unit.
*/
data class Luminosity(val luminosityValue: Double)
data class Luminosity(val luminosityValue: Double, val luminosityUnit: LuminosityUnit)

/**
* The presence of a person inside the room.
* @param presenceDetected true if is a person detection event, false otherwise.
*/
data class Presence(val presenceDetected: Boolean)

/** The temperature unit. **/
enum class TemperatureUnit {
CELSIUS
}

/** The luminosity unit. **/
enum class LuminosityUnit {
LUX
}
}

0 comments on commit 1a938af

Please # to comment.