-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_config.json
More file actions
80 lines (80 loc) · 2.11 KB
/
test_config.json
File metadata and controls
80 lines (80 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"modules": [
{ "name": "alarm" },
{ "name": "command" },
{ "name": "communication" },
{ "name": "datapoint" },
{
"name": "tracking",
"config": {
"mode": "file",
"file_path": "flow_events.log"
}
}
],
"dp_types": {
"LEVEL": { "type": "float", "min": 0, "max": 100, "default": 0.0 },
"STATUS": { "type": "enum", "values": ["OPENED", "CLOSED"], "default": "CLOSED" },
"PRESSURE": { "type": "float", "min": 0, "max": 200, "default": 50.0 },
"TEMPERATURE":{ "type": "float", "min": 100, "max": 150, "default": 120.0 }
},
"drivers": [
{
"name": "WaterTank",
"driver_class": "TankTestDriver",
"connection_info": { "server_name": "WaterTank" },
"datapoints": [
{ "name": "TANK", "type": "LEVEL" },
{ "name": "PUMP", "type": "STATUS" },
{ "name": "DOOR", "type": "STATUS" }
]
},
{
"name": "AuxServer",
"driver_class": "BoilerTestDriver",
"connection_info": { "server_name": "AuxServer" },
"datapoints": [
{ "name": "VALVE", "type": "STATUS" },
{ "name": "PRESSURE", "type": "PRESSURE" },
{ "name": "TEMPERATURE", "type": "TEMPERATURE" },
{ "name": "HEATER", "type": "STATUS" }
]
}
],
"rules": [
{
"rule_id": "close_valve_if_high",
"on_condition": "AuxServer@PRESSURE > 100",
"on_actions": [
"send_command('AuxServer@VALVE1_POS', 0)",
"raise_alarm()"
],
"off_condition": "AuxServer@PRESSURE < 80",
"off_actions": [
"lower_alarm()"
]
},
{
"rule_id": "pump_shutdown_if_low_level",
"on_condition": "WaterTank@TANK1_LEVEL < 10",
"on_actions": [
"send_command('WaterTank@PUMP1_STATUS', 'OFF')",
"raise_alarm()"
]
},
{
"rule_id": "door_open_alarm",
"on_condition": "WaterTank@DOOR1_OPEN == True",
"on_actions": [
"raise_alarm()"
]
},
{
"rule_id": "temperature_high_warning",
"on_condition": "AuxServer@TEMPERATURE > 80",
"on_actions": [
"raise_alarm()"
]
}
]
}