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, Limits, ResultError, ResultList, ResultValue, SequenceContext, StepResult, Thread,
47    ThreadTerminationOption,
48};
49pub use expression::{
50    ArithmeticOperator, Arity, ArrayFunction, AssignmentOperator, BitwiseOperator, ColorConstant,
51    ComparisonOperator, DecimalPointLocalizationOption, EvaluationOptions, Expression,
52    ExpressionError, LogicalOperator, NumericFunction, Operator, OperatorClass, OtherConstant,
53    OtherFunction, OtherOperator, PropertyFunction, StringFunction, SwitchingFunction,
54    TimeFunction,
55};
56pub use license::{AcquireLicenseOptions, ApplicationLicense, HeldLicense, LicenseType};
57pub use messaging::{UIMessage, UIMessageCode, pump_thread_messages};
58pub use property::{
59    ArrayDimensions, GetTemplatesFileOptions, PropertyObject, PropertyObjectFile,
60    PropertyObjectType, PropertyOptions, PropertyRepresentation, PropertyType,
61};
62pub use sequence::{
63    BreakpointScope, ConflictHandler, GetSeqFileOptions, ResultRecordingOption, RunMode, Sequence,
64    SequenceFile, Step,
65};
66pub use station::{
67    DebugOptions, ExecutionMask, RunTimeErrorOption, SearchDirectories, SearchDirectory,
68    StationOptions,
69};
70pub use types::{TypeCategory, TypeUsageList};
71pub use users::{User, UserPrivilege, UsersFile};
72pub use watchdog::{
73    DialogInfo, DialogPolicy, Dismissed, Raised, Watchdog, dismiss_blocking_dialog,
74    find_blocking_dialog, surface_blocking_dialog,
75};
76pub use workspace::{WorkspaceFile, WorkspaceObject};