pub enum Action {
Show 33 variants
ReadSignal {
signal: Signal,
wait_for_newest: bool,
},
ReadSignals {
signals: Vec<Signal>,
wait_for_newest: bool,
},
ReadSignalNames,
ReadBias,
SetBias {
voltage: f32,
},
ReadOsci {
signal: Signal,
trigger: Option<TriggerConfig>,
data_to_get: DataToGet,
is_stable: Option<fn(&[f64]) -> bool>,
},
ReadPiezoPosition {
wait_for_newest_data: bool,
},
SetPiezoPosition {
position: Position,
wait_until_finished: bool,
},
MovePiezoRelative {
delta: Position,
},
MoveMotorAxis {
direction: MotorDirection,
steps: u16,
blocking: bool,
},
MoveMotor3D {
displacement: MotorDisplacement,
blocking: bool,
},
MoveMotorClosedLoop {
target: Position3D,
mode: MovementMode,
},
StopMotor,
AutoApproach {
wait_until_finished: bool,
timeout: Duration,
center_freq_shift: bool,
},
Withdraw {
wait_until_finished: bool,
timeout: Duration,
},
SafeReposition {
x_steps: i16,
y_steps: i16,
},
SetZSetpoint {
setpoint: f32,
},
ScanControl {
action: ScanAction,
},
ReadScanStatus,
BiasPulse {
wait_until_done: bool,
pulse_width: Duration,
bias_value_v: f32,
z_controller_hold: u16,
pulse_mode: u16,
},
TipShaper {
config: TipShaperConfig,
wait_until_finished: bool,
timeout: Duration,
},
PulseRetract {
pulse_width: Duration,
pulse_height_v: f32,
},
Wait {
duration: Duration,
},
Store {
key: String,
action: Box<Action>,
},
Retrieve {
key: String,
},
StartTCPLogger,
StopTCPLogger,
GetTCPLoggerStatus,
ConfigureTCPLogger {
channels: Vec<i32>,
oversampling: i32,
},
CheckTipState {
method: TipCheckMethod,
},
CheckTipStability {
method: TipStabilityMethod,
max_duration: Duration,
},
ReadStableSignal {
signal: Signal,
data_points: Option<usize>,
use_new_data: bool,
stability_method: SignalStabilityMethod,
timeout: Duration,
retry_count: Option<u32>,
},
ReachedTargedAmplitude,
}Expand description
Enhanced Action enum representing all possible SPM operations Properly separates motor (step-based) and piezo (continuous) movements
Variants§
ReadSignal
Read single signal value
ReadSignals
Read multiple signal values
ReadSignalNames
Read all available signal names
ReadBias
Read current bias voltage
SetBias
Set bias voltage to specific value
ReadOsci
Fields
trigger: Option<TriggerConfig>ReadPiezoPosition
Read current piezo position (continuous coordinates)
SetPiezoPosition
Set piezo position (absolute)
MovePiezoRelative
Move piezo position (relative to current)
MoveMotorAxis
Move motor along a single axis (discrete positioning)
MoveMotor3D
Move motor in 3D space with single displacement vector
MoveMotorClosedLoop
Move motor using closed-loop to target position
StopMotor
Stop all motor movement
AutoApproach
Perform auto-approach with timeout
Fields
Withdraw
Withdraw tip with timeout
SafeReposition
Safely reposition tip: withdraw → move → approach → stabilize
SetZSetpoint
Set Z-controller setpoint
ScanControl
Control scan operations
Fields
action: ScanActionReadScanStatus
Read scan status
BiasPulse
Execute bias pulse with parameters
Fields
TipShaper
Full tip shaper control with all parameters
PulseRetract
Simple pulse-retract with predefined safe values
Wait
Wait for a specific duration
Store
Store result value with key for later retrieval
Retrieve
Retrieve previously stored value
StartTCPLogger
Start TCP logger (must be configured first)
StopTCPLogger
Stop TCP logger
GetTCPLoggerStatus
Get TCP logger status and configuration
ConfigureTCPLogger
Configure TCP logger channels and oversampling
CheckTipState
Check tip state using specified method (non-invasive)
Fields
method: TipCheckMethodCheckTipStability
Check tip stability using potentially invasive methods WARNING: This action may damage the tip through bias sweeps or extended testing
ReadStableSignal
Get a stable signal value using TCP logger data and stability analysis
Fields
stability_method: SignalStabilityMethodReachedTargedAmplitude
Check if oscillation amplitude is reached
Implementations§
Source§impl Action
impl Action
Sourcepub fn is_positioning_action(&self) -> bool
pub fn is_positioning_action(&self) -> bool
Check if this is a positioning action
Sourcepub fn is_read_action(&self) -> bool
pub fn is_read_action(&self) -> bool
Check if this is a read-only action
Sourcepub fn is_control_action(&self) -> bool
pub fn is_control_action(&self) -> bool
Check if this is a control action
Sourcepub fn modifies_bias(&self) -> bool
pub fn modifies_bias(&self) -> bool
Check if this action modifies bias voltage
Sourcepub fn involves_motor(&self) -> bool
pub fn involves_motor(&self) -> bool
Check if this action involves motor movement
Sourcepub fn involves_piezo(&self) -> bool
pub fn involves_piezo(&self) -> bool
Check if this action involves piezo movement
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description of the action