Skip to main content

rs_teststand/
lib.rs

1//! Safe, idiomatic Rust bindings (twin API) for the National
2//! Instruments TestStand™ COM API.
3//!
4//! The wrapper surface maps one-to-one onto the TestStand™ object model:
5//! type names, the object hierarchy, method names, and parameter order follow
6//! the COM API so that anyone who knows TestStand™ can predict the Rust call.
7//!
8//! All COM interop (and all `unsafe`) lives in the `rs-teststand-sys` crate;
9//! this crate forbids `unsafe` entirely.
10//!
11//! ```no_run
12//! use rs_teststand::Engine;
13//!
14//! let engine = Engine::new()?;
15//! println!("major version: {}", engine.major_version()?);
16//! # Ok::<(), rs_teststand::Error>(())
17//! ```
18#![forbid(unsafe_code)]
19
20pub mod adapters;
21mod dispids;
22pub mod engine;
23pub mod enums;
24pub mod error;
25mod error_codes;
26pub mod execution;
27pub mod expression;
28pub mod license;
29pub mod messaging;
30pub mod property;
31pub mod sequence;
32pub mod station;
33pub mod types;
34pub mod users;
35pub mod watchdog;
36pub mod workspace;
37
38pub use adapters::AdapterKeyName;
39pub use engine::Engine;
40pub use enums::{
41    ExecRunState, ExecTermState, OpenWorkspaceFileOptions, PropValType, PropertyValueTypeFlags,
42    SaveWorkspaceFileOptions, SearchDirectoryType, StepGroup,
43};
44pub use error::Error;
45pub use execution::{
46    Execution, ResultList, ResultValue, SequenceContext, StepResult, Thread,
47    ThreadTerminationOption,
48};
49pub use expression::{
50    ArithmeticOperator, Arity, ArrayFunction, AssignmentOperator, BitwiseOperator, ColorConstant,
51    ComparisonOperator, LogicalOperator, NumericFunction, Operator, OperatorClass, OtherConstant,
52    OtherFunction, OtherOperator, PropertyFunction, StringFunction, SwitchingFunction,
53    TimeFunction,
54};
55pub use license::{AcquireLicenseOptions, ApplicationLicense, HeldLicense, LicenseType};
56pub use messaging::{UIMessage, UIMessageCode, pump_thread_messages};
57pub use property::{
58    ArrayDimensions, GetTemplatesFileOptions, PropertyObject, PropertyObjectFile,
59    PropertyObjectType, PropertyOptions, PropertyRepresentation,
60};
61pub use sequence::{
62    BreakpointScope, ConflictHandler, GetSeqFileOptions, ResultRecordingOption, RunMode, Sequence,
63    SequenceFile, Step,
64};
65pub use station::{
66    DebugOptions, ExecutionMask, RunTimeErrorOption, SearchDirectories, SearchDirectory,
67    StationOptions,
68};
69pub use types::{TypeCategory, TypeUsageList};
70pub use users::{User, UserPrivilege, UsersFile};
71pub use watchdog::{
72    DialogInfo, DialogPolicy, Dismissed, Raised, Watchdog, dismiss_blocking_dialog,
73    find_blocking_dialog, surface_blocking_dialog,
74};
75pub use workspace::{WorkspaceFile, WorkspaceObject};