-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate conditions syntax on device template loading and during package build
- Loading branch information
Showing
7 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/device-templates/config-invalid-channel-condition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"device_type": "invalid_channel_condition", | ||
"device": { | ||
"name": "invalid channel condition", | ||
"id": "invalid channel condition", | ||
"channels": [ | ||
{ | ||
"name": "Temperature", | ||
"reg_type": "input", | ||
"format": "s32", | ||
"address": "0x0504", | ||
"condition": "( in1 > 3 )" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"device_type": "invalid_param_condition", | ||
"device": { | ||
"name": "invalid param condition", | ||
"id": "invalid param condition", | ||
"setup": [ | ||
{ | ||
"title": "Param", | ||
"address": "0x0504", | ||
"value": 1 | ||
} | ||
], | ||
"channels": [ | ||
{ | ||
"name": "Temperature", | ||
"reg_type": "input", | ||
"format": "s32", | ||
"address": "0x0504" | ||
} | ||
], | ||
"parameters": [ | ||
{ | ||
"id": "Test", | ||
"title": "p1", | ||
"address": 9992, | ||
"condition": "( in1 > 3 )" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"device_type": "invalid_setup_condition", | ||
"device": { | ||
"name": "invalid setup condition", | ||
"id": "invalid setup condition", | ||
"setup": [ | ||
{ | ||
"title": "Param", | ||
"address": "0x0504", | ||
"value": 1, | ||
"condition": "( in1 > 3 )" | ||
} | ||
], | ||
"channels": [ | ||
{ | ||
"name": "Temperature", | ||
"reg_type": "input", | ||
"format": "s32", | ||
"address": "0x0504" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters