Skip to content

Commit 06214c9

Browse files
feat: add ventilation base artifact
1 parent 2f71ef9 commit 06214c9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
}

0 commit comments

Comments
 (0)