Skip to content

Commit 2796742

Browse files
feat: create base schema for temperatureControl agent
1 parent ef4e7a3 commit 2796742

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

automation_management_microservice.jcm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
mas automation_management_microservice {
1010
agent director
11+
agent temperatureControl
1112
}

src/agt/temperatureControl.asl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
/*
10+
* This agent is responsible to monitor the temperature inside the Operating Block
11+
* in order to maintain it within the values of the user configuration.
12+
*/
13+
14+
// todo: react to configuration changes
15+
16+
!observeOperatingBlock.
17+
18+
+!observeOperatingBlock
19+
<- ?obtainObserver(OperatingBlockObserverId);
20+
start [aid(OperatingBlockObserverId)];
21+
focus(OperatingBlockObserverId).
22+
23+
// Obtain the operating block observer
24+
+?obtainObserver(OperatingBlockObserverId)
25+
<- lookupArtifact("operating_block_observer", OperatingBlockObserverId).
26+
27+
// If the operating block observer artifact is not found in the workspace, then create it
28+
-?obtainObserver(OperatingBlockObserverId)
29+
<- makeArtifact("operating_block_observer", "artifact.environment.OperatingBlockObserverArtifact", [], OperatingBlockObserverId).
30+
31+
32+
{ include("$jacamoJar/templates/common-cartago.asl") }
33+
{ include("$jacamoJar/templates/common-moise.asl") }

0 commit comments

Comments
 (0)