Skip to content

Commit 45d4592

Browse files
chore: create enum class for twin properties
1 parent 9622822 commit 45d4592

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package infrastructure.digitaltwins.events
10+
11+
/**
12+
* Object with all the properties path of Digital Twins.
13+
*/
14+
object TwinProperties {
15+
16+
/**
17+
* The properties path of Room Model.
18+
* @param path the property path.
19+
*/
20+
enum class RoomProperties(val path: String) {
21+
TEMPERATURE("/temperature"),
22+
HUMIDITY("/humidity"),
23+
LUMINOSITY("/luminosity"),
24+
PRESENCE("/presence_inside")
25+
}
26+
27+
/**
28+
* The properties path of Patient Model.
29+
* @param path the property path.
30+
*/
31+
enum class PatientProperties(val path: String) {
32+
BODY_TEMPERATURE("/body_temperature"),
33+
DIASTOLIC_PRESSURE("/diastolic_blood_pressure"),
34+
SYSTOLIC_PRESSURE("/systolic_blood_pressure"),
35+
IS_ON_OPERATING_TABLE("/is_on_operating_table"),
36+
RESPIRATORY_RATE("/respiratory_rate"),
37+
SATURATION_PERCENTAGE("/saturation_percentage"),
38+
HEARTBEAT("/heart_beat")
39+
}
40+
41+
/**
42+
* The digital twins model id.
43+
* @param id the model id.
44+
*/
45+
enum class DTModelID(val id: String) {
46+
OPERATING_ROOM_MODEL_ID("dtmi:io:github:smartoperatingblock:OperatingRoom;1"),
47+
PRE_OPERATING_ROOM_MODEL_ID("dtmi:io:github:smartoperatingblock:PrePostOperatingRoom;1"),
48+
PROCESS_MODEL_ID("dtmi:io:github:smartoperatingblock:SurgicalProcess;1"),
49+
PATIENT_MODEL_ID("dtmi:io:github:smartoperatingblock:Patient;1"),
50+
HEALTH_PROFESSIONAL_MODEL_ID("dtmi:io:github:smartoperatingblock:HealthProfessional;1")
51+
}
52+
53+
/**
54+
* The types of digital twin events.
55+
* @param type the event type.
56+
*/
57+
enum class DTEventTypes(val type: String) {
58+
UPDATE("Microsoft.DigitalTwins.Twin.Update"),
59+
RELATIONSHIP_CREATE("Microsoft.DigitalTwins.Relationship.Create"),
60+
RELATIONSHIP_DELETE("Microsoft.DigitalTwins.Relationship.Delete"),
61+
}
62+
}

0 commit comments

Comments
 (0)