Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 2.04 KB

basic_examples.rst

File metadata and controls

72 lines (56 loc) · 2.04 KB

Basic Examples

Writing a sequence

A Python real-time sequence is a Python function decorated with the niveristand.nivs_rt_sequence decorator. For example, the following sequence calls a function and checks the result.

../examples/basic_examples.py

The function also takes in some parameters. You must define parameters using the niveristand.NivsParam decorator.

../examples/basic_examples.py

You can now run the test just like any other Python function. You can run it non-deterministically, as in the following example:

../examples/basic_examples.py

Or, you can run the test deterministically on the VeriStand engine connected to your system.

../examples/basic_examples.py

Combining the legacy API with real-time sequences

To create a fully-automated test environment, you can mix the api_reference/legacy with Python real-time sequences.

../examples/legacy_mix.py

Array operations example

../examples/basic_examples.py

Measuring elapsed time example

../examples/basic_examples.py

State machine

../examples/basic_examples.py