generated from SmartOperatingBlock/kotlin-template-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create enum class for twin properties
- Loading branch information
1 parent
9622822
commit 45d4592
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
src/main/kotlin/infrastructure/digitaltwins/events/TwinProperties.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (c) 2023. Smart Operating Block | ||
* | ||
* Use of this source code is governed by an MIT-style | ||
* license that can be found in the LICENSE file or at | ||
* https://opensource.org/licenses/MIT. | ||
*/ | ||
|
||
package infrastructure.digitaltwins.events | ||
|
||
/** | ||
* Object with all the properties path of Digital Twins. | ||
*/ | ||
object TwinProperties { | ||
|
||
/** | ||
* The properties path of Room Model. | ||
* @param path the property path. | ||
*/ | ||
enum class RoomProperties(val path: String) { | ||
TEMPERATURE("/temperature"), | ||
HUMIDITY("/humidity"), | ||
LUMINOSITY("/luminosity"), | ||
PRESENCE("/presence_inside") | ||
} | ||
|
||
/** | ||
* The properties path of Patient Model. | ||
* @param path the property path. | ||
*/ | ||
enum class PatientProperties(val path: String) { | ||
BODY_TEMPERATURE("/body_temperature"), | ||
DIASTOLIC_PRESSURE("/diastolic_blood_pressure"), | ||
SYSTOLIC_PRESSURE("/systolic_blood_pressure"), | ||
IS_ON_OPERATING_TABLE("/is_on_operating_table"), | ||
RESPIRATORY_RATE("/respiratory_rate"), | ||
SATURATION_PERCENTAGE("/saturation_percentage"), | ||
HEARTBEAT("/heart_beat") | ||
} | ||
|
||
/** | ||
* The digital twins model id. | ||
* @param id the model id. | ||
*/ | ||
enum class DTModelID(val id: String) { | ||
OPERATING_ROOM_MODEL_ID("dtmi:io:github:smartoperatingblock:OperatingRoom;1"), | ||
PRE_OPERATING_ROOM_MODEL_ID("dtmi:io:github:smartoperatingblock:PrePostOperatingRoom;1"), | ||
PROCESS_MODEL_ID("dtmi:io:github:smartoperatingblock:SurgicalProcess;1"), | ||
PATIENT_MODEL_ID("dtmi:io:github:smartoperatingblock:Patient;1"), | ||
HEALTH_PROFESSIONAL_MODEL_ID("dtmi:io:github:smartoperatingblock:HealthProfessional;1") | ||
} | ||
|
||
/** | ||
* The types of digital twin events. | ||
* @param type the event type. | ||
*/ | ||
enum class DTEventTypes(val type: String) { | ||
UPDATE("Microsoft.DigitalTwins.Twin.Update"), | ||
RELATIONSHIP_CREATE("Microsoft.DigitalTwins.Relationship.Create"), | ||
RELATIONSHIP_DELETE("Microsoft.DigitalTwins.Relationship.Delete"), | ||
} | ||
} |