Hi,
I am new to BACnet VTS scripting.Are there any conditional statements in VTS script?
For example IF,WHILE,DO-WHILE etc.If yes,can I get syntax and examples for each of them.
Hi,
I am new to BACnet VTS scripting.Are there any conditional statements in VTS script?
For example IF,WHILE,DO-WHILE etc.If yes,can I get syntax and examples for each of them.
Thanks in Advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
VTS scripting is not a full language. It has no looping, and no run-time IF.
There is an IF/ENDIF, but it is done during "Check syntax" time, like #if in C.
There are no subroutines, but you can sometimes use "include" to approximate them.
You can do quite complex things with these simple tools. For example, I have written a set of scripts to test various options of the Schedule object. A portion of it looks like this:
IF (AUTO_SET_PROPERTY = schedule-default)
IF (VALUE_TYPE = "BOOL")
include "Schedule_setDefault_bool.vts"
ENDIF
IF (VALUE_TYPE = "ENUM")
include "Schedule_setDefault_enum.vts"
ENDIF
IF (VALUE_TYPE = "REAL")
include "Schedule_setDefault_real.vts"
ENDIF
IF (VALUE_TYPE = "UINT")
include "Schedule_setDefault_uint.vts"
ENDIF
ENDIF
The options must be set before "Check Syntax", but the scripts are still very useful for regression testing etc.
The documentation is limited. Read everything in the "Docs" folder, examples in the "scripts" folder, and the source code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am new to BACnet VTS scripting.Are there any conditional statements in VTS script?
For example IF,WHILE,DO-WHILE etc.If yes,can I get syntax and examples for each of them.
Thanks in Advance
VTS scripting is not a full language. It has no looping, and no run-time IF.
There is an IF/ENDIF, but it is done during "Check syntax" time, like #if in C.
There are no subroutines, but you can sometimes use "include" to approximate them.
You can do quite complex things with these simple tools. For example, I have written a set of scripts to test various options of the Schedule object. A portion of it looks like this:
The options must be set before "Check Syntax", but the scripts are still very useful for regression testing etc.
The documentation is limited. Read everything in the "Docs" folder, examples in the "scripts" folder, and the source code.