Skip to content

Commit 385b5e4

Browse files
committed
engine: Add conceal key to trigger conf
This is a bugfix, since the trigger conf is used for validation purposes.
1 parent 918f795 commit 385b5e4

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

engine/src/stack.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,7 @@ struct TriggerConf : public PersistentConfable {
785785
Source source{Source::FILESYSTEM};
786786
Conf action{};
787787
Conf event{};
788+
bool conceal{false};
788789
bool sticky{false};
789790
bool optional{false};
790791

@@ -804,6 +805,7 @@ struct TriggerConf : public PersistentConfable {
804805
{"event", make_schema(&event, EANDA_SCHEMA, "event").require()},
805806
{"action", make_schema(&action, EANDA_SCHEMA, "action").require()},
806807
{"sticky", make_schema(&sticky, "whether trigger should be sticky")},
808+
{"conceal", make_schema(&conceal, "whether trigger should be concealed in history")},
807809
{"optional", make_schema(&optional, "whether errors creating event or action should be ignored")},
808810
{"at", Ignore("time at which trigger was executed", JsonType::string)},
809811
{"since", Ignore("time since which trigger was in queue", JsonType::string)},

engine/tests/test_engine_json_schema.json

+4
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,10 @@
11211121
"at": {
11221122
"description": "time at which trigger was executed"
11231123
},
1124+
"conceal": {
1125+
"description": "whether trigger should be concealed in history",
1126+
"type": "boolean"
1127+
},
11241128
"event": {
11251129
"anyOf": [
11261130
{

engine/tests/test_engine_nop_smoketest_dump.json

+10
Original file line numberDiff line numberDiff line change
@@ -92,27 +92,31 @@
9292
],
9393
"name": "bundle"
9494
},
95+
"conceal": false,
9596
"event": "start",
9697
"optional": false,
9798
"source": "filesystem",
9899
"sticky": false
99100
},
100101
{
101102
"action": "basic/hmi=enable",
103+
"conceal": false,
102104
"event": "next=1",
103105
"optional": false,
104106
"source": "filesystem",
105107
"sticky": false
106108
},
107109
{
108110
"action": "basic/hmi=resume",
111+
"conceal": false,
109112
"event": "time=5",
110113
"optional": false,
111114
"source": "filesystem",
112115
"sticky": false
113116
},
114117
{
115118
"action": "basic/hmi=!resume",
119+
"conceal": false,
116120
"event": "time=5.5",
117121
"optional": false,
118122
"source": "filesystem",
@@ -132,6 +136,7 @@
132136
}
133137
]
134138
},
139+
"conceal": false,
135140
"event": "time=6",
136141
"label": "Push and release basic/hmi=plus",
137142
"optional": false,
@@ -140,13 +145,15 @@
140145
},
141146
{
142147
"action": "fail",
148+
"conceal": false,
143149
"event": "virtue/failure",
144150
"optional": false,
145151
"source": "filesystem",
146152
"sticky": false
147153
},
148154
{
149155
"action": "fail",
156+
"conceal": false,
150157
"event": "default_speed/kmph=>0.0",
151158
"label": "Vehicle default should never move with the nop binding.",
152159
"optional": false,
@@ -155,20 +162,23 @@
155162
},
156163
{
157164
"action": "log=info: Running nop/basic smoketest.",
165+
"conceal": false,
158166
"event": "start",
159167
"optional": false,
160168
"source": "filesystem",
161169
"sticky": false
162170
},
163171
{
164172
"action": "realtime_factor=-1",
173+
"conceal": false,
165174
"event": "start",
166175
"optional": false,
167176
"source": "filesystem",
168177
"sticky": false
169178
},
170179
{
171180
"action": "succeed",
181+
"conceal": false,
172182
"event": "time=60",
173183
"optional": false,
174184
"source": "filesystem",

0 commit comments

Comments
 (0)