File tree 1 file changed +30
-0
lines changed
src/env/artifact/environment/roomartifact
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
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 artifact .environment .roomartifact ;
10
+
11
+ import cartago .OPERATION ;
12
+
13
+ import java .util .logging .Logger ;
14
+
15
+ /**
16
+ * CArtAgO artifact that is responsible for the communication with the hvac system of the operating block respect
17
+ * to the ventilation part.
18
+ */
19
+ public class Ventilation extends AbstractRoomArtifact implements DimmableArtifact {
20
+ @ Override
21
+ @ OPERATION
22
+ public final void setIntensity (final int intensityPercentage ) {
23
+ if (intensityPercentage < 0 || intensityPercentage > 100 ) {
24
+ throw new IllegalArgumentException ("Intensity must be an integer percentage" );
25
+ }
26
+
27
+ Logger .getLogger (Ventilation .class .toString ())
28
+ .info ("[" + this .getRoomId () + "]" + " Set " + intensityPercentage );
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments