- Inherits
:qml
Component
- Enumerations
:cpp
PullMode
, :cppType
, :cppValue
- Properties
:cpp
ioid
, :cppport
, :cpppullMode
, :cpptype
, :cppvalue
A PinProbe component represents an IO pin on the launchpad probe board. It can be used to physically interface Qst to a Device Under Test (DUT) and stimulate/analyse digital hardware signals.
Each PinProbe item can be configured either as input or output. Additional pull-up or pull-down resistors may be activated for inputs. The output state is set by writing to the output
property and events on the probe wire can be observed by attaching a signal handler to the valueChanged()
signal.
Example:
import qst 1.0
// Assuming a DUT with an LED and a button and two wires of a
// launchpad probe board attached.
// On a falling edge of the button IO, the LED shall be turned on.
Testcase {
name: "test-app"
property string port: "ttyACM3"
PinProbe {
id: button
port: test.port
type: PinProbe.Write
value: PinProbe.High
}
PinProbe {
id: led
port: test.port
type: PinProbe.Read
onValueChanged: {
Qst.info("The LED value is now " + led.value);
}
}
function run() {
Qst.wait(50);
Qst.compare(led.value, PinProbe.Low, "LED should be off but is on");
// Stimulate button press
button.value = PinProbe.Low;
Qst.wait(5);
Qst.compare(led.value, PinProbe.High, "LED should be on but is off");
}
}
PinProbe currently only emits the :cppvalueChanged()
signal. All other properties are assumed to be constant during application life time.